/* Anthropia – vitrine. Sombre par choix : la nuit d'un monde de blocs. */
@font-face { font-family: "Pixelify Sans"; font-weight: 600; font-display: swap; src: url("fonts/pixelify-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Pixelify Sans"; font-weight: 700; font-display: swap; src: url("fonts/pixelify-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("fonts/nunito-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("fonts/nunito-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("fonts/nunito-latin-800-normal.woff2") format("woff2"); }

:root {
  --nuit: #15112e;
  --nuit-2: #1e1942;
  --nuit-3: #2a2459;
  --trait: #3a3375;
  --texte: #f3efff;
  --doux: #b9b2e0;
  --or: #ffc83d;
  --or-fonce: #c98f0a;
  --herbe: #7ddf64;
  --herbe-fonce: #3f9a34;
  --braise: #ff6b3d;
  --glace: #7fe3ff;
  --violet: #a78bff;
  --police-titre: "Pixelify Sans", "Trebuchet MS", system-ui, sans-serif;
  --police: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--nuit);
  color: var(--texte);
  font: 400 1.0625rem/1.65 var(--police);
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(60rem 40rem at 85% -10%, rgba(167,139,255,.18), transparent 60%),
    radial-gradient(50rem 30rem at -10% 30%, rgba(125,223,100,.08), transparent 60%);
  background-attachment: fixed;
}
h1, h2, h3 { font-family: var(--police-titre); font-weight: 700; line-height: 1.05; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
a { color: inherit; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; border-radius: 4px; }
.sprite { position: absolute; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--or); color: #1b1300; padding: 8px 14px; z-index: 100; border-radius: 6px; font-weight: 800; }
.skip:focus { left: 8px; }

/* ---------- en-tête */
.entete {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 12px var(--pad);
  background: rgba(21,17,46,.86);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--trait);
}
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.45rem/1 var(--police-titre); letter-spacing: .02em; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a { text-decoration: none; padding: 8px 14px; border-radius: 8px; font-weight: 700; color: var(--doux); }
.nav a:hover { color: var(--texte); background: var(--nuit-3); }
.compte { display: flex; align-items: center; gap: 10px; }
.pseudo-connecte { font-weight: 800; color: var(--or); }

/* ---------- boutons : bloc épais avec ombre dure, qui s'enfonce au clic */
.btn {
  --fond: var(--nuit-3); --ombre: #120e2a; --encre: var(--texte);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; min-height: 46px;
  border: 0; border-radius: 8px; cursor: pointer; text-decoration: none;
  font: 800 1rem/1.1 var(--police); color: var(--encre); background: var(--fond);
  box-shadow: 0 5px 0 var(--ombre), inset 0 2px 0 rgba(255,255,255,.18);
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ombre), inset 0 2px 0 rgba(255,255,255,.18); }
.btn-or { --fond: var(--or); --ombre: var(--or-fonce); --encre: #231800; }
.btn-herbe { --fond: var(--herbe); --ombre: var(--herbe-fonce); --encre: #0d2a08; }
.btn-fin { --fond: var(--nuit-3); --ombre: #100c26; }
.btn-plein { width: 100%; margin-top: 8px; }
.btn[disabled] { opacity: .55; cursor: wait; }

/* ---------- hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 36px;
  max-width: 1200px; margin: 0 auto; padding: clamp(28px, 6vw, 72px) var(--pad) clamp(24px, 4vw, 48px);
}
.surtitre { font: 800 .8rem/1 var(--police); letter-spacing: .14em; text-transform: uppercase; color: var(--herbe); margin-bottom: 14px; }
.hero h1 {
  font-size: clamp(2.8rem, 7.4vw, 6.4rem); color: var(--or); letter-spacing: .01em; margin-bottom: 18px;
  text-shadow: 0 4px 0 var(--or-fonce), 0 8px 0 #7a4f00, 0 14px 24px rgba(0,0,0,.4);
}
.hero h1 span { color: var(--texte); text-shadow: 0 4px 0 #8c84c4, 0 8px 0 #4b4380, 0 14px 24px rgba(0,0,0,.4); }
.accroche { font-size: 1.25rem; max-width: 34em; color: #e4defc; }
.accroche strong { color: var(--or); }
.ip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 26px 0 12px;
  padding: 10px 10px 10px 18px; width: fit-content; max-width: 100%;
  background: var(--nuit-2); border: 2px solid var(--trait); border-radius: 12px;
  box-shadow: 0 6px 0 #100c26;
}
.ip code { font-size: clamp(1.05rem, 3.4vw, 1.5rem); font-weight: 700; color: var(--glace); word-break: break-all; }
.etat { display: flex; align-items: center; gap: 10px; color: var(--doux); font-weight: 700; margin-bottom: 22px; }
.pastille { width: 12px; height: 12px; border-radius: 3px; background: var(--doux); box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.etat.en-ligne .pastille { background: var(--herbe); box-shadow: 0 0 0 3px rgba(125,223,100,.25), 0 0 14px var(--herbe); animation: pouls 2s ease-in-out infinite; }
.etat.hors-ligne .pastille { background: var(--braise); }
@keyframes pouls { 50% { box-shadow: 0 0 0 6px rgba(125,223,100,.08), 0 0 20px var(--herbe); } }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-scene {
  position: relative; aspect-ratio: 5 / 4; width: 100%;
  border: 5px solid #0d0a22; border-radius: 4px; overflow: hidden;
  box-shadow: 0 0 0 3px var(--or), 0 0 0 8px #0d0a22, 0 18px 0 8px #0d0a22, 0 30px 60px rgba(0,0,0,.55);
}
.hero-scene canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }

.paysage { display: block; width: 100%; height: clamp(110px, 16vw, 170px); margin-top: -8px; image-rendering: pixelated; }

/* ---------- bandeau défilant */
.bandeau { overflow: hidden; border-block: 2px solid var(--trait); background: var(--nuit-2); }
.bandeau-piste { display: flex; width: max-content; animation: defile 38s linear infinite; }
.bandeau-piste span { padding: 14px 28px; font: 700 1.05rem/1 var(--police-titre); color: var(--doux); white-space: nowrap; letter-spacing: .04em; }
.bandeau-piste span::after { content: ""; display: inline-block; width: 10px; height: 10px; margin-left: 56px; background: var(--or); transform: rotate(45deg); }
@keyframes defile { to { transform: translateX(-50%); } }

/* ---------- blocs de contenu */
.bloc { padding: clamp(48px, 8vw, 96px) var(--pad); }
.bloc > * { max-width: 1120px; margin-inline: auto; }
.bloc-contraste { background: linear-gradient(180deg, var(--nuit-2), #191536); border-block: 2px solid var(--trait); }
.bloc-tete { margin-bottom: 36px; }
.bloc h2 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 14px; }
.intro { font-size: 1.15rem; color: var(--doux); max-width: 40em; }

.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 22px; }
.carte {
  position: relative; padding: 24px 22px 22px;
  background: linear-gradient(165deg, color-mix(in srgb, var(--teinte, #ffc83d) 16%, var(--nuit-2)), var(--nuit-2) 58%);
  border: 2px solid color-mix(in srgb, var(--teinte, #ffc83d) 40%, var(--trait)); border-radius: 14px;
  box-shadow: 0 6px 0 #100c26; transition: transform .15s, border-color .15s;
}
.carte:hover { transform: translateY(-4px); border-color: var(--teinte, var(--or)); }
.carte .icone {
  display: grid; place-items: center; width: 76px; height: 76px; margin-bottom: 16px;
  background: color-mix(in srgb, var(--teinte, #ffc83d) 22%, #15112e);
  border: 3px solid var(--teinte, #ffc83d); border-radius: 6px;
  box-shadow: 0 4px 0 rgba(0,0,0,.4), inset 0 0 0 3px rgba(0,0,0,.25);
  transition: transform .25s;
}
.carte .icone svg { display: block; }
.carte:hover .icone { transform: translateY(-4px) rotate(-4deg); }
.carte h3 { font-size: 1.35rem; margin-bottom: 8px; color: var(--teinte, var(--or)); }
.carte p { margin: 0; color: #d6d0f2; font-size: 1rem; }
.carte .badge { position: absolute; top: 16px; right: 16px; font: 800 .7rem/1 var(--police); letter-spacing: .08em; text-transform: uppercase; padding: 6px 9px; border-radius: 6px; background: var(--violet); color: #1a1036; }

/* ---------- rejoindre */
.rejoindre { max-width: 820px; }
.onglets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 0; }
.onglets button {
  padding: 12px 18px; border: 2px solid var(--trait); border-bottom: 0; border-radius: 10px 10px 0 0;
  background: var(--nuit); color: var(--doux); font: 800 1rem/1.1 var(--police); cursor: pointer;
}
.onglets button[aria-selected="true"] { background: var(--nuit-3); color: var(--texte); border-color: var(--trait); position: relative; top: 2px; }
.panneau { background: var(--nuit-3); border: 2px solid var(--trait); border-radius: 0 12px 12px 12px; padding: 26px clamp(18px, 4vw, 32px); }
.etapes { margin: 0 0 16px; padding: 0; list-style: none; counter-reset: etape; display: grid; gap: 14px; }
.etapes li { counter-increment: etape; position: relative; padding: 5px 0 0 54px; min-height: 38px; }
.etapes li::before {
  content: counter(etape); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 38px; height: 38px;
  background: var(--or); color: #231800; font: 700 1.2rem/1 var(--police-titre); border-radius: 6px; box-shadow: 0 3px 0 var(--or-fonce);
}
.mini {
  font: 700 .95rem/1 ui-monospace, Consolas, monospace; color: var(--glace); background: var(--nuit);
  border: 2px dashed var(--trait); padding: 4px 9px; border-radius: 6px; cursor: copy; vertical-align: baseline;
}
.mini:hover { border-color: var(--glace); }
.mini.copie { border-style: solid; border-color: var(--herbe); color: var(--herbe); }
.note { color: var(--doux); font-size: .95rem; margin: 0; }
.astuce.vocal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.astuce.vocal > div { flex: 1 1 320px; }
.astuce.vocal .note { display: block; margin-top: 6px; }
.astuce { margin: 22px 0 0; padding: 14px 18px; border-left: 5px solid var(--violet); background: rgba(167,139,255,.1); border-radius: 0 10px 10px 0; }

/* ---------- galerie */
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.galerie figure { margin: 0; border: 2px solid var(--trait); border-radius: 12px; overflow: hidden; background: var(--nuit-2); box-shadow: 0 6px 0 #100c26; }
.galerie img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.galerie figcaption { padding: 10px 14px; color: var(--doux); font-size: .95rem; }
.vide {
  grid-column: 1 / -1; padding: 40px 24px; text-align: center; border: 2px dashed var(--trait); border-radius: 14px; color: var(--doux);
}
.vide strong { display: block; font: 700 1.4rem/1.2 var(--police-titre); color: var(--texte); margin-bottom: 6px; }

/* ---------- votes */
.votes-appel { max-width: 1120px; padding: 22px 24px; margin-bottom: 28px; background: var(--nuit-3); border: 2px solid var(--trait); border-radius: 12px; }
.votes-appel p { color: #d6d0f2; }
.sondages { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; }
.sondage { padding: 24px; background: var(--nuit-3); border: 2px solid var(--trait); border-radius: 14px; box-shadow: 0 6px 0 #100c26; }
.sondage h3 { font-size: 1.45rem; margin-bottom: 6px; }
.sondage .meta { color: var(--doux); font-size: .9rem; margin-bottom: 16px; font-weight: 700; }
.sondage .meta .ferme { color: var(--braise); }
.choix { display: grid; gap: 10px; }
.choix button {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px;
  width: 100%; text-align: left; padding: 12px 14px; min-height: 48px;
  border: 2px solid var(--trait); border-radius: 10px; background: var(--nuit); color: var(--texte);
  font: 700 1rem/1.25 var(--police); cursor: pointer; transition: border-color .15s;
}
.choix button:hover:not([disabled]) { border-color: var(--or); }
.choix button[disabled] { cursor: default; }
.choix .barre { position: absolute; inset: 0 auto 0 0; width: var(--part, 0%); background: rgba(125,223,100,.22); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.choix button.mon .barre { background: rgba(255,200,61,.3); }
.choix button.mon { border-color: var(--or); }
.choix .texte, .choix .score { position: relative; }
.choix .score { font-variant-numeric: tabular-nums; color: var(--doux); font-weight: 800; }
.choix button.mon .score { color: var(--or); }
.sondage .pied { margin: 14px 0 0; color: var(--doux); font-size: .9rem; }

/* ---------- FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { background: var(--nuit-2); border: 2px solid var(--trait); border-radius: 12px; padding: 0 20px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 700 1.5rem/1 var(--police-titre); color: var(--or); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: #d6d0f2; padding-bottom: 6px; }

/* ---------- pied */
.pied {
  padding: 84px var(--pad) 40px; background: #100d26 repeat-x top / 48px 48px; image-rendering: pixelated;
  color: var(--doux); font-size: .92rem;
}
.ruban-apercu { position: sticky; top: 0; z-index: 30; padding: 8px 16px; text-align: center; font-weight: 800; font-size: .9rem; background: var(--violet); color: #1a1036; }
.ruban-apercu ~ .entete { top: 36px; }
.pied > * { max-width: 1120px; margin-inline: auto; }
.pied p { margin-bottom: .5em; }
.pied-marque { display: flex; align-items: center; gap: 10px; color: var(--texte); margin-bottom: 14px; }

/* ---------- fenêtre de connexion */
dialog { width: min(92vw, 420px); padding: 24px; color: var(--texte); background: var(--nuit-2); border: 2px solid var(--trait); border-radius: 16px; box-shadow: 0 10px 0 #100c26, 0 30px 60px rgba(0,0,0,.5); }
dialog::backdrop { background: rgba(10,7,28,.75); backdrop-filter: blur(3px); }
.auth-tete { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.auth-tete h3 { font-size: 1.7rem; }
.fermer { border: 0; background: transparent; color: var(--doux); font-size: 2rem; line-height: 1; cursor: pointer; padding: 0 6px; }
.fermer:hover { color: var(--texte); }
.onglets-petits button { padding: 9px 14px; font-size: .92rem; }
dialog .onglets { margin-bottom: 18px; border-bottom: 2px solid var(--trait); }
dialog label { display: block; font-weight: 800; margin: 14px 0 6px; }
dialog input { width: 100%; padding: 12px 14px; font: 700 1rem/1.2 var(--police); color: var(--texte); background: var(--nuit); border: 2px solid var(--trait); border-radius: 8px; }
dialog input:focus { outline: none; border-color: var(--or); box-shadow: 0 0 0 3px rgba(255,200,61,.25); }
.aide { color: var(--doux); font-size: .88rem; margin: 6px 0 0; }
.erreur { min-height: 1.4em; margin: 12px 0 0; color: #ff9a82; font-weight: 700; }

/* contenus plus étroits que la colonne de 1120 px : alignés à gauche comme les titres */
.bloc > .rejoindre, .bloc > .faq { margin-left: max(0px, calc(50% - 560px)); margin-right: auto; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-scene { max-width: 520px; margin: 8px auto 26px; order: -1; }
  .nav { display: none; }
  .compte { margin-left: auto; }
}
@media (max-width: 520px) {
  .entete { gap: 10px; }
  .marque { font-size: 1.2rem; }
  .pseudo-connecte { display: none; }
  .compte .btn { padding: 10px 14px; min-height: 42px; }
  .ip { padding-left: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bandeau-piste, .etat.en-ligne .pastille { animation: none; }
  .carte, .carte svg, .choix .barre { transition: none; }
}

/* ---------- boîte à idées */
.idee-form { max-width: 720px; margin-bottom: 28px; padding: 24px; background: var(--nuit-3); border: 2px solid var(--trait); border-radius: 14px; box-shadow: 0 6px 0 #100c26; }
.idee-form[hidden], .votes-appel[hidden] { display: none; }
.idee-form label { display: block; font-weight: 800; margin-bottom: 8px; }
.idee-form textarea {
  width: 100%; min-height: 130px; resize: vertical; padding: 12px 14px;
  font: 700 1rem/1.5 var(--police); color: var(--texte); background: var(--nuit); border: 2px solid var(--trait); border-radius: 8px;
}
.idee-form textarea:focus { outline: none; border-color: var(--or); box-shadow: 0 0 0 3px rgba(255,200,61,.25); }
.idee-pied { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.compteur { color: var(--doux); font-variant-numeric: tabular-nums; font-weight: 700; }
.idee-retour { min-height: 1.4em; margin: 12px 0 0; font-weight: 800; }
.idee-retour.ok { color: var(--herbe); }
.idee-retour.erreur { color: #ff9a82; }
.note-vote { margin: 0; padding: 14px 18px; max-width: 720px; border: 2px dashed var(--trait); border-radius: 12px; color: var(--doux); }

/* ---------- tuto console */
.console { margin-top: 28px; padding-top: 22px; border-top: 2px dashed var(--trait); }
.console h3 { font-size: 1.35rem; color: var(--glace); margin-bottom: 10px; }
.liens { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.liens a { color: var(--glace); font-weight: 700; }
.liens a:hover { color: var(--texte); }

/* ---------- administration */
.admin-titre { margin: 0 0 0 auto; font: 700 1.1rem/1 var(--police-titre); color: var(--or); letter-spacing: .06em; text-transform: uppercase; }
.admin { max-width: 1000px; margin: 0 auto; padding: 36px var(--pad) 80px; }
.admin h1 { font-size: 2rem; margin-bottom: 18px; }
.stats { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.stat { min-width: 150px; padding: 14px 18px; background: var(--nuit-2); border: 2px solid var(--trait); border-radius: 12px; box-shadow: 0 4px 0 #100c26; }
.stat strong { display: block; font: 700 2rem/1 var(--police-titre); color: var(--or); }
.stat span { color: var(--doux); font-weight: 700; font-size: .9rem; }
.admin-barre { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-barre label { font-weight: 800; }
.admin select, .admin input[type="text"], .admin input[type="password"] {
  padding: 10px 12px; font: 700 1rem/1.2 var(--police); color: var(--texte); background: var(--nuit); border: 2px solid var(--trait); border-radius: 8px;
}
.admin .idee-form input { width: 100%; margin-bottom: 14px; }
.liste-idees { display: grid; gap: 14px; }
.idee { padding: 16px 18px; background: var(--nuit); border: 2px solid var(--trait); border-left-width: 6px; border-radius: 10px; }
.idee-nouvelle { border-left-color: var(--or); }
.idee-retenue { border-left-color: var(--herbe); }
.idee-refusee { border-left-color: var(--braise); opacity: .75; }
.idee-texte { white-space: pre-wrap; margin: 0 0 12px; overflow-wrap: anywhere; }
.idee-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--doux); font-size: .92rem; }
.idee-meta strong { color: var(--texte); }
.idee-meta select { margin-left: auto; }
.idee-meta .btn { min-height: 38px; padding: 8px 14px; box-shadow: 0 3px 0 #100c26; }
.resultats { margin: 0 0 14px; padding-left: 18px; color: #d6d0f2; }
.page-admin .panneau { border-radius: 0 12px 12px 12px; }
