:root {
    --bg: #faf8f4;
    --bg-card: #ffffff;
    --border: #e7e1d4;
    --text: #1c1a16;
    --text-muted: #837c6d;
    --gold: #a9792e;
    --gold-deep: #7d5a22;
    --maroon: #6e1423;
    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.site-header {
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 24px 14px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand-logo { height: 38px; width: 38px; object-fit: contain; }
.brand-name {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 22px;
    letter-spacing: 0.5px;
    color: var(--text);
}

/* Barre de catégories : onglets épurés, soulignés */
.category-nav {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    padding: 0 24px;
    scrollbar-width: none;
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav a {
    flex: none;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    white-space: nowrap;
    padding: 12px 0 11px;
    border-bottom: 2px solid transparent;
}
.category-nav a:hover { color: var(--text); }
.category-nav a.active {
    color: var(--gold-deep);
    border-bottom-color: var(--gold);
}

/* Top catégories : badges circulaires défilables */
.top-categories {
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    padding: 16px 0;
}
.top-categories-title {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 0 24px;
    margin-bottom: 12px;
}
.top-categories-track {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 0 24px 4px;
    scrollbar-width: none;
}
.top-categories-track::-webkit-scrollbar { display: none; }
.top-category-item {
    flex: none;
    width: 76px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}
.top-category-badge {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.15s, transform 0.15s;
}
.top-category-item:hover .top-category-badge {
    border-color: var(--gold);
    transform: translateY(-2px);
}
.top-category-badge img { width: 70%; height: 70%; object-fit: contain; }
.top-category-fallback {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--gold-deep);
}
.top-category-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1.25;
}
.top-category-item:hover .top-category-label { color: var(--text); }

/* Layout */
.main-content {
    min-height: 60vh;
    padding-top: 40px;
    padding-bottom: 60px;
}

/* Mise en page 2 colonnes (contenu + pub), façon RMC Sport */
.home-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    align-items: start;
}
.home-main { min-width: 0; }
.home-sidebar { position: sticky; top: 86px; }

.ad-slot {
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    border-radius: 8px;
}
.ad-slot-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ad-slot-sidebar { min-height: 600px; }
.ad-slot-inline { min-height: 110px; margin: 36px 0; }
.ad-slot-skyscraper { min-height: 500px; }

/* Encart maison affiché quand aucune pub n'est chargée pour l'emplacement */
.ad-house {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px;
    background: linear-gradient(160deg, var(--bg-card), var(--bg));
}
.ad-house-kicker {
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}
.ad-house-title {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--gold-deep);
}
.ad-house-cta {
    font-family: var(--sans);
    font-size: 11px;
    color: var(--text-muted);
}
.ad-slot-inline .ad-house { flex-direction: row; gap: 14px; }
.ad-slot-skyscraper .ad-house-title { font-size: 18px; text-align: center; }

/* Fil d'Ariane */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    margin-bottom: 22px;
}
.breadcrumb a:hover { color: var(--gold-deep); }
.breadcrumb-sep { color: var(--border); }
.breadcrumb-current {
    color: var(--text);
    text-transform: none;
    letter-spacing: normal;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 320px;
}

/* Widget "Les plus lus" */
.trending-box { margin-top: 24px; }
.trending-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--gold-deep);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.trending-list { list-style: none; margin: 0; padding: 0; }
.trending-list li + li { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.trending-list a { display: flex; align-items: baseline; gap: 10px; }
.trending-rank {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 600;
    color: var(--border);
    flex: none;
    width: 18px;
}
.trending-list a:hover .trending-rank { color: var(--gold); }
.trending-text {
    font-size: 14px;
    line-height: 1.4;
    color: var(--text);
    transition: color 0.12s ease;
}
.trending-list a:hover .trending-text { color: var(--gold-deep); }

/* Page article : rails pub de part et d'autre sur grand écran */
.article-layout {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) 180px;
    gap: 24px;
    align-items: start;
}
.article-rail { position: sticky; top: 86px; }

/* Sections par compétition (façon blocs RMC plus bas sur l'accueil) */
.topic-section { margin-top: 56px; }
.topic-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.topic-section-header h2 {
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 600;
    margin: 0;
}
.topic-section-more {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gold-deep);
    white-space: nowrap;
}

/* Page Scores */
.scores-date-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin-bottom: 36px;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.scores-date-nav::-webkit-scrollbar { display: none; }
.scores-date-nav a {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
}
.scores-date-day { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.scores-date-num { font-family: var(--serif); font-size: 18px; color: var(--text); }
.scores-date-nav a.active { border-color: var(--gold); background: #fbf3e4; }
.scores-date-nav a.active .scores-date-day,
.scores-date-nav a.active .scores-date-num { color: var(--gold-deep); }

/* Hero (article à la une) */
.hero {
    position: relative;
    display: block;
    margin-bottom: 52px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px -22px rgba(28,26,22,0.35);
    border-color: var(--gold);
}
.hero-media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--bg); }
.hero-image {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.5s ease;
}
.hero:hover .hero-image { transform: scale(1.035); }
.hero-body { padding: 28px 32px 30px; }
.hero-badge {
    display: inline-block;
    color: var(--gold-deep);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--gold);
    padding-bottom: 3px;
}
.hero-title {
    font-family: var(--serif);
    color: var(--text);
    font-size: 32px;
    font-weight: 600;
    line-height: 1.22;
    margin: 0 0 12px;
}
.hero-excerpt {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.5;
    max-width: 680px;
    margin: 0 0 14px;
}
.hero-meta { color: var(--text-muted); font-size: 13px; margin: 0; }

/* Badge "en ce moment" pulsant, affiché seulement si l'article a < 30 min */
.live-badge {
    position: absolute;
    top: 16px; left: 16px;
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(16,14,11,0.78);
    backdrop-filter: blur(3px);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 7px 12px 7px 10px;
    border-radius: 999px;
}
.live-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #e6473f;
    box-shadow: 0 0 0 0 rgba(230,71,63,0.65);
    animation: live-pulse 1.8s ease-out infinite;
}
@keyframes live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(230,71,63,0.65); }
    70%  { box-shadow: 0 0 0 8px rgba(230,71,63,0); }
    100% { box-shadow: 0 0 0 0 rgba(230,71,63,0); }
}

/* Apparition douce au scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Fil Sport : flux éditorial */
.fil-sport-header { margin-bottom: 18px; }
.fil-sport-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gold-deep);
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.fil-sport-list { }
.fil-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}
.fil-item-thumb {
    flex: none;
    width: 108px;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    background: var(--border);
}
.fil-item-thumb img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.4s ease;
}
.fil-item:hover .fil-item-thumb img { transform: scale(1.08); }
.fil-item-text { min-width: 0; }
.fil-item-meta {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
}
.fil-item-meta .cat { color: var(--gold-deep); }
.fil-item-title {
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    transition: color 0.12s ease;
}
.fil-item:hover .fil-item-title { color: var(--gold-deep); }

@media (max-width: 480px) {
    .fil-item-thumb { width: 78px; }
    .fil-item-title { font-size: 16px; }
}

/* Article page */
.article-full { max-width: 700px; margin: 0 auto; }
.article-image { width: 100%; margin-bottom: 26px; aspect-ratio: 1 / 1; object-fit: cover; border: 1px solid var(--border); border-radius: 10px; }
.article-category {
    display: inline-block;
    color: var(--gold-deep);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
}
.article-title {
    font-family: var(--serif);
    font-size: 34px;
    line-height: 1.22;
    margin: 0 0 16px;
    font-weight: 600;
}
.article-meta {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 30px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.article-body { font-size: 18px; line-height: 1.75; color: #2a271f; }
.article-body p { margin: 0 0 20px; }
.article-body blockquote {
    margin: 28px 0;
    padding: 2px 0 2px 24px;
    border-left: 3px solid var(--gold);
    color: var(--text);
    font-family: var(--serif);
    font-style: italic;
    font-size: 19px;
}
.related { max-width: 1080px; margin: 60px auto 0; }
.related h2 {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.category-title {
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 28px;
}

.empty-state { color: var(--text-muted); text-align: center; padding: 70px 0; font-size: 15px; }

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-top: 6px;
    padding-top: 30px;
    font-size: 14px;
    color: var(--text-muted);
}
.pagination a { font-weight: 700; color: var(--gold-deep); }

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 30px 0;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}
.footer-note { margin-top: 6px; }
.footer-legal-nav { margin-top: 14px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.footer-legal-nav a { color: var(--text-muted); text-decoration: underline; }
.footer-legal-nav a:hover { color: var(--gold-deep); }

/* Pages légales (mentions, confidentialité, à propos) */
.legal-content { max-width: 700px; margin: 0 auto; line-height: 1.7; }
.legal-content h2 { font-family: var(--serif); font-size: 20px; margin: 32px 0 10px; color: var(--text); }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content ul { color: var(--text-muted); margin-bottom: 12px; }
.legal-content ul { padding-left: 20px; }
.legal-content a { color: var(--gold-deep); }
.legal-updated { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Bandeau de consentement cookies */
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 100;
    max-width: 560px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    font-size: 13px;
    color: var(--text);
}
.cookie-banner p { margin-bottom: 12px; color: var(--text-muted); }
.cookie-banner a { color: var(--gold-deep); }
.cookie-banner-actions { display: flex; gap: 10px; justify-content: flex-end; }
.cookie-btn {
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
}
.cookie-btn-primary { background: var(--gold-deep); color: #fff; }
.cookie-btn-ghost { background: transparent; border-color: var(--border); color: var(--text-muted); }

@media (max-width: 1100px) {
    .article-layout { grid-template-columns: 1fr; }
    .article-rail { display: none; }
}

@media (max-width: 960px) {
    .home-layout { grid-template-columns: 1fr; }
    .home-sidebar { display: none; }
}

@media (max-width: 600px) {
    .header-inner { padding: 18px 20px 12px; }
    .category-nav { gap: 20px; padding: 0 20px; }
    .hero { margin-bottom: 40px; }
    .hero-media { aspect-ratio: 1 / 1; }
    .hero-body { padding: 20px 20px 24px; }
    .hero-title { font-size: 22px; }
    .article-title { font-size: 25px; }
    .article-body { font-size: 16px; }
    .ad-slot-inline { min-height: 90px; margin: 26px 0; }
}
