/****
    *
    *		@Author [Benoit Hinck]
    *		@Copyright [2007]
    *
    *		@Pagename : classement-style.css 
    *
    *		@Revisions
    *			Le 09/01/2026 : Création
    *
    ****/
    
    
    /* !-- ================= ----------- ================ --! */
    /* !-- ================= Classement ================ --! */
    /* !-- ================= ----------- ================ --! */
    
    /* CONTENEUR PRINCIPAL */
    .classement-container {
        display: flex;
        flex-wrap: wrap;
        gap: 40px;
        justify-content: center;
        padding: 40px 20px;
    }

    /* CARTE PREMIUM */
    .classement-card {
        width: 320px;
        height: 440px;
        border-radius: 28px;
        background: rgba(255,255,255,0.25);
        overflow: hidden;
        position: relative;
        transition: 0.4s ease;
    }

    /* Effet glassmorphism */
    .classement-glass {
        backdrop-filter: blur(18px) saturate(180%);
        -webkit-backdrop-filter: blur(18px) saturate(180%);
        background: rgba(255, 255, 255, 0.45);
        border-radius: 28px;
        height: 100%;
        padding: 30px 25px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* ==================== CONTENEUR ICONES ==================== */
    .classement-icon {
        position: relative;
        width: 130px;
        height: 130px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* ========================== IMAGES ======================== 
            Une seule image, on change la src via JavaScript
       ========================================================== */

    .icon-img {
        width: 130px;
        height: auto;
        object-fit: contain;
        display: block;
        margin: 0;
        padding: 0;
        transition:
            opacity 0.30s ease,
            transform 0.45s cubic-bezier(.25,.8,.25,1),
            filter 0.45s ease;
        will-change: transform, filter, opacity;
    }

    /* ===================== EFFET AU SURVOL ==================== */

    .classement-card:hover .icon-img {
        transform: scale(1.15);
        filter: 
            brightness(1.35) 
            contrast(1.1) 
            drop-shadow(0 0 12px rgba(0,63,134,0.55));
    }
    
    /* =========================== TEXTES ======================== */

    /* TITRES */
    .classement-card h2 {
        font-size: 24px;
        font-weight: 700;
        color: #ffffff;
        letter-spacing: 1px;
        margin-bottom: 12px;
    }

    /* DESCRIPTION */
    .classement-card p {
        font-size: 15px;
        color: #e8e8e8;
        margin-bottom: 25px;
        line-height: 1.4em;
    }

    /* =========================== BOUTONS ======================== */

    .btn-classement {
        background: #003F86;
        color: white;
        padding: 12px 26px;
        border-radius: 50px;
        font-size: 16px;
        text-decoration: none;
        font-weight: 600;
        transition: 0.3s ease;
        box-shadow: 0 6px 16px rgba(0,63,134,0.35);
    }

    /* Hover bouton */
    .btn-classement:hover {
        background: #0056c7;
        box-shadow: 0 8px 22px rgba(0,63,134,0.45);
    }

    /* ================== ANIMATION CARTE ======================= */

    .classement-card:hover {
        transform: scale(1.04) rotate(1.5deg);
        box-shadow: 0 18px 35px rgba(0,0,0,0.28);
    }

    /* ======================== RESPONSIVE ======================= */

    @media (max-width: 768px) {
        .classement-card {
            width: 90%;
            max-width: 360px;
        }
    }

    /* =========================== CARDS INFO ======================== */

    .info-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
        margin-bottom: 1rem;
        margin-top: 1rem;
    }

    /* Version Grand Écran (Desktop) */
    @media (min-width: 992px) {
        .info-grid {
            grid-template-columns: repeat(3, 1fr);  /* Force 3 colonnes exactement */
        }

        /* Optionnel : Centrer la 7ème carte seule sur la dernière ligne */
        .info-card:last-child:nth-child(3n+1) {
            grid-column: 2;                         /* Place la 7ème carte au milieu */
        }
    }

    .info-card {
        background: white;
        padding: 1.5rem;
        border-radius: 12px;
        text-align: center;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        text-decoration: none;
        color: #333;
        border: 1px solid #eee;
    }

    .info-card:hover {
        border-color: #037ffa;
        box-shadow: 0 8px 25px rgba(3, 127, 250, 0.2);
        transform: translateY(-5px);
    }

    .info-card h4 {
        color: #004080;
        font-size: 1.1rem;
        margin: 0;
    }

    .pdf-section {
        align-items: center;
        background: linear-gradient(135deg, #f8f9fa, #e9ecef);
        border-radius: 15px;
        display: flex;
        justify-content: space-between;
        margin-bottom: 2rem;
        padding: 2rem;
    }

    .text-section {
        align-items: center;
        background: linear-gradient(135deg, #f8f9fa, #e9ecef);
        border-radius: 15px;
        display: flex;
        justify-content: space-between;
        margin-bottom: 2rem;
        padding: 1.4rem;
    }

    .btn-pdf {
        background: #e63946;
        color: white;
        padding: 10px 25px;
        border-radius: 8px;
        text-decoration: none;
        font-weight: 600;
        transition: background 0.3s;
    }

    .btn-pdf:hover {
        background: #c12e3a;
    }

	/* Fond sombre derrière la modale */
    .modal-overlay {
        display: none; /* Caché par défaut */
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.6);
        backdrop-filter: blur(5px);
        align-items: center;
        justify-content: center;
    }

    /* Fenêtre de contenu */
    .modal-content {
        background-color: white;
        padding: 2.5rem;
        border-radius: 20px;
        width: 90%;
        max-width: 600px;
        position: relative;
        box-shadow: 0 20px 40px rgba(0,0,0,0.2);
        transform: translateY(-20px);
        transition: all 0.3s ease;
    }

    .modal-overlay.active {
        display: flex;
    }

    /* Bouton fermer */
    .close-modal {
        position: absolute;
        right: 20px;
        top: 15px;
        font-size: 30px;
        cursor: pointer;
        color: #999;
    }

    .close-modal:hover { color: #e63946; }

    .info-card { cursor: pointer; }

    /* Style spécifique pour le contenu de la modale */
    .modal-intro {
        margin-bottom: 20px;
        color: #666;
        font-style: italic;
    }

    /* =============================================================== */
    /* ----------------------- INFO CATEGORIE ------------------------ */
    /* =============================================================== */
    .category-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .category-item {
        display: flex;
        align-items: center;
        background: #f8f9fa;
        padding: 10px 15px;
        border-radius: 10px;
        transition: background 0.2s;
    }

    .category-item:hover {
        background: #f0f2f5;
    }

    /* Style des badges (cercles avec la lettre) */
    .badge {
        width: 35px;
        height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-weight: bold;
        color: white;
        margin-right: 15px;
        flex-shrink: 0; /* Empêche le badge de s'écraser */
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    /* Couleurs différenciées pour faciliter la lecture */
    .badge-male { background-color: #037ffa; }   /* Bleu pour les mâles */
    .badge-ox   { background-color: #6c757d; }   /* Gris pour bœufs */
    .badge-female { background-color: #e63946; } /* Rouge/Rose pour femelles */
    .badge-age  { background-color: #ff9f1c; }   /* Orange pour les jeunes */

    .category-desc {
        font-size: 0.95rem;
        color: #333;
        line-height: 1.3;
    }

    /* =============================================================== */
    /* ---------------------- INFO CONFORMATION ---------------------- */
    /* =============================================================== */
    .conformation-scale {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
    }

    .conf-item {
        display: flex;
        align-items: center;
        padding: 12px 15px;
        border-radius: 8px;
        border-left: 5px solid transparent;
        background: #f9f9f9;

        /* SOLUTION : On force une hauteur minimale identique pour tous */
        box-sizing: border-box;
        min-height: 80px;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .conf-item:hover {
        transform: scale(1.02);
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
        z-index: 1;
    }

    /* Badge de lettre */
    .conf-badge {
        width: 45px;
        height: 45px;
        flex-shrink: 0; /* Empêche le badge de se déformer si le texte est long */
        background: #333;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        font-weight: 900;
        border-radius: 8px;
        margin-right: 20px;
        box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    }

    .conf-content {
        flex: 1;                /* Prend tout l'espace restant */
    }

    .conf-content strong { 
        color: #004080;
        display: block;
        font-size: 1.05rem;
        margin-bottom: 2px;
    }

    .reglement { 
        color: #004080;
        font-weight: italic;
        font-size: 1.05rem;
    }
    
    .conf-content p {
        color: #555;
        font-size: 0.9rem;
        line-height: 1.2;       /* Resserre un peu l'interligne pour le texte sur 2 lignes */
        margin: 0;
    }

    /* Couleurs de l'échelle (Dégradé de qualité) */
    .item-s { border-left-color: #037ffa; background: #eef6ff; }
    .item-e { border-left-color: #2a9d8f; background: #f0faf9; }
    .item-u { border-left-color: #8ab17d; background: #f4f8f2; }
    .item-r { border-left-color: #e9c46a; background: #fffcf2; }
    .item-o { border-left-color: #f4a261; background: #fff7f0; }
    .item-p { border-left-color: #e76f51; background: #fff1ee; }

    /* Boite des sous-classes */
    .sub-classes-box {
        background: #f0f2f5;
        padding: 15px;
        border-radius: 12px;
        text-align: center;
    }

    .sub-classes-flex {
        display: flex;
        justify-content: center;
        gap: 20px;
        margin: 10px 0;
    }

    .tag {
        background: white;
        padding: 2px 8px;
        border-radius: 4px;
        font-weight: bold;
        border: 1px solid #ddd;
    }

    .tag:hover {
        background: #037ffa;
        color: white;
        border-color: #037ffa;
    }

    /* =============================================================== */
    /* --------------------- INFO ENGRAISSEMENT ---------------------- */
    /* =============================================================== */
    .eng-scale {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
    }

    .eng-item {
        display: flex;
        align-items: center;
        padding: 12px 15px;
        border-radius: 8px;
        background: #f9f9f9;
        min-height: 80px; /* Aligné pour le texte sur 2 lignes */
        border-right: 8px solid transparent; /* Petite touche design sur la droite */
    }

    .eng-badge {
        width: 45px;
        height: 45px;
        flex-shrink: 0;
        background: #333;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.4rem;
        font-weight: 800;
        border-radius: 50%; /* Cercle pour changer de la conformation */
        margin-right: 20px;
        box-shadow: 2px 2px 5px rgba(0,0,0,0.05);
    }

    /* Couleurs de progression (Jaune -> Orange -> Rouge) */
    .level-1 { 
        background-color: #fffdf0; /* Jaune très pâle */
        border-right-color: #fff3b0;
    }

    .level-2 { 
        background-color: #fff5ed; /* Pêche très pâle */
        border-right-color: #fec89a; 
    }
    
    .level-3 { 
        background-color: #fff1eb; /* Orange très pâle */
        border-right-color: #f9844a; 
    }

    .level-4 { 
        background-color: #fff0f3; /* Rose/Rouge très pâle */
        border-right-color: #d81159; 
    }

    .level-5 {
        background-color: #ffeef0; /* Rouge très pâle */
        background-color: #fcebed; /* Rouge foncé très pâle */
        border-right-color: #8d0801; 
    }

    .eng-content strong { color: #004080; display: block; }
    .eng-content p { margin: 0; font-size: 0.85rem; color: #555; }


    /* =============================================================== */
    /* --------------------- FORME PRESENTATION ---------------------- */
    /* =============================================================== */
    .legend-box {
        background: #f8f9fa;
        border-radius: 8px;
        display: flex;
        font-size: 0.85rem;
        gap: 15px;
        margin-bottom: 15px;
        padding: 10px;
    }

    .legend-item { 
        align-items: center;
        display: flex;
        gap: 5px;
    }

    /* Symboles colorés */
    .symb {
        align-items: center;
        border-radius: 4px;
        color: white;
        display: inline-flex;
        font-weight: bold;
        height: 20px;
        justify-content: center;
        width: 20px;
        font-size: 0.75rem;
    }

    .minus { background-color: #e63946; } /* Rouge pour "enlevé" */
    .plus { background-color: #2a9d8f; }  /* Vert pour "maintenu" */

    /* Conteneur pour scroll horizontal sur mobile */
    .table-container {
        border: 1px solid #ddd;
        border-radius: 8px;
        margin: 15px 0;
        overflow-x: auto;
        width: 100%;
    }

    /* Style du tableau */
    .presentation-table {
        border-collapse: collapse;
        font-size: 0.85rem;
        min-width: 500px; /* Force la lisibilité sur petit écran */
        text-align: center;
        width: 100%;
    }

    .presentation-table th {
        background-color: #004080;
        color: white;
        font-weight: 500;
        padding: 10px 5px;
    }

    .presentation-table td {
        border-bottom: 1px solid #eee;
        font-size: 0.95rem;
        padding: 10px 5px;
    }

    .presentation-table tr:nth-child(even) {
        background-color: #fcfcfc;
    }

    .presentation-table tr:hover {
        background-color: #f1f5f9;
    }

    .presentation-table td:first-child {
        font-weight: 600;
        padding-left: 15px;
        text-align: left;
    }

    .presentation-table td:last-child {
        font-weight: 600;
        padding-right: 15px;
        text-align: right;
    }


    /* =============================================================== */
    /* ----------------------- INDICE DU TYPE ------------------------ */
    /* =============================================================== */
    .formula-explanation {
        background: #f0f4f8;
        padding: 15px;
        border-radius: 10px;
        margin-bottom: 20px;
        border: 1px dashed #004080;
    }

    .formula-explanation ul {
        list-style: none;
        padding: 0;
        margin: 10px 0 0 0;
    }

    .formula-explanation li {
        margin-bottom: 5px;
        font-size: 0.9rem;
    }

    .formula-explanation strong {
        color: #004080;
    }
