/* Layout: sticky pill nav over a soft blue/rose wash hero, then one 1120px column:
   établissement (role cards) → candidatures (tabbed form that writes a Discord message) → infos → Discord card. */
:root {
  --bg: #f8f9fc;
  --surface: #ffffff;
  --ink: #14284b;
  --muted: #566178;
  --line: #e2e7f0;
  --soft: #edf0f6;
  --field-bg: #fbfcfe;
  --field-line: #cdd5e4;
  --blue: #2450d6;
  --red: #d6282e;
  --discord: #4a56d6;
  --btn-bg: #14284b;
  --btn-fg: #ffffff;
  --band-bg: #14284b;
  --band-fg: #ffffff;
  --band-muted: rgba(255, 255, 255, 0.78);
  --wash1: rgba(118, 158, 214, 0.30);
  --wash2: rgba(238, 118, 130, 0.22);
  --shadow: 0 24px 56px -28px rgba(20, 40, 75, 0.5);
  --font-display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1220;
    --surface: #111c33;
    --ink: #e8eefb;
    --muted: #9eabc7;
    --line: #223250;
    --soft: #16233d;
    --field-bg: #0c1527;
    --field-line: #2f4166;
    --blue: #7fa2ff;
    --red: #ff6b70;
    --discord: #5865f2;
    --btn-bg: #e8eefb;
    --btn-fg: #0a1220;
    --band-bg: #15305e;
    --wash1: rgba(70, 110, 190, 0.28);
    --wash2: rgba(200, 80, 100, 0.16);
    --shadow: 0 24px 56px -28px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1220;
  --surface: #111c33;
  --ink: #e8eefb;
  --muted: #9eabc7;
  --line: #223250;
  --soft: #16233d;
  --field-bg: #0c1527;
  --field-line: #2f4166;
  --blue: #7fa2ff;
  --red: #ff6b70;
  --discord: #5865f2;
  --btn-bg: #e8eefb;
  --btn-fg: #0a1220;
  --band-bg: #15305e;
  --wash1: rgba(70, 110, 190, 0.28);
  --wash2: rgba(200, 80, 100, 0.16);
  --shadow: 0 24px 56px -28px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: var(--bg);
}
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; text-decoration: none; min-width: 0; }
.brand img { width: 40px; height: 40px; border-radius: 12px; display: block; box-shadow: 0 0 0 1px var(--line); }
.brand-text { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; letter-spacing: -0.01em; white-space: nowrap; }
.pill {
  display: flex;
  gap: 2px;
  padding: 5px;
  background: var(--soft);
  border-radius: 999px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}
.pill::-webkit-scrollbar { display: none; }
.pill a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 9px 18px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
}
.pill a[aria-current="true"] { background: var(--btn-bg); color: var(--btn-fg); }
.dc {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--discord);
  color: #fff;
  flex: none;
}
.dc svg { width: 24px; height: 24px; fill: currentColor; }
.nav { order: 2; }
.dc { order: 3; }
@media (max-width: 860px) {
  .dc { order: 2; }
  .nav { order: 3; flex-basis: 100%; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}
.btn svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-discord { background: var(--discord); color: #fff; }
.btn-light { background: #fff; color: #14284b; }
.btn-outline { background: transparent; color: var(--band-fg); border-color: rgba(255, 255, 255, 0.42); }
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform 0.15s ease, box-shadow 0.15s ease; }
  .btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(20, 40, 75, 0.6); }
}
.link { background: none; border: 0; padding: 8px 4px; font: inherit; font-weight: 600; color: var(--blue); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(56px, 9vw, 112px) clamp(40px, 6vw, 72px); }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(58% 72% at 0% 22%, var(--wash1), transparent 72%),
    radial-gradient(48% 70% at 100% 12%, var(--wash2), transparent 72%);
}
.hero-in { text-align: center; max-width: 820px; margin-inline: auto; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.8rem); font-weight: 800; line-height: 1.04; letter-spacing: -0.025em; }
.hl { color: var(--red); }
.tri { display: inline-flex; width: 104px; height: 6px; margin-top: 22px; border-radius: 999px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.tri i { flex: 1; display: block; }
.tri i:nth-child(1) { background: #1f46f0; }
.tri i:nth-child(2) { background: #fff; }
.tri i:nth-child(3) { background: #ee1c25; }
.hero p.sub { margin-top: 26px; font-size: clamp(1.05rem, 2.2vw, 1.22rem); color: var(--muted); max-width: 640px; margin-inline: auto; text-wrap: pretty; }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 34px; }
.banner { margin: clamp(40px, 6vw, 64px) auto 0; max-width: 1080px; filter: drop-shadow(0 26px 40px rgba(20, 40, 75, 0.28)); }
.banner img { display: block; width: 100%; height: auto; }

/* ---------- sections ---------- */
section { scroll-margin-top: 96px; }
.sec { padding-block: clamp(48px, 7vw, 88px) 0; }
.sec-head { display: flex; flex-direction: column; gap: 12px; max-width: 680px; }
.sec-head h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.sec-head p { color: var(--muted); font-size: 1.08rem; text-wrap: pretty; }

.cycles { display: flex; flex-wrap: wrap; gap: 14px 36px; margin-top: 32px; }
.cycle { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cycle-name { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; }
.cycle ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.cycle li { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; padding: 6px 15px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.cycle sup { font-size: 0.6em; line-height: 0; position: relative; top: -0.45em; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; margin-top: 32px; }
.card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 26px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; }
.tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 11px; border-radius: 999px; }
.tag-staff { color: var(--blue); background: color-mix(in srgb, var(--blue) 13%, transparent); }
.tag-prof { color: var(--ink); background: var(--soft); }
.tag-eleve { color: var(--red); background: color-mix(in srgb, var(--red) 13%, transparent); }
.card h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; }
.card p { color: var(--muted); text-wrap: pretty; }
.card a { margin-top: auto; padding-top: 6px; font-family: var(--font-display); font-weight: 600; color: var(--blue); text-decoration: none; }
.card a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- candidatures ---------- */
.steps { display: flex; flex-wrap: wrap; gap: 14px 32px; list-style: none; margin: 32px 0 0; padding: 0; counter-reset: s; }
.steps li { display: flex; align-items: center; gap: 12px; counter-increment: s; font-weight: 500; max-width: 330px; }
.steps li::before { content: counter(s); flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--btn-bg); color: var(--btn-fg); font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; }

.apply { margin-top: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: clamp(20px, 4vw, 40px); box-shadow: var(--shadow); }
.tabs { display: inline-flex; max-width: 100%; gap: 2px; padding: 5px; background: var(--soft); border-radius: 999px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; padding: 10px 24px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { background: var(--btn-bg); color: var(--btn-fg); }
.lead { margin-top: 24px; color: var(--muted); font-size: 1.04rem; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 22px; margin-top: 24px; }
.full { grid-column: 1 / -1; }
@media (max-width: 640px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field label, .field legend { font-weight: 600; font-size: 0.93rem; padding: 0; }
.req { color: var(--red); margin-left: 3px; }
.field input[type="text"], .field input[type="number"], .field select, .field textarea {
  width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--field-bg);
  border: 1px solid var(--field-line);
  border-radius: 14px;
  padding: 13px 15px;
}
.field textarea { resize: vertical; min-height: 112px; line-height: 1.5; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5' fill='none' stroke='%238a96ad' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.field ::placeholder { color: var(--muted); opacity: 0.7; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 55%, transparent); outline-offset: 0; border-color: var(--blue); }
.hint { font-size: 0.86rem; color: var(--muted); }
.hint.q { color: var(--ink); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chk { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.chips .chk { padding: 9px 16px; border: 1px solid var(--field-line); border-radius: 999px; background: var(--field-bg); }
.chk input { width: 20px; height: 20px; accent-color: var(--blue); flex: none; margin: 0; }
.consent { align-items: flex-start; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.actions .note { color: var(--muted); font-size: 0.9rem; flex: 1 1 240px; }

.result { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.result h3 { font-size: 1.5rem; font-weight: 800; }
.result > p { color: var(--muted); margin-top: 6px; }
.result textarea { width: 100%; margin-top: 18px; font: inherit; font-size: 0.97rem; line-height: 1.55; color: var(--ink); background: var(--field-bg); border: 1px solid var(--field-line); border-radius: 16px; padding: 16px 18px; resize: vertical; }
.result-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; margin-top: 14px; }
.count { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.92rem; }
.count.over { color: var(--red); font-weight: 600; }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.limit { margin-top: 10px; color: var(--red); font-weight: 500; }
.copy-note { margin-top: 10px; min-height: 1.5em; color: var(--muted); font-size: 0.93rem; }

/* ---------- infos ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 32px; margin-top: 36px; }
.fact { border-top: 2px solid var(--ink); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.fact h3 { font-size: 1.25rem; font-weight: 700; }
.fact p { color: var(--muted); text-wrap: pretty; }

/* ---------- discord card ---------- */
.cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px 48px;
  align-items: center;
  margin-top: clamp(48px, 7vw, 88px);
  padding: clamp(28px, 5vw, 60px);
  border-radius: 34px;
  color: var(--band-fg);
  background:
    radial-gradient(60% 90% at 100% 0%, rgba(110, 140, 255, 0.28), transparent 70%),
    var(--band-bg);
}
.cta h2 { color: var(--band-fg); font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.cta p.t { margin-top: 14px; color: var(--band-muted); font-size: 1.08rem; max-width: 560px; text-wrap: pretty; }
.cta .cta-row { justify-content: flex-start; margin-top: 28px; }
.invite { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 22px; color: var(--band-muted); font-size: 0.95rem; }
.invite code { font: 600 0.98rem var(--font-body); color: var(--band-fg); background: rgba(255, 255, 255, 0.1); padding: 6px 12px; border-radius: 10px; user-select: all; overflow-wrap: anywhere; }
.invite .link { color: var(--band-fg); }
.cta-logo { width: clamp(150px, 20vw, 210px); aspect-ratio: 1; border-radius: 30px; display: block; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 24px 48px -20px rgba(0, 0, 0, 0.6); max-width: 100%; }
@media (max-width: 760px) { .cta { grid-template-columns: minmax(0, 1fr); } .cta-logo { order: -1; width: 120px; } }

footer { margin-top: clamp(48px, 7vw, 80px); border-top: 1px solid var(--line); padding-block: 28px 40px; }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; color: var(--muted); font-size: 0.9rem; }
.foot .tri { margin-top: 0; }
.foot p { max-width: 560px; }

/* ---------- ajouts (version fichiers) ---------- */
.sprite { position: absolute; width: 0; height: 0; }
.dcl { color: var(--discord); }
.cta-first { margin-top: 0; }
.card h3 sup { font-size: 0.6em; line-height: 0; position: relative; top: -0.45em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#res-sent { margin-top: 18px; }
#manual { margin-top: 4px; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
