/* ============================================================
   ELECTROINFO — ARTICLE-DETAIL STYLES (autonome, sans styles.css)
   ============================================================ */

/* ============================================================
   VARIABLES CSS
   ============================================================ */
:root {
    --primary-color:  #2563eb;
    --primary-hover:  #1d4ed8;
    --primary-light:  #3b82f6;
    --secondary-color: #10b981;
    --accent-color:   #f59e0b;
    --danger-color:   #ef4444;

    --text-primary:   #1f2937;
    --text-secondary: #6b7280;
    --text-muted:     #9ca3af;

    --bg-primary:     #ffffff;
    --bg-secondary:   #f9fafb;
    --bg-tertiary:    #f3f4f6;

    --border-color:   #e5e7eb;

    --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
    --shadow-sm: 0 2px 4px rgba(0,0,0,.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.12);
    --shadow-xl: 0 20px 40px rgba(0,0,0,.15);

    --radius-sm:  .375rem;
    --radius-md:  .5rem;
    --radius-lg:  .75rem;
    --radius-xl:  1rem;
    --radius-2xl: 1.5rem;

    --transition:      all .3s cubic-bezier(.4,0,.2,1);
    --transition-fast: all .15s cubic-bezier(.4,0,.2,1);

    /* Variables additionnelles article-styles */
    --primary:        #1d4ed8;
    --primary-bright: #3b82f6;
    --primary-glow:   rgba(59,130,246,.15);
    --accent:         #f59e0b;
    --accent-dark:    #d97706;
    --success:        #10b981;
    --danger:         #ef4444;
    --ink:            #0f172a;
    --ink-soft:       #1e293b;
    --text-body:      #334155;
    --text-faint:     #94a3b8;
    --surface:        #ffffff;
    --surface-2:      #f8fafc;
    --surface-3:      #f1f5f9;
    --border:         #e2e8f0;
    --border-light:   #f1f5f9;
    --shadow-blue: 0 8px 24px rgba(29,78,216,.2);
    --radius:     .625rem;
    --ease: cubic-bezier(.4,0,.2,1);
    --ease-spring: cubic-bezier(.34,1.56,.64,1);
    --font-display: 'Syne', sans-serif;
    --font-body:    'DM Sans', sans-serif;
}

[data-theme="dark"] {
    --text-primary:   #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted:     #9ca3af;
    --bg-primary:     #0f172a;
    --bg-secondary:   #1e293b;
    --bg-tertiary:    #334155;
    --border-color:   #334155;
}

/* ============================================================
   BASE
   ============================================================ */
/* Reset de base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background: var(--bg-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

*:focus-visible { outline: 3px solid var(--primary-color); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

/* ============================================================
   COMPOSANTS ISSUS DE styles.css
   ============================================================ */
.hidden { display: none !important; }

/* Loading & Error - CORRIGÉ */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 3rem;
}

.loading-state.hidden {
    display: none !important;
}

.loading-spinner { text-align: center; }

.loading-spinner i {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.loading-spinner p { color: var(--text-secondary); font-size: 1.125rem; }

.error-state {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 3rem;
}

.error-state:not(.hidden) {
    display: flex !important;
}

.error-content { text-align: center; max-width: 550px; }

.error-content i { font-size: 5rem; color: var(--danger-color); margin-bottom: 2rem; }

.error-content h2 { font-size: 2.25rem; color: var(--text-primary); margin-bottom: 1rem; font-weight: 800; }

.error-content p { color: var(--text-secondary); font-size: 1.125rem; margin-bottom: 2.5rem; }

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

.share-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    font-size: 1.0625rem;
    position: relative;
    overflow: hidden;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

@media (hover: none) {
    /* Pas d'effet hover sur écrans tactiles */
    .article-body img:hover { transform: none; box-shadow: var(--shadow-lg); }
    .article-card:hover { transform: none; box-shadow: 0 2px 16px rgba(0,0,0,.07); }
    .article-card:hover .article-image { transform: none; }
    .reaction-btn:hover { transform: none; }
    .tag:hover { transform: none; }
    .related-article-item:hover { transform: none; }
    .share-btn:hover { transform: none; }
}

.reactions-container { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.reaction-btn {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 2rem;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.0625rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.reaction-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.reaction-btn i { font-size: 1.375rem; }

.reaction-btn span { font-weight: 700; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }

.form-group { margin-bottom: 0; }

.comment-form .input {
    width: 100%;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    font-size: 1rem; /* ≥ 16px sur mobile → évite le zoom automatique iOS */
    box-sizing: border-box;
    -webkit-appearance: none; /* fix Safari */
}

.comment-form .btn { margin-top: .75rem; }

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-widget {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-color);
}

.newsletter-widget {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)) !important;
    color: white;
    text-align: center;
    border: none !important;
}

.footer-widget-title { font-size: 1.375rem; font-weight: 700; margin-bottom: 1rem; }

.newsletter-widget .footer-widget-title { color: white; }

.footer-widget-text { color: rgba(255,255,255,.9); margin-bottom: 1.75rem; line-height: 1.6; }

.newsletter-form-footer .input { background: rgba(255,255,255,.95); border: none; padding: 1rem 1.25rem; border-radius: var(--radius-lg); }

.newsletter-form-footer .btn   { background: white; color: var(--primary-color); font-weight: 700; }

.related-widget { background: var(--bg-primary) !important; }

.notification {
    position: fixed;
    bottom: 2rem;
    bottom: max(2rem, env(safe-area-inset-bottom) + 1rem); /* iPhone X+ safe area */
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .75rem;
    z-index: 9999;
    opacity: 0;
    transition: all .3s cubic-bezier(.34,1.56,.64,1);
    box-shadow: var(--shadow-xl);
    pointer-events: none;
    white-space: nowrap;
}

@media (max-width: 1024px) {
    .article-title-hero { font-size: 2.75rem; }
    .footer-widgets { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .article-hero { height: 400px; }
    .article-title-hero { font-size: 2.25rem; }
    .article-hero-overlay { padding: 2.5rem 1.25rem; }
    .article-meta-section { padding: 2rem 0; }
    .article-meta-content { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
    .share-buttons { width: 100%; justify-content: center; }
    .form-row { grid-template-columns: 1fr; }
    .reactions-container { flex-direction: column; }
    .reaction-btn { width: 100%; justify-content: center; }
    .article-body { font-size: 1.0625rem; }
    .article-body h2 { font-size: 1.875rem; }
    .article-body h3 { font-size: 1.5rem; }
    .comments-section { padding: 2rem 1.5rem; }
    .pinterest-iframe-wrapper iframe { width: 100% !important; }
}

@media (max-width: 480px) {
    .article-hero { height: 300px; }
    .article-title-hero { font-size: 1.75rem; }
    .author-avatar-large { width: 56px; height: 56px; }
    .article-stats-section { flex-direction: column; gap: .75rem; }
    .article-body { font-size: 1rem; }
    .article-body h2 { font-size: 1.625rem; }
    .related-article-item { flex-direction: column; }
    .related-article-image { width: 100%; height: 200px; }
    .comments-section { padding: 1.5rem 1rem; }
    .footer-widget { padding: 2rem 1.5rem; }
}

@media print {
    .navbar, .share-buttons, .article-actions-bar,
    .comments-section, .footer-widgets, .footer { display: none !important; }
    .article-hero { height: 350px; }
    .article-body { color: #000; font-size: 12pt; }
    .article-body a { color: #000; text-decoration: underline; }
}

.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 3rem;
}

.loading-state.hidden {
    display: none !important;
}

.error-state {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 3rem;
}

.error-state:not(.hidden) {
    display: flex !important;
}

.empty-state.offline-state .btn {
    animation: pulse 2s infinite;
}

/* Loading & Error */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 3rem;
}

.loading-state.hidden {
    display: none !important;
}

.loading-spinner { text-align: center; }

.loading-spinner i {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.loading-spinner p { color: var(--text-secondary); font-size: 1.125rem; }

.error-state {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 3rem;
}

.error-state:not(.hidden) {
    display: flex !important;
}

.error-content { text-align: center; max-width: 550px; }

.error-content i { font-size: 5rem; color: var(--danger-color); margin-bottom: 2rem; }

.error-content h2 { font-size: 2.25rem; color: var(--text-primary); margin-bottom: 1rem; font-weight: 800; }

.error-content p { color: var(--text-secondary); font-size: 1.125rem; margin-bottom: 2.5rem; }

/* Bouton de thème principal */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.theme-toggle-btn:active {
    transform: translateY(0);
}

.theme-toggle-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.theme-toggle-btn:hover i {
    transform: rotate(15deg);
}

.theme-toggle-btn .theme-text {
    font-size: 0.8125rem;
    white-space: nowrap;
}

.theme-toggle-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.theme-toggle-btn:active::before {
    width: 200px;
    height: 200px;
}

@media (max-width: 768px) {
    .theme-toggle-btn {
        padding: 0.625rem;
        border-radius: 50%;
    }
    
    .theme-toggle-btn .theme-text {
        display: none;
    }
    
    .theme-toggle-btn i {
        font-size: 1.125rem;
    }
}
/* ============================================================
   NAVBAR — ELECTROINFO (article-detail)
   Structure :
     .navbar > .container
       .nav-brand        (logo + texte)
       .nav-controls     (lang + thème + hamburger — toujours visible)
       .nav-menu         (liens + connexion — caché mobile, visible desktop)
   ============================================================ */

.navbar {
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
    height: 68px;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    box-shadow: 0 2px 16px rgba(0,0,0,0.18);
    width: 100%;
    box-sizing: border-box;
    transition: background-color 0.3s ease;
}

[data-theme="dark"] .navbar {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    box-shadow: 0 2px 16px rgba(0,0,0,0.45);
}

.navbar .container {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    gap: 0.5rem;
}

/* ── LOGO / BRAND ── */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-brand img,
.nav-logo,
.nav-logo-img {
    height: 40px;
    width: 40px;
    max-height: 40px;
    max-width: 40px;
    object-fit: contain;
    flex-shrink: 0;
    background: transparent;
    border-radius: 10px;
    display: block;
}

.nav-brand span,
.nav-logo-text {
    font-size: 1rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: visible;
    max-width: none;
}

/* ── NAV-CONTROLS (lang + thème + hamburger — toujours dans la barre) ── */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
    flex-shrink: 0;
}

/* ── BOUTON LANGUE SWITCHER ── */
.lang-switcher { position: relative; display: inline-flex; align-items: center; }

.lang-current-btn {
    background: rgba(255,255,255,0.14);
    border: 1.5px solid rgba(255,255,255,0.35);
    color: white;
    padding: 0.4rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.lang-current-btn:hover { background: rgba(255,255,255,0.25); }

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 8px 28px rgba(0,0,0,0.18);
    overflow: hidden;
    z-index: 99999;
    min-width: 160px;
}
.lang-dropdown.open { display: block; }
.lang-option {
    display: flex; align-items: center; gap: 0.5rem;
    width: 100%; padding: 0.7rem 1.1rem;
    background: none; border: none;
    font-size: 0.9rem; font-weight: 500; color: #374151;
    cursor: pointer; transition: background 0.15s;
    text-align: left;
}
.lang-option:hover { background: #f3f4f6; }
.lang-option.lang-active { background: #eff6ff; color: #1e40af; font-weight: 700; }

/* ── BOUTON THÈME ── */
#themeToggle,
.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: rgba(255,255,255,0.14);
    border: 1.5px solid rgba(255,255,255,0.35);
    border-radius: 9999px;
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
#themeToggle:hover,
.theme-toggle-btn:hover { background: rgba(255,255,255,0.25); }

/* ── HAMBURGER ── */
.mobile-toggle,
#mobileToggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.14);
    border: 1.5px solid rgba(255,255,255,0.35);
    border-radius: 0.5rem;
    color: white;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: background 0.2s;
}
.mobile-toggle:hover,
#mobileToggle:hover { background: rgba(255,255,255,0.25); }
.mobile-toggle i,
#mobileToggle i { font-size: 1.1rem; }

/* ── BOUTON CONNEXION ── */
#loginBtn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    background: white;
    color: #1e40af;
    border: none;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
#loginBtn:hover { background: #f0f4ff; transform: translateY(-1px); }

/* ── USER MENU ── */
.user-menu { position: relative; }
.user-btn {
    display: flex; align-items: center; gap: 0.5rem;
    background: rgba(255,255,255,0.14);
    border: 1.5px solid rgba(255,255,255,0.35);
    border-radius: 9999px;
    color: white; padding: 0.4rem 0.9rem;
    cursor: pointer; font-size: 0.875rem; font-weight: 600;
    white-space: nowrap; transition: background 0.2s;
}
.user-btn:hover { background: rgba(255,255,255,0.25); }
.avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

/* ── MENU DROPDOWN ── */
.dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: white; border-radius: 0.75rem;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    min-width: 200px; overflow: hidden; z-index: 9999;
    animation: dropIn 0.18s ease;
}
@keyframes dropIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
[data-theme="dark"] .dropdown { background: #1e293b; border: 1px solid #334155; }

.dropdown-header { display: flex; align-items: center; gap: 0.75rem; padding: 1rem; background: #f8fafc; }
[data-theme="dark"] .dropdown-header { background: #0f172a; }
.avatar-large { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.dropdown-divider { height: 1px; background: #e5e7eb; }
[data-theme="dark"] .dropdown-divider { background: #334155; }
.dropdown-item {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.75rem 1rem; width: 100%;
    background: none; border: none;
    color: #374151; font-size: 0.875rem; font-weight: 500;
    text-decoration: none; cursor: pointer; transition: background 0.15s;
}
.dropdown-item:hover { background: #f3f4f6; }
[data-theme="dark"] .dropdown-item { color: #e2e8f0; }
[data-theme="dark"] .dropdown-item:hover { background: #334155; }
.dropdown-item.logout { color: #ef4444; }

/* ── NAV-MENU DESKTOP ── */
.nav-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 0.25rem;
    margin: 0; padding: 0;
}
.nav-links { display: flex; align-items: center; gap: 0.125rem; }
.nav-link {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 0.875rem;
    color: rgba(255,255,255,0.82);
    text-decoration: none; font-size: 0.9rem; font-weight: 600;
    border-radius: 0.5rem; transition: all 0.2s; white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: white; background: rgba(255,255,255,0.15); }

.nav-actions {
    display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0;
}

/* ── RESPONSIVE MOBILE ≤ 900px ── */
@media (max-width: 900px) {
    .navbar { height: 60px; }
    .navbar .container { height: 60px; }

    /* Hamburger visible */
    .mobile-toggle,
    #mobileToggle { display: flex; }

    /* Texte thème masqué, icône seule */
    .theme-text { display: none; }
    #themeToggle,
    .theme-toggle-btn {
        width: 40px; height: 40px;
        padding: 0; justify-content: center;
        border-radius: 0.5rem;
    }

    /* Nav-controls : margin-left auto pour coller à droite */
    .nav-controls { margin-left: auto; }

    /* Nav-menu : panneau fullscreen */
    .nav-menu,
    #mobileMenu {
        display: none;
        position: fixed;
        top: 60px; left: 0; right: 0; bottom: 0;
        background: linear-gradient(170deg, #1e3a8a 0%, #1e40af 60%, #1d4ed8 100%);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 1.25rem 1rem;
        gap: 0;
        z-index: 999;
        overflow-y: auto;
        border-top: 1px solid rgba(255,255,255,0.12);
    }
    .nav-menu.active,
    #mobileMenu.active {
        display: flex;
        animation: slideDown 0.25s ease;
    }
    @keyframes slideDown {
        from { opacity:0; transform:translateY(-10px); }
        to   { opacity:1; transform:translateY(0); }
    }
    [data-theme="dark"] .nav-menu,
    [data-theme="dark"] #mobileMenu {
        background: linear-gradient(170deg, #0f172a 0%, #1e293b 100%);
    }

    .nav-links {
        flex-direction: column; gap: 0.125rem;
        width: 100%; margin-bottom: 1rem;
    }
    .nav-link {
        padding: 0.875rem 1.1rem; font-size: 1rem;
        border-radius: 0.625rem; width: 100%;
        color: rgba(255,255,255,0.88);
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .nav-link:last-child { border-bottom: none; }
    .nav-link:hover, .nav-link.active {
        background: rgba(255,255,255,0.14); color: white;
    }

    .nav-actions {
        flex-direction: column; align-items: stretch;
        gap: 0.625rem; width: 100%; padding-top: 0.5rem;
    }
    #loginBtn {
        width: 100%; justify-content: center;
        padding: 0.875rem 1rem; border-radius: 0.75rem; font-size: 1rem;
    }
    .user-menu, #userMenu { width: 100%; }
    .user-btn, #userMenuToggle {
        width: 100%; justify-content: space-between;
        padding: 0.75rem 1rem; border-radius: 0.75rem;
    }
    .dropdown, #userDropdown {
        position: static; animation: none;
        border-radius: 0.75rem; margin-top: 0.4rem;
        box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    }
}

@media (max-width: 480px) {
    .navbar { padding: 0 0.75rem; }
}


.auth-page .navbar {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-page .navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Centrage du formulaire */
.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* Carte principale */
.auth-card {
    background: white;
    border-radius: 1.25rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 460px;
    overflow: hidden;
}

/* Onglets Connexion / Inscription */
.auth-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 1.1rem 1rem;
    border: none;
    background: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.auth-tab:hover {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

.auth-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: white;
}

/* Formulaire Auth */
.auth-form {
    display: none;
    padding: 2rem;
}

.auth-form.active {
    display: block;
}

/* En-tête du formulaire */
.auth-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    display: block;
}

.auth-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.35rem;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* Groupe de champ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.45rem;
}

.form-group label i {
    color: var(--primary-color);
    margin-right: 0.3rem;
    font-size: 0.8rem;
}

/* Input générique */
.input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-primary);
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.input::placeholder {
    color: var(--text-muted);
}

/* Input avec bouton (mot de passe) */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group .input {
    padding-right: 3rem;
}

.input-icon {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.input-icon:hover {
    color: var(--primary-color);
}

/* Options (remember me + lien oublié) */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Checkbox personnalisée */
.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    user-select: none;
}

.checkbox input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--primary-color);
    cursor: pointer;
    flex-shrink: 0;
}

/* Lien générique */
.link {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

.btn-block {
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
    margin-top: 0.25rem;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(6px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: white;
}

/* Bouton Google */
.btn-google {
    background: white;
    color: #374151;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-google:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-google i {
    color: #ea4335;
    font-size: 1.1rem;
}

/* Séparateur OU */
.divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* Jauge de solidité du mot de passe */
.password-strength {
    margin-top: 0.5rem;
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
    overflow: hidden;
    transition: all 0.3s;
}

.password-strength.weak   { background: linear-gradient(to right, #ef4444 33%, var(--border-color) 33%); }
.password-strength.medium { background: linear-gradient(to right, #f59e0b 66%, var(--border-color) 66%); }
.password-strength.strong { background: #10b981; }

/* Modal générique */
.modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.hidden {
    display: none !important;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 420px;
    z-index: 1;
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
    position: absolute;
    top: 0.875rem;
    right: 0.875rem;
    width: 34px;
    height: 34px;
    border: none;
    background: var(--bg-secondary);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
    text-align: center;
}

.modal-icon {
    font-size: 2.75rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.modal-body h2 {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.modal-body p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

.modal-body .input {
    margin-bottom: 1rem;
}

/* Notification toast */
.notification {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1f2937;
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: 0.625rem;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    max-width: calc(100vw - 2rem);
    text-align: center;
}

.notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.notification.success { background: linear-gradient(135deg, #10b981, #059669); }
.notification.error   { background: linear-gradient(135deg, #ef4444, #dc2626); }
.notification.info    { background: linear-gradient(135deg, #3b82f6, #2563eb); }

/* ============================================================
   RESPONSIVE AUTH
   ============================================================ */

@media (max-width: 480px) {
    .auth-container {
        padding: 1rem 0.75rem;
        align-items: flex-start;
        padding-top: 1.5rem;
    }

    .auth-card {
        border-radius: 1rem;
    }

    .auth-form {
        padding: 1.5rem;
    }

    .auth-tab {
        font-size: 0.85rem;
        padding: 0.9rem 0.5rem;
        gap: 0.3rem;
    }

    .auth-tab i {
        font-size: 0.85rem;
    }

    .auth-header h2 {
        font-size: 1.3rem;
    }

    .auth-icon {
        font-size: 2.5rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-block {
        padding: 0.875rem 1rem;
    }

    .modal-body {
        padding: 1.5rem;
    }
}

/* ============================================================
   STYLES ARTICLE-DETAIL (article-styles.css original)
   ============================================================ */
/* ============================================================
   ELECTROINFO — ARTICLE STYLES v2.0
   Design : Editorial Tech Magazine
   ============================================================ */

/* ============================================================
   IMPORTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

/* ============================================================
   VARIABLES CSS
   ============================================================ */


[data-theme="dark"] {
    --ink:          #f8fafc;
    --ink-soft:     #e2e8f0;
    --text-body:    #cbd5e1;
    --text-muted:   #94a3b8;
    --text-faint:   #64748b;
    --surface:      #0f172a;
    --surface-2:    #1e293b;
    --surface-3:    #293548;
    --border:       #2d3f58;
    --border-light: #1e293b;
    --shadow-md:    0 4px 16px rgba(0,0,0,.25);
    --shadow-lg:    0 12px 32px rgba(0,0,0,.35);
}

/* ============================================================
   UTILITAIRES
   ============================================================ */
.hidden { display: none !important; }

body {
    font-family: var(--font-body);
    color: var(--text-body);
    background: var(--surface-2);
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
    position: relative;
    background: var(--ink);
    color: white;
    padding: 4.5rem 1.5rem 6rem;
    text-align: center;
    overflow: hidden;
    isolation: isolate;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 50%, rgba(29,78,216,.45) 0%, transparent 70%),
        radial-gradient(ellipse 60% 80% at 80% 30%, rgba(59,130,246,.3) 0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 60% 90%, rgba(245,158,11,.15) 0%, transparent 70%);
    z-index: -1;
}

.page-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: -1;
    opacity: .5;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -.03em;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.page-header h1 i {
    color: var(--accent);
    margin-right: .5rem;
}

.page-header p {
    font-size: clamp(1rem, 2vw, 1.15rem);
    opacity: .8;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.65;
    font-weight: 300;
}

/* ============================================================
   BARRE DE RECHERCHE (flottante)
   ============================================================ */
.search-bar {
    position: relative;
    z-index: 20;
    margin: -2.5rem auto 2.5rem;
    max-width: 680px;
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border-light);
}

.search-input-wrapper {
    position: relative;
}

.search-input-wrapper i {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-faint);
    font-size: .95rem;
    transition: color .2s;
}

.search-input-wrapper:focus-within i {
    color: var(--primary);
}

.search-input-wrapper input {
    width: 100%;
    padding: .85rem 1.25rem .85rem 3rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--surface-2);
    transition: all .25s var(--ease);
    -webkit-appearance: none;
    box-sizing: border-box;
}

.search-input-wrapper input::placeholder {
    color: var(--text-faint);
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-bright);
    background: var(--surface);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* ============================================================
   LAYOUT PRINCIPAL
   ============================================================ */
.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 0 4rem;
}

@media (min-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr 320px;
        gap: 2.5rem;
        align-items: start;
    }
}

.articles-section { width: 100%; }

/* ============================================================
   FILTRES
   ============================================================ */
.filters {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 1.25rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    align-items: center;
}

.filter-btn {
    padding: .45rem 1.1rem;
    border: 1.5px solid var(--border);
    background: var(--surface-2);
    color: var(--text-muted);
    border-radius: 9999px;
    font-size: .82rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all .2s var(--ease);
    letter-spacing: .01em;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--primary-bright);
    color: var(--primary);
    background: var(--primary-glow);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 3px 10px rgba(29,78,216,.3);
    transform: translateY(-1px);
}

/* ============================================================
   BARRE DE TRI
   ============================================================ */
.sort-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: .9rem 1.25rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border-light);
}

.sort-bar label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: .875rem;
    white-space: nowrap;
}

.sort-bar select {
    padding: .45rem 2.25rem .45rem .9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--ink);
    font-size: .875rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all .2s var(--ease);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .5rem center;
    background-size: 1rem;
}

.sort-bar select:focus {
    outline: none;
    border-color: var(--primary-bright);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ============================================================
   GRILLE D'ARTICLES
   ============================================================ */
.articles-grid {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    margin-bottom: 3rem;
}

/* Sous-grille 2 colonnes */
.articles-subgrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 640px) {
    .articles-subgrid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   CARD — BASE
   ============================================================ */
.article-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
    cursor: pointer;
    position: relative;
}

.article-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-bright));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s var(--ease);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(59,130,246,.25);
}

.article-card:hover::before {
    transform: scaleX(1);
}

/* Image wrapper */
.article-card__image-wrap {
    position: relative;
    overflow: hidden;
}

.article-image {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
    transition: transform .55s var(--ease);
    background: var(--surface-3);
}

.article-card:hover .article-image {
    transform: scale(1.06);
}

/* ============================================================
   CARD VEDETTE (featured)
   ============================================================ */
.article-card--featured {
    flex-direction: row;
    min-height: 340px;
    border-radius: var(--radius-xl);
    border: none;
    box-shadow: var(--shadow-lg);
    background: var(--ink);
    color: white;
    overflow: hidden;
}

.article-card--featured::before {
    display: none;
}

.article-card--featured .article-card__image-wrap {
    flex: 0 0 52%;
    min-height: 340px;
    position: relative;
}

.article-card--featured .article-card__image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 60%, var(--ink) 100%);
}

.article-card--featured .article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.85);
}

.article-card__featured-label {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: .72rem;
    font-weight: 800;
    font-family: var(--font-display);
    padding: .4rem 1rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: .4rem;
    box-shadow: 0 4px 12px rgba(245,158,11,.4);
    letter-spacing: .06em;
    text-transform: uppercase;
    z-index: 2;
}

.article-card--featured .article-content {
    flex: 1;
    padding: 2.25rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    background: transparent;
}

.article-card--featured .article-title {
    color: white;
    font-size: 1.65rem;
    -webkit-line-clamp: 3;
}

.article-card--featured .article-title:hover,
.article-card--featured:hover .article-title {
    color: rgba(255,255,255,.9);
}

.article-card--featured .article-summary {
    color: rgba(255,255,255,.7);
    -webkit-line-clamp: 4;
    font-size: 1rem;
}

.article-card--featured .article-date { color: rgba(255,255,255,.55); }
.article-card--featured .article-stats { color: rgba(255,255,255,.55); }
.article-card--featured .article-footer { border-color: rgba(255,255,255,.12); }

.article-card--featured .badge {
    background: rgba(255,255,255,.15);
    color: white;
    border: 1px solid rgba(255,255,255,.25);
}

@media (max-width: 768px) {
    .article-card--featured {
        flex-direction: column;
        min-height: unset;
    }

    .article-card--featured .article-card__image-wrap {
        flex: unset;
        min-height: 220px;
    }

    .article-card--featured .article-card__image-wrap::after {
        background: linear-gradient(180deg, transparent 50%, var(--ink) 100%);
    }

    .article-card--featured .article-content {
        padding: 1.5rem;
    }

    .article-card--featured .article-title {
        font-size: 1.3rem;
    }
}

/* ============================================================
   CONTENU DES CARDS
   ============================================================ */
.article-content {
    padding: 1.4rem 1.6rem 1.6rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: .7rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.article-date {
    font-size: .78rem;
    color: var(--text-faint);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .3rem;
    letter-spacing: .01em;
}

.article-date i {
    font-size: .7rem;
    color: var(--primary-bright);
}

.article-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.35;
    letter-spacing: -.02em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s;
    margin: 0;
}

.article-card:hover .article-title {
    color: var(--primary);
}

.article-summary {
    color: var(--text-muted);
    font-size: .9rem;
    line-height: 1.65;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    margin-top: auto;
    gap: .75rem;
    flex-wrap: wrap;
}

.article-stats {
    display: flex;
    gap: 1rem;
    font-size: .8rem;
    color: var(--text-faint);
    font-weight: 500;
}

.article-stats span {
    display: flex;
    align-items: center;
    gap: .3rem;
}

.article-stats i {
    color: var(--primary-bright);
    font-size: .75rem;
}

.btn-read-more {
    background: linear-gradient(135deg, var(--primary), var(--primary-bright));
    color: white;
    padding: .55rem 1.2rem;
    border-radius: 9999px;
    border: none;
    font-size: .82rem;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all .25s var(--ease-spring);
    display: flex;
    align-items: center;
    gap: .4rem;
    box-shadow: 0 3px 10px rgba(29,78,216,.25);
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 0;
}

.btn-read-more:hover {
    transform: translateX(2px) translateY(-1px);
    box-shadow: 0 6px 18px rgba(29,78,216,.4);
}

.btn-read-more i {
    transition: transform .2s var(--ease);
    font-size: .75rem;
}

.btn-read-more:hover i {
    transform: translateX(4px);
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: .2rem .7rem;
    border-radius: 9999px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-family: var(--font-display);
}

.badge-blue   { background: rgba(29,78,216,.1);    color: #1d4ed8; }
.badge-red    { background: rgba(239,68,68,.1);    color: #dc2626; }
.badge-green  { background: rgba(16,185,129,.1);   color: #059669; }
.badge-orange { background: rgba(245,158,11,.1);   color: #d97706; }
.badge-purple { background: rgba(139,92,246,.1);   color: #7c3aed; }
.badge-cyan   { background: rgba(6,182,212,.1);    color: #0891b2; }
.badge-yellow { background: rgba(234,179,8,.1);    color: #ca8a04; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .375rem;
    margin-top: 2.5rem;
    padding: 1.25rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.pagination-btn {
    padding: .5rem .9rem;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all .2s var(--ease);
    min-width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-glow);
}

.pagination-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 3px 8px rgba(29,78,216,.3);
}

.pagination-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.pagination-dots {
    color: var(--text-faint);
    padding: 0 .25rem;
    user-select: none;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { width: 100%; }

@media (min-width: 1024px) {
    .sidebar {
        position: sticky;
        top: 80px;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: var(--border) transparent;
    }
}

/* ============================================================
   WIDGETS SIDEBAR
   ============================================================ */
.widget {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-light);
}

.widget h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid var(--border);
    letter-spacing: -.01em;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.widget h3::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 1.1em;
    background: linear-gradient(180deg, var(--primary), var(--primary-bright));
    border-radius: 2px;
    flex-shrink: 0;
}

/* Widget Cours */
.widget-courses {
    background: linear-gradient(145deg, #0f172a 0%, #1e3a8a 50%, #1e40af 100%) !important;
    color: white;
    border: none !important;
    position: relative;
    overflow: hidden;
}

.widget-courses::before {
    content: '⚡';
    position: absolute;
    bottom: -1rem;
    right: -1rem;
    font-size: 6rem;
    opacity: .05;
    user-select: none;
}

.widget-courses h3 {
    color: white;
    border-bottom-color: rgba(255,255,255,.15);
}

.widget-courses h3::before {
    background: linear-gradient(180deg, var(--accent), var(--accent-dark));
}

.widget-courses p {
    color: rgba(255,255,255,.7);
    font-size: .85rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.widget-icon-large {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--accent);
    filter: drop-shadow(0 0 8px rgba(245,158,11,.4));
}

.btn-white {
    background: white !important;
    color: var(--primary) !important;
    font-weight: 700;
    font-family: var(--font-body);
    border-radius: var(--radius);
    padding: .75rem 1rem;
    text-decoration: none;
    display: block;
    text-align: center;
    transition: all .2s var(--ease-spring);
    font-size: .875rem;
    border: none;
    cursor: pointer;
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,.2);
}

/* Widget Newsletter */
.widget-newsletter {
    background: var(--surface) !important;
    text-align: center;
}

.widget-icon {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: .75rem;
    display: block;
    filter: drop-shadow(0 0 6px var(--primary-glow));
}

.widget-text {
    font-size: .875rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ============================================================
   ARTICLES POPULAIRES SIDEBAR
   ============================================================ */
.popular-article {
    display: flex;
    gap: .875rem;
    padding: .875rem 0;
    cursor: pointer;
    transition: all .2s var(--ease);
    align-items: flex-start;
    border-radius: var(--radius);
}

.popular-article:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
}

.popular-article:hover {
    background: var(--surface-2);
    margin: 0 -.75rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    border-bottom-color: transparent;
}

.popular-article img {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    background: var(--surface-3);
}

.popular-article-info { flex: 1; min-width: 0; }

.popular-title {
    font-family: var(--font-display);
    font-size: .85rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.35;
    margin-bottom: .35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s;
}

.popular-article:hover .popular-title { color: var(--primary); }

.popular-views {
    font-size: .75rem;
    color: var(--text-faint);
    display: flex;
    align-items: center;
    gap: .25rem;
}

/* ============================================================
   ÉTATS (chargement, vide)
   ============================================================ */
.loading, .empty-state {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-muted);
}

.loading i, .empty-state i {
    font-size: 3rem;
    margin-bottom: 1.25rem;
    color: var(--primary-bright);
    display: block;
}

.loading p, .empty-state p {
    font-size: 1rem;
    opacity: .7;
}

.loading-small {
    text-align: center;
    padding: 2rem;
    color: var(--text-faint);
}

.loading-small i {
    font-size: 1.75rem;
}

/* ============================================================
   BOUTONS GLOBAUX
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .7rem 1.35rem;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all .25s var(--ease-spring);
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-bright));
    color: white;
    box-shadow: 0 4px 12px rgba(29,78,216,.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(29,78,216,.35);
}

.btn-block { width: 100%; }

/* ============================================================
   INPUT GLOBAL
   ============================================================ */
.input {
    width: 100%;
    padding: .75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: .9rem;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--surface-2);
    transition: all .2s var(--ease);
    box-sizing: border-box;
}

.input:focus {
    outline: none;
    border-color: var(--primary-bright);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--surface);
}

/* ============================================================
   MODAL NEWSLETTER
   ============================================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 460px;
    width: 100%;
    overflow: hidden;
    animation: modalIn .3s var(--ease-spring);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(.92) translateY(16px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: var(--surface-3);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    color: var(--text-muted);
    transition: all .2s;
    z-index: 1;
}

.modal-close:hover {
    background: var(--border);
    color: var(--ink);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2.5rem 2rem 2rem;
    text-align: center;
}

.modal-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
    filter: drop-shadow(0 0 12px rgba(29,78,216,.3));
}

.modal-body h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: .75rem;
    letter-spacing: -.02em;
}

.modal-body p {
    color: var(--text-muted);
    font-size: .95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-body form {
    display: flex;
    flex-direction: column;
    gap: .875rem;
}

/* ============================================================
   NOTIFICATIONS TOAST
   ============================================================ */
.notification {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--ink);
    color: white;
    padding: .9rem 1.35rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .9rem;
    font-weight: 500;
    z-index: 10000;
    max-width: 360px;
    transform: translateX(calc(100% + 2rem));
    transition: transform .35s var(--ease-spring);
    border-left: 3px solid var(--primary);
}

.notification.show {
    transform: translateX(0);
}

.notification.success { border-left-color: var(--success); }
.notification.error   { border-left-color: var(--danger); }
.notification.info    { border-left-color: var(--primary-bright); }

.notification i { font-size: 1rem; flex-shrink: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--ink);
    color: rgba(255,255,255,.7);
    padding: 4rem 1.5rem 2rem;
    margin-top: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (max-width: 1024px) {
    .footer-content { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 640px) {
    .footer-content { grid-template-columns: 1fr; gap: 1.75rem; }
}

.footer-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: -.02em;
}

.footer-title i { color: var(--accent); }

.footer-description {
    font-size: .9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    opacity: .7;
}

.social-links {
    display: flex;
    gap: .75rem;
}

.social-links a {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,.08);
    border-radius: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.7);
    text-decoration: none;
    transition: all .2s var(--ease);
    border: 1px solid rgba(255,255,255,.1);
    font-size: .9rem;
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.footer-subtitle {
    font-family: var(--font-display);
    font-size: .85rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.footer-links a {
    color: rgba(255,255,255,.55);
    text-decoration: none;
    font-size: .875rem;
    transition: color .2s;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.footer-links a:hover { color: white; }

.footer-links a::before {
    content: '→';
    font-size: .65em;
    opacity: 0;
    transform: translateX(-4px);
    transition: all .2s;
    display: inline-block;
}

.footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: .825rem;
    color: rgba(255,255,255,.35);
}

.footer-credit {
    display: flex;
    align-items: center;
    gap: .3rem;
}

/* ============================================================
   PAGE DÉTAIL ARTICLE — ÉTATS DE CHARGEMENT
   ============================================================ */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 3rem;
}

.loading-state.hidden { display: none !important; }

.loading-spinner { text-align: center; }

.loading-spinner i {
    font-size: 3rem;
    color: var(--primary-bright);
    margin-bottom: 1.5rem;
    display: block;
}

.loading-spinner p {
    color: var(--text-muted);
    font-size: 1rem;
}

.error-state {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 3rem;
}

.error-state:not(.hidden) { display: flex !important; }

.error-content { text-align: center; max-width: 520px; }

.error-content i {
    font-size: 4rem;
    color: var(--danger);
    margin-bottom: 1.5rem;
    display: block;
}

.error-content h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--ink);
    margin-bottom: 1rem;
    font-weight: 800;
}

.error-content p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* ============================================================
   ARTICLE HERO
   ============================================================ */
.article-hero {
    position: relative;
    width: 100%;
    height: clamp(220px, 45vw, 550px);
    overflow: hidden;
}

.article-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(.9);
    transition: var(--transition);
}

.article-hero:hover .article-hero-image {
    transform: scale(1.02);
    filter: brightness(.95);
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 768px) {
    .search-bar {
        margin: -2rem 1rem 2rem;
        padding: 1rem;
        border-radius: var(--radius-lg);
    }

    .filters {
        padding: 1rem;
        gap: .4rem;
    }

    .filter-btn {
        padding: .4rem .85rem;
        font-size: .78rem;
    }

    .widget { padding: 1.25rem; }
}

@media (max-width: 480px) {
    .article-footer { flex-direction: column; align-items: flex-start; }
    .btn-read-more { width: 100%; justify-content: center; }
}

/* ============================================================
   CONTENU MIROIR — PLEINE LARGEUR PC + MOBILE
   Override le max-width:900px et les paddings de styles.css
   pour que le contenu utilise toute la largeur disponible
   ============================================================ */

/* PC — supprime la contrainte 900px, garde 1rem de marge */
.article-main-content-full {
    max-width: 100% !important;
    padding: 0 1rem !important;
}

/* Div racine injectée par le contenu miroir */
.article-body > div {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
}

/* Mobile ≤ 768px */
@media (max-width: 768px) {
    .article-main-content-full {
        padding: 0 0.5rem !important;
    }

    .article-body > div {
        padding: 4px !important;
    }

    .article-body nav {
        padding: 10px 8px !important;
    }

    .article-body nav ol {
        padding-left: 14px !important;
    }

    /* Tableaux scrollables horizontalement */
    .article-body table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Très petit écran ≤ 480px */
@media (max-width: 480px) {
    .article-main-content-full {
        padding: 0 0.25rem !important;
    }
}

