:root {
    --navy: #082a57;
    --navy2: #041d3e;
    --yellow: #f6b800;
    --red: #ca0017;
    --text: #0b1d3a;
    --muted: #777;
    --line: #e9e9e9;
    --shadow: 0 7px 24px rgba(10, 35, 70, .08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: "Cairo", sans-serif;
    background: #f7f7f7;
    color: var(--text);
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}
.container { width: min(1180px, calc(100% - 32px)); margin: auto; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }

/* ===== HEADER ===== */
.site-header {
    background: linear-gradient(110deg, var(--navy2), var(--navy));
    color: #fff;
    position: relative;
    z-index: 1000;
}
.header-inner {
    height: 92px;
    display: flex;
    align-items: center;
    gap: 28px;
}
.brand { flex: 0 0 auto; }
.brand-logo {
    height: 76px;
    width: auto;
    display: block;
}
@media (max-width: 800px) {
    .brand-logo { height: 58px; }
}
@media (max-width: 560px) {
    .brand-logo { height: 50px; }
}
.main-nav {
    display: flex; align-items: center; gap: 30px; flex: 1;
}
.main-nav a {
    font-size: 16px; font-weight: 700; position: relative; padding: 35px 0 31px;
}
.main-nav a:after {
    content: ""; position: absolute; right: 0; left: 0; bottom: 20px;
    height: 3px; background: var(--yellow); transform: scaleX(0); transition: .2s;
}
.main-nav a:hover:after, .main-nav a.active:after { transform: scaleX(1); }
.main-nav a.active { color: var(--yellow); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
    width: 42px; height: 42px; background: transparent; border: 0;
    color: #fff; font-size: 20px; cursor: pointer;
}
.live-btn {
    background: var(--yellow); color: #302300; padding: 12px 18px;
    font-weight: 800; border-radius: 3px; display: flex; gap: 8px;
    align-items: center; white-space: nowrap;
}
.menu-toggle {
    display: none; background: transparent; border: 0;
    color: #fff; font-size: 30px; cursor: pointer;
}
.close-menu {
    display: none; background: none; border: none;
    color: #fff; font-size: 24px; cursor: pointer;
}

/* ===== BREAKING NEWS – BANDEAU DÉFILANT ===== */
.breaking-news {
    background: linear-gradient(90deg, #a90011, #dc001b, #a90011);
    color: #fff;
    border-bottom: none;
    position: relative;
    z-index: 10;
    padding: 0;
}
.breaking-inner {
    min-height: 43px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.breaking-header {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.breaking-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 18px 4px 14px;
    border-radius: 40px;
    box-shadow: none;
    white-space: nowrap;
}
.breaking-badge .dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    background: #fff;
    border-radius: 50%;
    animation: blink-dot 1.2s infinite step-end;
}
@keyframes blink-dot {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}
.breaking-track {
    overflow: hidden;
    position: relative;
    border-radius: 10px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 8px 0;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.3);
    flex: 1;
}
.breaking-items {
    display: flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation: scroll-flash 30s linear infinite reverse;
    direction: ltr;
}
.breaking-item {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 0 30px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    flex-shrink: 0;
}
.breaking-item .item-separator {
    color: rgba(255,255,255,0.4);
    font-weight: 300;
}
@keyframes scroll-flash {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.breaking-track:hover .breaking-items {
    animation-play-state: paused;
}

/* ===== SEARCH BOX ===== */
.search-box {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 10px 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1005;
    border-radius: 0 0 6px 6px;
}
.search-box form { display: flex; gap: 8px; }
.search-box input {
    flex: 1; padding: 10px 12px; border: 1px solid #ddd; border-radius: 4px;
    font-family: 'Cairo', sans-serif;
}
.search-box button {
    background: var(--navy, #082a57); color: #fff; border: none;
    padding: 0 20px; border-radius: 4px; cursor: pointer; font-weight: 700;
}

/* ===== OVERLAY MOBILE ===== */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: transparent !important;
    z-index: -1 !important;
    pointer-events: none !important;
}
.nav-overlay.active {
    display: block !important;
    pointer-events: none !important;
}
body.menu-open { overflow: hidden; }

/* ===== HERO SLIDER ===== */
.hero-slider {
    height: 430px; border-radius: 4px; overflow: hidden; position: relative;
    background: #111; box-shadow: var(--shadow);
}
.hero-slide {
    position: absolute; inset: 0; opacity: 0; transition: opacity .5s;
    pointer-events: none;
}
.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-shade {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,.05), rgba(0,0,0,.15), rgba(0,0,0,.72));
}
.hero-slide h1 {
    position: absolute; right: 48px; bottom: 45px; color: #fff;
    font-size: 44px; line-height: 1.35; font-weight: 900; max-width: 650px;
    text-shadow: 0 3px 18px rgba(0,0,0,.45);
}
.hero-dots {
    position: absolute; bottom: 18px; left: 25px; display: flex; gap: 11px; z-index: 4;
}
.hero-dots button {
    width: 10px; height: 10px; border-radius: 50%; border: 0; background: #fff;
    cursor: pointer;
}
.hero-dots button.active { background: var(--yellow); }

/* ===== TOP STORIES ===== */
.top-stories { padding: 20px 0 24px; }
.story-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.story-card {
    background: #fff; border-radius: 5px; padding: 9px;
    box-shadow: var(--shadow); border: 1px solid #eee;
}
.story-image { height: 160px; position: relative; overflow: hidden; }
.story-image img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.story-card:hover img { transform: scale(1.04); }
.story-image span {
    position: absolute; bottom: 8px; right: 0; background: var(--yellow);
    padding: 3px 18px; font-size: 12px; font-weight: 800;
    clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%);
}
.story-card h3 { font-size: 15px; line-height: 1.65; margin: 10px 5px 8px; min-height: 49px; }
.story-card p { font-size: 11px; color: #777; margin: 0 5px 4px; }

/* ===== NEWS COMPOSITION ===== */
.news-composition { display: grid; grid-template-columns: 310px 1fr; gap: 24px; align-items: stretch; padding-bottom: 25px; }
.latest-panel, .category-panel {
    background: #fff; border-radius: 6px; box-shadow: var(--shadow); border: 1px solid #eee;
}
.latest-panel { padding: 16px; }
.latest-panel h2 { font-size: 21px; font-weight: 800; margin-bottom: 10px; }
.slashes { color: var(--yellow); font-weight: 900; letter-spacing: -2px; }
.latest-list article {
    display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line);
}
.latest-list img { width: 92px; height: 67px; object-fit: cover; border-radius: 2px; flex-shrink: 0; }
.latest-list b { color: var(--yellow); font-size: 12px; }
.latest-list h4 { font-size: 12px; line-height: 1.55; margin: 4px 0; }
.latest-list small { font-size: 10px; color: #888; }
.outline-btn {
    display: block; border: 1px solid #e5c14f; color: #173765;
    text-align: center; padding: 9px; margin-top: 14px;
    font-weight: 800; font-size: 13px; border-radius: 2px;
}
.outline-btn:hover { background: var(--yellow); }

.category-panel { overflow: hidden; }
.category-tabs {
    height: 46px; display: grid; grid-template-columns: repeat(5,1fr);
    border-bottom: 1px solid var(--line);
}
.tab-btn {
    border: 0; background: #fff; color: #111; font-weight: 800;
    font-size: 13px; cursor: pointer; position: relative;
}
.tab-btn.active { background: var(--yellow); }
.tab-btn.active:after {
    content: ""; position: absolute; left: -15px; top: 0;
    border-top: 46px solid var(--yellow); border-left: 15px solid transparent;
}
.tab-content { display: none; padding: 18px; }
.tab-content.active { display: grid; }
.tab-content#politics { grid-template-columns: 1.25fr .85fr; gap: 18px; }
.category-feature img { width: 100%; height: 260px; object-fit: cover; }
.category-feature h2 { font-size: 18px; line-height: 1.55; margin: 10px 0 5px; }
.category-feature p { font-size: 12px; color: #777; line-height: 1.8; }
.category-feature small, .category-side-list small { font-size: 10px; color: #777; }
.category-side-list article {
    display: flex; gap: 12px; padding: 7px 0 13px;
    border-bottom: 1px solid var(--line); margin-bottom: 6px;
}
.category-side-list img { width: 115px; height: 77px; object-fit: cover; order: -1; }
.category-side-list h3 { font-size: 12px; line-height: 1.65; margin-bottom: 10px; }
.empty-tab {
    min-height: 360px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
    color: #777;
}
.empty-tab i { font-size: 50px; color: var(--yellow); margin-bottom: 10px; }

/* ===== VIDEOS ===== */
.videos {
    background: #fff; border-radius: 6px; box-shadow: var(--shadow);
    border: 1px solid #eee; padding: 12px 28px 22px; margin-bottom: 0;
}
.section-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.section-heading h2 { font-size: 20px; }
.video-strip { display: grid; grid-template-columns: repeat(5,1fr); gap: 16px; }
.video-strip article>div { height: 130px; position: relative; overflow: hidden; }
.video-strip img { width: 100%; height: 100%; object-fit: cover; }
.video-strip button {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: 42px; height: 42px; border-radius: 50%; border: 2px solid #fff;
    background: rgba(0,0,0,.4); color: #fff; font-size: 21px;
}
.video-strip span {
    position: absolute; bottom: 5px; left: 5px; background: #111;
    color: var(--yellow); font-size: 10px; padding: 2px 5px;
}
.video-strip h4 { font-size: 11px; text-align: center; margin-top: 7px; line-height: 1.5; }

/* ===== FOOTER ===== */
.site-footer {
    margin-top: 0; background: linear-gradient(120deg, var(--navy2), var(--navy));
    color: #fff; padding-top: 35px;
}
.footer-grid {
    display: grid; grid-template-columns: 1.2fr .7fr .8fr 1.3fr 1fr; gap: 45px;
}
.footer-logo {
    height: 65px;
    width: auto;
    display: block;
}
@media (max-width: 560px) {
    .footer-logo { height: 50px; }
}
.footer-about p, .site-footer p { font-size: 11px; color: rgba(255,255,255,.7); line-height: 1.8; margin-top: 12px; }
.site-footer h3 { color: var(--yellow); font-size: 14px; margin-bottom: 15px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 6px; font-size: 11px; color: rgba(255,255,255,.8); }
.socials { display: flex; gap: 8px; margin-top: 14px; }
.socials a {
    width: 28px; height: 28px; background: var(--yellow); color: #18345d;
    border-radius: 50%; display: grid; place-items: center;
}
.newsletter input { width: 100%; height: 38px; border: 0; padding: 0 12px; font-size: 11px; }
.newsletter button {
    width: 100%; height: 38px; border: 0; background: var(--yellow);
    font-weight: 800; margin-top: 10px;
}
.app-links { display: flex; gap: 8px; flex-wrap: wrap; }
.app-links a { border: 1px solid rgba(255,255,255,.5); padding: 7px 9px; border-radius: 4px; font-size: 10px; }
.copyright {
    text-align: center; border-top: 1px solid rgba(255,255,255,.1);
    margin-top: 30px; padding: 15px; font-size: 10px; color: rgba(255,255,255,.6);
}
.scroll-top {
    position: fixed; left: 20px; bottom: 20px; width: 42px; height: 42px;
    border: 0; background: var(--yellow); color: #173765; font-size: 18px;
    opacity: 0; visibility: hidden; transition: .2s; z-index: 100;
}
.scroll-top.show { opacity: 1; visibility: visible; }

/* ===== STYLE DES CITATIONS ===== */
blockquote {
    border-left: 4px solid #041d3e !important;
    border-right: 4px solid #041d3e !important;
    padding: 15px 25px !important;
    margin: 20px 0 !important;
    background-color: #f8f9fa !important;
    font-style: italic !important;
    border-radius: 4px !important;
    color: #333 !important;
}
blockquote a {
    text-decoration: underline !important;
    color: #041d3e !important;
}
blockquote::before {
    content: "\"" !important;
    font-size: 1.5em;
    color: #041d3e;
    margin-left: 5px;
}
blockquote::after {
    content: "\"" !important;
    font-size: 1.5em;
    color: #041d3e;
    margin-right: 5px;
}
blockquote.forced-quote-style::before {
    content: "\"" !important;
    font-size: 1.5em;
    color: #041d3e;
    margin-left: 5px;
}
blockquote.forced-quote-style::after {
    content: "\"" !important;
    font-size: 1.5em;
    color: #041d3e;
    margin-right: 5px;
}

/* ===== RECHERCHE INTÉGRÉE DANS LE MENU MOBILE ===== */
.mobile-search {
    display: none;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.2);
}
.mobile-search form {
    display: flex;
    gap: 8px;
}
.mobile-search input {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 4px;
    font-family: 'Cairo', sans-serif;
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.mobile-search input::placeholder {
    color: rgba(255,255,255,0.6);
}
.mobile-search button {
    background: var(--yellow);
    color: #041d3e;
    border: none;
    padding: 0 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    font-size: 18px;
}

/* ================================================================ */
/* ========== STYLE POUR LES ARTICLES EN VEDETTE ================== */
/* ================================================================ */

.featured-card {
    position: relative !important;
    border: 2px solid var(--yellow) !important;
    border-radius: 6px;
    padding: 8px;
    background: rgba(246, 184, 0, 0.05);
    box-shadow: 0 0 0 1px rgba(246, 184, 0, 0.2);
    transition: border-color 0.3s, box-shadow 0.3s;
    overflow: hidden !important;
}
.featured-card:hover {
    border-color: #e5a800;
    box-shadow: 0 0 12px rgba(246, 184, 0, 0.3);
}

/* Badge "★ مميز" en bas à gauche */
.featured-card::before {
    content: "★ مميز";
    position: absolute;
    bottom: 0;
    left: 0;
    background: var(--yellow);
    color: #041d3e;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 0 12px 0 0;
    line-height: 1.4;
    z-index: 5;
    white-space: nowrap;
}

/* Responsive pour la carte en vedette et son badge */
@media (max-width: 800px) {
    .featured-card::before {
        font-size: 0.65rem;
        padding: 3px 12px;
        border-radius: 0 10px 0 0;
    }
}
@media (max-width: 560px) {
    .featured-card::before {
        font-size: 0.55rem !important;
        padding: 2px 10px !important;
        border-radius: 0 8px 0 0 !important;
    }
}
@media (max-width: 380px) {
    .featured-card::before {
        font-size: 0.5rem !important;
        padding: 2px 8px !important;
    }
}

/* ================================================================ */
/* ========== RESPONSIVE – MENU MOBILE ========== */
/* ================================================================ */

@media (max-width: 1050px) {
    .main-nav { gap: 16px; }
    .main-nav a { font-size: 12px; }
    .header-actions .live-btn span { display: none; }
    .story-grid { grid-template-columns: repeat(2,1fr); }
    .news-composition { grid-template-columns: 280px 1fr; }
    .video-strip { grid-template-columns: repeat(3,1fr); }
    .footer-grid { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 800px) {
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: #f6b800;
        color: #041d3e;
        border: none;
        border-radius: 4px;
        padding: 8px 12px;
        font-size: 28px;
        width: 48px;
        height: 48px;
        cursor: pointer;
        z-index: 1002;
    }

    .main-nav {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 80% !important;
        max-width: 320px !important;
        height: 100% !important;
        background: #062550 !important;
        flex-direction: column !important;
        padding: 20px !important;
        z-index: 1002 !important;
        transition: right 0.3s ease !important;
        box-shadow: -5px 0 20px rgba(0,0,0,0.5) !important;
        display: flex !important;
        overflow-y: auto !important;
        pointer-events: auto !important;
    }
    .main-nav.open {
        right: 0 !important;
    }

    .main-nav a {
        color: #fff !important;
        padding: 14px 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.15) !important;
        font-size: 16px !important;
        text-align: right !important;
        width: 100% !important;
        display: block !important;
        pointer-events: auto !important;
        cursor: pointer !important;
    }
    .main-nav a:after { display: none !important; }

    .main-nav .close-menu {
        display: none !important;
        background: none !important;
        border: none !important;
        color: #fff !important;
        font-size: 28px !important;
        text-align: left !important;
        padding: 10px 0 !important;
        margin-bottom: 15px !important;
        border-bottom: 2px solid rgba(255,255,255,0.2) !important;
        cursor: pointer !important;
        pointer-events: auto !important;
    }
    .main-nav.open .close-menu {
        display: block !important;
    }

    .main-nav.open .mobile-search {
        display: block !important;
    }

    .nav-overlay {
        z-index: 1001 !important;
    }

    .header-inner {
        height: 72px !important;
        padding: 0 10px !important;
        gap: 10px !important;
    }
    .container { width: min(100% - 22px, 1180px); }
    .hero-slider { height: 290px; }
    .hero-slide h1 { font-size: 28px; right: 22px; bottom: 35px; }
    .news-composition { grid-template-columns: 1fr; }
    .latest-panel { order: 2; }
    .category-panel { order: 1; }
    .tab-content#politics { grid-template-columns: 1fr; }
    .category-feature img { height: 230px; }
    .category-side-list img { width: 105px; }
    .video-strip {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 5px;
    }
    .video-strip article { min-width: 210px; scroll-snap-align: start; }
    .footer-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 560px) {
    .header-actions .icon-btn:not(.search-toggle):not(#darkToggle) {
        display: none !important;
    }
    .header-actions .search-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    #darkToggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.1);
        border-radius: 50%;
        width: 42px;
        height: 42px;
    }
    .live-btn { padding: 8px 10px !important; font-size: 12px !important; }
    .live-btn span { display: none !important; }
    .container { width: calc(100% - 20px); }
    .header-inner { height: 64px; }
    .main-nav { width: 85% !important; }
    .main-nav a { font-size: 15px !important; padding: 12px 0 !important; }
    .menu-toggle { width: 42px; height: 42px; font-size: 24px; }
    .hero-slider { height: 220px; border-radius: 0; }
    .hero-slide h1 {
        right: 14px; left: 14px; bottom: 32px;
        font-size: 20px; line-height: 1.45; max-width: calc(100% - 32px);
    }
    .hero-shade {
        background: linear-gradient(0deg, rgba(0,0,0,.78), rgba(0,0,0,.08) 70%);
    }
    .top-stories { padding: 12px 0 16px; }
    .story-grid { grid-template-columns: 1fr; gap: 12px; }
    .story-card {
        display: grid;
        grid-template-columns: 42% 1fr;
        gap: 10px;
        padding: 8px;
        align-items: center;
    }
    .story-image { height: 110px; }
    .story-card h3 { font-size: 13px; min-height: 0; margin: 0; line-height: 1.65; }
    .story-card p { grid-column: 2; margin: 4px 0 0; font-size: 10px; }
    .story-image span { font-size: 10px; padding: 2px 12px; }
    .news-composition { width: 100%; }
    .category-tabs {
        overflow-x: auto; display: flex; scrollbar-width: none;
    }
    .category-tabs::-webkit-scrollbar { display: none; }
    .tab-btn { min-width: 92px; height: 44px; flex: 0 0 auto; padding: 0 14px; font-size: 12px; }
    .tab-btn.active:after { display: none; }
    .tab-content { padding: 12px; }
    .category-feature img { height: 180px; }
    .category-feature h2 { font-size: 16px; }
    .category-side-list img { width: 92px; height: 68px; flex: 0 0 92px; }
    .latest-panel h2 { font-size: 19px; }
    .videos { padding: 12px 10px 16px; }
    .video-strip article { min-width: 78vw; max-width: 300px; }
    .video-strip article>div { height: 170px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .site-footer { text-align: center; }
    .footer-logo { margin: auto; }
    .socials, .app-links { justify-content: center; }
    .scroll-top { left: 12px; bottom: 12px; width: 40px; height: 40px; }
}

@media (max-width: 380px) {
    .container { width: calc(100% - 14px); }
    .live-btn { padding: 8px; }
    .live-btn i { margin: 0; }
    .hero-slider { height: 205px; }
    .hero-slide h1 { font-size: 18px; }
    .story-card { grid-template-columns: 40% 1fr; }
    .story-image { height: 100px; }
    .video-strip article { min-width: 86vw; }
    .category-side-list img { width: 82px; flex-basis: 82px; }
}

html, body { max-width: 100%; overflow-x: hidden; }
body { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
img, svg, video, iframe { max-width: 100%; height: auto; }
button, a, input { touch-action: manipulation; }

/* ================================================================ */
/* ========== MODE SOMBRE (DARK MODE) ========== */
/* ================================================================ */

body.dark-mode {
    --navy: #0a1a2b;
    --navy2: #061220;
    --text: #e8edf3;
    --muted: #aaa;
    --line: #2a3a4a;
    --shadow: 0 7px 24px rgba(0, 0, 0, 0.5);
    background: #0d1b2a;
    color: var(--text);
}

body.dark-mode .site-header {
    background: linear-gradient(110deg, #061220, #0a1a2b);
}

body.dark-mode .main-nav {
    background: #0a1a2b !important;
}

body.dark-mode .main-nav a {
    color: #e8edf3 !important;
}

body.dark-mode .main-nav a.active {
    color: var(--yellow) !important;
}

body.dark-mode .search-box {
    background: #1a2a3a;
}

body.dark-mode .search-box input {
    background: #0d1b2a;
    color: #fff;
    border-color: #3a4a5a;
}

body.dark-mode .search-box input::placeholder {
    color: #aaa;
}

body.dark-mode .search-box button {
    background: var(--yellow);
    color: #041d3e;
}

body.dark-mode .story-card,
body.dark-mode .latest-panel,
body.dark-mode .category-panel,
body.dark-mode .videos {
    background: #152433;
    border-color: #2a3a4a;
}

body.dark-mode .story-card h3,
body.dark-mode .latest-panel h2,
body.dark-mode .category-feature h2,
body.dark-mode .videos .section-heading h2 {
    color: #e8edf3;
}

body.dark-mode .story-card p,
body.dark-mode .latest-list small,
body.dark-mode .category-feature p,
body.dark-mode .category-side-list small,
body.dark-mode .empty-tab {
    color: #c8d8e8;
}

body.dark-mode .latest-list h4,
body.dark-mode .category-side-list h3,
body.dark-mode .video-strip h4 {
    color: #e8edf3;
}

body.dark-mode .latest-list article {
    border-bottom-color: #2a3a4a;
}

body.dark-mode .tab-btn {
    background: #152433;
    color: #b0c0d0;
}

body.dark-mode .tab-btn.active {
    background: var(--yellow);
    color: #041d3e;
}

body.dark-mode .tab-btn.active:after {
    border-top-color: var(--yellow);
}

body.dark-mode .outline-btn {
    border-color: var(--yellow);
    color: var(--yellow);
}

body.dark-mode .outline-btn:hover {
    background: var(--yellow);
    color: #041d3e;
}

body.dark-mode .site-footer {
    background: linear-gradient(120deg, #061220, #0a1a2b);
}

body.dark-mode .footer-about p,
body.dark-mode .site-footer p,
body.dark-mode .site-footer li,
body.dark-mode .copyright {
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .newsletter input {
    background: #0d1b2a;
    color: #fff;
}

body.dark-mode .newsletter button {
    background: var(--yellow);
    color: #041d3e;
}

body.dark-mode .scroll-top {
    background: var(--yellow);
    color: #041d3e;
}

body.dark-mode blockquote {
    background-color: #1a2a3a !important;
    color: #e8edf3 !important;
    border-left-color: var(--yellow) !important;
    border-right-color: var(--yellow) !important;
}

body.dark-mode blockquote a {
    color: var(--yellow) !important;
}

body.dark-mode blockquote::before,
body.dark-mode blockquote::after {
    color: var(--yellow) !important;
}

body.dark-mode .story-card a,
body.dark-mode .latest-list a,
body.dark-mode .category-feature a,
body.dark-mode .category-side-list a {
    color: var(--yellow) !important;
}

body.dark-mode .story-card a:hover,
body.dark-mode .latest-list a:hover,
body.dark-mode .category-feature a:hover,
body.dark-mode .category-side-list a:hover {
    color: #ffd966 !important;
}

body.dark-mode .mobile-search input {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

body.dark-mode .mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

body.dark-mode .story-card,
body.dark-mode .latest-panel,
body.dark-mode .category-panel,
body.dark-mode .videos {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7) !important;
}

/* ================================================================ */
/* ========== CORRECTIONS PAGE D'ARTICLE (single-post) ============= */
/* ================================================================ */

body.dark-mode .single-post {
    background: #152433 !important;
    color: #e8edf3 !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7) !important;
}

body.dark-mode .single-post h1 {
    color: #e8edf3 !important;
}

body.dark-mode .single-post .bi,
body.dark-mode .single-post .bi::before {
    color: #c8d8e8 !important;
}

body.dark-mode .single-post a {
    color: var(--yellow) !important;
}

body.dark-mode .single-post a:hover {
    color: #ffd966 !important;
}

body.dark-mode .single-post div[style*="color:var(--text)"] {
    color: #e8edf3 !important;
}

body.dark-mode .single-post blockquote {
    background-color: #1a2a3a !important;
    border-left-color: var(--yellow) !important;
    border-right-color: var(--yellow) !important;
    color: #e8edf3 !important;
}

body.dark-mode .single-post blockquote a {
    color: var(--yellow) !important;
}

body.dark-mode .single-post + div article {
    background: #152433 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
}

body.dark-mode .single-post + div article h4 a {
    color: #e8edf3 !important;
}

body.dark-mode .single-post + div article h4 a:hover {
    color: var(--yellow) !important;
}

body.dark-mode .single-post + div article small {
    color: #b0c0d0 !important;
}

body.dark-mode .single-post + div {
    border-top-color: #2a3a4a !important;
}

body.dark-mode .single-post > div:last-child {
    border-top-color: #2a3a4a !important;
}

/* ================================================================ */
/* ========== CORRECTIONS PAGE DE RECHERCHE (résultats) ============ */
/* ================================================================ */

body.dark-mode .container h1 {
    color: #e8edf3 !important;
}

body.dark-mode .container article {
    background: #152433 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
}

body.dark-mode .container article h2 a {
    color: #e8edf3 !important;
}

body.dark-mode .container article h2 a:hover {
    color: var(--yellow) !important;
}

body.dark-mode .container article p {
    color: #c8d8e8 !important;
}

body.dark-mode .container article small {
    color: #b0c0d0 !important;
}

body.dark-mode .container article small i {
    color: #c8d8e8 !important;
}

body.dark-mode .container > p {
    color: #e8edf3 !important;
}

/* ================================================================ */
/* ========== CORRECTIONS PAGE CONTACT ============================= */
/* ================================================================ */

body.dark-mode .container[style*="background:#fff"] {
    background: #152433 !important;
    color: #e8edf3 !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7) !important;
}

body.dark-mode .container h1 {
    color: #e8edf3 !important;
}

body.dark-mode .container .alert-success {
    background: #1a3a2a !important;
    color: #b8e6c8 !important;
}

body.dark-mode .container label {
    color: #e8edf3 !important;
}

body.dark-mode .container input,
body.dark-mode .container textarea {
    background: #0d1b2a !important;
    border-color: #3a4a5a !important;
    color: #e8edf3 !important;
}

body.dark-mode .container input::placeholder,
body.dark-mode .container textarea::placeholder {
    color: #8898a8 !important;
}

body.dark-mode .container button[type="submit"] {
    background: var(--yellow) !important;
    color: #041d3e !important;
}

body.dark-mode .container button[type="submit"]:hover {
    background: #ffd966 !important;
}

/* ================================================================ */
/* ========== CORRECTIONS PAGE D'ERREUR (error/index) ============== */
/* ================================================================ */

body.dark-mode .example-wrapper {
    background: #152433 !important;
    color: #e8edf3 !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7) !important;
}

body.dark-mode .example-wrapper h1 {
    color: #e8edf3 !important;
}

body.dark-mode .example-wrapper code {
    background: #2a3a4a !important;
    color: #ffd966 !important;
    padding: 2px 6px !important;
}

body.dark-mode .example-wrapper ul {
    color: #c8d8e8 !important;
}

body.dark-mode .example-wrapper li {
    color: #c8d8e8 !important;
}

/* ================================================================ */
/* ========== BREAKING NEWS – CORRECTION MOBILE =================== */
/* ================================================================ */

@media (max-width: 600px) {
    .breaking-inner {
        gap: 6px;
        min-height: 34px;
        flex-wrap: nowrap;
        padding: 0 4px;
    }
    .breaking-badge {
        font-size: 0.55rem;
        padding: 2px 8px 2px 6px;
        gap: 4px;
        flex-shrink: 0;
        letter-spacing: 0.04em;
        border-radius: 30px;
    }
    .breaking-badge .dot {
        width: 5px;
        height: 5px;
    }
    .breaking-badge i {
        font-size: 0.6rem;
    }
    .breaking-live {
        display: none;
    }
    .breaking-track {
        flex: 1;
        min-width: 0;
        padding: 3px 0;
        border-radius: 6px;
        background: rgba(0, 0, 0, 0.15);
        border: none;
        box-shadow: none;
    }
    .breaking-item {
        font-size: 0.72rem;
        padding: 0 10px;
        gap: 6px;
        font-weight: 600;
        letter-spacing: 0.005em;
    }
    .breaking-item .item-icon {
        font-size: 0.8rem;
        flex-shrink: 0;
    }
    .breaking-item .item-separator {
        margin: 0 2px;
        color: rgba(255, 255, 255, 0.3);
    }
    .breaking-item .item-time {
        font-size: 0.5rem;
        padding: 1px 6px;
        background: rgba(0, 0, 0, 0.3);
        border: none;
        flex-shrink: 0;
    }
    .breaking-items {
        animation-duration: 28s;
    }
}

@media (max-width: 380px) {
    .breaking-inner {
        gap: 4px;
        min-height: 30px;
    }
    .breaking-badge {
        font-size: 0.5rem;
        padding: 2px 5px 2px 4px;
    }
    .breaking-badge .dot {
        width: 4px;
        height: 4px;
    }
    .breaking-badge i {
        font-size: 0.5rem;
    }
    .breaking-item {
        font-size: 0.6rem;
        padding: 0 6px;
        gap: 4px;
    }
    .breaking-item .item-icon {
        font-size: 0.7rem;
    }
    .breaking-item .item-time {
        font-size: 0.45rem;
        padding: 1px 4px;
    }
    .breaking-track {
        padding: 2px 0;
    }
    .breaking-items {
        animation-duration: 32s;
    }
}

@media (max-width: 480px) {
    .breaking-item .item-text {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 55vw;
        display: inline-block;
        vertical-align: middle;
    }
}