/* ============================================================================
   Frise « Tour de contrôle »
   ============================================================================ */

.agg-frise {
    --bg:           #0f1621;
    --bg-ligne:     #17202f;
    --bg-ligne-alt: #141c2a;
    --border:       #2c3a4d;
    --text:         #e6ecf5;
    --text-muted:   #8b9cb3;

    --ton-positif:  #2ecc71;
    --ton-negatif:  #e74c3c;
    --ton-neutre:   #7f8c8d;

    background: var(--bg);
    border-radius: 8px;
    padding: 16px;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
    width: 100%;
}

.agg-frise * { box-sizing: border-box; }

/* ---------------------------------------------------------------------------
   En-tête
   --------------------------------------------------------------------------- */

.agg-frise__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.agg-frise__titre {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.agg-frise__legende {
    display: flex;
    gap: 14px;
    font-size: 11px;
    color: var(--text-muted);
}

.agg-frise__legende span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.agg-legende-point {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.agg-legende-point--positif { background: var(--ton-positif); }
.agg-legende-point--negatif { background: var(--ton-negatif); }
.agg-legende-point--neutre  { background: var(--ton-neutre); }

/* ---------------------------------------------------------------------------
   Corps (les 12 lignes)
   --------------------------------------------------------------------------- */

.agg-frise__corps {
    position: relative;
    min-height: 300px;
}

.agg-frise__loader {
    text-align: center;
    padding: 60px;
}

.agg-ligne {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: center;
    height: 36px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.agg-ligne:nth-child(even) {
    background: var(--bg-ligne-alt);
}

.agg-ligne__label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-left: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agg-ligne__label small {
    font-weight: 400;
    opacity: 0.6;
    margin-left: 4px;
}

.agg-ligne__piste {
    position: relative;
    height: 100%;
    border-left: 1px solid var(--border);
    overflow: hidden;
}

/* Grille verticale (heures) sur la piste */
.agg-ligne__piste::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, var(--border) 1px, transparent 1px);
    background-size: calc(100% / 24) 100%;
    opacity: 0.35;
    pointer-events: none;
}

/* ---------------------------------------------------------------------------
   Points et vignettes
   --------------------------------------------------------------------------- */

.agg-point,
.agg-vignette {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.3s ease;
}

.agg-point {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

.agg-point--positif { background: var(--ton-positif); }
.agg-point--negatif { background: var(--ton-negatif); }
.agg-point--neutre  { background: var(--ton-neutre); opacity: 0.7; }

/* Point dont l'intensité est élevée (score absolu > 50) : plus gros */
.agg-point--fort {
    width: 11px;
    height: 11px;
    box-shadow: 0 0 8px currentColor;
}

.agg-point--positif.agg-point--fort { color: var(--ton-positif); }
.agg-point--negatif.agg-point--fort { color: var(--ton-negatif); }

.agg-point:hover {
    transform: translate(-50%, -50%) scale(1.8);
    z-index: 10;
}

/* Vignettes : remplacent un point pendant X secondes */
.agg-vignette {
    width: 60px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: #1a2433;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    opacity: 0;
    animation: agg-vignette-in 0.4s ease forwards;
}

.agg-vignette.agg-vignette--out {
    animation: agg-vignette-out 0.4s ease forwards;
}

.agg-vignette img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.agg-vignette__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c3a4d, #1a2433);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

.agg-vignette__ton {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid var(--bg);
}

.agg-vignette__ton--positif { background: var(--ton-positif); }
.agg-vignette__ton--negatif { background: var(--ton-negatif); }
.agg-vignette__ton--neutre  { background: var(--ton-neutre); }

.agg-vignette:hover {
    transform: translate(-50%, -50%) scale(1.15);
    border-color: rgba(255, 255, 255, 0.5);
}

@keyframes agg-vignette-in {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes agg-vignette-out {
    from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    to   { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
}

/* ---------------------------------------------------------------------------
   Infobulle
   --------------------------------------------------------------------------- */

.agg-frise__infobulle {
    position: fixed;
    z-index: 100000;
    background: #1a2433;
    color: var(--text);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 12px;
    line-height: 1.4;
    max-width: 320px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    border: 1px solid var(--border);
}

.agg-frise__infobulle strong {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: #fff;
}

.agg-frise__infobulle em {
    color: var(--text-muted);
    font-style: normal;
    font-size: 11px;
}

/* ---------------------------------------------------------------------------
   Axe (heures)
   --------------------------------------------------------------------------- */

.agg-frise__axe {
    display: grid;
    grid-template-columns: 110px 1fr;
    margin-top: 8px;
    font-size: 10px;
    color: var(--text-muted);
}

.agg-frise__axe-track {
    position: relative;
    height: 20px;
    border-left: 1px solid var(--border);
}

.agg-frise__axe-label {
    position: absolute;
    bottom: 0;
    transform: translateX(-50%);
    white-space: nowrap;
}

.agg-frise__curseur {
    position: absolute;
    top: -6px;
    bottom: -6px;
    width: 2px;
    background: #ff6b6b;
    box-shadow: 0 0 6px #ff6b6b;
}

.agg-frise__curseur::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #ff6b6b;
    border-radius: 50%;
}

/* ---------------------------------------------------------------------------
   Modal
   --------------------------------------------------------------------------- */

.agg-frise-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agg-frise-modal[hidden] { display: none; }

.agg-frise-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.agg-frise-modal__panel {
    position: relative;
    background: #1a2433;
    color: #e6ecf5;
    max-width: 780px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.agg-frise-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    color: #8b9cb3;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
}

.agg-frise-modal__close:hover {
    background: #2c3a4d;
    color: #fff;
}

.agg-frise-modal__content {
    font-size: 14px;
    line-height: 1.6;
}

.agg-frise-modal__content img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 16px;
}

.agg-frise-modal__content h2 {
    font-size: 22px;
    line-height: 1.3;
    margin: 0 0 12px;
    color: #fff;
}

.agg-frise-modal__content .agg-modal__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #2c3a4d;
    border-bottom: 1px solid #2c3a4d;
    margin-bottom: 16px;
    font-size: 13px;
    color: #8b9cb3;
}

.agg-frise-modal__content .agg-modal__meta strong {
    color: #e6ecf5;
}

.agg-frise-modal__content .agg-modal__cta {
    display: inline-block;
    background: #e6ecf5;
    color: #0f1621;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
}

.agg-frise-modal__content .agg-modal__cta:hover {
    opacity: 0.85;
    color: #0f1621;
}

@media (max-width: 700px) {
    .agg-ligne { grid-template-columns: 70px 1fr; }
    .agg-ligne__label { font-size: 10px; }
    .agg-frise__axe { grid-template-columns: 70px 1fr; }
}

/* ---------------------------------------------------------------------------
   Frise : largeur naturelle dans son conteneur
   --------------------------------------------------------------------------- */

.agg-frise {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    padding: 16px !important;
    border-radius: 8px !important;
}

/* Le corps et l'axe restent dans la largeur du parent */
.agg-frise__corps,
.agg-frise__scroll,
.agg-frise__inner,
.agg-frise__axe {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.agg-ligne,
.agg-frise__axe {
    min-width: 0 !important;
}

/* ---------------------------------------------------------------------------
   Repères extrêmes : 0h aligné à gauche, 24h aligné à droite
   --------------------------------------------------------------------------- */

.agg-frise__axe-label:first-child {
    transform: translateX(0) !important;
}

.agg-frise__axe-label:last-child {
    transform: translateX(-100%) !important;
}

/* ---------------------------------------------------------------------------
   FIX modal frise : croix visible + fond panel
   --------------------------------------------------------------------------- */

.agg-frise-modal__panel {
    background: #1a2433 !important;
    color: #e6ecf5 !important;
    z-index: 2;
}

.agg-frise-modal__backdrop {
    z-index: 1;
}

.agg-frise-modal__close {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    background: rgba(0, 0, 0, 0.7) !important;
    color: #fff !important;
    border: none !important;
    font-size: 24px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 100 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
}

.agg-frise-modal__close:hover {
    background: rgba(0, 0, 0, 0.95) !important;
}

/* ---------------------------------------------------------------------------
   FINAL — Croix du modal frise ultra-visible
   --------------------------------------------------------------------------- */

.agg-frise-modal__close {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    background: #ffffff !important;
    color: #0f1621 !important;
    border: 2px solid rgba(0, 0, 0, 0.15) !important;
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    z-index: 999 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7) !important;
    transition: transform 0.15s ease !important;
}

.agg-frise-modal__close:hover {
    transform: scale(1.1) !important;
    background: #e6ecf5 !important;
}

/* ---------------------------------------------------------------------------
   Sélecteur de jour (Aujourd'hui / Hier / Avant-hier)
   --------------------------------------------------------------------------- */

.agg-frise__jours {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.agg-frise__jour-btn {
    background: transparent;
    color: #8b9cb3;
    border: 1px solid #2c3a4d;
    border-radius: 14px;
    padding: 5px 14px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.agg-frise__jour-btn:hover {
    background: #1a2433;
    color: #e6ecf5;
}

.agg-frise__jour-btn.is-active {
    background: #e6ecf5;
    color: #0f1621;
    border-color: #e6ecf5;
}

/* ---------------------------------------------------------------------------
   FIX infobulle frise — couleurs en dur (car l'élément est dans <body>,
   hors du scope .agg-frise où sont définies les variables)
   --------------------------------------------------------------------------- */

.agg-frise__infobulle {
    background: #1a2433 !important;
    color: #e6ecf5 !important;
    border: 1px solid #2c3a4d !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85) !important;
    opacity: 1 !important;
    z-index: 999999 !important;
}

.agg-frise__infobulle strong {
    color: #ffffff !important;
}

.agg-frise__infobulle em {
    color: #8b9cb3 !important;
}
/* ---------------------------------------------------------------------------
   Vignettes : alignement adapté près des bords 0h/24h
   --------------------------------------------------------------------------- */

/* Cas par défaut : centrée sur sa position */
.agg-vignette {
    transform-origin: center center;
}

/* Trop à gauche (< 5%) : on aligne le bord gauche de la vignette sur la position */
.agg-vignette.agg-vignette--left {
    transform: translate(0, -50%) scale(1);
}

.agg-vignette--left:hover {
    transform: translate(0, -50%) scale(1.15) !important;
}

/* Trop à droite (> 95%) : on aligne le bord droit */
.agg-vignette.agg-vignette--right {
    transform: translate(-100%, -50%) scale(1);
}

.agg-vignette--right:hover {
    transform: translate(-100%, -50%) scale(1.15) !important;
}

/* Animations cohérentes */
@keyframes agg-vignette-in-left {
    from { opacity: 0; transform: translate(0, -50%) scale(0.6); }
    to   { opacity: 1; transform: translate(0, -50%) scale(1); }
}

@keyframes agg-vignette-in-right {
    from { opacity: 0; transform: translate(-100%, -50%) scale(0.6); }
    to   { opacity: 1; transform: translate(-100%, -50%) scale(1); }
}

.agg-vignette--left  { animation: agg-vignette-in-left 0.4s ease forwards !important; }
.agg-vignette--right { animation: agg-vignette-in-right 0.4s ease forwards !important; }

/* ---------------------------------------------------------------------------
   Mobile : pas de padding latéral sur la frise
   --------------------------------------------------------------------------- */

@media (max-width: 700px) {
    .agg-frise {
        padding-left: 0 !important;
        padding-right: 0 !important;
        border-radius: 0 !important;
    }
    .agg-frise__header,
    .agg-frise__corps,
    .agg-frise__axe {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .agg-frise__scroll {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* ============================================================================
   Couleurs des poles (points + libelles)
   ============================================================================ */

/* Libelles (texte colore) */
.agg-ligne__label--politique     { color: #f5b800 !important; }
.agg-ligne__label--societe       { color: #6cb4ee !important; }
.agg-ligne__label--international { color: #f0f0f0 !important; }
.agg-ligne__label--economie      { color: #2ecc71 !important; }
.agg-ligne__label--culture       { color: #b06bca !important; }
.agg-ligne__label--sport         { color: #e67e22 !important; }
.agg-ligne__label--technologie   { color: #48c9b0 !important; }
.agg-ligne__label--environnement { color: #7bd47b !important; }
.agg-ligne__label--sante         { color: #e84393 !important; }
.agg-ligne__label--justice       { color: #95a5a6 !important; }
.agg-ligne__label--medias        { color: #f1c40f !important; }
.agg-ligne__label--faits-divers  { color: #e74c3c !important; }

/* Points (cercles pleins de la couleur du pole) */
.agg-point--politique     { background: #f5b800 !important; border-color: #f5b800 !important; }
.agg-point--societe       { background: #6cb4ee !important; border-color: #6cb4ee !important; }
.agg-point--international { background: #f0f0f0 !important; border-color: #f0f0f0 !important; }
.agg-point--economie      { background: #2ecc71 !important; border-color: #2ecc71 !important; }
.agg-point--culture       { background: #b06bca !important; border-color: #b06bca !important; }
.agg-point--sport         { background: #e67e22 !important; border-color: #e67e22 !important; }
.agg-point--technologie   { background: #48c9b0 !important; border-color: #48c9b0 !important; }
.agg-point--environnement { background: #7bd47b !important; border-color: #7bd47b !important; }
.agg-point--sante         { background: #e84393 !important; border-color: #e84393 !important; }
.agg-point--justice       { background: #95a5a6 !important; border-color: #95a5a6 !important; }
.agg-point--medias        { background: #f1c40f !important; border-color: #f1c40f !important; }
.agg-point--faits-divers  { background: #e74c3c !important; border-color: #e74c3c !important; }

/* ============================================================================
   Bouton Lecteur (header)
   ============================================================================ */
.agg-lecteur-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1a2433;
    color: #e6ecf5;
    border: 1px solid #2c3a4d;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.agg-lecteur-btn:hover {
    background: #243347;
    border-color: #38bdf8;
    color: #38bdf8;
}
.agg-lecteur-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}
.agg-lecteur-btn--inline {
    padding: 6px 12px;
    font-size: 12px;
}

@media (max-width: 600px) {
    .agg-lecteur-btn--inline .agg-lecteur-btn__label { display: none; }
    .agg-lecteur-btn--inline { padding: 8px; }
}

/* ============================================================================
   Modal frise : extrait et CTA
   ============================================================================ */
.agg-frise-modal__image {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 16px;
    display: block;
}
.agg-frise-modal__title {
    font-size: 22px;
    line-height: 1.3;
    margin: 0 0 12px;
    color: #fff;
}
.agg-frise-modal__extrait {
    font-size: 14px;
    line-height: 1.55;
    color: #b8c4d6;
    margin: 0 0 16px;
}
.agg-frise-modal__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #2c3a4d;
    border-bottom: 1px solid #2c3a4d;
    margin-bottom: 16px;
    font-size: 13px;
    color: #8b9cb3;
}
.agg-frise-modal__meta strong {
    color: #e6ecf5;
}
.agg-frise-modal__ad {
    background: #0f1621;
    border: 1px dashed #2c3a4d;
    border-radius: 6px;
    padding: 16px;
    text-align: center;
    color: #8b9cb3;
    font-size: 12px;
    margin: 16px 0;
}
.agg-frise-modal__cta {
    display: inline-block;
    background: #38bdf8;
    color: #070b12;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
}
.agg-frise-modal__cta:hover {
    background: #0ea5e9;
    color: #070b12;
}

/* ============================================================================
   Lecteur : overlay plein ecran
   ============================================================================ */
.agg-lecteur {
    position: fixed;
    inset: 0;
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.agg-lecteur__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
}
.agg-lecteur__panel {
    position: relative;
    background: #0f1621;
    color: #e6ecf5;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    box-sizing: border-box;
    overflow: hidden;
}
.agg-lecteur__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 8px;
    flex-shrink: 0;
}
.agg-lecteur__info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: baseline;
}
.agg-lecteur__titre-lecteur {
    font-size: 15px;
    font-weight: 700;
    color: #e6ecf5;
}
.agg-lecteur__compteur {
    font-size: 12px;
    color: #8b9cb3;
}
.agg-lecteur__close {
    background: rgba(255, 255, 255, 0.08);
    color: #e6ecf5;
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}
.agg-lecteur__progress-global {
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 2px;
    margin-bottom: 8px;
}
.agg-lecteur__progress-global-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #38bdf8, #0ea5e9);
}
@keyframes agg-lecteur-progress {
    from { width: 0%; }
    to   { width: 100%; }
}

/* Grille 4 x 3 */
.agg-lecteur__grille {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 10px;
    min-height: 0;
    overflow: hidden;
}
@media (max-width: 1200px) {
    .agg-lecteur__grille {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(4, 1fr);
    }
}
@media (max-width: 800px) {
    .agg-lecteur__grille {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(6, 1fr);
        gap: 8px;
    }
}

/* ============================================================================
   Lecteur - carte article (futuriste, sans barre laterale)
   ============================================================================ */

.agg-lecteur__carte {
    position: relative;
    background:
        linear-gradient(135deg, #0e1620 0%, #16212f 100%);
    border: 1px solid rgba(56, 189, 248, 0.12);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    min-height: 0;
    padding: 12px 14px 54px 14px;
    box-sizing: border-box;
    display: block;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

/* Lueur cyan dans le coin superieur droit */
.agg-lecteur__carte::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 75%;
    height: 75%;
    background: radial-gradient(circle at top right,
        rgba(56, 189, 248, 0.14), transparent 65%);
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s ease;
    z-index: 0;
}

/* Fondu bas pour absorber le texte qui deborde */
.agg-lecteur__carte::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 76px;
    background: linear-gradient(180deg,
        rgba(14, 22, 32, 0) 0%,
        rgba(14, 22, 32, 0.85) 40%,
        #0f1a26 100%);
    pointer-events: none;
    z-index: 1;
}

.agg-lecteur__carte:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.42);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(56, 189, 248, 0.20),
        0 0 28px rgba(56, 189, 248, 0.12);
}

.agg-lecteur__carte:hover::before { opacity: 1; }

/* ---------------------------------------------------------------------------
   Vignette style "ecran TV futuriste"
   --------------------------------------------------------------------------- */

.agg-lecteur__img {
    float: left;
    width: 45%;
    max-width: 140px;
    aspect-ratio: 16 / 10;
    margin: 2px 12px 8px 0;
    border-radius: 4px;
    overflow: hidden;
    background: #060d14;
    position: relative;
    box-sizing: border-box;
    /* Coins coupes (clip-path) : effet HUD moderne */
    clip-path: polygon(
        10px 0, 100% 0,
        100% calc(100% - 10px),
        calc(100% - 10px) 100%,
        0 100%, 0 10px
    );
    /* Contour lumineux */
    box-shadow:
        0 0 0 1px rgba(56, 189, 248, 0.35),
        0 0 12px rgba(56, 189, 248, 0.20) inset;
    transition: box-shadow .3s ease, transform .3s ease;
}

/* Ligne de scan subtile */
.agg-lecteur__img::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(56, 189, 248, 0.06) 0px,
        rgba(56, 189, 248, 0.06) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 2;
}

/* Coins lumineux HUD dans les 4 angles */
.agg-lecteur__img::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    background:
        /* Coin haut gauche */
        linear-gradient(to right, #38bdf8 0, #38bdf8 100%) top left / 14px 1.5px no-repeat,
        linear-gradient(to bottom, #38bdf8 0, #38bdf8 100%) top left / 1.5px 14px no-repeat,
        /* Coin haut droit */
        linear-gradient(to left, #38bdf8 0, #38bdf8 100%) top right / 14px 1.5px no-repeat,
        linear-gradient(to bottom, #38bdf8 0, #38bdf8 100%) top right / 1.5px 14px no-repeat,
        /* Coin bas gauche */
        linear-gradient(to right, #38bdf8 0, #38bdf8 100%) bottom left / 14px 1.5px no-repeat,
        linear-gradient(to top, #38bdf8 0, #38bdf8 100%) bottom left / 1.5px 14px no-repeat,
        /* Coin bas droit */
        linear-gradient(to left, #38bdf8 0, #38bdf8 100%) bottom right / 14px 1.5px no-repeat,
        linear-gradient(to top, #38bdf8 0, #38bdf8 100%) bottom right / 1.5px 14px no-repeat;
    opacity: 0.9;
}

.agg-lecteur__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease, filter .3s ease;
    filter: saturate(1.05) contrast(1.03);
}

.agg-lecteur__carte:hover .agg-lecteur__img {
    box-shadow:
        0 0 0 1px rgba(56, 189, 248, 0.75),
        0 0 20px rgba(56, 189, 248, 0.40) inset,
        0 0 24px rgba(56, 189, 248, 0.30);
    transform: scale(1.02);
}

.agg-lecteur__carte:hover .agg-lecteur__img img {
    transform: scale(1.06);
}

/* ---------------------------------------------------------------------------
   Titre + extrait
   --------------------------------------------------------------------------- */

.agg-lecteur__titre {
    font-size: 17.5px;
    font-weight: 700;
    line-height: 1.25;
    color: #eaf2ff;
    margin: 0 0 4px;
    letter-spacing: 0.1px;
}

/* Paragraphe en blanc pour une meilleure lisibilite */
.agg-lecteur__extrait {
    font-size: 15px;
    line-height: 1.38;
    color: #ffffff;
    margin: 0;
}

/* ---------------------------------------------------------------------------
   Meta (source / heure) : en bas
   --------------------------------------------------------------------------- */

/* Footer : source + heure + bouton sur la meme ligne */
.agg-lecteur__footer {
    position: absolute;
    bottom: 10px;
    left: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
}

/* Nom du journal : bouton ambre/dore (contraste avec le cyan) */
.agg-lecteur__source {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #1a0f00;
    padding: 5px 12px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 35%;
    box-shadow:
        0 0 0 1px rgba(245, 158, 11, 0.45),
        0 2px 10px rgba(245, 158, 11, 0.30);
    clip-path: polygon(
        6px 0, 100% 0,
        100% calc(100% - 6px),
        calc(100% - 6px) 100%,
        0 100%, 0 6px
    );
}

/* Heure : cyan, inchangee */
.agg-lecteur__heure {
    color: #38bdf8;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 11px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* CTA : compact, pousse a droite */
.agg-lecteur__cta {
    margin-left: auto;
    padding: 5px 14px;
    background:
        linear-gradient(90deg,
            rgba(56, 189, 248, 0.14),
            rgba(14, 165, 233, 0.14));
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #7dd3fc;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 10.5px;
    text-align: center;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: all .2s ease;
    flex-shrink: 0;
    clip-path: polygon(
        6px 0, 100% 0,
        100% calc(100% - 6px),
        calc(100% - 6px) 100%,
        0 100%, 0 6px
    );
}

.agg-lecteur__carte:hover .agg-lecteur__cta {
    background: linear-gradient(90deg, #38bdf8, #0ea5e9);
    color: #070b12;
    border-color: #38bdf8;
    box-shadow:
        0 0 0 1px rgba(56, 189, 248, 0.6),
        0 4px 18px rgba(56, 189, 248, 0.45);
}

/* Plus de pub dans les cartes */
.agg-lecteur__ad { display: none !important; }

/* ============================================================================
   Boutons de controle du lecteur - style futuriste
   ============================================================================ */

.agg-lecteur__barre {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding-top: 14px;
    flex-shrink: 0;
    position: relative;
}

/* Ligne lumineuse au-dessus de la barre */
.agg-lecteur__barre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent, rgba(56, 189, 248, 0.5), transparent);
}

.agg-lecteur__btn {
    /* Forme hexagonale moderne */
    clip-path: polygon(
        30% 0, 70% 0, 100% 30%, 100% 70%,
        70% 100%, 30% 100%, 0 70%, 0 30%
    );
    background:
        linear-gradient(135deg,
            rgba(56, 189, 248, 0.14),
            rgba(14, 165, 233, 0.08));
    color: #7dd3fc;
    border: none;
    width: 52px;
    height: 52px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: transform .2s ease, background .2s ease, color .2s ease;
    /* Contour hexagonal lumineux */
    outline: 1px solid rgba(56, 189, 248, 0.45);
    outline-offset: -1px;
}

.agg-lecteur__btn:hover {
    background:
        linear-gradient(135deg,
            rgba(56, 189, 248, 0.35),
            rgba(14, 165, 233, 0.20));
    color: #e0f2fe;
    transform: scale(1.08);
    outline: 1px solid rgba(56, 189, 248, 0.9);
}

.agg-lecteur__btn:active {
    transform: scale(0.96);
}

/* Bouton lecture : plus grand, plein cyan, effet halo */
.agg-lecteur__btn--play {
    width: 66px;
    height: 66px;
    background:
        linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    color: #04121e;
    outline: 1px solid rgba(125, 211, 252, 0.9);
    box-shadow:
        0 0 0 1px rgba(56, 189, 248, 0.4),
        0 0 24px rgba(56, 189, 248, 0.55),
        0 0 48px rgba(56, 189, 248, 0.25);
}

.agg-lecteur__btn--play:hover {
    background:
        linear-gradient(135deg, #7dd3fc 0%, #38bdf8 100%);
    box-shadow:
        0 0 0 1px rgba(125, 211, 252, 0.9),
        0 0 32px rgba(56, 189, 248, 0.75),
        0 0 64px rgba(56, 189, 248, 0.35);
}

.agg-lecteur__carte:hover::before { opacity: 1; }

/* Image : vignette flottante a gauche */
.agg-lecteur__img {
    float: left;
    width: 45%;
    max-width: 140px;
    aspect-ratio: 16 / 10;
    margin: 2px 10px 6px 0;
    border-radius: 6px;
    overflow: hidden;
    background: #0a121b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    box-sizing: border-box;
}

.agg-lecteur__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.agg-lecteur__carte:hover .agg-lecteur__img img {
    transform: scale(1.06);
}

/* Titre : s'ecoule autour de l'image puis sous elle */
.agg-lecteur__titre {
    font-size: 17.5px;
    font-weight: 700;
    line-height: 1.25;
    color: #eaf2ff;
    margin: 0 0 6px;
    letter-spacing: 0.1px;
    /* PAS de display: -webkit-box, PAS de line-clamp :
       le texte doit s'ecouler librement autour de la vignette. */
}


/* Plus de pub dans les cartes */
.agg-lecteur__ad { display: none !important; }

/* Barre de contrôle */
.agg-lecteur__barre {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding-top: 10px;
    flex-shrink: 0;
}
.agg-lecteur__btn {
    background: rgba(255, 255, 255, 0.08);
    color: #e6ecf5;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}
.agg-lecteur__btn:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.05);
}
.agg-lecteur__btn--play {
    width: 56px;
    height: 56px;
    background: #38bdf8;
    color: #070b12;
    border-color: #38bdf8;
}
.agg-lecteur__btn--play:hover {
    background: #0ea5e9;
    border-color: #0ea5e9;
}