.video-grid {
    max-width: 56.25rem; /* 900px */
    width: 100%;
    margin: 0 auto;
    display: block; /* 🛑 Utiliser display: block pour le mode multi-colonnes */
    gap: 0.9375rem; /* 15px */
    position: relative;

    /* 🛑 DÉFAUT MOBILE : 1 colonne */
    column-count: 3;
    column-gap: 0.9375rem; /* 15px */
    background-color:  var(--source-color-white-transparent-plus) !important;
    padding: var(--space-md);
    border-radius: var(--space-sm);
    box-shadow: var(--shadow-z2);

}
.video-section-title {
    max-width: 56.25rem; /* 900px */
    margin: var(--space-lg) auto var(--space-md) auto;
    padding-left: 2.1875rem; /* 35px */
    color: var(--color-section-title);
    font-size: 1.2rem;
    text-transform: uppercase;
    position: relative;
    display: flex;
    align-items: center;
}

.video-section-title::before {
    content: "";
    position: absolute;
    left: 0;
    width: 0.9375rem; /* 15px */
    height: 0.9375rem; /* 15px */
    background-color: var(--color-section-title-before);
    border-radius: 50%;
}
/* ---------------------------------------------------- */
/* 2. CARTE VIDÉO : Style général et Survol (Hover) */
/* ---------------------------------------------------- */
.video-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--color-not-white);
    background-color: var(--color-video-card-bg);
    break-inside: avoid; /* Empêche la carte d'être coupée entre deux colonnes */
    margin-bottom: 0.9375rem; /* 15px */
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-z2);
    border: 0.125rem solid var(--source-color-accent-four); /* 2px */
}

.video-card:hover {
    transform: scale(var(--transform-scale-sm-plus));
    box-shadow: var(--shadow-z4),
    0 0 0.3125rem rgba(255, 0, 0, 0.5), /* 5px */
    0 0 0.625rem var(--color-video-card-hover); /* 10px */
}
/* 🛑 SOLUTION : Permet à la carte de s'étendre en hauteur lorsque le synopsis est déplié */
.video-card:has(.video-synopsis-wrapper.is-unfolded) {
    /* Définit la hauteur de la carte à son contenu réel */
    height: auto !important;
    /* Permet à la carte de se positionner au début de la grille pour ne pas pousser les autres */
    align-self: start !important;
}
/* ---------------------------------------------------- */
/* 3. MINIATURE et RATIO 16:9 */
/* ---------------------------------------------------- */
.video-thumbnail-container {
    position: relative;
    padding-top: 56.25%;
    height: 0;
    overflow: hidden;
    flex-shrink: 0;
    background-color: var(--color-video-thumbnail-container-bg);
}

.video-thumbnail-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* ========================================================================= */
/* 3.5. ICÔNE PLAY / OVERLAY (Triangle dans cercle) */
/* ========================================================================= */
.play-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2.8125rem; /* 45px */
    height: 2.8125rem; /* 45px */
    background-color: rgba(255, 0, 0, 0.45); /* Cercle Rouge semi-transparent */
    border-radius: 50%;
    z-index: 10;
    pointer-events: none; /* Important : pour ne pas bloquer les clics sur la carte */
    opacity: 1; /* Opacité par défaut (semi-transparent) */
    transition: opacity 0.3s ease; /* Transition pour l'effet de survol */
}

/* L'ICÔNE TRIANGLE (Ajouté via le pseudo-élément ::before) */
.play-icon-overlay::before {
    content: "\25B6"; /* Unicode du triangle de lecture */
    position: absolute;
    top: 50%;
    left: 55%; /* Décalage pour centrer visuellement le triangle */
    transform: translate(-50%, -50%);
    color: var(--color-not-white); /* Couleur du triangle (Blanc) */
    font-size: 1.25rem; /* 20px */
}

/* EFFET DE SURVOL : L'icône devient plus transparente */
.video-card:hover .play-icon-overlay {

    background-color: rgb(5, 79, 154, 0.45);
}
/* ---------------------------------------------------- */
/* 4. INFORMATIONS et TITRE */
/* ---------------------------------------------------- */
.video-info {
    background-color: var(--color-video-info-bg);
    border-top: none;
    padding: var(--space-xs) var(--space-sm) var(--space-sm) var(--space-sm);
    flex-grow: 1;
    margin-top: -0.0625rem; /* -1px */
}

.video-info h3 {
    margin-top: 0;
    margin-bottom: var(--space-sm);
    line-height: 1.2;
    color: var(--color-video-info-h3);
    font-size: var(--font-size-video-info-h3);
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------------------------------------------------- */
/* 5. BADGES : Style général et Spécifique (Regroupé) */
/* ---------------------------------------------------- */
.video-badges {
    display: flex;
    gap: 0.5rem; /* 8px */
}
.video-badge {
    /* 1. On met le padding à 0 partout pour commencer propre */
    padding: 0 0.3125rem; /* 0 en haut/bas, 5px gauche/droite */

    border-radius: var(--radius-sm);
    background-color: var(--color-not-white);
    color: var(--color-video-badge-text);
    text-transform: uppercase;

    /* 2. RÉDUCTION DE L'ESPACE HAUT/BAS :
       On force la hauteur de ligne à 1 ou moins pour écraser l'espace réservé */
    line-height: 1;

    /* 3. OPTIONNEL : Si line-height ne suffit pas, on fixe une hauteur
       égale à la taille de la police pour un badge ultra-serré */
    height: 1.5rem;

    font-size: var(--font-size-video-badge) !important;
    font-weight: var(--fw-bold);
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Centre le texte parfaitement */
    margin-top: 0 !important;
    border: 0.125rem solid var(--color-video-badge-audio-langue-border); /* 2px */
    z-index: 10;

    /* Pour éviter que le texte ne bouge si tu changes la taille */
    vertical-align: middle;
}
.duration-badge {
    position: absolute;
    bottom: 0.5rem; /* 8px */
    right: 0.5rem; /* 8px */
    background-color: rgba(0, 0, 0, 0.75);
    color: var(--color-video-duration-badge);
    border : 0.0625rem solid var(--color-video-duration-badge-border); /* 1px */
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
}
.video-badge-icon {
    width: 1.875rem; /* 30px */
    height: 1.875rem; /* 30px */
    margin-right: -0.5rem; /* -8px */
    transform: translateX(-0.5625rem); /* -9px */
}
.video-badge-audio-langue {
    background-color: var(--color-video-badge-audio-langue-bg);
}
.video-badge-subtitles {
    background-color: var(--color-video-badge-subtitles-bg);
}
.video-badge-age-restriction {
    background-color: var(--color-video-badge-age-restriction-bg);
}
/* ========================================================================= */
/* 6. SYNOPSIS (MÉCANISME D'EXPANSION IN-PLACE) */
/* ========================================================================= */
/* Conteneur de Troncature (.video-synopsis-wrapper) */
.video-synopsis-wrapper {
    /* ... (Autres styles de troncature) ... */
    max-height: 6.4375rem; /* 103px */
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    position: relative;
    margin-bottom: var(--space-xs, 0.3125rem); /* 5px */
}
/* --- DÉGRADÉ DE MASQUAGE --- */
.video-synopsis-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3.4375rem; /* 55px */
    /* Utilisation de la couleur de fond de .video-info pour cacher le texte */
    background: linear-gradient(to top,
    var(--video-synopsis-gradiant) 0%,
    rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
    z-index: 5;
}
/* État ÉTENDU : Supprime la limite de hauteur (classe appliquée par JS) */
.video-synopsis-wrapper.is-unfolded {
    /* 🛑 NOUVELLE RÈGLE : Utilisation de 'unset' (ou '1000px') et !important */
    max-height: unset !important;
    overflow: visible !important;
}
/* État ÉTENDU : Masque le dégradé */
.video-synopsis-wrapper.is-unfolded::after {
    opacity: 0;
}
/* Styles des paragraphes internes du synopsis */
.video-synopsis-content p,
.video-synopsis-content { /* 🛑 AJOUT DE LA CLASSE video-synopsis-content ICI */
    color: #000000 !important;
    font-size: 1.15rem !important;
    margin: 0;
    padding: 0;
    line-height: 1.2;
}
/* On s'assure que p interne n'a pas de marges résiduelles */
.video-synopsis-content p {
    margin: 0 !important;
    padding: 0 !important;
}
/* ---------------------------------------------------- */
/* BOUTON D'EXPANSION (.video-expand-btn) */
/* ---------------------------------------------------- */
.video-expand-btn {
    display: block;
    width: 100%;
    /* 🛑 Centrage du bouton */
    margin: var(--space-xs) auto var(--space-sm) auto;
    text-align: center; /* Centrage du texte interne */
    padding: 0.25rem 0; /* 4px */
    background-color: transparent;
    color: var(--color-video-read-more-btn);
    border: none;
    cursor: pointer;
    font-size: var(--font-size-video-btn-read-more);
    font-weight: var(--fw-bold);
    text-decoration: none; /* Retrait du soulignement pour un look plus "bouton" */
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}
.video-expand-btn:hover {
    /* Retrait de la transformation pour le centrage, si elle cause des problèmes */
    transform: scale(var(--transform-scale-md));
}
/* Gère l'icône TRIANGLE */
.video-expand-btn::after {
    /* Le style reste le même, mais il est maintenant centré */
    content: "\25BC"; /* Triangle bas */
    display: inline-block;
    margin-left: var(--space-sm);
    font-size: var(--font-size-video-btn-read-more-triangle);
    transition: none;
}
/* Gère l'icône TRIANGLE HAUT (en mode étendu) */
.video-expand-btn.is-collapsed::after {
    content: "\25B2"; /* Triangle haut */
}
/*-------------------------------------------------------------------------*/
/*------------------- RÈGLES MOBILE (@media) ---------------------*/
/*-------------------------------------------------------------------------*/
@media (max-width: 71.25rem) { /* 1140px */
    .video-grid {
        /* On retire grid-template-columns et on utilise column-count */
        column-count: 2;
    }
}
@media (max-width: 48.4375rem) { /* 775px */
    .video-grid {
        /* On retire grid-template-columns et on utilise column-count */
        column-count: 1;
    }
}