/* ============================================================
   RDC-INFO.com — Styles principaux
   Palette : Navy #1A2B4A (principal) + Or #F5D038 (accent)
   Rouge #C8102E réservé aux badges catégorie uniquement
   ============================================================ */

:root {
    --red:    #C8102E;
    --gold:   #F5D038;
    --gold-dark: #c9a800;
    --green:  #007A5E;
    --navy:   #1A2B4A;
    --navy-light: #243860;
    --text:   #1a1a1a;
    --muted:  #6b7280;
    --border: #e5e7eb;
    --bg:     #f8f9fa;
    --white:  #ffffff;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,.08);
    --cat-color: var(--navy);
    font-size: 16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', Arial, sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 5vw, 2rem); }

/* ── Header ─────────────────────────────────────────────── */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,.2); }

.header-top { background: var(--navy); border-bottom: 3px solid var(--gold); }
.header-top-inner { display: flex; align-items: center; justify-content: space-between; padding: .75rem 0; gap: 1rem; flex-wrap: wrap; }

.site-logo { display: flex; align-items: center; gap: .5rem; color: #fff; text-decoration: none; }
.logo-flag { font-size: 1.8rem; }
.logo-name { font-size: 1.5rem; font-weight: 800; letter-spacing: 1px; color: var(--gold); }
.logo-tagline { font-size: .75rem; color: rgba(255,255,255,.7); display: none; }
.site-logo-img { height: 80px; width: auto; display: block; }
@media (min-width: 768px) { .logo-tagline { display: inline; } }

.header-right { display: flex; align-items: center; gap: 1rem; }

.lang-switcher { display: flex; gap: .25rem; }
.lang-btn { padding: .25rem .6rem; border-radius: 4px; font-size: .8rem; font-weight: 600; color: rgba(255,255,255,.7); background: transparent; border: 1px solid rgba(255,255,255,.3); }
.lang-btn.active, .lang-btn:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); text-decoration: none; }

.header-search { display: flex; gap: .25rem; }
.header-search input { padding: .35rem .75rem; border-radius: 4px; border: none; font-size: .85rem; background: rgba(255,255,255,.15); color: #fff; width: 180px; }
.header-search input::placeholder { color: rgba(255,255,255,.5); }
.header-search input:focus { outline: none; background: rgba(255,255,255,.25); }
.header-search button { background: var(--gold); border: none; padding: .35rem .6rem; border-radius: 4px; color: var(--navy); cursor: pointer; font-weight: 700; }

/* Nav */
.site-nav { background: var(--navy-light); border-bottom: 1px solid rgba(255,255,255,.08); }
.nav-list { display: flex; list-style: none; gap: 0; overflow-x: auto; }
.nav-list li a { display: block; padding: .7rem 1rem; color: rgba(255,255,255,.85); font-size: .875rem; font-weight: 500; white-space: nowrap; border-bottom: 3px solid transparent; transition: all .2s; }
.nav-list li a:hover { color: var(--gold); border-color: var(--gold); text-decoration: none; background: rgba(255,255,255,.04); }

.mobile-menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.mobile-menu-toggle span { display: block; width: 22px; height: 2px; background: #fff; margin: 4px 0; }

/* ── Nav "more" dropdown — desktop Priority+ ─────────────── */
@media (min-width: 901px) {
    .nav-list { overflow: visible; }
    .nav-more { position: relative; }
    .nav-more-btn {
        display: flex; align-items: center; height: 100%;
        padding: .7rem 1rem; background: none; border: none;
        border-bottom: 3px solid transparent;
        color: rgba(255,255,255,.85); font-size: 1.1rem; font-weight: 700;
        letter-spacing: .2em; white-space: nowrap; cursor: pointer; transition: all .2s;
    }
    .nav-more-btn:hover, .nav-more.open .nav-more-btn {
        color: var(--gold); border-color: var(--gold); background: rgba(255,255,255,.04);
    }
    .nav-more-dropdown {
        display: none; position: absolute; top: 100%; right: 0; z-index: 300;
        min-width: 190px; list-style: none; margin: 0; padding: .35rem 0;
        background: var(--navy-light); border: 1px solid rgba(255,255,255,.12);
        border-top: 2px solid var(--gold);
        border-radius: 0 0 6px 6px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
    }
    .nav-more.open .nav-more-dropdown { display: block; }
    .nav-more-dropdown li a {
        display: block; padding: .6rem 1.15rem !important;
        border-bottom: none !important; white-space: nowrap;
    }
    .nav-more-dropdown li a:hover { background: rgba(255,255,255,.07) !important; }
}

/* ── Hero ────────────────────────────────────────────────── */
.hero { background: var(--navy); color: #fff; padding: 3rem 0; text-align: center; border-bottom: 4px solid var(--gold); }
.hero h1 { font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 800; margin-bottom: .75rem; color: var(--gold); }
.hero p { font-size: 1.05rem; opacity: .85; max-width: 640px; margin: 0 auto; }
.hero-cta { margin-top: 1.75rem; }

/* ── Sections ────────────────────────────────────────────── */
.section { padding: 2.5rem 0 1rem 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.section-title { font-size: 1.4rem; font-weight: 700; border-left: 4px solid var(--cat-color, var(--gold)); padding-left: .75rem; }
.section-title a { color: inherit; }
.see-all { font-size: .875rem; font-weight: 600; color: var(--navy); }
.see-all:hover { color: var(--gold-dark); }

/* ── Grilles articles ────────────────────────────────────── */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.articles-grid--hero { grid-template-columns: repeat(3, 1fr); }
.articles-grid--hero .article-card--featured { grid-column: span 2; grid-row: span 2; }
@media (max-width: 900px) { .articles-grid, .articles-grid--hero { grid-template-columns: repeat(2,1fr); } .articles-grid--hero .article-card--featured { grid-column: span 2; grid-row: span 1; } }
@media (max-width: 600px) { .articles-grid, .articles-grid--hero { grid-template-columns: 1fr; } .articles-grid--hero .article-card--featured { grid-column: span 1; } }

/* ── Article card ────────────────────────────────────────── */
.article-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
.article-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.12); }

.article-img-wrap { overflow: hidden; aspect-ratio: 16/9; display: block; }
.article-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.article-card:hover .article-img-wrap img { transform: scale(1.03); }
.article-card--featured .article-img-wrap { aspect-ratio: unset; flex: 1; min-height: 0; }
.article-card--featured .article-body { flex: none; }

.article-body { padding: .875rem 1rem 1rem; flex: 1; display: flex; flex-direction: column; gap: .4rem; }

.article-cat { display: inline-block; background: var(--cat-color, var(--navy)); color: #fff; font-size: .7rem; font-weight: 700; padding: .2rem .55rem; border-radius: 3px; text-transform: uppercase; letter-spacing: .5px; }

.article-title { font-size: .975rem; font-weight: 700; line-height: 1.4; flex: 1; }
.article-title a { color: var(--text); }
.article-title a:hover { color: var(--navy); text-decoration: none; }
.article-card--featured .article-title { font-size: 1.2rem; }

.article-excerpt { font-size: .85rem; color: var(--muted); line-height: 1.5; }

.article-meta { display: flex; gap: .75rem; font-size: .78rem; color: var(--muted); flex-wrap: wrap; margin-top: auto; padding-top: .4rem; border-top: 1px solid var(--border); }
.article-source::before { content: '·'; margin-right: .5rem; }

/* ── Liste articles (catégorie/recherche) ────────────────── */
.articles-list { display: flex; flex-direction: column; gap: 1rem; }
.article-row { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; gap: 1rem; overflow: hidden; }
.article-row-img { flex: 0 0 180px; overflow: hidden; }
.article-row-img img { width: 100%; height: 120px; object-fit: cover; }
.article-row-body { flex: 1; padding: .875rem; }
@media (max-width: 540px) { .article-row { flex-direction: column; } .article-row-img { flex: none; } .article-row-img img { height: 180px; width: 100%; } }

/* ── Article detail ──────────────────────────────────────── */
.article-page { max-width: 840px; }
.article-full-header { margin-bottom: 1.5rem; }
.article-full-header h1 { font-size: clamp(1.3rem, 3vw, 2rem); line-height: 1.3; margin: .5rem 0; }
.article-full-image img { width: 100%; border-radius: var(--radius); margin-bottom: 1.5rem; max-height: 450px; object-fit: cover; }
.article-full-excerpt { font-size: 1.1rem; line-height: 1.7; color: #333; border-left: 3px solid var(--gold); padding-left: 1rem; margin-bottom: 1.5rem; }
.article-source-cta { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; text-align: center; margin: 2rem 0; }
.article-source-cta p { color: var(--muted); margin-bottom: 1rem; }
.article-views { color: var(--muted); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn { display: inline-block; padding: .6rem 1.2rem; border-radius: 6px; font-size: .9rem; font-weight: 700; cursor: pointer; border: 2px solid transparent; transition: all .15s; text-align: center; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: var(--navy); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn-source { font-size: 1rem; padding: .75rem 2rem; }
.btn-block { width: 100%; }
.btn-sm { padding: .3rem .7rem; font-size: .8rem; }

/* ── Newsletter CTA ──────────────────────────────────────── */
.newsletter-cta { background: var(--navy); color: #fff; padding: 3rem 0; border-top: 4px solid var(--gold); }
.newsletter-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.newsletter-cta-text h2 { font-size: 1.5rem; color: var(--gold); margin-bottom: .5rem; }
.newsletter-cta-text p { opacity: .85; }
.newsletter-form { flex: 0 0 400px; }
.newsletter-form-row { display: flex; gap: .5rem; }
.newsletter-form-row input { flex: 1; padding: .65rem 1rem; border-radius: 6px; border: none; font-size: .9rem; }
.newsletter-form-row input:focus { outline: 2px solid var(--gold); }
.newsletter-form-row button { background: var(--gold); color: var(--navy); border: none; padding: .65rem 1.2rem; border-radius: 6px; font-weight: 700; cursor: pointer; font-size: .9rem; }
.newsletter-form-row button:hover { background: var(--gold-dark); }
.nl-msg { margin-top: .5rem; font-size: .875rem; padding: .4rem .75rem; border-radius: 4px; }
.nl-ok  { background: rgba(0,122,94,.15); color: #005a3c; }
.nl-err { background: rgba(200,16,46,.1); color: #991b1b; }

/* Newsletter page card */
.newsletter-page-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; }
.nl-legal { font-size: .8rem; color: var(--muted); text-align: center; margin-top: 1rem; }

/* ── Page header ─────────────────────────────────────────── */
.page-header { background: var(--navy); color: #fff; padding: 2rem 0; border-bottom: 3px solid var(--gold); }
.page-header h1 { font-size: clamp(1.4rem, 3vw, 2rem); }
.page-header p { opacity: .8; margin-top: .4rem; }
.page-body { padding-top: 2rem; padding-bottom: 2rem; }

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb { display: flex; gap: .5rem; align-items: center; font-size: .85rem; color: var(--muted); margin-bottom: 1rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--navy); }

/* ── Pagination ──────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 2rem 0; }
.pagination-btn { background: var(--white); border: 2px solid var(--navy); padding: .5rem 1.2rem; border-radius: 6px; font-weight: 700; color: var(--navy); }
.pagination-btn:hover { background: var(--navy); color: #fff; text-decoration: none; }
.pagination-info { color: var(--muted); font-size: .9rem; }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .3rem; color: var(--text); }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: .6rem .9rem; border: 1.5px solid var(--border); border-radius: 6px; font-size: .95rem; font-family: inherit; transition: border-color .15s; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--navy); }
.form-group textarea { resize: vertical; }

/* Search form */
.search-form { display: flex; gap: .5rem; margin-bottom: 2rem; }
.search-form input { flex: 1; }
.search-form button { background: var(--navy); color: #fff; border: none; padding: .6rem 1.2rem; border-radius: 6px; font-weight: 700; cursor: pointer; }

/* Contact form */
.contact-form { background: var(--white); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ── Alerts ──────────────────────────────────────────────── */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius); margin-bottom: 1rem; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-info    { background: #e0f2fe; color: #0c4a6e; border: 1px solid #7dd3fc; }

/* ── Blocs publicitaires ─────────────────────────────────── */
.ad-wrap { margin: 1.5rem 0; }
.ad-block { position: relative; text-align: center; min-height: 90px; }
.ad-label { position: absolute; top: 0; left: 0; font-size: .65rem; color: var(--muted); background: var(--bg); padding: 1px 5px; border-radius: 0 0 3px 0; line-height: 1.6; }
.ad-link { display: inline-block; }
.ad-image { max-width: 100%; height: auto; border-radius: var(--radius); }
.ad-text-fallback { display: inline-block; padding: 1.5rem 2rem; font-weight: 700; color: var(--navy); }
/* Placeholder vide */
.ad-placeholder { border: 2px dashed var(--border); border-radius: var(--radius); background: var(--bg); }
.ad-placeholder-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; padding: 1.5rem; min-height: 90px; text-decoration: none; color: var(--muted); }
.ad-placeholder-inner:hover { background: rgba(245,208,56,.07); border-radius: var(--radius); text-decoration: none; }
.ad-placeholder-icon { font-size: 1.4rem; }
.ad-placeholder-title { font-size: .95rem; font-weight: 700; color: var(--navy); }
.ad-placeholder-sub { font-size: .8rem; color: var(--muted); }
/* Ad card — même dimensions qu'une article-card dans la grille */
.article-card--ad { cursor: default; }
.article-card--ad:hover { transform: none; box-shadow: var(--shadow); }
.article-card--ad .ad-wrap { margin: 0; height: 100%; display: flex; flex-direction: column; }
.article-card--ad .ad-block { flex: 1; display: flex; flex-direction: column; min-height: 200px; }
.article-card--ad .ad-placeholder { flex: 1; border-radius: var(--radius); }
.article-card--ad .ad-placeholder-inner { flex: 1; min-height: 200px; }
.article-card--ad .ad-link { display: block; width: 100%; height: 100%; }
.article-card--ad .ad-image { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }

/* ── Related ─────────────────────────────────────────────── */
.related-section { margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--border); }

/* ── Empty state ─────────────────────────────────────────── */
.empty-state { text-align: center; color: var(--muted); padding: 3rem; font-size: 1.05rem; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer { background: var(--navy); color: rgba(255,255,255,.8); padding: 3rem 0 0; margin-top: 3rem; border-top: 4px solid var(--gold); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 2rem; align-items: start; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } .footer-col-logo { display: none; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid .footer-col:first-child { grid-column: span 2; } .footer-col-logo { display: none; } }
.footer-col-logo { display: flex; align-items: flex-start; justify-content: center; }
.footer-logo-img { width: 280px; height: auto; display: block; opacity: .9; transition: opacity .2s; }
.footer-logo-img:hover { opacity: 1; }

.footer-logo { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.footer-logo .logo-name { color: var(--gold); font-size: 1.2rem; font-weight: 800; }
.footer-tagline { font-size: .9rem; color: var(--gold); margin-bottom: .5rem; }
.footer-about { font-size: .85rem; line-height: 1.6; }

.footer-heading { color: var(--gold); font-size: .95rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: .75rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: .3rem; }
.footer-links a { color: rgba(255,255,255,.75); font-size: .875rem; }
.footer-links a:hover { color: var(--gold); }

.footer-nl-form { display: flex; gap: .5rem; margin-top: .75rem; flex-wrap: wrap; }
.footer-nl-form input { flex: 1; min-width: 0; padding: .5rem .75rem; border-radius: 4px; border: none; font-size: .875rem; background: rgba(255,255,255,.15); color: #fff; }
.footer-nl-form input::placeholder { color: rgba(255,255,255,.5); }
.footer-nl-form button { background: var(--gold); border: none; color: var(--navy); padding: .5rem 1rem; border-radius: 4px; font-weight: 700; cursor: pointer; font-size: .875rem; }
.footer-nl-form button:hover { background: var(--gold-dark); }

.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; padding: 1rem 0; margin-top: 2rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .8rem; color: rgba(255,255,255,.5); }
.footer-legal { list-style: none; display: flex; gap: 1rem; }
.footer-legal a { color: rgba(255,255,255,.5); }
.footer-legal a:hover { color: var(--gold); }

/* ── Mobile menu ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .mobile-menu-toggle { display: block; }
    .nav-list { display: none; flex-direction: column; }
    .nav-list.open { display: flex; }
    .header-search { display: none; }
    .newsletter-form { flex: 1 1 100%; }
    .newsletter-cta-inner { flex-direction: column; text-align: center; }
}

/* ── Scroll to top ───────────────────────────────────────── */
#scroll-top { position: fixed; bottom: 1.5rem; right: 1.5rem; width: 44px; height: 44px; background: var(--gold); color: var(--navy); border: none; border-radius: 50%; font-size: 1.2rem; font-weight: 700; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.25); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s, transform .2s; z-index: 999; display: flex; align-items: center; justify-content: center; }
#scroll-top.visible { opacity: 1; visibility: visible; }
#scroll-top:hover { background: var(--gold-dark); transform: translateY(-2px); }

/* ── Prose (pages statiques) ─────────────────────────────── */
.prose { line-height: 1.8; }
.prose p { margin-bottom: 1rem; }
.prose h2 { margin: 1.5rem 0 .75rem; }
.prose a { color: var(--navy); }
