/* ======================================================
   Fichier: actualites/static/actualites/css/actualites.css
   Styles Complets et Dépendants pour l'application "Actualités"
   (Utilise les variables CSS globales du projet)
   ====================================================== */

/* --- DÉPENDANCES ET FALLBACKS (Variables du Projet Global) --- */
:root {
    /* Les variables utilisées ici doivent être définies dans le CSS global de votre projet. */
    --ens-green: var(--color-ens-green, #006633);
    --ens-light-green: var(--color-ens-light-green, #8CC63F);
    --ens-yellow: var(--color-ens-yellow, #fcd34d);
    --text-dark: var(--color-text-dark, #333);
    --card-radius: var(--card-border-radius, 12px);
    --card-shadow-base: var(--card-shadow, 0 8px 25px rgba(0, 0, 0, 0.15));
    --card-shadow-hover: var(--card-shadow-hover, 0 15px 35px rgba(0, 0, 0, 0.2));
}


/* --- 1. CONFIGURATION DES GRILLES DE LA PAGE D'ACCUEIL --- */

.home-container {
    padding: 2rem 0;
}

/* Grille 1 : Actualités (3 colonnes) */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Grille 2 : Infos (Events, Liens, Stats) (3 colonnes) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}


/* --- 2. STYLE DES CARTES ACTUALITÉS (NEWS-CARD) --- */

.news-card {
    position: relative;
    height: 380px; /* Maintenu comme hauteur fixe selon la source */
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow-base);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: block;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.news-bg {
    position: absolute;
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s ease;
    z-index: 1;
}

.news-card:hover .news-bg {
    transform: scale(1.05);
}

.news-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.5) 60%, rgba(0,0,0,0.9) 100%);
    z-index: 2;
    transition: opacity 0.3s ease;
}

.news-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    z-index: 3;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.news-category {
    align-self: flex-start;
    background: var(--ens-green);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.news-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    line-height: 1.3;
    color: white;
    transition: color 0.3s ease;
}

.news-card:hover .news-title {
    color: var(--ens-light-green);
}

.news-excerpt {
    font-size: 0.95rem;
    opacity: 0.95;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
    line-height: 1.5;
}

/* --- 3. STYLE DES CARTES COUVERTURE (COVER-IMAGE-CARD) --- */

.cover-image-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow-base);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 320px;
}

.cover-image-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.cover-image-background {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: transform 0.5s ease;
}

.cover-image-card:hover .cover-image-background {
    transform: scale(1.05);
}

.cover-image-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.cover-image-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.cover-category-badge {
    display: inline-block;
    background: rgba(0, 0, 0, 0.4); /* Spécifique au badge de couverture (semi-transparent) */
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cover-image-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.cover-image-card:hover .cover-image-title {
    color: var(--ens-light-green);
}

.cover-image-excerpt {
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cover-image-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    opacity: 0.8;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Lien qui couvre toute la carte (Pour l'accessibilité) */
.cover-image-link {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 3;
    text-decoration: none;
}


/* --- 4. STYLES SECTION BASSE (INFO GRID) --- */

.info-col {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: var(--card-radius);
    padding: 1.5rem;
    height: 100%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.info-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ens-green);
    border-bottom: 2px solid var(--ens-yellow);
    padding-bottom: 0.8rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-link-item {
    display: flex;
    align-items: center;
    padding: 0.9rem 0;
    border-bottom: 1px solid #f0f0f0;
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s, transform 0.2s;
}

.quick-link-item:hover {
    color: var(--ens-green);
    transform: translateX(5px);
}

.quick-link-icon {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 102, 51, 0.1);
    color: var(--ens-green);
    border-radius: 50%;
    margin-right: 12px;
    font-size: 0.9rem;
}

.stat-item {
    text-align: center;
    padding: 1.2rem;
    background: var(--bs-gray-100, #f8f9fa);
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid var(--bs-gray-200, #eee);
    transition: transform 0.3s ease;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ens-green);
    line-height: 1;
    margin-bottom: 0.3rem;
    animation: countUp 0.8s ease forwards;
}


/* --- 5. STYLES POUR LA VUE DÉTAIL --- */

.detail-cover-container {
    position: relative;
    width: 100%;
    max-height: 700px;
    overflow: hidden;
    border-radius: var(--card-radius);
    margin-bottom: 2rem;
}

.detail-cover-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    max-height: 500px;
}

.detail-cover-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0) 100%
    );
    padding: 2rem;
    color: white;
}

.detail-cover-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.detail-cover-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Cas des articles de détail sans image */
.no-cover-image {
    background: linear-gradient(135deg, var(--ens-green) 0%, var(--color-ens-dark, #004d26) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
}

.no-cover-image .cover-image-content {
    text-align: center;
}

.no-cover-image .cover-image-title {
    font-size: 2rem;
}

/* Titres */
.actualite-title {
    font-weight: 600;
    line-height: 1.4;
}

/* Arabe uniquement */
html[dir="rtl"] .actualite-title {
    line-height: 1.8;
}
.actualite-content p {
    margin-bottom: 1.2rem;
    line-height: 1.6;
    color: var(--text-dark);
    font-size: 1rem;
}

.actualite-card {
    text-align: start;
}

html[dir="rtl"] .actualite-card {
    text-align: right;
}
.actualite-content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.actualite-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}
html[dir="rtl"] .actualite-meta {
    flex-direction: row-reverse;
    justify-content: flex-start;
}


.actualite-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ======================================================
   STYLE "NEW YORK TIMES" - PAGE DÉTAIL ARTICLE
   Version complète avec Lightbox, Commentaires, Likes
   À AJOUTER dans actualites.css ou pages/actualites.css
   ====================================================== */

/* ======================================================
   PAGE DÉTAIL ARTICLE - LAYOUT FLOAT
   Image 1/4 supérieur droit | Titre+Contenu 3/4 autour
   ====================================================== */

/* ══════════════════════════════════════════════
   1. CONTENEUR PRINCIPAL
   ══════════════════════════════════════════════ */

.nyt-article {
    width: 100%;
    padding: var(--space-xs);
    font-family: var(--font-primary);
    line-height: 1.8;
    color: var(--color-text);
    background: var(--color-bg-primary);
}

/* ══════════════════════════════════════════════
   2. CONTENEUR FLOW (Image flottante + Contenu)
   ══════════════════════════════════════════════ */

.nyt-flow-container {
    overflow: hidden; /* Contient les floats */
}

/* ══════════════════════════════════════════════
   3. IMAGE FLOTTANTE - 1/4 SUPÉRIEUR DROIT
   ══════════════════════════════════════════════ */

.nyt-float-image {
    float: right;
    width: 35%;
 
     min-width: 380px;
    max-width: 480px;

   
    margin: 0 0 var(--space-md) var(--space-md);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nyt-float-image:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.nyt-float-image img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.nyt-float-image:hover img {
    transform: scale(1.03);
}

.nyt-float-image figcaption {
    background: var(--color-bg-secondary);
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
    color: var(--color-ens-green);
    text-align: center;
    border-top: 1px solid var(--color-border);
    font-weight: 500;
}

.nyt-float-image figcaption i {
    margin-right: 0.25rem;
}

/* Placeholder sans image */
.nyt-float-image.nyt-no-image {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    background: linear-gradient(135deg, var(--color-ens-green) 0%, var(--color-ens-dark) 100%);
    color: white;
    cursor: default;
}

.nyt-float-image.nyt-no-image:hover {
    transform: none;
}

.nyt-float-image.nyt-no-image i {
    font-size: 2rem;
    opacity: 0.7;
}

.nyt-float-image.nyt-no-image span {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Clear float */
.nyt-clear {
    clear: both;
}

/* ══════════════════════════════════════════════
   4. EN-TÊTE (s'écoule à côté de l'image)
   ══════════════════════════════════════════════ */

.nyt-header {
    margin-bottom: var(--space-md);
}

.nyt-category {
    margin-bottom: var(--space-xs);
}

.badge-category {
    display: inline-block;
    background: var(--color-ens-green);
    color: white;
    padding: 0.25rem 0.7rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 2px;
}

/* TITRE - Retour à la ligne forcé */
.nyt-title {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 3vw, 1.9rem);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text-dark);
    margin-bottom: var(--space-sm);
    
    /* Forcer retour à la ligne */
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.nyt-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem var(--space-sm);
    font-size: 0.8rem;
    color: var(--color-text-muted);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-ens-green);
}

.nyt-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.nyt-meta-item i {
    color: var(--color-ens-green);
    font-size: 0.8em;
}

.nyt-meta-separator {
    color: var(--color-border);
}

/* ══════════════════════════════════════════════
   5. CONTENU (s'écoule puis passe en dessous)
   ══════════════════════════════════════════════ */

.nyt-content {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--color-text);
    text-align: justify;
    hyphens: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Drop cap */
.nyt-content > p:first-of-type::first-letter {
    float: left;
    font-size: 3rem;
    line-height: 0.85;
    font-weight: 700;
    color: var(--color-ens-green);
    margin-right: 0.1em;
    margin-top: 0.05em;
    font-family: var(--font-heading);
}

.nyt-content p {
    margin-bottom: 1.1rem;
}

.nyt-content h2,
.nyt-content h3 {
    font-family: var(--font-heading);
    color: var(--color-text-dark);
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
    clear: none; /* Ne pas clear les floats */
}

.nyt-content h2 {
    font-size: 1.25rem;
    border-bottom: 2px solid var(--color-ens-green);
    padding-bottom: 0.3rem;
}

.nyt-content h3 {
    font-size: 1.1rem;
}

.nyt-content a {
    color: var(--color-ens-green);
    text-decoration: underline;
}

.nyt-content blockquote {
    margin: 1.2rem 0;
    padding: 0.9rem 1.2rem;
    border-left: 3px solid var(--color-ens-green);
    background: var(--color-bg-secondary);
    font-style: italic;
    color: var(--color-text-muted);
}

.nyt-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

.nyt-content ul,
.nyt-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.nyt-content li {
    margin-bottom: 0.3rem;
}

/* ══════════════════════════════════════════════
   6. ÉVÉNEMENT INFO
   ══════════════════════════════════════════════ */

.nyt-event-info {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: linear-gradient(135deg, var(--color-ens-green) 0%, var(--color-ens-dark) 100%);
    border-radius: var(--radius-sm);
    color: white;
}

.nyt-event-info h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nyt-event-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-sm);
}

.nyt-event-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.nyt-event-item strong {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.nyt-event-item span {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ══════════════════════════════════════════════
   7. FOOTER
   ══════════════════════════════════════════════ */

.nyt-footer {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 2px solid var(--color-border);
}

/* Navigation */
.nyt-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.nyt-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--color-text);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s ease;
}

.nyt-nav-btn:hover {
    background: var(--color-ens-green);
    color: white;
    border-color: var(--color-ens-green);
}

.nyt-nav-btn.home {
    background: var(--color-ens-green);
    color: white;
}

.nyt-nav-placeholder {
    width: 90px;
}

/* Interactions */
.nyt-interactions {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.nyt-reactions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.nyt-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text-muted);
    background: var(--color-bg-secondary);
    border: 2px solid var(--color-border);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nyt-reaction-btn:hover {
    border-color: var(--color-ens-green);
    color: var(--color-ens-green);
}

.nyt-reaction-btn.like.active {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.nyt-reaction-btn.dislike.active {
    background: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

.nyt-reaction-btn i {
    font-size: 0.95em;
}

.reaction-count {
    font-weight: 600;
}

.nyt-reaction-btn.pulse {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    50% { transform: scale(1.1); }
}

/* Commentaires */
.nyt-comments-section {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.nyt-comments-section.visible {
    max-height: 1500px;
    opacity: 1;
    margin-top: var(--space-sm);
}

.nyt-comments-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nyt-comment-form {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    padding: var(--space-sm);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-sm);
}

.nyt-comment-form textarea {
    flex: 1;
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    resize: none;
    font-family: inherit;
}

.nyt-comment-form textarea:focus {
    outline: none;
    border-color: var(--color-ens-green);
}

.btn-submit-comment {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: white;
    background: var(--color-ens-green);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.btn-submit-comment:hover {
    background: var(--color-ens-dark);
}

.nyt-comments-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.nyt-comment {
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: 0.15rem;
}

.comment-header strong {
    font-size: 0.82rem;
}

.comment-date {
    font-size: 0.68rem;
    color: var(--color-text-muted);
}

.comment-text {
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

.no-comments {
    text-align: center;
    color: var(--color-text-muted);
    font-style: italic;
    font-size: 0.82rem;
}

/* Login prompt */
.nyt-login-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.nyt-login-prompt i {
    color: var(--color-ens-green);
}

.btn-login-small {
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
    color: white;
    background: var(--color-ens-green);
    border-radius: var(--radius-sm);
    text-decoration: none;
}

/* Partage */
.nyt-share {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.nyt-share-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
}

.nyt-share-buttons {
    display: flex;
    gap: 0.4rem;
}

.nyt-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    font-size: 0.95rem;
    transition: transform 0.2s ease;
}

.nyt-share-btn:hover {
    transform: translateY(-2px);
    color: white;
}

.nyt-share-btn.facebook { background: #1877f2; }
.nyt-share-btn.twitter { background: #1da1f2; }
.nyt-share-btn.linkedin { background: #0a66c2; }
.nyt-share-btn.whatsapp { background: #25d366; }

/* ══════════════════════════════════════════════
   8. LIGHTBOX
   ══════════════════════════════════════════════ */

.nyt-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: var(--space-md);
}

.nyt-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-image {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.nyt-lightbox.active .lightbox-image {
    transform: scale(1);
}

.lightbox-caption {
    margin-top: var(--space-sm);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.88rem;
    text-align: center;
}

/* ══════════════════════════════════════════════
   9. RTL (Arabe) - Image flotte à gauche
   ══════════════════════════════════════════════ */

html[dir="rtl"] .nyt-float-image {
    float: left;
    margin: 0 var(--space-md) var(--space-md) 0;
}

html[dir="rtl"] .nyt-content {
    text-align: right;
}

html[dir="rtl"] .nyt-content > p:first-of-type::first-letter {
    float: right;
    margin-right: 0;
    margin-left: 0.1em;
}

html[dir="rtl"] .nyt-content blockquote {
    border-left: none;
    border-right: 3px solid var(--color-ens-green);
}

html[dir="rtl"] .nyt-content ul,
html[dir="rtl"] .nyt-content ol {
    padding-left: 0;
    padding-right: 1.5rem;
}

html[dir="rtl"] .lightbox-close {
    right: auto;
    left: 20px;
}

/* ══════════════════════════════════════════════
   10. RESPONSIVE
   ══════════════════════════════════════════════ */

@media (max-width: 768px) {
    /* Image passe au-dessus du contenu */
    .nyt-float-image {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 0 0 var(--space-md) 0;
    }
    
    html[dir="rtl"] .nyt-float-image {
        float: none;
        margin: 0 0 var(--space-md) 0;
    }
    
    .nyt-float-image img {
        aspect-ratio: 16 / 9;
    }
    
    .nyt-title {
        font-size: 1.2rem;
    }
    
    .nyt-content {
        font-size: 0.92rem;
        text-align: left;
    }
    
    html[dir="rtl"] .nyt-content {
        text-align: right;
    }
    
    .nyt-content > p:first-of-type::first-letter {
        float: none;
        font-size: inherit;
        margin: 0;
    }
    
    .nyt-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .nyt-meta-separator {
        display: none;
    }
    
    .nyt-navigation {
        justify-content: center;
    }
    
    .nyt-nav-btn span {
        display: none;
    }
    
    .nyt-nav-placeholder {
        display: none;
    }
    
    .nyt-reactions {
        gap: var(--space-xs);
    }
    
    .nyt-comment-form {
        flex-direction: column;
    }
}

/* ══════════════════════════════════════════════
   11. DARK MODE
   ══════════════════════════════════════════════ */

@media (prefers-color-scheme: dark) {
    .nyt-float-image {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }
    
    .nyt-comment {
        background: var(--color-bg-secondary);
    }
}

/* ══════════════════════════════════════════════
   SIDEBAR STICKY - Liste actualités
   ══════════════════════════════════════════════ */

.sidebar-sticky {
    position: sticky;
    top: 100px; /* Hauteur du header + marge */
    z-index: 10; /* Plus bas que le header (z-index: 200) */
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Scrollbar personnalisée pour la sidebar ( liste.html)*/
.sidebar-sticky::-webkit-scrollbar {
    width: 5px;
}

.sidebar-sticky::-webkit-scrollbar-track {
    background: var(--color-background-light);
}

.sidebar-sticky::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

/* ══════════════════════════════════════════════
   TYPOGRAPHIE ACTUALITÉS (FR/AR automatique)
   ══════════════════════════════════════════════ */

/* Liste des articles */
.card-title {
    font-size: var(--actu-title-size);
    line-height: 1.4;
}

.card-text {
    font-size: var(--actu-excerpt-size);
    line-height: 1.6;
}

/* Article détail */
.nyt-title {
    font-size: var(--article-title-size);
    line-height: 1.3;
    font-weight: 700;
}

.nyt-content {
    font-size: var(--article-content-size);
    line-height: var(--article-line-height);
}

.nyt-content p {
    font-size: var(--article-content-size);
    margin-bottom: 1.2rem;
}

.nyt-meta {
    font-size: var(--actu-meta-size);
}

/* Sidebar */
.sidebar-sticky .list-group-item h6 {
    font-size: var(--actu-small-size);
}

.sidebar-sticky .list-group-item small {
    font-size: calc(var(--actu-small-size) - 0.1rem);
}

/* ─────────────────────────────────────────────
   AJUSTEMENTS SPÉCIFIQUES ARABE
   ───────────────────────────────────────────── */
[lang="ar"] .card-title,
[dir="rtl"] .card-title,
.rtl .card-title {
    font-family: 'Amiri', 'Traditional Arabic', serif;
    font-weight: 700;
}

[lang="ar"] .card-text,
[dir="rtl"] .card-text,
.rtl .card-text {
    font-family: 'Amiri', 'Traditional Arabic', serif;
}

[lang="ar"] .nyt-title,
[dir="rtl"] .nyt-title,
.rtl .nyt-title {
    font-family: 'Amiri', 'Traditional Arabic', serif;
    font-weight: 700;
}

[lang="ar"] .nyt-content,
[dir="rtl"] .nyt-content,
.rtl .nyt-content {
    font-family: 'Amiri', 'Traditional Arabic', serif;
    text-align: justify;
}

/* ══════════════════════════════════════════════
   DOCUMENTS JOINTS - ACTUALITÉS
   À ajouter dans actualites.css
   ══════════════════════════════════════════════ */

/* ─────────────────────────────────────────────
   APERÇU DOCUMENT (zone flottante)
   ───────────────────────────────────────────── */

.nyt-document-preview {
    position: relative;
    cursor: pointer;
}

.nyt-document-preview .document-link {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.nyt-document-preview .document-link:hover img {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* Overlay avec icône du document */
.document-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nyt-document-preview:hover .document-overlay {
    opacity: 1;
}

.document-overlay i {
    font-size: 3rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Placeholder pour documents sans image */
.document-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    border-radius: var(--border-radius);
    color: #fff;
    padding: 2rem;
}

.document-placeholder i {
    margin-bottom: 1rem;
    opacity: 0.9;
}

.document-placeholder .document-type {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

/* Bouton ouvrir document dans figcaption */
.btn-open-document {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-open-document:hover {
    background: var(--color-primary-dark);
    color: #fff;
    transform: translateY(-2px);
}

/* ─────────────────────────────────────────────
   BADGE DOCUMENT JOINT
   ───────────────────────────────────────────── */

.badge-document {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: var(--color-success, #28a745);
    color: #fff;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

[dir="rtl"] .badge-document,
.rtl .badge-document {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* ─────────────────────────────────────────────
   BOUTON TÉLÉCHARGEMENT EN BAS DU CONTENU
   ───────────────────────────────────────────── */

.nyt-document-download {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--color-background-light, #f8f9fa);
    border-radius: var(--border-radius);
    text-align: center;
    border: 2px dashed var(--color-border);
}

.nyt-document-download .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nyt-document-download .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ─────────────────────────────────────────────
   ICÔNES PAR TYPE DE DOCUMENT
   ───────────────────────────────────────────── */

/* PDF - Rouge */
.fa-file-pdf {
    color: #dc3545;
}

/* Word - Bleu */
.fa-file-word {
    color: #2b579a;
}

/* Excel - Vert */
.fa-file-excel {
    color: #217346;
}

/* PowerPoint - Orange */
.fa-file-powerpoint {
    color: #d24726;
}

/* Texte - Gris */
.fa-file-alt {
    color: #6c757d;
}

/* Dans les zones blanches, garder les couleurs */
.document-placeholder .fa-file-pdf,
.document-placeholder .fa-file-word,
.document-placeholder .fa-file-excel,
.document-placeholder .fa-file-powerpoint,
.document-placeholder .fa-file-alt {
    color: #fff;
}

/* ─────────────────────────────────────────────
   DARK MODE
   ───────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
    .nyt-document-download {
        background: var(--color-background-dark, #1a1a2e);
        border-color: var(--color-border-dark);
    }
    
    .document-placeholder {
        background: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 100%);
    }
}

.dark-mode .nyt-document-download {
    background: var(--color-background-dark, #1a1a2e);
    border-color: var(--color-border-dark);
}

.dark-mode .document-placeholder {
    background: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 100%);
}

/* ─────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────── */

@media (max-width: 768px) {
    .document-placeholder {
        min-height: 150px;
        padding: 1.5rem;
    }
    
    .document-placeholder i {
        font-size: 2.5rem;
    }
    
    .nyt-document-download {
        padding: 1rem;
    }
    
    .nyt-document-download .btn {
        width: 100%;
        justify-content: center;
    }
}