
/* ───────── Thèmes ───────── */
:root {
  --accent: #f87f4f;
  --accent-hover: #ff9466;
  --on-accent: #fff;
  --ok: #2f9e6e;
  --danger: #d9463f;
  --info: #4a7fe0;
  --display: 'Unbounded', system-ui, sans-serif;
  --body: 'Poppins', system-ui, sans-serif;
  --radius: 8px;
  --radius-lg: 16px;
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --field: #ffffff;
  --line: #ececee;
  --line-2: #d0d0d0;
  --text: #111111;
  --muted: #5f5f66;
  --faint: #9a9aa2;
  --accent-soft: rgba(248, 127, 79, 0.1);
  --shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 8px 24px rgba(17, 17, 17, .06);
  --glow: transparent;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --accent: #fe8e46;
  --accent-hover: #ffa165;
  --on-accent: #160b03;
  --ok: #3fb37f;
  --danger: #e0524f;
  --bg: #09090b;
  --bg-2: #0f0f12;
  --surface: #141418;
  --surface-2: #1b1b20;
  --field: #0f0f12;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --faint: #66666f;
  --accent-soft: rgba(254, 142, 70, 0.12);
  --shadow: none;
  --glow: rgba(254, 142, 70, 0.14);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 15px/1.65 var(--body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background-color .25s, color .25s;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(900px 520px at 70% -200px, var(--glow), transparent 70%);
}
main { flex: 1; }
a { color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #fff; }

/* Contenu large : jusqu'à ~1600 px utiles, marges latérales proportionnelles à l'écran */
.wrap { width: 100%; max-width: 1760px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 80px); }

/* ───────── Header ───────── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand b { font: 800 20px/1 var(--display); letter-spacing: -0.03em; }
.brand .fa { font: 600 10px/1 var(--display); letter-spacing: .12em; color: var(--accent); border: 1.5px solid var(--accent); border-radius: 5px; padding: 3px 5px; margin-left: 6px; vertical-align: 3px; }
.brand small { display: block; margin-top: 4px; font: 500 10px/1 var(--body); letter-spacing: .22em; color: var(--muted); text-transform: uppercase; }
.top-actions { display: flex; gap: 8px; align-items: center; }

/* ───────── Typo ───────── */
.kicker { display: inline-flex; align-items: center; gap: 10px; font: 600 11px var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; }
/* Interligne assez haut pour ne pas rogner les jambages (j, g, p) de l'Unbounded 900 */
h1 { font-weight: 900; font-size: clamp(32px, 5.4vw, 58px); line-height: 1.14; padding-bottom: .04em; }
h2, h3 { line-height: 1.2; }
/* « j » redessiné en Poppins dans les titres (celui d'Unbounded ressemble à un « i ») */
.j { font-family: var(--body); font-weight: 800; letter-spacing: 0; margin: 0 .01em; }
h1 em, h2 em { font-style: normal; color: var(--accent); }
h2 { font-weight: 800; }
.lead { color: var(--muted); font-size: 16px; max-width: 54ch; margin: 0; }
.muted { color: var(--muted); }
.hint { font-size: 12.5px; color: var(--faint); }

/* ───────── Boutons ───────── */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 2px solid var(--line-2); background: transparent; color: var(--text);
  font: 600 14px var(--body); padding: 11px 20px; border-radius: var(--radius); cursor: pointer; text-decoration: none;
  transition: background .2s, border-color .2s, color .2s, transform .15s, opacity .2s;
}
.btn:hover { border-color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .btn-primary { color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { border-color: transparent; }
.btn-ghost:hover { border-color: var(--line-2); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn-danger:hover { border-color: var(--danger); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 7px; }
.icon-btn { width: 40px; height: 40px; padding: 0; }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }

/* ───────── Accueil ───────── */
.hero { display: grid; gap: 36px; align-items: center; padding: 36px 0 56px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.05fr 1fr; gap: 56px; padding: 56px 0 72px; } }
.hero-text { display: grid; gap: 20px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.hero-art { position: relative; }
.hero-art::before {
  content: ''; position: absolute; inset: 18px -14px -14px 18px; border-radius: var(--radius-lg);
  background: url('/assets/topo.jpg') center / 360px; z-index: 0;
}
.hero-art img { position: relative; z-index: 1; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 40%; border-radius: var(--radius-lg); box-shadow: 0 24px 60px rgba(0,0,0,.18); }
.stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 8px; }
.stats div { display: grid; }
.stats b { font: 800 22px var(--display); letter-spacing: -0.02em; }
.stats span { font-size: 12.5px; color: var(--muted); }

.section-title { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.section-title h2 { font-size: clamp(22px, 3vw, 30px); }
.choices { display: grid; gap: 18px; padding-bottom: 80px; }
@media (min-width: 760px) { .choices { grid-template-columns: repeat(2, 1fr); } }
/* Nombre impair de pôles : la dernière carte se place seule au centre de la ligne */
@media (min-width: 760px) { .choices > .choice:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 9px); } }
.choice {
  position: relative; display: flex; flex-direction: column; overflow: hidden; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.choice:hover { border-color: var(--accent); transform: translateY(-3px); }
.choice .band {
  position: relative; height: 150px; background: url('/assets/topo.jpg') center / 420px; display: flex; align-items: flex-end; justify-content: space-between; padding: 18px 22px;
}
.choice .band .num { font: 900 64px/0.8 var(--display); color: rgba(255,255,255,.9); letter-spacing: -0.04em; }
.choice .band img { width: 58px; height: 58px; border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.choice .body { padding: 24px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.choice h3 { font: 800 clamp(22px, 3vw, 28px) var(--display); letter-spacing: -0.02em; }
.choice p { margin: 0; color: var(--muted); }
.choice .go { margin-top: auto; padding-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.choice .cta { font: 600 14px var(--body); color: var(--accent); display: inline-flex; gap: 8px; align-items: center; }
.choice.closed, .choice.sent { pointer-events: none; cursor: default; }
.choice.sent { opacity: .85; }
.choice.sent .band { filter: saturate(.35) brightness(.9); }
.choice.sent .cta { color: var(--muted); font-weight: 500; }
.pill.done { color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.pill.done::before { background: var(--accent); }
.choice.closed .band { filter: grayscale(1) brightness(.85); }
.choice.closed .cta { color: var(--faint); }

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px; border-radius: 999px; font: 500 12px var(--body); border: 1px solid var(--line-2); color: var(--muted); width: fit-content; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.pill.open { color: var(--text); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.pill.open::before { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }

/* ───────── Footer (sombre, comme la boutique) ───────── */
.foot { background: #111; color: #e8e8ea; margin-top: 40px; }
.foot .wrap { display: grid; gap: 22px; padding-top: 34px; padding-bottom: 30px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.foot .brand small { color: #9a9aa2; }
.foot nav { display: flex; flex-wrap: wrap; gap: 22px; font: 600 13.5px var(--body); }
.foot nav a { text-decoration: none; color: #d4d4d8; }
.foot nav a:hover { color: #fff; }
.foot-legal { border-top: 1px solid rgba(255,255,255,.08); padding-top: 18px; font-size: 12.5px; color: #8a8a93; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }

/* ───────── Candidature ───────── */
.apply-grid { display: grid; gap: 26px; padding: 18px 0 70px; }
@media (min-width: 960px) { .apply-grid { grid-template-columns: minmax(280px, 340px) 1fr; gap: clamp(36px, 4vw, 72px); } .apply-side { position: sticky; top: 20px; align-self: start; } }
@media (min-width: 1500px) { .apply-grid .card { padding: 44px 52px; } }

/* ───────── Connexion Discord ───────── */
.dc-card { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 12px; margin-bottom: 22px;
  background: color-mix(in srgb, #5865f2 9%, var(--surface)); border: 1.5px solid color-mix(in srgb, #5865f2 35%, transparent); }
.dc-card > div { flex: 1; min-width: 200px; display: grid; gap: 2px; }
.dc-card b { font-weight: 600; }
.dc-card span { font-size: 13px; color: var(--muted); }
.dc-card img { border-radius: 50%; }
.dc-card .dc-ok { color: var(--ok); font-weight: 600; }
.dc-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #5865f2; color: #fff; flex: none; }
.dc-card.verified { background: color-mix(in srgb, var(--ok) 8%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.btn-discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn-discord:hover { background: #4752c4; border-color: #4752c4; }
.dc-or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; margin: -6px 0 18px; }
.dc-or::before, .dc-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
input.locked { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.id-help-btn { display: inline-flex; align-items: center; gap: 7px; margin-top: 9px; padding: 0; border: 0; background: none; color: #5865f2; font: 600 13px var(--body); cursor: pointer; }
:root[data-theme="dark"] .id-help-btn { color: #8c95ff; }
.id-help-btn svg { width: 16px; height: 16px; }
.id-help-btn:hover { text-decoration: underline; }
.id-help { margin-top: 10px; padding: 14px 16px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; }
.id-help ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.apply-side h1 { font-size: clamp(30px, 4vw, 44px); margin: 12px 0 10px; }
.progress { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 18px; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width .4s; }
.progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); margin-top: 8px; }
.steps { list-style: none; padding: 0; margin: 22px 0 0; display: none; }
@media (min-width: 960px) { .steps { display: block; } }
.steps li { display: flex; gap: 12px; align-items: center; padding: 8px 0; color: var(--faint); font-size: 14px; }
.steps li b { font: 700 11px var(--display); width: 24px; }
.steps li.done { color: var(--muted); }
.steps li.done b, .steps li.active b { color: var(--accent); }
.steps li.active { color: var(--text); font-weight: 500; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); }
@media (min-width: 640px) { .card { padding: 36px; } }
.section-head { padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.section-head .idx { font: 700 12px var(--display); color: var(--accent); letter-spacing: .14em; }
.section-head h2 { font-size: clamp(21px, 3vw, 28px); margin: 8px 0 6px; }
.section-head p { margin: 0; color: var(--muted); }

.prose { color: var(--text); }
.prose h3 { font: 700 12px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 26px 0 12px; }
.prose ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.prose li { position: relative; padding-left: 22px; color: var(--muted); }
.prose li::before { content: ''; position: absolute; left: 0; top: .8em; width: 10px; height: 2px; border-radius: 2px; background: var(--accent); }
.prose strong { font-weight: 600; color: var(--text); }
.prose p { margin: 0 0 14px; color: var(--muted); }

.q { padding: 4px 0 24px; }
.q + .q { border-top: 1px solid var(--line); padding-top: 24px; }
.q label.title { display: block; font-weight: 600; font-size: 15.5px; margin-bottom: 4px; }
.q .req { color: var(--accent); margin-left: 4px; }
.q .help { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.q .err { color: var(--danger); font-size: 13px; margin-top: 8px; display: none; }
.q.invalid .err { display: block; }
.q.invalid :is(input[type=text], input[type=number], textarea, select) { border-color: var(--danger); }
.q .tag { display: inline-block; font: 600 10px var(--display); letter-spacing: .1em; color: var(--accent); background: var(--accent-soft); border-radius: 5px; padding: 3px 7px; margin-bottom: 8px; }
.meta { display: flex; justify-content: flex-end; font-size: 12px; color: var(--faint); margin-top: 6px; }
.meta.low { color: var(--accent); }

input[type=text], input[type=number], input[type=password], input[type=url], input[type=search], textarea, select {
  width: 100%; background: var(--field); color: var(--text); border: 1.5px solid var(--line-2);
  border-radius: var(--radius); padding: 12px 14px; font: 400 15px var(--body); transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
::placeholder { color: var(--faint); }

.opts { display: grid; gap: 10px; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); cursor: pointer; background: var(--field); border: 1.5px solid var(--line-2); transition: border-color .2s, background .2s; }
.opt:hover { border-color: var(--muted); }
.opt input { accent-color: var(--accent); margin-top: 5px; flex: none; }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.scale { display: flex; gap: 8px; flex-wrap: wrap; }
.scale .opt { flex: 1; min-width: 52px; justify-content: center; align-items: center; flex-direction: column; gap: 4px; font-family: var(--display); font-weight: 700; }
.scale-labels { display: flex; justify-content: space-between; color: var(--faint); font-size: 12px; margin-top: 8px; }

.nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--line); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.banner { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); font-size: 14px; margin-bottom: 18px; }
.notice { padding: 13px 16px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 8%, transparent); color: var(--danger); font-size: 14px; margin: 16px 0 0; }

.recap h3 { font: 700 12px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 24px 0 8px; display: flex; justify-content: space-between; align-items: center; }
.recap h3 button { font: 500 12px var(--body); letter-spacing: 0; text-transform: none; }
.recap dl { margin: 0; display: grid; gap: 2px; }
.recap dt { font-size: 13px; color: var(--muted); margin-top: 10px; }
.recap dd { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 14.5px; }

.done-card { text-align: center; padding: 40px 12px; max-width: 560px; margin: 0 auto; }
.done-card .ring { width: 74px; height: 74px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; margin: 0 auto 22px; box-shadow: 0 0 0 10px var(--accent-soft); }
.done-card h2 { font-size: 26px; margin-bottom: 14px; }
.done-card .prose p { color: var(--muted); }
.done-card code { font: 700 14px var(--display); color: var(--accent); letter-spacing: .1em; }
.done-card .row-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }

.hidden { display: none !important; }
.fade { animation: fade .45s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
