/* =============================================================================
   STYLES POUR L'AFFICHAGE DE LA LISTE DES PORTÉES
   ============================================================================= */

/* Conteneur principal de la grille de portées */
.gestion-elevage-portees-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Carte individuelle de portée */
.portee-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.portee-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Image de la portée */
.portee-card-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.portee-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.3));
}

/* Badge de race sur l'image */
.portee-race-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(152, 70, 70, 0.95);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Contenu de la carte */
.portee-card-content {
    padding: 20px;
}

.portee-card-title {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-family: 'Georgia', serif;
}

/* Informations parents */
.portee-card-parents {
    margin-bottom: 15px;
}

.portee-card-parents p {
    margin: 5px 0;
    font-size: 14px;
    color: #555;
}

/* Date de naissance */
.portee-card-date {
    margin-bottom: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.portee-card-date p {
    margin: 5px 0;
    font-size: 14px;
    color: #555;
}

.portee-card-age {
    color: #984646;
    font-weight: 600;
}

/* Statistiques (mâles/femelles) */
.portee-card-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-icon {
    font-size: 20px;
    color: #984646;
}

.stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Statuts des chiots */
.portee-card-statuts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.statut-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.statut-badge.statut-disponible {
    background: #e8f5e9;
    color: #2e7d32;
}

.statut-badge.statut-reserve {
    background: #fff3e0;
    color: #e65100;
}

.statut-badge.statut-adopte {
    background: #e3f2fd;
    color: #1565c0;
}

.statut-badge.statut-elevage {
    background: #f3e5f5;
    color: #6a1b9a;
}

/* Bouton pour voir les chiots */
.portee-card-button {
    display: block;
    width: 100%;
    padding: 10px 15px;
    background: #984646;
    color: #fff;
    text-align: center;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.portee-card-button:hover {
    background: #7a3535;
}

/* Message quand aucune portée */
.no-portees {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}

/* Loader pendant le chargement AJAX */
.portees-loader {
    text-align: center;
    padding: 60px 20px;
}

.portees-loader .spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #984646;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Bouton retour à la liste des portées */
.portee-back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #fff;
    color: #984646;
    border: 2px solid #984646;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.portee-back-button:hover {
    background: #984646;
    color: #fff;
    transform: translateX(-5px);
}

.portee-back-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(152, 70, 70, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .gestion-elevage-portees-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }
    
    .portee-card-image {
        height: 200px;
    }
    
    .portee-card-content {
        padding: 15px;
    }
    
    .portee-card-title {
        font-size: 18px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .gestion-elevage-portees-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
