/* Codex UI 1.1.0 — mêmes composants, palettes propres aux jeux. */
/* Contrôles : aucun halo au clic ; repère fin pendant la navigation clavier.
   Ces règles communes priment sur les anciens focus propres à chaque site. */
html[data-codex-site] :focus-visible{outline:1px solid var(--codex-accent,currentColor)!important;outline-offset:2px!important}
html[data-codex-input=pointer] :focus,html[data-codex-input=pointer] :focus-within{outline:none!important}
@media(forced-colors:active){html[data-codex-site] :focus-visible{outline-color:Highlight!important}}
:root{--codex-content-max:1360px;--codex-header-max:1600px;--codex-radius-control:6px;--codex-radius-panel:12px;--codex-bg:var(--paper,var(--bg));--codex-surface:var(--surface,var(--white));--codex-text:var(--ink);--codex-muted:var(--muted);--codex-line:var(--line)}
html[data-codex-site=aoe]{--max:1360px;--codex-accent:var(--blue);--codex-hero:#162032;--codex-hero-accent:#a5c1f1;--codex-soft:#eaf0f7}
html[data-codex-site=spam]{--max:1360px;--codex-accent:var(--purple);--codex-hero:#14111d;--codex-hero-accent:#c2aff0;--codex-soft:#ede8f4}
html[data-theme=dark]{--codex-soft:var(--surface-soft,var(--carte-2))}
body .wrap{max-width:var(--codex-content-max);width:calc(100% - 80px)}
body .site-footer>.wrap{max-width:var(--codex-content-max)}
body .site-header .header-inner{max-width:var(--codex-header-max)}
body .site-header.codex-nav-managed .header-inner{display:grid;grid-template-columns:minmax(0,1fr) max-content minmax(0,1fr);gap:20px;position:relative;min-height:86px}
body .site-header.codex-nav-managed .codex-brand-group{justify-self:start;width:max-content}
body .site-header.codex-nav-managed .header-actions{justify-self:end;width:max-content}
body .site-header.codex-nav-managed .main-nav,body .site-header .codex-nav-probe{display:flex;position:static;inset:auto;width:max-content;max-width:none;flex-direction:row;flex-wrap:nowrap;gap:20px;justify-content:center;align-items:center;padding:0;margin:0;border:0;background:none;box-shadow:none}
body .site-header.codex-nav-managed .main-nav>a,body .site-header .codex-nav-probe>a{font:500 13px/1.4 Inter,sans-serif;white-space:nowrap;padding:32px 0}
body .site-header .codex-nav-probe{position:absolute!important;left:0!important;top:0!important;visibility:hidden!important;pointer-events:none!important}
body .site-header.codex-nav-managed :is(.menu-btn,.menu-button){display:none}
body .site-header.codex-nav-compact .header-inner{grid-template-columns:1fr auto}
body .site-header.codex-nav-compact .main-nav{display:none}
body .site-header.codex-nav-compact .main-nav.open{display:flex;position:absolute;inset:100% -32px auto;width:auto;max-height:calc(100dvh - 180px);overflow:auto;padding:16px 32px;background:var(--codex-hero);border-top:1px solid #ffffff30;flex-wrap:wrap;justify-content:center;gap:8px 20px;box-shadow:0 12px 28px #0003}
body .site-header.codex-nav-compact .main-nav>a{padding:12px}
body .site-header.codex-nav-compact :is(.menu-btn,.menu-button){display:grid;place-items:center;width:40px;height:44px;border:0;background:transparent;color:#fff;font-size:22px;padding:8px}
.codex-family{position:relative;width:fit-content;margin:20px 0}.codex-family>summary{display:flex;gap:16px;align-items:center;list-style:none;cursor:pointer;padding:12px 16px;min-height:44px;border:1px solid var(--codex-line);border-radius:6px;background:var(--codex-surface);color:var(--codex-text);font:600 13px/1.4 Inter,sans-serif}.codex-family>summary::-webkit-details-marker{display:none}.codex-family-fallback{display:grid;gap:12px;padding:18px 0}.codex-family:not([open])>.codex-family-fallback{display:none}.codex-family-fallback a{display:flex;align-items:center;gap:12px;font-size:13px}.codex-family-fallback img{object-fit:contain}
.codex-family-dialog{box-sizing:border-box;width:min(900px,calc(100% - 32px));max-height:calc(100dvh - 40px);padding:0;border:1px solid var(--codex-line);border-radius:14px;background:var(--codex-bg);color:var(--codex-text);box-shadow:0 24px 80px #0005;margin:auto;z-index:200;font:400 14px/1.5 Inter,sans-serif}.codex-family-dialog[open]{display:flex;flex-direction:column}.codex-family-dialog::backdrop{background:#101622b8;backdrop-filter:blur(4px)}.codex-family-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:24px 28px 16px}.codex-family-heading h2{font-family:'Barlow Condensed',Barlow,Impact,sans-serif;font-size:38px;line-height:1.1;color:var(--codex-text);margin:0;text-transform:uppercase}.codex-family-close{flex:none;border:1px solid var(--codex-line);border-radius:6px;background:var(--codex-surface);color:var(--codex-text);width:44px;height:44px;cursor:pointer;font:24px Inter,sans-serif}.codex-family-tools{display:grid;gap:10px;padding:0 28px 18px;border-bottom:1px solid var(--codex-line)}.codex-family-tools>label{font-weight:600;font-size:12px}.codex-family-tools input[type=search]{box-sizing:border-box;min-width:0;width:100%;min-height:46px;padding:12px;border:1px solid var(--codex-line);border-radius:6px;background:var(--codex-surface);color:var(--codex-text);font:14px Inter,sans-serif}.codex-family-tools>div{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:12px}.codex-family-tools input[type=checkbox]{accent-color:var(--codex-accent);width:16px;height:16px;vertical-align:middle}.codex-family-count{color:var(--codex-muted)}.codex-family-scroll{min-height:120px;overflow:auto;overscroll-behavior:contain;padding:20px 28px}.codex-family-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.codex-family-card{position:relative;display:flex;align-items:center;gap:12px;padding:18px 42px 18px 14px;min-height:96px;border:1px solid var(--codex-line);border-radius:12px;background:var(--codex-surface);min-width:0}.codex-family-card>img{width:38px;height:38px;object-fit:contain;flex:none}.codex-family-card a{font-size:13px;font-weight:700;color:var(--codex-text);text-decoration:none;overflow-wrap:anywhere}.codex-family-card a::after{content:'';position:absolute;inset:0;border-radius:12px}.codex-family-card small{display:block;font-size:11px;color:var(--codex-muted);margin-top:4px;line-height:1.4}.codex-family-card .codex-family-current{color:var(--codex-accent);font-weight:600}.codex-family-star{position:absolute;right:2px;top:3px;border:0;background:none;color:var(--codex-muted);width:40px;height:44px;font-size:24px;cursor:pointer;z-index:1}.codex-family-star[aria-pressed=true]{color:var(--codex-accent)}.codex-family-empty{padding:25px;text-align:center;color:var(--codex-muted)}.codex-family-note{margin:0;padding:16px 28px;font-size:11px;color:var(--codex-muted);border-top:1px solid var(--codex-line);background:var(--codex-surface)}.codex-family-dialog :is(button,a,input):focus-visible,.codex-family>summary:focus-visible{outline:3px solid var(--codex-accent);outline-offset:3px}
/* Gabarits : les outils métier conservent leurs grilles spécialisées. */
body .button,body .btn{border-radius:var(--codex-radius-control)}
body .catalogue>.section-head{display:flex;flex-direction:column;align-items:stretch;gap:24px;margin-bottom:32px}
body .catalogue-search{display:flex;gap:12px;align-items:center}body .catalogue-search input{max-width:620px;flex:1;min-height:46px}
body .catalogue h1,body .page-head h1{font-size:clamp(40px,4.7vw,64px);line-height:1.05}
body .catalogue-description{font-size:14px;color:var(--muted);line-height:1.75;margin-top:16px;max-width:700px}
html.codex-is-home .flag-band{display:none}body .flag-band[hidden]{display:none}
html[data-codex-site=aoe] body .home-intro{background:var(--codex-hero);color:#fff;box-shadow:0 0 0 100vmax var(--codex-hero);clip-path:inset(0 -100vmax);grid-template-columns:1fr 1fr;gap:40px;padding:64px 0;min-height:590px}
html[data-codex-site=aoe] body .home-intro :is(h1,.intro-copy p){color:#fff}html[data-codex-site=aoe] body .home-intro h1 span,html[data-codex-site=aoe] body .home-intro .eyebrow{color:var(--codex-hero-accent)}
body .home-intro h1,body .hero h1{font-size:clamp(48px,5.8vw,88px);line-height:.98}
html[data-codex-site=aoe] body .home-intro .intro-copy p{color:#c5cede;font-size:15px;max-width:470px}
html[data-codex-site=aoe] body .home-intro .button{background:var(--codex-hero-accent);color:#162032;border-color:transparent}html[data-codex-site=aoe] body .home-intro .button.secondary{background:transparent;color:white;border-color:#65748b}
.codex-hero-art{width:100%;height:auto;display:block;max-height:470px;object-fit:contain}
body .home-news{display:grid;grid-template-columns:1fr 1fr;gap:48px;align-items:center;padding:64px 0;border-top:1px solid var(--line)}body .home-news h2{font-size:clamp(34px,3.6vw,54px);margin:14px 0 22px}.home-news-copy .eyebrow{color:var(--blue)}
body .hero-inner{min-height:590px}body .hero-copy{padding:64px 0 90px}
@media(max-width:1000px){.codex-family-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){body .wrap{width:calc(100% - 48px)}html[data-codex-site=aoe] body .home-intro{grid-template-columns:1fr;padding:45px 0;gap:20px;min-height:0}body .home-news{grid-template-columns:1fr;gap:20px}.codex-hero-art{max-height:340px}}
@media(max-width:700px){body .wrap{width:calc(100% - 32px)}body .site-header.codex-nav-managed .header-inner{min-height:76px;gap:12px}body .site-header.codex-nav-compact .main-nav.open{inset:100% -16px auto;padding:14px 20px;flex-direction:column;flex-wrap:nowrap;align-items:stretch;gap:2px}body .site-header.codex-nav-compact .main-nav>a{padding:12px}.codex-family-dialog{width:calc(100% - 16px);max-height:calc(100dvh - 16px)}.codex-family-heading{padding:20px 18px 14px}.codex-family-heading h2{font-size:32px}.codex-family-tools{padding:0 18px 16px}.codex-family-scroll{padding:16px 18px}.codex-family-grid{grid-template-columns:1fr}.codex-family-note{padding:14px 18px}.codex-family-card{min-height:84px}body .catalogue-search{align-items:stretch;flex-direction:column}body .catalogue-search input{max-width:none}body .home-intro h1,body .hero h1{font-size:clamp(44px,12vw,62px)}}
@media(prefers-reduced-motion:reduce){.codex-family-dialog::backdrop{backdrop-filter:none}}

#codex-hero-carousel{--cr-bg:#162032;--cr-accent:#a8c3ef;--cr-dim:#c5cede;background:var(--cr-bg);color:#fff;position:relative;box-shadow:0 0 0 100vmax var(--cr-bg);clip-path:inset(0 -100vmax)}
html[data-codex-site=spam] #codex-hero-carousel{--cr-bg:#14111d;--cr-accent:#c6afee;--cr-dim:#bfb5ce}
#codex-hero-carousel .cr-stage{display:grid;isolation:isolate;overflow:clip}
#codex-hero-carousel .cr-slide{grid-area:1/1;min-width:0;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .4s;align-self:stretch}
#codex-hero-carousel .cr-slide[data-active=true]{opacity:1;visibility:visible;pointer-events:auto;z-index:1}
#codex-hero-carousel .cr-slide>.hero,#codex-hero-carousel .cr-slide>.home-intro{height:100%;margin:0}
#codex-hero-carousel .cr-inner{min-height:590px;height:100%;display:grid;grid-template-columns:1fr 1fr;gap:40px;align-items:center;padding:64px 0}
html[data-codex-site=spam] #codex-hero-carousel .cr-inner{max-width:1360px;width:calc(100% - 80px);margin:auto;min-height:655px;grid-template-columns:45% 55%;gap:0}
#codex-hero-carousel .cr-copy{position:relative;z-index:2;min-width:0}
#codex-hero-carousel .cr-eyebrow{font-size:11px;letter-spacing:.15em;font-weight:700;text-transform:uppercase;color:var(--cr-accent);margin-bottom:24px}
#codex-hero-carousel .cr-copy h1{font-family:'Barlow Condensed',Impact,sans-serif;font-size:clamp(48px,5.8vw,88px);font-weight:700;line-height:.98;text-transform:uppercase;margin:0;letter-spacing:-.02em;color:#fff}
#codex-hero-carousel .cr-copy h1 span{color:var(--cr-accent)}
#codex-hero-carousel .cr-copy>p{font:400 15px/1.8 Inter,Arial,sans-serif;color:var(--cr-dim);max-width:470px;margin:28px 0}
#codex-hero-carousel .cr-links{display:flex;gap:12px;flex-wrap:wrap}
#codex-hero-carousel .cr-social{display:inline-flex;align-items:center;gap:12px;padding:14px 20px;min-height:48px;border-radius:5px;background:var(--cr-accent);color:var(--cr-bg);border:1px solid transparent;font:600 13px/1.5 Inter,Arial,sans-serif;text-decoration:none}
#codex-hero-carousel .cr-social:nth-child(2){background:transparent;border-color:#6b7080;color:#fff}
#codex-hero-carousel .cr-social img{height:20px;width:20px;object-fit:contain;filter:brightness(0)}
#codex-hero-carousel .cr-social:nth-child(2) img{filter:brightness(0) invert(1)}
#codex-hero-carousel .cr-link-arrow{margin-left:10px}
#codex-hero-carousel .cr-creator-art{height:440px;position:relative;isolation:isolate;min-width:0}
#codex-hero-carousel .cr-orbit{position:absolute;border:1px solid #ffffff12;border-radius:50%;width:90%;aspect-ratio:1;max-width:440px;left:5%;top:0;z-index:-2}
#codex-hero-carousel .cr-art-base{position:absolute;left:0;top:0;width:64%;height:85%;object-fit:contain;opacity:.4;transform:rotate(-15deg);z-index:-1}
html[data-codex-site=spam] #codex-hero-carousel .cr-art-base{object-fit:cover;left:0;top:40px;border-radius:10px;max-width:290px;height:350px;opacity:.65}
#codex-hero-carousel .cr-back-panel{position:absolute;right:8%;top:25px;width:53%;height:82%;border:1px solid var(--cr-accent);background:color-mix(in srgb,var(--cr-accent) 10%,var(--cr-bg));transform:rotate(14deg);z-index:-1}
#codex-hero-carousel .cr-poster{position:absolute;left:23%;top:15px;width:58%;height:88%;border:1px solid color-mix(in srgb,var(--cr-accent) 65%,transparent);padding:22px;background:linear-gradient(145deg,color-mix(in srgb,var(--cr-accent) 24%,var(--cr-bg)),var(--cr-bg));box-shadow:0 24px 65px #0006;transform:rotate(-5deg);display:flex;flex-direction:column;justify-content:space-between;overflow:hidden}
#codex-hero-carousel .cr-poster:before{content:'';position:absolute;inset:10px;border:1px solid #ffffff15;pointer-events:none}
#codex-hero-carousel .cr-poster-top{font:600 10px Inter,Arial,sans-serif;letter-spacing:.18em;color:var(--cr-accent)}
#codex-hero-carousel .cr-monogram{font:700 clamp(110px,13vw,180px)/1 'Barlow Condensed',Impact,sans-serif;text-align:center;color:var(--cr-accent);text-shadow:9px 12px 0 #ffffff08;letter-spacing:-.07em}
#codex-hero-carousel .cr-poster-name{font:700 28px 'Barlow Condensed',Impact,sans-serif;text-transform:uppercase;color:#fff;border-top:1px solid #ffffff25;padding-top:15px}
#codex-hero-carousel .cr-portrait{height:78%;width:100%;object-fit:cover}
#codex-hero-carousel .cr-art-tag{position:absolute;right:0;bottom:4px;background:#b7ded8;color:#1d3339;padding:16px 22px;font:700 12px Inter,Arial,sans-serif;transform:rotate(-6deg)}
#codex-hero-carousel .cr-controls{min-height:66px;border-top:1px solid #ffffff18;display:flex;align-items:center;gap:28px;max-width:1360px;margin:auto;padding:12px 0;color:var(--cr-dim)}
html[data-codex-site=spam] #codex-hero-carousel .cr-controls{width:calc(100% - 80px)}
#codex-hero-carousel .cr-controls[hidden]{display:none}
#codex-hero-carousel .cr-buttons{display:flex;align-items:center;gap:5px}
#codex-hero-carousel .cr-controls button{font:500 11px Inter,Arial,sans-serif;background:transparent;border:1px solid transparent;color:inherit;border-radius:4px;min-height:36px;padding:7px 10px;cursor:pointer}
#codex-hero-carousel .cr-controls button:hover{background:#ffffff0d;color:#fff}
#codex-hero-carousel .cr-controls button:focus-visible,#codex-hero-carousel a:focus-visible{outline:2px solid var(--cr-accent);outline-offset:3px}
#codex-hero-carousel .cr-dots{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
#codex-hero-carousel .cr-dots button{border-bottom:2px solid transparent;border-radius:0}
#codex-hero-carousel .cr-dots button[aria-pressed=true]{color:var(--cr-accent);border-bottom-color:var(--cr-accent)}
#codex-hero-carousel .cr-count{margin-left:auto;font:500 10px Inter,Arial,sans-serif;white-space:nowrap;letter-spacing:.15em}
@media(max-width:900px){#codex-hero-carousel .cr-inner,html[data-codex-site=spam] #codex-hero-carousel .cr-inner{grid-template-columns:1fr;padding:45px 0 26px;gap:20px;min-height:0}#codex-hero-carousel .cr-creator-art{height:340px;max-width:500px;width:100%;margin:auto}#codex-hero-carousel .cr-poster{width:54%;left:26%}#codex-hero-carousel .cr-monogram{font-size:138px}#codex-hero-carousel .cr-controls{gap:12px}#codex-hero-carousel .cr-dots{gap:4px}#codex-hero-carousel .cr-count{display:none}}
@media(max-width:700px){html[data-codex-site=spam] #codex-hero-carousel .cr-inner,html[data-codex-site=spam] #codex-hero-carousel .cr-controls{width:calc(100% - 32px)}#codex-hero-carousel .cr-copy h1{font-size:clamp(44px,12vw,62px)}#codex-hero-carousel .cr-copy>p{font-size:13px;margin:22px 0}#codex-hero-carousel .cr-eyebrow{font-size:10px;letter-spacing:.1em}#codex-hero-carousel .cr-creator-art{height:310px}#codex-hero-carousel .cr-poster{left:18%;width:66%;padding:20px}#codex-hero-carousel .cr-back-panel{right:1%}#codex-hero-carousel .cr-art-tag{font-size:10px;padding:13px 16px}#codex-hero-carousel .cr-poster-top{font-size:8px}#codex-hero-carousel .cr-poster-name{font-size:24px}#codex-hero-carousel .cr-monogram{font-size:128px}#codex-hero-carousel .cr-controls{flex-wrap:wrap;justify-content:center;gap:0;padding:8px 0}#codex-hero-carousel .cr-dots{justify-content:center;gap:0}#codex-hero-carousel .cr-controls button{min-height:40px;padding:7px 8px}}
@media(max-width:900px){#codex-hero-carousel .cr-inner,html[data-codex-site=spam] #codex-hero-carousel .cr-inner{align-content:start;grid-auto-rows:max-content}}
@media(prefers-reduced-motion:reduce){#codex-hero-carousel .cr-slide{transition:none}}

#codex-hero-carousel .cr-dots{position:absolute;right:10px;top:9px;z-index:3;display:flex;align-items:center;gap:0;max-width:calc(100% - 20px);flex-wrap:wrap;justify-content:flex-end}
html[data-codex-site=spam] #codex-hero-carousel .cr-dots{right:max(10px,calc((100% - 1360px)/2))}
#codex-hero-carousel .cr-dots button{padding:0;width:28px;height:28px;min-height:28px;border:0;border-radius:50%;display:grid;place-items:center;background:transparent;color:var(--cr-accent);cursor:pointer}
#codex-hero-carousel .cr-dots button::before{content:'';display:block;width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.28}
#codex-hero-carousel .cr-dots button[aria-pressed=true]::before{opacity:1}
#codex-hero-carousel .cr-dots button:hover::before{opacity:.8}
#codex-hero-carousel .cr-dots button:focus-visible{outline:2px solid var(--cr-accent);outline-offset:1px}
#codex-hero-carousel .cr-custom-art{display:grid;place-items:center}
#codex-hero-carousel .cr-custom-image{display:block;width:100%;height:100%;max-height:440px;object-fit:contain}
@media(max-width:700px){#codex-hero-carousel .cr-dots{top:5px}#codex-hero-carousel .cr-custom-image{max-height:310px}}
