:root {
    --bg: #0b0b0d;
    --surface: #141418;
    --elev: #1c1c22;
    --ink: #f5f5f7;
    --muted: rgba(245, 245, 247, 0.62);
    --line: rgba(255, 255, 255, 0.08);
    --amber: #e8b14a;
    --amber-deep: #c9922f;
    --max: 1280px;
    --sans: Manrope, system-ui, sans-serif;
    --display: Outfit, Manrope, system-ui, sans-serif;
    --radius: 14px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.co-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--sans);
    color: var(--ink);
    background:
        radial-gradient(900px 420px at 50% -10%, rgba(232, 177, 74, 0.08), transparent 55%),
        var(--bg);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

.co-preview {
    background: var(--amber);
    color: #111;
    text-align: center;
    padding: .55rem 1rem;
    font-weight: 700;
    font-size: .85rem;
}
.co-preview a { text-decoration: underline; }

/* —— Header —— */
.co-header {
    position: sticky; top: 0; z-index: 40;
    background: linear-gradient(180deg, rgba(11,11,13,.96), rgba(11,11,13,.82));
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}
.co-header-inner {
    width: min(var(--max), calc(100% - 2rem));
    margin: 0 auto;
    min-height: 72px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
}
.co-brand {
    display: inline-flex; align-items: center; gap: .65rem;
    font-family: var(--display);
    font-weight: 800;
    letter-spacing: -.02em;
}
.co-brand-mark {
    width: 28px; height: 28px; border-radius: 8px;
    background:
        linear-gradient(145deg, var(--amber), var(--amber-deep));
    box-shadow: 0 0 24px rgba(232, 177, 74, 0.35);
}
.co-brand-name { font-size: 1.2rem; }
.co-nav {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: .15rem 1.15rem;
}
.co-nav a {
    font-size: .88rem;
    font-weight: 600;
    color: var(--muted);
    padding: .35rem 0;
    border-bottom: 2px solid transparent;
    transition: color .2s var(--ease), border-color .2s var(--ease);
}
.co-nav a:hover, .co-nav a.is-active {
    color: var(--ink);
    border-bottom-color: var(--amber);
}
.co-tools { display: flex; align-items: center; gap: .55rem; }
.co-search {
    display: flex; align-items: center; gap: .4rem;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: .45rem .8rem;
    min-width: 180px;
}
.co-search span { color: var(--muted); }
.co-search input {
    border: 0; outline: none; background: transparent;
    color: var(--ink); width: 100%;
    font: inherit; font-size: .85rem;
}
.co-icon-btn {
    position: relative;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.04);
    cursor: pointer;
    display: grid; place-content: center;
}
.co-bell {
    width: 14px; height: 14px;
    border: 2px solid var(--ink);
    border-radius: 50% 50% 40% 40%;
    display: block;
}
.co-dot {
    position: absolute; top: 9px; right: 10px;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 0 2px var(--bg);
}
.co-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-content: center;
    background: linear-gradient(145deg, #2a2a32, #151518);
    border: 1px solid rgba(232, 177, 74, 0.45);
    font-weight: 800;
    color: var(--amber);
}
.co-burger {
    display: none;
    width: 42px; height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
}

.co-main { padding-bottom: 3.5rem; }

/* —— Buttons —— */
.co-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    padding: .85rem 1.25rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    transition: transform .2s var(--ease), filter .2s ease, background .2s ease;
}
.co-btn:hover { transform: translateY(-1px); }
.co-btn-primary {
    background: linear-gradient(135deg, var(--amber), var(--amber-deep));
    color: #14110a;
    box-shadow: 0 10px 28px rgba(232, 177, 74, 0.28);
}
.co-btn-primary:hover { filter: brightness(1.05); }
.co-btn-ghost {
    background: rgba(255,255,255,.08);
    color: var(--ink);
    border: 1px solid rgba(255,255,255,.18);
}
.co-btn-ghost:hover { background: rgba(255,255,255,.12); }

.co-pill {
    display: inline-flex;
    padding: .28rem .65rem;
    border-radius: 999px;
    background: rgba(232, 177, 74, 0.16);
    color: var(--amber);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.co-pill-affiche {
    background: rgba(232, 177, 74, 0.2);
    border: 1px solid rgba(232, 177, 74, 0.35);
}

/* —— Hero —— */
.co-hero {
    position: relative;
    min-height: clamp(420px, 72vh, 640px);
    display: flex;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.co-hero-bg {
    position: absolute; inset: 0;
    background: #151518;
}
.co-hero-bg img {
    width: 100%; height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}
.co-hero-veil {
    position: absolute; inset: 0;
    background:
        linear-gradient(90deg, rgba(11,11,13,.92) 0%, rgba(11,11,13,.55) 48%, rgba(11,11,13,.25) 100%),
        linear-gradient(180deg, rgba(11,11,13,.15) 0%, rgba(11,11,13,.88) 100%);
}
.co-hero-content {
    position: relative;
    z-index: 1;
    width: min(var(--max), calc(100% - 2rem));
    margin: 0 auto;
    padding: 0 0 clamp(2rem, 5vh, 3.2rem);
    max-width: 640px;
    margin-left: max(1rem, calc((100% - min(var(--max), calc(100% - 2rem))) / 2));
}
.co-hero h1 {
    margin: .85rem 0 .9rem;
    font-family: var(--display);
    font-size: clamp(2.4rem, 6vw, 4rem);
    line-height: 1.02;
    font-weight: 800;
    letter-spacing: -.03em;
    text-shadow: 0 16px 40px rgba(0,0,0,.55);
}
.co-hero-meta {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: .45rem .7rem;
    margin-bottom: .95rem;
    font-size: .88rem;
    font-weight: 600;
    color: var(--muted);
}
.co-score { color: var(--amber); font-weight: 800; }
.co-age {
    padding: .15rem .4rem;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 6px;
    font-size: .75rem;
}
.co-genre {
    padding: .15rem .5rem;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    font-size: .75rem;
}
.co-synopsis {
    margin: 0 0 1.25rem;
    color: rgba(245,245,247,.86);
    font-size: 1.02rem;
    line-height: 1.55;
    max-width: 52ch;
}
.co-hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; }

/* —— Rails —— */
.co-rail-section {
    width: min(var(--max), calc(100% - 2rem));
    margin: 0 auto 2rem;
}
.co-cat-page { padding-top: 1.5rem; }
.co-rail-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: .95rem;
}
.co-rail-head h1, .co-rail-head h2 {
    margin: 0;
    font-family: var(--display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -.02em;
}
.co-rail {
    position: relative;
}
.co-track {
    display: flex;
    gap: .9rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: .25rem .15rem 1rem;
    scrollbar-width: none;
}
.co-track::-webkit-scrollbar { display: none; }
.co-rail-btn {
    position: absolute;
    top: 35%;
    z-index: 2;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(20,20,24,.85);
    color: var(--ink);
    font-size: 1.4rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    display: grid; place-content: center;
}
.co-rail-btn:first-of-type { left: -8px; }
.co-rail-btn-next { right: -8px; left: auto; }

.co-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
    width: 168px;
}
.co-card-rank { width: 260px; }
.co-card-media {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--elev);
    border: 1px solid var(--line);
    aspect-ratio: 2 / 3;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.co-card-rank .co-card-media { aspect-ratio: 16 / 10; }
.co-card:hover .co-card-media {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 18px 40px rgba(0,0,0,.45);
}
.co-card-media .co-pill {
    position: absolute;
    top: .6rem; left: .6rem;
    z-index: 2;
    background: var(--amber);
    color: #14110a;
}
.co-rank {
    position: absolute;
    top: .45rem; left: .55rem;
    z-index: 2;
    font-family: var(--display);
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--amber);
    text-shadow: 0 6px 18px rgba(0,0,0,.65);
    line-height: 1;
}
.co-card-score {
    position: absolute;
    right: .55rem; bottom: .55rem;
    z-index: 2;
    padding: .2rem .45rem;
    border-radius: 999px;
    background: rgba(0,0,0,.65);
    color: var(--amber);
    font-size: .72rem;
    font-weight: 800;
    backdrop-filter: blur(6px);
}
.co-card-body { padding: .65rem .15rem 0; }
.co-card h3 {
    margin: 0 0 .3rem;
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.co-card h3 a:hover { color: var(--amber); }
.co-card-meta {
    margin: 0;
    display: flex; flex-wrap: wrap; gap: .35rem .55rem;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 600;
}

.co-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}
.co-search-grid .co-card { width: auto; }
.co-fallback {
    display: grid; place-content: center;
    width: 100%; height: 100%;
    background: linear-gradient(145deg, #22222a, #121216);
    color: var(--amber);
    font-family: var(--display);
    font-weight: 800;
    font-size: 1.4rem;
}
.co-empty, .co-empty-page {
    padding: 2.2rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
    background: var(--surface);
}
.co-empty-page h1 {
    margin: .7rem 0;
    font-family: var(--display);
    color: var(--ink);
}

/* —— Article —— */
.co-article { margin-bottom: 1.5rem; }
.co-article-hero {
    position: relative;
    min-height: 360px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.co-article-hero > img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.co-article-hero-copy {
    position: relative;
    z-index: 1;
    width: min(var(--max), calc(100% - 2rem));
    margin: 0 auto;
    padding: 0 0 2rem;
}
.co-article-hero h1 {
    margin: .75rem 0 .8rem;
    font-family: var(--display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    letter-spacing: -.03em;
}
.co-article-body {
    width: min(760px, calc(100% - 2rem));
    margin: 0 auto;
}
.co-prose {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(245,245,247,.88);
}
.co-prose p { margin: 0 0 1rem; }
.co-prose h2 {
    font-family: var(--display);
    margin: 1.6rem 0 .7rem;
}

/* —— Footer —— */
.co-footer {
    border-top: 1px solid var(--line);
    background: #09090b;
    color: var(--muted);
}
.co-footer-inner {
    width: min(var(--max), calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 1.8rem;
}
.co-footer-brand strong {
    display: block;
    color: var(--ink);
    font-family: var(--display);
    font-size: 1.2rem;
    margin-bottom: .35rem;
}
.co-footer-brand p { margin: 0 0 1.1rem; }
.co-footer-links {
    display: flex; flex-wrap: wrap; gap: .55rem 1.1rem;
    margin-bottom: 1.2rem;
}
.co-footer-links a:hover { color: var(--amber); }
.co-footer-copy { font-size: .78rem; }

@media (max-width: 960px) {
    .co-header-inner { grid-template-columns: auto auto 1fr; }
    .co-burger { display: inline-grid; place-content: center; justify-self: end; }
    .co-nav {
        display: none;
        grid-column: 1 / -1;
        flex-direction: column;
        align-items: flex-start;
        padding: .4rem 0 .8rem;
        border-top: 1px solid var(--line);
    }
    .co-nav.is-open { display: flex; }
    .co-search { min-width: 0; width: 140px; }
    .co-rail-btn { display: none; }
    .co-hero-content { margin-left: 1rem; }
}
@media (max-width: 640px) {
    .co-search { display: none; }
    .co-card { width: 142px; }
    .co-card-rank { width: 220px; }
}
