/* Premiers pas, L'équipe, Règlement, 404. Own tokens, redefined for the Noël season (html[data-season]),
   so both identities stay coherent without duplicating rules. No purple: green, white, red and gold. */
:root { --sp-surface: #1a1d29; --sp-surface-2: #22263a; --sp-line: #383b4c; --sp-text: #eceef5; --sp-muted: #b3b6c6; --sp-accent: #f39a88; --sp-gold: #f3c66d; --sp-ok: #6fd3a1; --sp-radius: 24px; }
html[data-season="christmas"] { --sp-surface: #10221b; --sp-surface-2: #163027; --sp-line: #2b4a3d; --sp-text: #eef3ef; --sp-muted: #a9bab0; --sp-accent: #d2263f; --sp-gold: #e6bf6b; --sp-ok: #8ee6c4; }

.sp-lead { text-align: left; }
.sp-invite { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.sp-link { display: inline-block; margin-top: 8px; color: var(--sp-gold); font-weight: 650; text-decoration: none; }
.sp-link:hover { text-decoration: underline; }
.sp-empty { text-align: center; }
.sp-note { margin-top: 28px; text-align: center; }

/* Premiers pas: a numbered path, then the searchable questions. */
.sp-steps { counter-reset: none; display: grid; gap: 14px; max-width: 900px; margin: 0 auto 48px; padding: 0; list-style: none; }
.sp-step { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; padding: 22px 24px; border: 1px solid var(--sp-line); border-radius: var(--sp-radius); background: var(--sp-surface); }
.sp-step:not(:last-child)::after { content: ""; position: absolute; left: 51px; top: 78px; bottom: -16px; width: 2px; background: linear-gradient(var(--sp-gold), transparent); opacity: .5; }
.sp-step-n { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--sp-surface-2); border: 2px solid var(--sp-gold); color: var(--sp-gold); font: 800 1.4rem/1 var(--n-display, Sora, sans-serif); }
.sp-step h2 { margin: 4px 0 6px; font-size: var(--type-h3, 1.25rem); }
.sp-step p { margin: 0; color: var(--sp-muted); max-width: 64ch; }
.sp-faq { max-width: 900px; margin: 0 auto; }
.sp-search input { width: 100%; min-height: 52px; padding: 0 20px; border-radius: 999px !important; border: 1px solid var(--sp-line); background: var(--sp-surface); color: var(--sp-text); font: inherit; }
.sp-search input:focus-visible { outline: 3px solid var(--sp-gold); outline-offset: 2px; }
.sp-faq-list { display: grid; gap: 10px; margin-top: 14px; }
.sp-faq-item { border: 1px solid var(--sp-line); border-radius: 20px; background: var(--sp-surface); overflow: hidden; }
.sp-faq-item summary { position: relative; padding: 18px 56px 18px 22px; font-weight: 700; cursor: pointer; list-style: none; }
.sp-faq-item summary::-webkit-details-marker { display: none; }
.sp-faq-item summary::after { content: "+"; position: absolute; right: 22px; top: 50%; translate: 0 -50%; color: var(--sp-gold); font-size: 1.4rem; transition: rotate .2s; }
.sp-faq-item[open] summary::after { rotate: 45deg; }
.sp-faq-item summary:focus-visible { outline: 3px solid var(--sp-gold); outline-offset: -3px; border-radius: 20px; }
.sp-faq-answer { padding: 0 22px 18px; color: var(--sp-muted); }
.sp-faq-answer p { margin: 0; max-width: 70ch; }
.sp-faq-answer strong, .sp-faq-answer a { color: var(--sp-text); }

/* L'équipe: an organisation chart first, then each pole with its grades and members. */
.sp-chart { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 10px; margin: 0 0 28px; }
.sp-chart a { display: grid; gap: 4px; padding: 16px 18px; border-radius: 20px; border: 1px solid var(--sp-line); background: var(--sp-surface); color: var(--sp-text); text-decoration: none; transition: border-color .2s, translate .2s; }
.sp-chart a:hover { border-color: var(--sp-gold); translate: 0 -2px; }
.sp-chart span { color: var(--sp-muted); font-size: .86rem; }
.sp-join { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: center; margin-bottom: 36px; border-radius: var(--sp-radius); }
.sp-join h2 { margin: 6px 0; }
.sp-join p { margin: 0; color: var(--sp-muted); }
.sp-poles { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sp-poles li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--sp-surface-2); }
.sp-poles li span { color: var(--sp-muted); }
.sp-poles li.is-open span { color: var(--sp-ok); font-weight: 700; }
.sp-pole { margin: 0 0 40px; scroll-margin-top: 90px; }
.sp-pole-head h2 { margin: 0 0 4px; }
.sp-pole-head p { margin: 0 0 16px; color: var(--sp-muted); max-width: 70ch; }
.sp-grades { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.sp-grade { --role: var(--sp-gold); position: relative; padding: 18px 20px 20px; border-radius: 22px; border: 1px solid var(--sp-line); background: var(--sp-surface); overflow: hidden; }
.sp-grade::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--role); }
.sp-grade-head { display: flex; align-items: center; gap: 10px; }
.sp-grade h3 { margin: 0; color: var(--role); font-size: 1.05rem; }
.sp-grade-head img { border-radius: 8px; }
.sp-grade-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--role); }
.sp-grade > p { margin: 8px 0 12px; color: var(--sp-muted); font-size: .92rem; }
.sp-members { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sp-members li { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--sp-surface-2); font-size: .9rem; }
.sp-members li span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-members img, .sp-avatar { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--sp-line); }

/* Règlement: sticky contents on wide screens, anchors to share one rubric. */
.sp-rules-tools { max-width: 1100px; margin: 0 auto 22px; }
.sp-rules { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; max-width: 1100px; margin: 0 auto; align-items: start; }
.sp-toc { position: sticky; top: 90px; padding: 18px; border-radius: 22px; border: 1px solid var(--sp-line); background: var(--sp-surface); }
.sp-toc ol { margin: 8px 0 0; padding-left: 1.2em; display: grid; gap: 6px; }
.sp-toc a { color: var(--sp-text); text-decoration: none; }
.sp-toc a:hover { color: var(--sp-gold); }
.sp-rule { padding: 24px 26px; margin-bottom: 16px; border-radius: var(--sp-radius); border: 1px solid var(--sp-line); background: var(--sp-surface); scroll-margin-top: 90px; }
.sp-rule:target { border-color: var(--sp-gold); }
.sp-rule-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sp-rule-head h2 { margin: 0; }
.sp-anchor { color: var(--sp-muted); text-decoration: none; font-weight: 700; }
.sp-anchor:hover, .sp-anchor:focus-visible { color: var(--sp-gold); }
.sp-rule-lead { margin: 6px 0 12px; color: var(--sp-muted); }
.sp-rule .prose p { margin: 0 0 10px; max-width: 75ch; }
.sp-rule .prose strong { color: var(--sp-text); }
.sp-rule .prose code { padding: 1px 6px; border-radius: 6px; background: var(--sp-surface-2); }

/* 404 */
.sp-404 { max-width: 720px; margin: 40px auto; text-align: center; }
.sp-404-code { margin: 0; font: 800 clamp(4.5rem, 16vw, 9rem)/1 var(--n-display, Sora, sans-serif); color: transparent; -webkit-text-stroke: 2px var(--sp-gold); letter-spacing: .04em; }
.sp-404 h1 { margin: 10px 0; }
.sp-404 p { color: var(--sp-muted); }
.sp-404 .sp-invite { justify-content: center; }
.sp-404-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.sp-404-links a { display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--sp-line); color: var(--sp-text); text-decoration: none; }
.sp-404-links a:hover { border-color: var(--sp-gold); }

@media (max-width: 820px) {
    .sp-rules, .sp-join { grid-template-columns: minmax(0, 1fr); }
    .sp-toc { position: static; }
    .sp-step { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 18px; }
    .sp-step-n { width: 44px; height: 44px; font-size: 1.15rem; }
    .sp-step:not(:last-child)::after { left: 39px; top: 66px; }
    .sp-rule { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .sp-chart a, .sp-faq-item summary::after { transition: none; } }

/* Header: « Découvrir » menu (wide screens) and the phone menu. */
header.crb-masthead .nav-more { position: relative; }
header.crb-masthead .nav-more > summary { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 600; color: inherit; }
header.crb-masthead .nav-more > summary::-webkit-details-marker { display: none; }
header.crb-masthead .nav-more > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: 45deg; translate: 0 -2px; opacity: .7; transition: rotate .2s; }
header.crb-masthead .nav-more[open] > summary::after { rotate: 225deg; translate: 0 2px; }
header.crb-masthead .nav-more > summary[aria-current="page"] { color: var(--sp-gold); }
header.crb-masthead .nav-more > summary:focus-visible, .site-menu > summary:focus-visible { outline: 3px solid var(--sp-gold); outline-offset: 2px; }
.nav-more-panel { position: absolute; left: 50%; top: calc(100% + 10px); z-index: 80; translate: -50% 0; display: grid; gap: 4px; width: 290px; padding: 10px; border-radius: 22px; border: 1px solid var(--sp-line); background: var(--sp-surface); box-shadow: 0 24px 60px #0009; }
header.crb-masthead .nav-more-panel a { display: grid; gap: 2px; padding: 10px 14px; border-radius: 14px; text-decoration: none; color: var(--sp-text); }
header.crb-masthead .nav-more-panel a:hover, header.crb-masthead .nav-more-panel a[aria-current="page"] { background: var(--sp-surface-2); }
.nav-more-panel strong { font-size: 14px; }
.nav-more-panel span { color: var(--sp-muted); font-size: 12.5px; font-weight: 400; }
.site-menu { display: none; position: relative; }
.site-menu > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--sp-line); background: var(--sp-surface); color: var(--sp-text); cursor: pointer; list-style: none; font-weight: 700; font-size: 14px; }
.site-menu > summary::-webkit-details-marker { display: none; }
.site-menu > summary svg { width: 20px; height: 20px; }
.site-menu-panel { position: fixed; z-index: 90; left: 12px; right: 12px; top: 84px; display: grid; gap: 16px; max-height: calc(100dvh - 180px); overflow: auto; padding: 18px; border-radius: 26px; border: 1px solid var(--sp-line); background: var(--sp-surface); box-shadow: 0 30px 80px #000c; }
.site-menu-panel .eyebrow { margin: 0 0 6px; }
.site-menu-panel a { display: block; padding: 12px 14px; border-radius: 14px; color: var(--sp-text); text-decoration: none; font-weight: 600; }
.site-menu-panel a[aria-current="page"], .site-menu-panel a:hover { background: var(--sp-surface-2); color: var(--sp-gold); }
@media (max-width: 760px) {
    /* The bar scrolls sideways on phones and would clip the drop-down: its pages are in the phone menu. */
    header.crb-masthead .nav-more { display: none; }
    .site-menu { display: block; }
    .site-menu > summary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .site-menu > summary { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) { header.crb-masthead .nav-more > summary::after { transition: none; } }
@media (max-width: 420px) {
    body > header.crb-masthead > .btn, body > header.crb-masthead > a.btn { white-space: nowrap; padding-inline: 14px; }
}
@media (max-width: 360px) { body > header.crb-masthead .brand span .muted { display: none; } }
