/* Koversec Formation — feuille de style unique
   Charte reprise de la landing : noir, blanc, Georgia + Courier New, aucune couleur d'accent.
   Mise en page : une colonne centrée, champs soulignés, un seul bouton plein par écran. */

:root {
  --bg: #000;
  --fg: #fff;
  --text: #e0e0e0;
  --muted: #b5b5b5;
  --faint: #9a9a9a;
  --line: #555;
  --rule: #1c1c1c;
  --frame: #2a2a2a;
  --serif: Georgia, 'Times New Roman', Times, serif;
  --mono: 'Courier New', Courier, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; background: var(--bg); color: var(--fg); font-family: var(--serif); }
body { display: flex; flex-direction: column; min-height: 100vh; }
a { color: var(--fg); }
img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
[hidden] { display: none !important; }

/* ---------- En-tête (identique à la landing) ---------- */
.site-header { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 32px 16px 0; }
.brand { font-family: var(--mono); font-weight: bold; letter-spacing: .25em; font-size: 13px; text-decoration: none; opacity: .75; }
.nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 3rem; font-size: 1.1rem; letter-spacing: .05em; }
.nav a { text-decoration: none; opacity: .7; transition: opacity .2s ease; }
.nav a:hover { opacity: 1; text-decoration: underline; }
.nav a[aria-current="page"] { opacity: 1; text-decoration: underline; }

/* ---------- Colonne centrée ---------- */
.page { width: 100%; margin: 0 auto; padding: 72px 24px; display: flex; flex-direction: column; align-items: center; gap: 44px; text-align: center; }
.page--xs { max-width: 440px; }
.page--sm { max-width: 520px; }
.page--md { max-width: 560px; }
.page--lg { max-width: 620px; }
.page--xl { max-width: 680px; }
.page--fill { flex: 1; justify-content: center; }

.stack { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 26px; }
.stack--tight { gap: 10px; }
.row { display: flex; justify-content: center; flex-wrap: wrap; gap: 24px; }
.grid-2 { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } .nav { gap: 1.5rem; } }

/* ---------- Typo ---------- */
h1 { font-weight: normal; font-size: 40px; line-height: 1.15; }
.h1--sm { font-size: 34px; }
.lead { color: var(--muted); font-size: 16px; line-height: 1.6; }
.prose { font-size: 18px; line-height: 1.7; color: var(--text); }
.prose p + p { margin-top: 1em; }
.eyebrow { font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: .2em; text-transform: uppercase; }
.meta { font-family: var(--mono); font-size: 13px; color: var(--faint); }
.note { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.code-big { font-family: var(--mono); font-size: 30px; letter-spacing: .2em; }

/* ---------- Formulaires ---------- */
.field { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: .15em; text-transform: uppercase; }
.input {
  width: 100%; background: transparent; color: var(--fg); border: 0; border-bottom: 1px solid var(--line);
  padding: 12px 0; font-family: var(--mono); font-size: 17px; text-align: center; letter-spacing: 0; text-transform: none;
}
.input:focus { outline: none; border-bottom-color: var(--fg); }
.input::placeholder { color: #777; }
.input--code { font-size: 24px; letter-spacing: .2em; text-transform: uppercase; }
.input--flag { max-width: 420px; font-size: 22px; }
.input[type="date"] { color-scheme: dark; }
.textarea {
  width: 100%; background: #0a0a0a; color: #e6e6e6; border: 1px solid #262626; padding: 20px;
  font-family: var(--mono); font-size: 15px; line-height: 1.6; resize: vertical; text-align: left; /* l'édition reste alignée à gauche */
}
.check { display: flex; gap: 10px; align-items: center; justify-content: center; font-size: 15px; color: var(--muted); }
.check input { width: 18px; height: 18px; accent-color: #fff; }
.check--disabled { color: #777; }

/* ---------- Boutons et liens d'action ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 40px; background: var(--fg); color: var(--bg); border: 0; font-family: var(--serif); font-size: 16px; text-decoration: none; cursor: pointer; }
.btn:hover { opacity: .9; }
.link-btn { background: none; border: 0; color: var(--muted); min-height: 44px; font-family: var(--serif); font-size: 15px; text-decoration: underline; cursor: pointer; }
.links { display: flex; justify-content: center; flex-wrap: wrap; gap: 24px; font-size: 14px; }
.links a { opacity: .8; }
.links--col { flex-direction: column; align-items: center; gap: 14px; }
.links .quiet, .quiet { color: var(--faint); }

/* Onglets texte (classement, éditeur) */
.tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 32px; }
.tab { background: none; border: 0; color: var(--fg); min-height: 44px; font-family: var(--serif); font-size: 17px; text-decoration: none; opacity: .6; cursor: pointer; }
.tab[aria-selected="true"], .tab[aria-current="page"] { opacity: 1; text-decoration: underline; }

/* ---------- Listes empilées ---------- */
.list { list-style: none; width: 100%; display: flex; flex-direction: column; }
.list > li { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.list > li.is-inactive { opacity: .55; }
.list-title { font-size: 18px; }

/* Classement */
.board { list-style: none; width: 100%; }
.board li { display: flex; gap: 16px; align-items: baseline; padding: 14px 4px; font-size: 17px; border-bottom: 1px solid var(--rule); color: #d0d0d0; }
.board .rank { font-family: var(--mono); font-size: 13px; color: var(--faint); width: 32px; text-align: left; }
.board .name { flex: 1; text-align: left; }
.board .score { font-family: var(--mono); }
.board li.is-me { color: var(--fg); font-weight: bold; }

/* Parcours */
.tracks { display: flex; flex-direction: column; align-items: center; gap: 64px; width: 100%; }
.track { display: flex; flex-direction: column; align-items: center; gap: 12px; text-decoration: none; width: 100%; }
.track-name { font-size: 28px; }
.track-desc { color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 440px; }
.bar { display: block; width: 160px; height: 2px; background: #262626; margin-top: 6px; }
.bar > span { display: block; height: 2px; background: var(--fg); }
.track-progress { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.track-progress .cta { color: var(--fg); text-decoration: underline; }

/* Challenge */
.dots { display: flex; gap: 10px; justify-content: center; }
.dot { display: block; width: 8px; height: 8px; border-radius: 50%; background: #333; }
.dot--done { background: var(--fg); }
.dot--current { background: transparent; border: 1px solid var(--fg); }
.figure { width: 100%; border: 1px solid var(--frame); }
.figure--placeholder { height: 340px; display: flex; align-items: center; justify-content: center; color: #8a8a8a; font-family: var(--mono); font-size: 13px; padding: 24px; }
.feedback { font-family: var(--mono); font-size: 14px; color: #d0d0d0; }
.success { font-size: 20px; }
.hint { color: var(--muted); font-size: 16px; line-height: 1.6; font-style: italic; max-width: 460px; }

/* Admin : sélecteur de challenges */
.steps { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.step { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; text-decoration: none; font-family: var(--mono); font-size: 14px; border: 1px solid #333; color: #d0d0d0; }
.step[aria-current="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.step--add { border-style: dashed; border-color: var(--line); color: var(--fg); }
.preview { width: 100%; border: 1px solid #262626; padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 18px; font-size: 17px; line-height: 1.65; color: var(--text); }

/* ---------- Landing ---------- */
.landing-nav { display: flex; justify-content: center; gap: 3rem; padding: 2rem 1rem; font-size: 1.1rem; letter-spacing: .05em; }
.landing-nav a { text-decoration: none; opacity: .85; transition: opacity .2s ease; }
.landing-nav a:hover { opacity: 1; text-decoration: underline; }
.landing-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 1rem; }
pre.ascii { color: var(--fg); font-family: var(--mono); font-weight: bold; line-height: 1.1; white-space: pre; font-size: clamp(5px, 1.5vw, 14px); text-align: left; }
