/* dragnix.fr — voir DESIGN.md. Mobile d'abord. */

@font-face { font-family: "Fredoka"; src: url("/static/fredoka-latin-wght-normal.6438e7de.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/static/nunito-latin-wght-normal.76388dbf.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  /* Palette de marque */
  --steel: #43608A;
  --orange: #FF8807;
  --brown: #5A1E0F;
  --ice: #EAF3FB;
  --white: #FFFFFF;
  --night: #0F1B2D;

  /* Rôles (thème clair) */
  --bg: var(--ice);
  --surface: var(--white);
  --surface-2: #DCEAF7;
  --text: #1B2A41;
  --muted: #44546E;
  --heading: var(--steel);
  --line: var(--brown);
  --link: var(--steel);
  --focus: var(--brown);
  --shadow: rgba(90, 30, 15, 1);
  --flake: rgba(67, 96, 138, .55);
  --on-orange: var(--brown);
  --tone-blue: #2F6DB5; --tone-green: #2E8B57; --tone-gold: #B77A00; --tone-red: #D9482A; --tone-purple: #7B4FD1; --tone-pink: #CF3A78;

  --radius: 16px;
  --font-title: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 1rem;
  --max: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--night);
    --surface: #17294A;
    --surface-2: #1F3560;
    --text: #EAF3FB;
    --muted: #B9C9E0;
    --heading: #CFE0F5;
    --line: #8FA6C9;
    --link: #FFB25A;
    --focus: var(--orange);
    --shadow: rgba(0, 0, 0, .55);
    --flake: rgba(255, 255, 255, .8);
    --tone-blue: #6FAAEA; --tone-green: #4CBF82; --tone-gold: #E6B232; --tone-red: #FF7A55; --tone-purple: #A98BF5; --tone-pink: #F0609C;
  }
}
/* Choix manuel (bouton du menu, retenu sur l'appareil) : mêmes valeurs que ci-dessus */
:root[data-theme="dark"] {
  --bg: var(--night);
  --surface: #17294A;
  --surface-2: #1F3560;
  --text: #EAF3FB;
  --muted: #B9C9E0;
  --heading: #CFE0F5;
  --line: #8FA6C9;
  --link: #FFB25A;
  --focus: var(--orange);
  --shadow: rgba(0, 0, 0, .55);
  --flake: rgba(255, 255, 255, .8);
  --tone-blue: #6FAAEA; --tone-green: #4CBF82; --tone-gold: #E6B232; --tone-red: #FF7A55; --tone-purple: #A98BF5; --tone-pink: #F0609C;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; position: relative; z-index: 1; outline: none; overflow-x: hidden; overflow-x: clip; } /* hidden : repli pour Safari avant 16, qui ignore « clip » */
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-title); color: var(--heading); line-height: 1.15; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 8vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .14em; }
ul, ol { padding-left: 1.3em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.icon { width: 1.5em; height: 1.5em; flex: none; }
.skip { position: absolute; left: var(--gutter); top: -4rem; z-index: 100; background: var(--orange); color: var(--on-orange); padding: .6rem 1rem; border-radius: var(--radius); font-weight: 700; }
.skip:focus { top: .5rem; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font: 700 1.05rem/1.2 var(--font-title); text-decoration: none; cursor: pointer;
  padding: .85rem 1.3rem; min-height: 3rem;
  color: var(--on-orange); background: var(--orange);
  border: 3px solid var(--brown); border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--brown);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn:hover { box-shadow: 7px 7px 0 var(--brown); filter: brightness(1.06); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--brown); }
.btn--ghost { background: var(--surface); color: var(--heading); border-color: var(--line); box-shadow: 4px 4px 0 var(--line); }
.btn--ghost:hover { box-shadow: 7px 7px 0 var(--line); }
.btn--ghost:active { box-shadow: 1px 1px 0 var(--line); }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; box-shadow: 4px 4px 0 var(--brown); }
.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.4rem; }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--steel); color: #fff; border-bottom: 3px solid var(--brown); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: #fff; padding: .35rem 0; }
.brand img { border-radius: var(--radius); }
.brand__name { font: 700 1.5rem/1 var(--font-title); }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 3rem; height: 3rem; background: transparent; color: #fff; border: 3px solid #fff; border-radius: var(--radius); cursor: pointer; }
.nav-toggle .nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem .5rem; }
.nav a, .nav__summary { display: flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding: .45rem .8rem; color: #fff; text-decoration: none; font: 600 1rem/1.2 var(--font-title); border-radius: var(--radius); transition: background-color .12s ease; }
.nav a:hover, .nav__summary:hover { background: rgba(255, 255, 255, .18); }
.nav a[aria-current="page"] { background: var(--orange); color: var(--on-orange); }
.nav a .icon { width: 1.15em; height: 1.15em; flex: none; }
.site-header :focus-visible { outline-color: #fff; }
.site-header .nav a[aria-current="page"]:focus-visible { outline-color: #fff; }

/* Groupe « Communauté » : <details> natif (clavier et lecteurs d'écran), refermé par Échap ou un clic ailleurs (core.js) */
.nav__details { position: relative; }
.nav__summary { cursor: pointer; list-style: none; user-select: none; }
.nav__summary::-webkit-details-marker { display: none; }
.nav__summary[data-current] { box-shadow: inset 0 -3px 0 var(--orange); }
.nav__chev { width: 1em; height: 1em; transition: transform .15s ease; }
.nav__details[open] > .nav__summary { background: rgba(255, 255, 255, .18); }
.nav__details[open] .nav__chev { transform: rotate(180deg); }
.nav__sub { flex-direction: column; flex-wrap: nowrap; gap: .15rem; }

@media (max-width: 63.99rem) {
  .js .nav-toggle { display: inline-flex; }
  .js .nav { flex-basis: 100%; display: none; padding-bottom: .8rem; }
  .js .nav.is-open { display: block; }
  .js .nav ul { flex-direction: column; }
  .nav__sub { margin: .1rem 0 .3rem 1.1rem; padding-left: .6rem; border-left: 3px solid rgba(255, 255, 255, .35); }
}
@media (min-width: 64rem) {
  .nav ul { flex-wrap: nowrap; }
  .nav__sub { position: absolute; top: calc(100% + .45rem); left: 0; z-index: 30; min-width: 15rem; padding: .4rem; background: var(--steel); border: 3px solid var(--brown); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--brown); }
  .nav__sub a { white-space: nowrap; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(2.2rem, 6vw, 4rem) 0; }
.section--alt { background: var(--surface-2); border-block: 3px solid var(--line); }
.section__head { max-width: 40rem; margin-bottom: 1.6rem; }
.lead { font-size: 1.2rem; color: var(--muted); }
.eyebrow { font: 700 .9rem/1 var(--font-title); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.page-title { padding: clamp(2rem, 6vw, 3.5rem) 0 1rem; }
.page-title p { max-width: 40rem; }

/* ---------- Cartes ---------- */
.card {
  background: var(--surface); color: var(--text);
  border: 3px solid var(--line); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--line);
  padding: 1.25rem;
}
.card > :last-child { margin-bottom: 0; }
.grid { display: grid; gap: 1.2rem; }
@media (min-width: 40rem) { .grid--2, .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Bandeau live ---------- */
.live-banner { background: var(--orange); color: var(--on-orange); border-bottom: 3px solid var(--brown); }
.live-banner p { margin: 0; padding: .7rem 0; display: flex; align-items: center; justify-content: center; gap: .6rem; font: 700 1.1rem/1.3 var(--font-title); text-align: center; }
.live-banner a { color: inherit; }

/* ---------- Héros ---------- */
.hero { padding: 0; } /* aucune marge : le pingouin, coupé net en bas de l'image, repose sur le bord de la section */
.hero__grid { display: grid; gap: 1.5rem; align-items: center; }
.hero__art { justify-self: center; width: min(62vw, 17rem); }
.mascot { position: relative; aspect-ratio: 4 / 5; }
.mascot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; /* transition: opacity .2s ease; */ }
.mascot img + img { opacity: 0; }
.mascot.is-ready:hover img + img, .mascot.is-ready:focus-within img + img { opacity: 1; }
.mascot.is-ready:hover img:first-child, .mascot.is-ready:focus-within img:first-child { opacity: 0; }
.hero__text { padding-top: 1.2rem; } /* petit écran : le texte ne colle pas au bandeau (le hero, lui, n'a aucun padding) */
.hero__text h1 { margin-bottom: .2em; }
.hero__text h1 span { color: var(--orange); }
.slogan { font: 700 clamp(1.3rem, 4.5vw, 1.9rem)/1.25 var(--font-title); color: var(--heading); margin-bottom: .3em; }
.tagline { font-size: 1.15rem; color: var(--muted); }
@media (min-width: 48rem) {
  .hero__grid { grid-template-columns: 1.2fr .8fr; }
  .hero__text { padding-top: 0; }
  .hero__art { order: 2; width: min(100%, 22rem); }
}

/* ---------- Lecteur Twitch / vidéos ---------- */
.embed { position: relative; border: 3px solid var(--line); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--line); overflow: hidden; background: var(--night); }
.embed.is-playing { aspect-ratio: 16 / 9; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed__facade { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem; padding: 1.6rem 1rem 1.8rem; text-align: center; background: linear-gradient(160deg, var(--steel), var(--night)); color: #fff; }
.embed__facade img { width: clamp(6rem, 22vw, 9rem); }
.embed__facade p { margin: 0; max-width: 32rem; font-size: .95rem; color: #DCEAF7; }
.embed-note { font-size: .95rem; color: var(--muted); margin-top: .9rem; }
.video { display: flex; flex-direction: column; padding: 0; overflow: hidden; text-decoration: none; color: var(--text); transition: transform .12s ease, box-shadow .12s ease; }
.video:hover { box-shadow: 7px 7px 0 var(--line); }
.video img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 3px solid var(--line); }
.video__body { padding: 1rem 1.1rem 1.2rem; }
.video__title { font: 600 1.1rem/1.3 var(--font-title); color: var(--heading); margin: 0 0 .3rem; }
.video__date { font-size: .9rem; color: var(--muted); margin: 0; }
.video__body { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; }
.video__tag { display: inline-block; margin: 0 0 .4rem; padding: .1rem .55rem; border: 2px solid var(--line); border-radius: 999px; font: 700 .75rem/1.4 var(--font-title); letter-spacing: .04em; text-transform: uppercase; color: var(--heading); background: var(--surface-2); }
.video__tag--new { background: var(--orange); color: var(--on-orange); }
.video-feature { margin: 0 0 2rem; }
.feature .video__title { font-size: clamp(1.3rem, 4vw, 1.9rem); }
@media (min-width: 760px) { .feature { flex-direction: row; align-items: stretch; } .feature img { width: 62%; border-bottom: 0; border-right: 3px solid var(--line); } .feature .video__body { justify-content: center; padding: 1.5rem; } }
.videos__sub { margin: 0 0 1rem; font-size: 1.15rem; }
.empty { display: grid; gap: 1rem; align-items: center; justify-items: center; text-align: center; }
.empty img { width: 8rem; }
@media (min-width: 40rem) { .empty { grid-template-columns: auto 1fr; text-align: left; justify-items: start; } }

/* ---------- Tuiles (liens, navigation) ---------- */
.tiles { display: grid; gap: 1.1rem; list-style: none; padding: 0; margin: 0; }
@media (min-width: 40rem) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .tiles--3 { grid-template-columns: repeat(3, 1fr); } }
.tile {
  position: relative; display: flex; align-items: center; gap: 1rem; min-height: 5.5rem;
  padding: 1rem 1.2rem; text-decoration: none; color: var(--text);
  background: var(--surface); border: 3px solid var(--line); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--line);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
a.tile:hover { box-shadow: 7px 7px 0 var(--line); background: var(--surface-2); }
a.tile:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--line); }
.tile__icon { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; flex: none; background: var(--orange); color: var(--on-orange); border: 3px solid var(--brown); border-radius: var(--radius); }
.tile__icon .icon { width: 1.8rem; height: 1.8rem; }
.tile__body { display: flex; flex-direction: column; min-width: 0; }
.tile__title { font: 700 1.3rem/1.2 var(--font-title); color: var(--heading); }
.tile__text { font-size: .98rem; color: var(--muted); line-height: 1.4; }
.tile__go { margin-left: auto; color: var(--muted); }
.tile--soon { opacity: .75; box-shadow: none; border-style: dashed; }
.tile__tag { margin-left: auto; font: 700 .85rem/1 var(--font-title); padding: .4rem .6rem; border: 2px solid var(--line); border-radius: var(--radius); color: var(--muted); }
.tile--big { min-height: 7rem; }
.tile--big .tile__title { font-size: 1.5rem; }

/* ---------- Prose (blog, pages texte) ---------- */
.prose { max-width: 44rem; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose blockquote { margin: 1.4em 0; padding: .8em 1.2em; border-left: 6px solid var(--orange); background: var(--surface); border-radius: var(--radius); }
.prose code { background: var(--surface-2); padding: .1em .35em; border-radius: 6px; font-size: .95em; }
.prose pre { overflow-x: auto; padding: 1em; background: var(--surface-2); border-radius: var(--radius); }
.prose img { border-radius: var(--radius); }
.notice { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem 1.2rem; background: var(--surface); border: 3px dashed var(--line); border-radius: var(--radius); margin: 0 0 1.6rem; }
.notice .icon { margin-top: .15rem; color: var(--orange); }
.notice p { margin: 0; }
.badge { display: inline-block; font: 700 .8rem/1 var(--font-title); letter-spacing: .05em; text-transform: uppercase; padding: .35rem .6rem; background: var(--orange); color: var(--on-orange); border: 2px solid var(--brown); border-radius: var(--radius); }
.post-card { display: flex; flex-direction: column; gap: .5rem; }
.post-card h2, .post-card h3 { margin: 0; font-size: 1.4rem; }
.post-card h2 a, .post-card h3 a { color: var(--heading); text-decoration: none; }
.post-card h2 a:hover, .post-card h3 a:hover { text-decoration: underline; }
.meta { font-size: .92rem; color: var(--muted); margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.split { display: grid; gap: 1.5rem; align-items: center; }
.split img { width: min(70%, 15rem); justify-self: center; }
@media (min-width: 48rem) { .split { grid-template-columns: 1fr auto; } .split--rev { grid-template-columns: auto 1fr; } .split img { width: 15rem; } }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; list-style: none; padding: 0; margin: 0; }
@media (min-width: 48rem) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery figure { margin: 0; text-align: center; }
.gallery figcaption { font: 600 1rem/1.2 var(--font-title); color: var(--heading); margin-top: .4rem; }

/* ---------- Planning ---------- */
.schedule { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 3px solid var(--line); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--line); overflow: hidden; }
.schedule th, .schedule td { padding: .8rem 1rem; text-align: left; border-bottom: 2px solid var(--surface-2); }
.schedule thead th { background: var(--steel); color: #fff; font-family: var(--font-title); }
.schedule tbody tr:last-child > * { border-bottom: 0; }
.schedule th[scope="row"] { font-family: var(--font-title); color: var(--heading); }
.next-live { font: 700 1.3rem/1.3 var(--font-title); color: var(--heading); }
.week { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: 1rem; }
@media (min-width: 40rem) { .week { grid-template-columns: repeat(2, 1fr); } }
.week__day { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; }
.week__emote { width: 5rem; height: auto; flex: none; }
.week__body { min-width: 0; }
.week__body p { margin: 0; }
.week__name { font: 600 1rem/1.3 var(--font-title); color: var(--muted); }
.week__name time { font-weight: 400; font-family: var(--font-body); font-size: .92rem; }
.week__game { font: 700 1.5rem/1.2 var(--font-title); color: var(--heading); }
.week__tags, .week__note { margin-top: .35rem !important; }
.week__note { font-size: .95rem; color: var(--muted); }
.week__day--off { border-style: dashed; box-shadow: none; }
.week__day--off .week__game { color: var(--muted); }
.week__day.is-today { border-color: var(--orange); box-shadow: 4px 4px 0 var(--orange); }
.week__today { display: inline-block; margin-top: .4rem !important; padding: .2rem .6rem; font: 700 .8rem/1.2 var(--font-title); letter-spacing: .05em; text-transform: uppercase; background: var(--orange); color: var(--on-orange); border: 2px solid var(--brown); border-radius: var(--radius); }
.rules { counter-reset: regle; list-style: none; padding: 0; display: grid; gap: 1rem; }
.rules li { counter-increment: regle; display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.rules li::before { content: counter(regle); display: grid; place-items: center; width: 2.6rem; height: 2.6rem; font: 700 1.3rem/1 var(--font-title); background: var(--orange); color: var(--on-orange); border: 3px solid var(--brown); border-radius: var(--radius); }
.rules strong { display: block; font: 700 1.15rem/1.3 var(--font-title); color: var(--heading); }

/* ---------- Formulaires / livre d'or ---------- */
.form { display: grid; gap: 1.1rem; }
.field label { display: block; font: 700 1.05rem/1.3 var(--font-title); color: var(--heading); margin-bottom: .35rem; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  padding: .8rem 1rem; border: 3px solid var(--line); border-radius: var(--radius);
}
.field textarea { min-height: 9rem; resize: vertical; }
.field .hint span:last-child { white-space: nowrap; }
.field .hint { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; color: var(--muted); margin-top: .3rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { margin: 0; padding: .9rem 1.1rem; border: 3px solid var(--line); border-radius: var(--radius); background: var(--surface); font-weight: 700; }
.status[hidden] { display: none; }
.status--ok { border-color: var(--steel); }
.status--err { border-color: var(--orange); }
.messages { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.message__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1rem; margin-bottom: .5rem; }
.message__author { font: 700 1.15rem/1.2 var(--font-title); color: var(--heading); }
.message__date { font-size: .9rem; color: var(--muted); }
.message__text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Comptes, avatars, profil ---------- */
.avatar { width: 3rem; height: 3rem; flex: none; object-fit: cover; background: var(--avatar-bg, var(--surface-2)); border: 3px solid var(--line); border-radius: var(--radius); }
.avatar--big { width: 6rem; height: 6rem; }
.gb-auth { margin-bottom: 1.4rem; }
.gb-me { display: grid; gap: .8rem; justify-items: start; }
.gb-me p { margin: 0; }
.section-gap { margin-top: 1.4rem; }
.btn--small { min-height: 2.5rem; padding: .4rem .9rem; font-size: .95rem; box-shadow: 3px 3px 0 var(--line); }
.identities { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.identities li { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.identities__name { font: 700 1.1rem/1.2 var(--font-title); color: var(--heading); }
.identities__state { color: var(--muted); font-size: .95rem; }
.identities .btn { margin-left: auto; }
.danger summary { cursor: pointer; font-weight: 700; margin-top: 1.2rem; color: var(--heading); }
.check { display: flex; align-items: center; gap: .6rem; }
.check input { width: 1.4rem; height: 1.4rem; accent-color: var(--orange); }
.message__who { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.message__image { display: block; margin-top: .9rem; }
.message__image img { max-width: 100%; max-height: 26rem; border: 3px solid var(--line); border-radius: var(--radius); }
.field input[type="file"] { padding: .6rem .8rem; }
.nav__account { display: flex; align-items: center; gap: .5rem; }
.nav a.nav__account .icon { width: 1.3em; height: 1.3em; }
@media (min-width: 64rem) {
  .nav__account-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- Pied de page ---------- */
.ice-strip { position: relative; z-index: 1; height: 4.2rem; margin-top: 3rem; background: var(--surface); border-top: 3px solid var(--line); overflow: hidden; }
.slider { position: absolute; bottom: -.2rem; left: 0; width: 5rem; height: auto; animation: glisse 18s cubic-bezier(.45, .05, .55, .95) infinite; }
.site-footer { position: relative; z-index: 1; background: var(--steel); color: #fff; padding: 2rem 0 1.2rem; border-top: 3px solid var(--brown); }
.site-footer a { color: #fff; }
.site-footer :focus-visible { outline-color: #fff; }
.footer__grid { display: grid; gap: 1.5rem; }
.footer__brand { font: 700 1.6rem/1 var(--font-title); margin: 0 0 .3rem; }
.footer__text { margin: 0 0 .8rem; color: #DCEAF7; }
.footer__mail { display: flex; align-items: center; gap: .5rem; margin: 0; font-weight: 700; flex-wrap: wrap; }
.footer__nav { display: grid; gap: 1.2rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.footer__title { font: 700 .85rem/1 var(--font-title); letter-spacing: .08em; text-transform: uppercase; color: #DCEAF7; margin: 0 0 .6rem; }
.footer__links, .footer__socials { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.footer__links a { display: inline-block; padding: .3rem 0; }
.footer__socials { display: flex; flex-wrap: wrap; gap: .6rem; }
.footer__copy { margin: 1.4rem auto 0; font-size: .9rem; color: #DCEAF7; }
@media (min-width: 48rem) { .footer__grid { grid-template-columns: 1.3fr 2fr auto; align-items: start; gap: 2rem; } }

/* ---------- Neige ---------- */
.snow { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.flake { position: absolute; top: -12px; background: var(--flake); border-radius: var(--radius); animation: neige linear infinite; }

/* ---------- Animations autorisées (voir DESIGN.md) ---------- */
@keyframes glisse {
  0% { transform: translateX(-6rem) rotate(0deg); }
  15% { transform: translateX(8vw) rotate(-4deg); }
  100% { transform: translateX(calc(100vw + 2rem)) rotate(3deg); }
}
@keyframes neige {
  from { transform: translate3d(0, -5vh, 0); }
  to { transform: translate3d(var(--drift, 30px), 105vh, 0); }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise .7s ease-out both; }
  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slider { animation: none; left: 70%; }
  .snow { display: none; }
  * { transition: none !important; }
}


/* Blog écrit depuis le site : rédaction (/admin/) */
.textarea--tall, .field textarea.textarea--tall { min-height: 22rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .98rem; line-height: 1.5; }
.admin-post { display: grid; gap: .5rem; }
.admin-post__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.admin-post__head h3 { margin: 0; font-size: 1.3rem; overflow-wrap: anywhere; }
.badge--draft { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.prose img { max-width: 100%; height: auto; }
.prose a { overflow-wrap: anywhere; }

/* ---------- Accueil : mêmes contours épais et ombres franches que le reste du site ---------- */
.hero__text h1 { font-size: clamp(3.4rem, 13vw, 6.5rem); line-height: .95; letter-spacing: -.02em; }
.hero__art { width: min(70vw, 19rem); align-self: end; }
.hero__grid { gap: 1rem; }
@media (min-width: 48rem) {
  .hero__grid { min-height: 32rem; }
  .hero__text { padding: 3rem 0; }
  .hero__art { width: min(100%, 25rem); }
}
.next-card { display: flex; align-items: center; gap: .9rem; margin-top: 1.6rem; max-width: 33rem; padding: .9rem 1.1rem; background: var(--surface); border: 3px solid var(--line); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--line); }
.next-card .icon { width: 2.2rem; height: 2.2rem; color: var(--orange); }
.next-card p { margin: 0; }
.next-card__label { font: 700 .8rem/1 var(--font-title); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem !important; }
.next-card .next-live { font-size: 1.05rem; line-height: 1.35; }

.embed__facade { min-height: clamp(14rem, 38vw, 24rem); }
.embed__title { margin: 0; font: 700 clamp(1.3rem, 4vw, 1.8rem)/1.2 var(--font-title); }

/* La semaine en un coup d'œil */
.strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .8rem; }
.strip .week__day { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; padding: .9rem .5rem 1rem; height: 100%; }
.strip .week__emote { width: 4.2rem; }
.strip .week__game { font-size: 1.05rem; }
.strip .week__name { font-size: .9rem; }
.strip .week__name time { display: block; }
.strip .week__tags { margin-top: .3rem !important; }
.strip .badge { font-size: .62rem; padding: .25rem .4rem; }
.strip .week__today { font-size: .66rem; padding: .2rem .45rem; }
@media (max-width: 63.99rem) {
  .strip { display: flex; overflow-x: auto; scroll-snap-type: x proximity; gap: .9rem; padding: .3rem var(--gutter) 1rem; margin-inline: calc(var(--gutter) * -1); }
  .strip > li { flex: 0 0 8.6rem; scroll-snap-align: start; }
}

/* Vidéos : défilement horizontal sur mobile */
@media (max-width: 39.99rem) {
  .videos { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 1rem; padding: .2rem var(--gutter) 1rem; margin-inline: calc(var(--gutter) * -1); }
  .videos > li { flex: 0 0 78%; scroll-snap-align: center; }
}

/* Explorer le site : le premier bloc est plus large */
.bento { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
@media (min-width: 40rem) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .bento > li { grid-column: span 2; }
  .bento > li:first-child { grid-column: span 4; }
}
.bento__item {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: .25rem; height: 100%; min-height: 11.5rem;
  padding: 1.2rem 7.5rem 1.2rem 1.2rem; overflow: hidden; text-decoration: none; color: var(--text);
  background: var(--surface); border: 3px solid var(--line); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--line);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.bento__item:hover { box-shadow: 7px 7px 0 var(--line); background: var(--surface-2); }
.bento__item:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--line); }
.bento__icon { margin-bottom: auto; width: 3rem; height: 3rem; display: grid; place-items: center; background: var(--orange); color: var(--on-orange); border: 3px solid var(--brown); border-radius: var(--radius); }
.bento__title { font: 700 1.5rem/1.15 var(--font-title); color: var(--heading); }
.bento__text { font-size: .98rem; color: var(--muted); line-height: 1.4; }
.bento__art { position: absolute; right: .6rem; bottom: 0; width: 7rem; height: auto; }
@media (min-width: 64rem) { .bento > li:first-child .bento__art { width: 9.5rem; right: 1.2rem; } .bento > li:first-child .bento__item { padding-right: 12rem; min-height: 13rem; } }

/* ---------- Autocollants : les emotes sont des stickers (contour blanc découpé, légèrement penchés) ---------- */
.sticker {
  --tilt: -4deg;
  border-radius: 14px;
  transform: rotate(var(--tilt));
  filter: drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff) drop-shadow(2px 6px 0 rgba(11, 20, 36, .35));
  transition: transform .18s ease;
}
/* Lecteur : l'autocollant colle au coin du cadre et déborde */
.live-stage { position: relative; margin-top: clamp(3.2rem, 8vw, 4rem); }
.live-stage__sticker { position: absolute; z-index: 2; top: -3rem; right: -.2rem; width: clamp(5.5rem, 14vw, 8.5rem); --tilt: 8deg; }
.embed__facade { gap: 1.1rem; }
.embed__facade .embed__title { font-size: clamp(1.6rem, 5vw, 2.6rem); }
/* Semaine : chaque jour porte son autocollant, qui dépasse du haut de la carte */
.strip { padding-top: 2.6rem; row-gap: 2.6rem; }
.strip .week__day { padding-top: 1.6rem; }
.strip .week__emote { width: 4.8rem; margin-top: -3.4rem; }
.strip > li:nth-child(odd) .week__emote { --tilt: -5deg; }
.strip > li:nth-child(even) .week__emote { --tilt: 4deg; }
.strip .week__day:hover .week__emote { transform: rotate(calc(var(--tilt) * -1)) translateY(-4px); }
@media (max-width: 63.99rem) { .strip { padding-top: 3.4rem; } }
/* Explorer : l'autocollant dépasse du coin haut droit du bloc */
.bento { row-gap: 2.4rem; }
.bento__item { overflow: visible; padding-right: 1.2rem; }
.bento__art { top: -1.5rem; right: 1.1rem; bottom: auto; width: 6.2rem; --tilt: 6deg; }
.bento > li:nth-child(even) .bento__art { --tilt: -5deg; }
.bento__item:hover .bento__art { transform: rotate(calc(var(--tilt) * -1)) translateY(-5px); }
@media (min-width: 64rem) { .bento > li:first-child .bento__art { width: 8.6rem; right: 1.6rem; top: -2rem; } .bento > li:first-child .bento__item { padding-right: 1.2rem; } }
.empty .sticker { --tilt: -6deg; }

/* ---------- Glisse : le pingouin arrive en glissant, une seule fois, avec ses traits de vitesse ---------- */
.hero { overflow-x: clip; }
@supports not (overflow: clip) { .hero { overflow-x: hidden; } }
.hero__art { position: relative; }
.mascot { z-index: 1; }
@media (prefers-reduced-motion: no-preference) {
  .mascot { animation: arrive 1.15s cubic-bezier(.16, .84, .3, 1) both; transform-origin: 50% 100%; }
  .hero__art::after {
    content: ""; position: absolute; z-index: 0; left: 80%; top: 28%; width: min(45vw, 28rem); height: 42%; pointer-events: none;
    background: repeating-linear-gradient(to bottom, var(--line) 0 3px, transparent 3px 22px);
    -webkit-mask-image: linear-gradient(to right, #000, transparent); mask-image: linear-gradient(to right, #000, transparent);
    transform-origin: 0 50%; animation: trail 1.15s ease-out both;
  }
}
@keyframes arrive {
  0% { transform: translateX(70vw) rotate(12deg); }
  70% { transform: translateX(-1.5vw) rotate(-2.5deg); }
  100% { transform: none; }
}
@keyframes trail {
  0% { opacity: .9; transform: scaleX(.1); }
  45% { opacity: .9; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) { .sticker, .bento__art { transition: none; } }

/* ---------- Autocollants et glisse sur les autres pages ---------- */
.split > img, .gallery img, .empty img, .week .week__emote {
  --tilt: -4deg;
  border-radius: 14px; transform: rotate(var(--tilt));
  filter: drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff) drop-shadow(2px 6px 0 rgba(11, 20, 36, .35));
}
.gallery li:nth-child(even) img, .week li:nth-child(even) .week__emote { --tilt: 3deg; }
.split--rev > img { --tilt: 4deg; }
@media (prefers-reduced-motion: no-preference) {
  .split > img { animation: arrive-lite .9s cubic-bezier(.16, .84, .3, 1) both; }
}
@keyframes arrive-lite { from { transform: translateX(40vw) rotate(10deg); } to { transform: rotate(var(--tilt)); } }

/* Page 404 : le pingouin glisse hors de la page */
.lost { position: relative; height: 5.4rem; margin-top: 2.2rem; overflow: hidden; border-top: 3px solid var(--line); }
.lost__penguin { position: absolute; bottom: -.2rem; left: 40%; width: 5rem; height: auto; }
@media (prefers-reduced-motion: no-preference) { .lost__penguin { animation: slide-away 3.4s cubic-bezier(.45, .05, .55, .95) both; } }
@keyframes slide-away { from { left: 100%; } to { left: -6rem; } }

/* Badge « en live maintenant » (carte de l'accueil, rempli par live.js) */
.next-card__join { margin-left: auto; flex: none; }
.next-card.is-live { background: var(--orange); border-color: var(--brown); box-shadow: 4px 4px 0 var(--brown); color: var(--on-orange); }
.next-card.is-live .icon, .next-card.is-live .next-card__label, .next-card.is-live .next-live { color: var(--on-orange); }
.next-card.is-live .btn { background: var(--surface); color: var(--heading); }

/* Dernier article (accueil) */
.post-card--latest { position: relative; max-width: 40rem; padding-right: 7.5rem; }
.post-card__sticker { position: absolute; top: -1.6rem; right: 1.2rem; width: 6rem; --tilt: 6deg; }

/* Espace de rédaction : onglets, planning */
.admin-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1rem; margin-bottom: 1.4rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .6rem; }
.tab { font: 700 1rem/1.2 var(--font-title); padding: .6rem 1.1rem; background: var(--surface); color: var(--heading); border: 3px solid var(--line); border-radius: var(--radius); box-shadow: 3px 3px 0 var(--line); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--orange); color: var(--on-orange); border-color: var(--brown); box-shadow: 3px 3px 0 var(--brown); }
.plan-days { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.plan-day { display: grid; gap: .5rem; padding: .8rem; background: var(--surface-2); border: 2px solid var(--line); border-radius: 16px; }
.plan-day input[type="text"], .plan-day select { width: 100%; font: inherit; color: var(--text); background: var(--surface); padding: .6rem .8rem; border: 2px solid var(--edge); border-radius: 12px; }
@media (min-width: 48rem) { .plan-day { grid-template-columns: 7rem 1fr 11rem auto auto; align-items: center; } }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }

/* Bouton clair / sombre */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; margin-left: auto; background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .85); border-radius: var(--radius); cursor: pointer; }
.theme-toggle:hover { background: rgba(255, 255, 255, .16); }
.theme-toggle .icon { width: 1.4rem; height: 1.4rem; }
.theme-toggle__moon { display: none; }
:root[data-theme-now="light"] .theme-toggle__moon { display: block; }
:root[data-theme-now="light"] .theme-toggle__sun { display: none; }
@media (min-width: 64rem) { .theme-toggle { order: 3; margin-left: 0; } .nav { order: 2; } }
.admin-bar__actions { margin-top: 0; }

/* Réactions avec les pingouins */
.reactions { margin-top: 2.4rem; max-width: 44rem; }
.reactions h2 { font-size: 1.3rem; margin-bottom: .8rem; }
.reactions__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .7rem; }
.reaction { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem .35rem .4rem; font: 700 1.05rem/1 var(--font-title); color: var(--heading); background: var(--surface); border: 3px solid var(--line); border-radius: var(--radius); box-shadow: 3px 3px 0 var(--line); cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.reaction img { width: 2.5rem; height: 2.5rem; object-fit: contain; }
.reaction:hover { box-shadow: 5px 5px 0 var(--line); }
.reaction:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.reaction[aria-pressed="true"] { border-color: var(--brown); background: var(--orange); color: var(--on-orange); box-shadow: 3px 3px 0 var(--brown); }
.reaction:disabled { opacity: .6; cursor: progress; }
.reactions .status { margin-top: 1rem; }

/* Réactions sous les messages du livre d'or (version compacte) */
.msg-reactions { margin-top: .9rem; }
.msg-reactions__list { display: flex; flex-wrap: wrap; gap: .45rem; }
.reaction--small { gap: .3rem; padding: .2rem .55rem .2rem .25rem; font-size: .9rem; border-width: 2px; box-shadow: 2px 2px 0 var(--line); }
.reaction--small img { width: 1.75rem; height: 1.75rem; }
.msg-reactions__note { margin-top: .6rem; font-size: .95rem; }

/* Évite le saut de mise en page quand l'éditeur bascule entre ses cartes. */
[data-blog-admin] { min-height: 70vh; }

/* Ajouter à mon agenda */
.agenda { margin-top: 1.6rem; }
.agenda__label { display: flex; align-items: center; gap: .5rem; font-weight: 800; margin-bottom: .7rem; }
.agenda__label svg { width: 1.4rem; height: 1.4rem; }
.agenda .hint { margin-top: .8rem; max-width: 40rem; font-size: .9rem; color: var(--muted); }

/* Message épinglé du livre d'or */
.message--pinned { border-color: var(--brown); box-shadow: 6px 6px 0 var(--brown); }
.message__pin { display: inline-block; margin: 0 0 .6rem; padding: .15rem .7rem; font: 800 .85rem/1.4 var(--font-title); color: var(--on-orange); background: var(--orange); border: 2px solid var(--brown); border-radius: 999px; }

/* Sondage de l'accueil */
.poll { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; max-width: 40rem; }
.poll__option { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; min-height: 3.2rem; padding: .7rem 1rem; overflow: hidden; text-align: left; font: 700 1.05rem/1.3 var(--font-title); color: var(--heading); background: var(--surface); border: 3px solid var(--line); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--line); cursor: pointer; isolation: isolate; }
.poll__option::before { content: ""; position: absolute; inset: 0 auto 0 0; z-index: -1; width: calc(var(--pct, 0) * 1%); background: rgba(255, 136, 7, .35); background: color-mix(in srgb, var(--orange) 35%, transparent); transition: width .3s ease; }
.poll__option:hover:not(:disabled) { box-shadow: 6px 6px 0 var(--line); }
.poll__option[aria-pressed="true"] { border-color: var(--brown); box-shadow: 4px 4px 0 var(--brown); }
.poll__option[aria-pressed="true"] .poll__label::before { content: "✓ "; }
.poll__option:disabled { cursor: default; }
.poll__count { font: 700 .9rem/1 var(--font-body); color: var(--muted); white-space: nowrap; }
.poll__total { margin-top: 1rem; color: var(--muted); }
.poll-archive { margin-top: 1.5rem; max-width: 40rem; }
.poll-archive summary { cursor: pointer; font: 700 1.05rem/1.3 var(--font-title); color: var(--heading); padding: .5rem 0; }
.poll-old__list { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: 1.4rem; }
.poll-old__q { font-size: 1.1rem; margin: 0 0 .2rem; }
.poll-old__meta { margin: 0 0 .6rem; color: var(--muted); font-size: .9rem; }
.poll-old__opts { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.poll-old__opt { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem .8rem; overflow: hidden; font: 700 .95rem/1.3 var(--font-title); color: var(--heading); background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); isolation: isolate; }
.poll-old__opt::before { content: ""; position: absolute; inset: 0 auto 0 0; z-index: -1; width: calc(var(--pct, 0) * 1%); background: rgba(255, 136, 7, .35); background: color-mix(in srgb, var(--orange) 35%, transparent); }
@media (prefers-reduced-motion: reduce) { .poll__option::before { transition: none; } }

/* Fan-arts */
.fanarts { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.fanart { display: flex; flex-direction: column; gap: .8rem; padding: .8rem; }
.fanart__image { display: block; overflow: hidden; border: 3px solid var(--line); border-radius: calc(var(--radius) - 4px); background: var(--surface-2, var(--surface)); }
.fanart__image img { display: block; width: 100%; height: auto; max-height: 28rem; object-fit: contain; }
.fanart__title { font: 700 1.1rem/1.3 var(--font-title); color: var(--heading); margin: 0; }
.fanart__artist { margin: .1rem 0 0; color: var(--muted); }
.fanart__links { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-weight: 700; }

/* Clips */
.clips { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.clip { padding: .8rem; display: flex; flex-direction: column; gap: .6rem; }
.clip__link { display: flex; flex-direction: column; gap: .6rem; color: inherit; text-decoration: none; }
.clip__link img { display: block; width: 100%; height: auto; aspect-ratio: 480 / 272; object-fit: cover; border: 3px solid var(--line); border-radius: calc(var(--radius) - 4px); background: var(--surface-2); }
.clip__title { font: 700 1.05rem/1.3 var(--font-title); color: var(--heading); }
.clip__link:hover .clip__title { text-decoration: underline; }
.clip__meta { margin: 0; color: var(--muted); font-size: .92rem; }

/* Commentaires sous les articles */
.comments { margin-top: 2.4rem; max-width: 44rem; }
.comments h2 { font-size: 1.3rem; margin-bottom: .8rem; }
.comments .messages { margin: 1rem 0; }
.comment--pending { border-style: dashed; }
.comment__pending { margin: .6rem 0; color: var(--muted); font-size: .92rem; }
.comments .form { margin-top: 1.2rem; }

/* /admin/ : sondages, fan-arts */
.poll-opts, .fa-links, .poll-results { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: .5rem; }
.fa-link { display: grid; gap: .5rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .fa-link { grid-template-columns: 1fr 2fr; } }
.fa-item { display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; align-items: start; }
.fa-item img { width: 6rem; height: 6rem; object-fit: cover; border: 3px solid var(--line); border-radius: 12px; }
fieldset.field { border: 0; margin: 0; padding: 0; }
fieldset.field legend { font-weight: 800; padding: 0; margin-bottom: .4rem; }

/* Page Setup */
.setup h3 { margin-bottom: .8rem; }
.spec { margin: 0; display: grid; gap: .8rem; }
.spec > div { display: grid; gap: .1rem; }
.spec dt { font: 800 .85rem/1.3 var(--font-title); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.spec dd { margin: 0; overflow-wrap: anywhere; }

/* Photos du setup : une grande photo de tête, puis des blocs photo(s) + fiche de matériel */
.setup-photo { margin: 0; overflow: hidden; border: 3px solid var(--line); border-radius: var(--radius); box-shadow: 6px 6px 0 var(--line); background: var(--surface-2); }
.setup-photo img { display: block; width: 100%; height: auto; }
.setup-photo figcaption { padding: .55rem .9rem; font-weight: 700; font-size: .95rem; color: var(--muted); border-top: 3px solid var(--line); background: var(--surface); }
.setup-block { display: grid; gap: 1.6rem; align-items: start; }
.setup-block__media { display: grid; gap: 1.6rem; }
.setup-block__info { display: grid; gap: 1.6rem; }
@media (min-width: 64rem) {
  .setup-block { grid-template-columns: 1.35fr 1fr; gap: 2.4rem; }
  .setup-block--rev { grid-template-columns: 1fr 1.35fr; }
  .setup-block--rev .setup-block__media { order: 2; }
  .setup-block--nophoto { grid-template-columns: 1fr; }
}
.setup h2 { font-size: 1.25rem; margin-bottom: .8rem; }

/* /admin/ : aperçu d'un brouillon dans la liste */
#ed-lv-code, #acc-code-input { text-transform: uppercase; letter-spacing: .12em; }
.me__rename-row #ed-lv-code { flex: 0 1 11rem; font-size: 1.15rem; font-weight: 700; }
#ed-lv-code::placeholder, #acc-code-input::placeholder { text-transform: none; letter-spacing: normal; }
#ed-bot pre { overflow-x: auto; padding: 1em; background: var(--surface-2); border-radius: var(--radius); font-size: .85rem; }
#ed-bot summary { cursor: pointer; font-weight: 700; margin-top: 1rem; color: var(--heading); }
#ed-bot code { overflow-wrap: anywhere; }
.admin-preview { margin-top: 1rem; }
.admin-preview h4 { margin: 0 0 .6rem; font: 700 1.1rem/1.3 var(--font-title); color: var(--heading); }

/* ---------- Badges : pastilles à côté d'un pseudo, collection du profil ---------- */
.message__who { flex-wrap: wrap; }
/* ---------- Profil : en-tête, onglets, photo, fonds ---------- */
.page-title--compact { padding: clamp(1.4rem, 4vw, 2.2rem) 0 .4rem; }
.page-title--compact h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); margin-bottom: 0; }
.me { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem 1.2rem; align-items: center; padding: 1rem 1.2rem; background: linear-gradient(135deg, var(--surface) 55%, color-mix(in srgb, var(--orange) 20%, var(--surface))); }
.me .avatar--big { width: 5.5rem; height: 5.5rem; }
.me__body { min-width: 0; }
.me__name { font-size: clamp(1.5rem, 5vw, 2rem); margin: 0; overflow-wrap: anywhere; }
.me__stats { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; margin: .2rem 0 .7rem; color: var(--muted); font-size: .95rem; }
.me__rename { display: grid; gap: .25rem; max-width: 30rem; }
.me__rename label { font: 700 .9rem/1.2 var(--font-title); color: var(--heading); }
.me__rename-row, .inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.me__rename-row input, .inline-form input { width: auto; flex: 1 1 9rem; min-width: 0; padding: .45rem .8rem; font-size: 1rem; min-height: 2.5rem; }
.me__rename .hint { margin: 0; font-size: .85rem; color: var(--muted); }
.page-title--compact + .section { padding-top: 1rem; }
.tabs { margin: 1rem 0 0; gap: .5rem; }
#account .tab { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; font-size: .95rem; box-shadow: 2px 2px 0 var(--line); }
#account .tab .icon { width: 1.15em; height: 1.15em; }
.panel { margin-top: 1rem; }
.panel > * + * { margin-top: 1rem; }
.panel__title { font-size: 1.3rem; margin: 0 0 .5rem; }
.card-maker .btn-row { margin: .6rem 0 0; }
.card-canvas { display: block; width: 100%; max-width: 36rem; height: auto; aspect-ratio: 1200 / 630; margin-top: 1rem; border: 3px solid var(--line); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--shadow); }
.card-canvas[hidden] { display: none; }
.panel p { margin: 0 0 .6rem; }
.pick { margin-top: 1rem; }
.pick:first-of-type { margin-top: .4rem; }
.pick__title { font: 700 .95rem/1.2 var(--font-title); margin: 0 0 .5rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.pick .hint, .panel .hint { margin: .5rem 0 0; font-size: .88rem; color: var(--muted); }
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip-row .btn[aria-pressed="true"] { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange); }
.btn-row--tight { margin-top: .8rem; gap: .5rem; }
.btn--small .icon { width: 1.1em; height: 1.1em; }

/* Fonds d'avatar : valeurs fixes (les mêmes dans les deux thèmes), identifiants = supabase/20-fond-avatar.sql */
[data-bg="ice"] { --avatar-bg: #CFE6FA; }
[data-bg="snow"] { --avatar-bg: #FFFFFF; }
[data-bg="sun"] { --avatar-bg: #FFD166; }
[data-bg="orange"] { --avatar-bg: #FF9A3C; }
[data-bg="coral"] { --avatar-bg: #FF8A80; }
[data-bg="rose"] { --avatar-bg: #F7A8C8; }
[data-bg="lilac"] { --avatar-bg: #C3B1FF; }
[data-bg="mint"] { --avatar-bg: #8EE6C0; }
[data-bg="sky"] { --avatar-bg: #7CCBFF; }
[data-bg="night"] { --avatar-bg: #0F1B2D; }
.swatches { display: flex; flex-wrap: wrap; gap: .5rem; }
.swatch { width: 2.2rem; height: 2.2rem; padding: 0; cursor: pointer; border: 3px solid var(--line); border-radius: 50%; background: var(--avatar-bg, var(--surface-2)); }
.swatch[data-bg=""] { background: linear-gradient(135deg, var(--surface-2) 44%, var(--line) 44% 56%, var(--surface-2) 56%); }
.swatch:hover { transform: scale(1.1); }
.swatch[aria-pressed="true"] { outline: 3px solid var(--orange); outline-offset: 2px; }
.swatch:disabled { opacity: .6; cursor: progress; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.9rem, 1fr)); gap: .5rem; }
.avatar-choice { display: grid; place-items: center; padding: .25rem; cursor: pointer; background: var(--surface); border: 3px solid var(--line); border-radius: 14px; transition: background-color .12s ease; }
.avatar-choice:hover { background: var(--surface-2); }
.avatar-choice[aria-pressed="true"] { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange); }
.avatar-choice:disabled { opacity: .6; cursor: progress; }
.avatar-choice__pic { display: grid; place-items: center; width: 100%; border-radius: 10px; background: var(--avatar-bg, transparent); }
.avatar-choice img { width: 100%; max-width: 3.2rem; height: auto; }

/* ---------- Badges : une couleur par famille, pastilles à côté d'un pseudo, collection du profil ---------- */
[data-tone="blue"] { --tone: var(--tone-blue); }
[data-tone="green"] { --tone: var(--tone-green); }
[data-tone="gold"] { --tone: var(--tone-gold); }
[data-tone="red"] { --tone: var(--tone-red); }
[data-tone="purple"] { --tone: var(--tone-purple); }
[data-tone="pink"] { --tone: var(--tone-pink); }
.message__who { flex-wrap: wrap; }
.badges { display: inline-flex; gap: .3rem; align-items: center; }
.badge-chip { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border: 2px solid var(--tone, var(--line)); border-radius: 50%; background: color-mix(in srgb, var(--tone, var(--surface-2)) 24%, var(--surface)); color: color-mix(in srgb, var(--tone, var(--heading)) 60%, var(--text)); }
.badge-chip .icon { width: .9rem; height: .9rem; }
.badge-grid { list-style: none; margin: 0 0 .4rem; padding: 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); }
.badge-card { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon body" "pin pin"; gap: .4rem .6rem; align-items: center; padding: .6rem .7rem; border: 2px solid var(--tone, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--tone, var(--surface-2)) 14%, var(--surface)); }
.badge-card__icon { grid-area: icon; display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border: 2px solid var(--tone, var(--line)); border-radius: 50%; background: color-mix(in srgb, var(--tone, var(--surface-2)) 26%, var(--surface)); color: color-mix(in srgb, var(--tone, var(--heading)) 60%, var(--text)); }
.badge-card__icon .icon { width: 1.3rem; height: 1.3rem; }
.badge-card__body { grid-area: body; display: grid; gap: .1rem; min-width: 0; }
.badge-card__body strong { font: 700 .98rem/1.2 var(--font-title); color: var(--heading); }
.badge-card__body .meta { margin: 0; font-size: .8rem; line-height: 1.3; }
.badge-card__pin { grid-area: pin; justify-self: start; min-height: 1.9rem; padding: .1rem .75rem; cursor: pointer; font: 700 .82rem/1 var(--font-title); color: var(--text); background: transparent; border: 2px solid var(--tone, var(--line)); border-radius: 99px; }
.badge-card__pin:hover { background: color-mix(in srgb, var(--tone, var(--line)) 18%, var(--surface)); }
.badge-card__pin.is-on { background: color-mix(in srgb, var(--tone, var(--line)) 32%, var(--surface)); }
.badge-card__pin.is-on::before { content: "✓ "; }
.badge-card__pin:disabled { opacity: .6; cursor: progress; }
.badge-grid--locked { grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.badge-card.is-locked { --tone: var(--line); background: transparent; border-style: dashed; grid-template-areas: "icon body"; }
.badge-card.is-locked .badge-card__icon { background: transparent; color: var(--muted); }

/* ---------- Crédits ---------- */
.credits { display: grid; gap: 1.3rem; }
@media (min-width: 48rem) { .credits { grid-template-columns: repeat(2, minmax(0, 1fr)); } .credits__group:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.credits__jump { margin-top: 1.1rem; }
.credits__jump ul, .credit__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.credits__jump a, .credit__link { display: inline-flex; align-items: center; gap: .4rem; min-width: 2.75rem; min-height: 2.75rem; padding: .3rem .95rem; font: 700 .95rem/1.2 var(--font-title); color: var(--heading); text-decoration: none; background: var(--surface); border: 2px solid var(--line); border-radius: 99px; transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.credits__jump a:hover, .credit__link:hover { background: var(--surface-2); box-shadow: 2px 2px 0 var(--line); text-decoration: underline; text-underline-offset: 3px; }
.credits__jump a:focus-visible, .credit__link:focus-visible { border-radius: 99px; outline-offset: 3px; background: var(--surface-2); }
.credits__note { margin-top: .9rem; }
.credits__note .icon, .credit__link .icon { width: 1.1em; height: 1.1em; }
.credit__link .credit__ext { width: .85em; height: .85em; opacity: .75; }
.credits__group { border-top-width: 10px; border-top-color: var(--tone, var(--line)); }
.credits__head { display: flex; align-items: center; gap: .85rem; margin-bottom: 1rem; }
.credits__head > div { min-width: 0; }
.credits__group h2 { font-size: 1.45rem; line-height: 1.15; margin: 0 0 .2rem; }
.credits__group .meta { margin: 0; }
.credits__icon, .credit__mono { display: grid; place-items: center; flex: none; border: 2px solid var(--tone, var(--line)); border-radius: 50%; background: color-mix(in srgb, var(--tone, var(--surface-2)) 26%, var(--surface)); color: color-mix(in srgb, var(--tone, var(--heading)) 60%, var(--text)); }
.credits__icon { width: 3.1rem; height: 3.1rem; transform: rotate(-6deg); }
.credits__icon .icon { width: 1.7rem; height: 1.7rem; }
.credits__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr)); }
.credit { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; align-content: start; gap: .5rem .75rem; padding: .75rem; background: color-mix(in srgb, var(--tone, var(--line)) 9%, var(--surface)); border: 2px solid color-mix(in srgb, var(--tone, var(--line)) 70%, var(--line)); border-radius: 14px; transition: transform .18s ease, box-shadow .18s ease; }
.credit:hover, .credit:focus-within { box-shadow: 3px 3px 0 var(--tone, var(--line)); }
.credit__mono { width: 3rem; height: 3rem; font: 700 1.6rem/1 var(--font-title); transition: transform .18s ease; }
.credit:nth-child(odd) .credit__mono { transform: rotate(-5deg); }
.credit:nth-child(even) .credit__mono { transform: rotate(4deg); }
.credit__body { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; min-width: 0; }
.credit__name--link { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .18em; }
.credit__name--link:hover { color: var(--link); }
.member-link { color: inherit; text-decoration: none; }
a.member-link:hover { text-decoration: underline; text-underline-offset: .18em; }
a.member-link--pic { display: inline-flex; border-radius: 50%; }
a.member-link--pic:hover { text-decoration: none; filter: brightness(1.06); }
.member { display: grid; gap: 1.2rem; }
.member__credit h2 { display: flex; align-items: center; gap: .5rem; }
.member__note { display: block; margin: 0; color: var(--muted); font-size: .95rem; }
.member [hidden] { display: none; }
.member .credit__links { margin-top: .6rem; }
.credit__name { font: 700 1.12rem/1.2 var(--font-title); color: var(--heading); overflow-wrap: anywhere; }
.credit__role { padding: .05rem .65rem; font: 700 .82rem/1.4 var(--font-body); color: var(--text); background: color-mix(in srgb, var(--tone, var(--line)) 20%, var(--surface)); border: 1.5px solid var(--tone, var(--line)); border-radius: 99px; }
.credit__links { grid-column: 1 / -1; }
.credits__thanks { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1.2rem; background: color-mix(in srgb, var(--orange) 14%, var(--surface)); }
.credits__thanks img { width: clamp(5rem, 22vw, 8.75rem); transform: rotate(-4deg); }
.credits__thanks h2 { font-size: 1.5rem; margin: 0 0 .3rem; }
.credits__thanks p { margin: 0; }
@media (prefers-reduced-motion: no-preference) {
  .credits__jump a:hover, .credit__link:hover { transform: translateY(-2px); }
  .credit:hover { transform: translateY(-3px); }
  .credit:hover .credit__mono { transform: rotate(0deg) scale(1.1); }
}

/* ---------- Overlay OBS (page nue, fond transparent) ---------- */
body.overlay { background: transparent; margin: 0; min-height: 0; overflow: hidden; }
body.overlay::before, body.overlay::after { display: none; }
.ovl { display: inline-flex; flex-direction: column; align-items: center; gap: .15em; margin: .4em; padding: .5em 1.1em .6em; font-size: calc(1rem * var(--ovl-scale, 1)); color: #fff; background: rgba(15, 27, 45, .88); border: .22em solid var(--orange); border-radius: .9em; box-shadow: .3em .3em 0 var(--brown); text-align: center; }
.ovl[hidden] { display: none; }
.ovl__label { margin: 0; font: 700 1em/1 var(--font-title); letter-spacing: .12em; text-transform: uppercase; color: #CFE0F5; }
.ovl__code { margin: 0; font: 700 4.2em/1.05 var(--font-title); letter-spacing: .12em; text-indent: .12em; color: #fff; text-shadow: .04em .04em 0 var(--brown); }
.ovl__hint { margin: 0; font: 600 .95em/1.2 var(--font-body); color: #CFE0F5; }
.ovl.is-in { animation: ovl-in .35s ease-out; }
@keyframes ovl-in { from { opacity: 0; transform: translateY(.4em) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ovl.is-in { animation: none; } }

/* ---------- « Ne rate plus un live » ---------- */
.notify { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); max-width: 46rem; }
.notify__item { display: grid; gap: .6rem; align-content: start; }
.notify__item h3 { display: flex; align-items: center; gap: .5rem; margin: 0; }
.notify__item h3 .icon { flex: none; }
.notify__item p { margin: 0; }

/* ---------- Vote de la semaine et « À l'honneur » ---------- */
.weekly { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .8rem; }
.weekly__count { color: var(--muted); font-size: .9rem; }
.weekly__note { flex-basis: 100%; margin: 0; font-size: .95rem; }
.weekly .btn[aria-pressed="true"] { border-color: var(--brown); box-shadow: 3px 3px 0 var(--brown); }
.honor-tag { display: inline-block; margin: 0 0 .6rem; padding: .25rem .7rem; font: 700 .8rem/1 var(--font-body); text-transform: uppercase; letter-spacing: .05em; color: var(--heading); background: var(--surface); border: 2px solid var(--line); border-radius: 99px; }
.fanart--honor { box-shadow: 6px 6px 0 var(--orange); }
.honor { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); max-width: 46rem; }
.honor__item { padding: 0; overflow: hidden; }
.honor__link { display: grid; gap: .3rem; padding-bottom: 1rem; color: inherit; text-decoration: none; }
.honor__link img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--surface); }
.honor__label { margin: .6rem 1rem 0; font: 700 .8rem/1 var(--font-body); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.honor__title { margin: 0 1rem; font: 700 1.1rem/1.3 var(--font-title); color: var(--heading); }
.honor__by { margin: 0 1rem; color: var(--muted); font-size: .9rem; }
.honor__link:hover .honor__title, .honor__link:focus-visible .honor__title { text-decoration: underline; }
.board__tabs { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .6rem; }
.board__tabs .btn[aria-pressed="true"] { border-color: var(--brown); box-shadow: 3px 3px 0 var(--brown); }
.board { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: .7rem; max-width: 40rem; }
.board__row { display: flex; align-items: center; gap: 1rem; padding: .7rem 1rem; }
.board__row--top { background: var(--surface-2); }
.board__rank { min-width: 3rem; font: 700 1.2rem/1 var(--font-title); color: var(--heading); }
.board__name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.board__pts { color: var(--muted); white-space: nowrap; }
.board__me { max-width: 40rem; }
.champ { display: flex; align-items: center; gap: .5rem; max-width: 40rem; margin: 0 0 1rem; font-weight: 700; color: var(--heading); }
.champ .icon { flex: none; width: 1.4em; height: 1.4em; color: var(--tone-gold); }
.champs { max-width: 40rem; margin-bottom: 1.2rem; border-color: var(--tone-gold); }
.champs h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.35rem; margin: 0 0 .2rem; }
.champs h2 .icon { width: 1.3em; height: 1.3em; color: var(--tone-gold); }
.champs__podium { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .4rem; }
.champs__row { display: flex; align-items: center; gap: 1rem; }
.champs__name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.presents { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.present { padding: .35rem .8rem; font: 700 1rem/1.2 var(--font-title); color: var(--heading); background: var(--surface-2); border: 2px solid var(--line); border-radius: 99px; overflow-wrap: anywhere; }
.board__rules { max-width: 40rem; }
.board__rules summary { cursor: pointer; font-weight: 700; }
