/* =====================================================================
 * Grille d'entretien Athena — feuille de style
 * ---------------------------------------------------------------------
 * FORK de la DA du test d'admission (front/styles.css) : mêmes tokens
 * couleurs, mêmes polices (Anton/Poppins), même carte flottante, mêmes
 * boutons dégradé violet, même header sombre.
 *
 * Différence de SUJET : ce n'est pas une épreuve chronométrée pour le
 * candidat, c'est un INSTRUMENT DE NOTATION pour le commercial pendant
 * l'entretien. Donc : pas de chrono, formulaire multi-étapes long, une
 * carte par étape, et un soin particulier sur les composants de notation
 * (étoiles, pastilles 1-10, checklists).
 * ===================================================================== */

:root {
  /* Couleurs — copiées telles quelles du test (DA athena-bs.fr) */
  --ink:        #1e0c36;   /* aubergine, toile sombre */
  --ink-2:      #2a1547;
  --ink-3:      #341a57;
  --violet:     #975afd;   /* signature */
  --violet-up:  #a974ff;
  --lilac:      #cec8eb;
  --mist:       #f1eefa;
  --paper:      #ffffff;
  --bg:         #f4f1fb;
  --text:       #1e0c36;
  --muted:      #6b6480;
  --line:       #e7e0f6;
  --coral:      #ff5b52;
  --gold:       #ffc24b;   /* étoile non sélectionnée (rappel) */

  /* Typo */
  --display: "Anton", system-ui, -apple-system, sans-serif;
  --body: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Formulaire long : largeur un peu plus généreuse que le test (660px) */
  --wrap: 720px;
  --radius: 16px;
  --radius-lg: 26px;
  --pill: 999px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--violet); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- En-tête (barre logo, sombre, commune au test) ---------- */
.site-header {
  background: var(--ink);
  position: relative;
  z-index: 3;
}
.site-header .wrap { max-width: none; }
.site-header__in { display: flex; align-items: center; min-height: 64px; }
.logo { height: 38px; width: auto; }
@media (min-width: 760px) {
  .site-header .wrap { padding-left: 40px; }
  .logo { height: 46px; }
}

/* =====================================================================
 * BANDEAU D'IDENTITÉ — qui est évalué (remplace le hero photo du test)
 * Toile aubergine reprise du hero, mais compacte : c'est un outil de
 * travail, pas une vitrine. Le NOM du candidat est le héros, en Anton.
 * ===================================================================== */
.ident {
  position: relative;
  background:
    radial-gradient(120% 90% at 88% -20%, rgba(151,90,253,0.42), transparent 60%),
    radial-gradient(90% 80% at -10% 120%, rgba(151,90,253,0.22), transparent 55%),
    var(--ink);
  color: var(--mist);
  padding: 26px 0 30px;
  overflow: hidden;
}
.ident__eyebrow {
  margin: 0 0 10px;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--lilac);
}
.ident__title {
  margin: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.ident__label {
  font-family: var(--body);
  font-size: 0.84rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--lilac);
}
.ident__nom {
  font-family: var(--display);
  font-weight: 400;            /* Anton est déjà très lourd */
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 0.01em;
  font-size: clamp(2.2rem, 9vw, 3.4rem);
  color: #fff;
}
/* Petit liseré violet sous le nom : la signature "marqueur" Athena */
.ident__nom::after {
  content: "";
  display: block;
  width: 56px; height: 5px;
  margin-top: 12px;
  background: var(--violet);
  border-radius: var(--pill);
}
.ident__meta {
  margin: 14px 0 0;
  font-size: 0.86rem; font-weight: 500;
  color: var(--lilac);
}
.ident__meta span { color: #fff; font-weight: 600; }

/* =====================================================================
 * REPÈRE DE PROGRESSION — minimal et discret (barre fine + compteur).
 * Les pastilles d'étapes nommées ont été retirées : la navigation se
 * fait uniquement via Précédent / Suivant.
 * ===================================================================== */
.progress-wrap {
  margin-top: 18px;
}
.progress-bar {
  height: 8px; border-radius: var(--pill); background: var(--line);
  overflow: hidden; margin: 0 0 8px;
}
.progress-bar__fill {
  display: block; height: 100%; width: 0%;
  background: var(--violet); border-radius: var(--pill);
  transition: width 0.25s ease;
}
.step-counter {
  margin: 0;
  font-size: 0.8rem; font-weight: 600; color: var(--muted);
}

/* =====================================================================
 * BLOC TEST D'ADMISSION — carte LECTURE SEULE (aucune saisie).
 * Rappelle au commercial le résultat du test passé AVANT l'entretien.
 * Même carte/rayons/tokens que le reste de la DA ; alignée sur la
 * largeur 960px du formulaire (via la surcharge .wrap ci-dessus).
 * Deux états : --ok (résultat trouvé) / --warn (test non trouvé).
 * ===================================================================== */
.test-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--violet);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 18px;
  box-shadow: 0 18px 44px -34px rgba(30,12,54,0.5);
}
.test-card__label {
  margin: 0;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--violet);
}
.test-card__score {
  margin: 6px 0 0;
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
}
.test-card__note {
  font-family: var(--display);
  font-size: 1.7rem; line-height: 1; color: var(--ink);
}
.test-card__note .muted { color: var(--muted); font-size: 0.95rem; }
/* Ventilation Anglais / Culture générale / Culture métier */
.test-card__detail {
  margin: 10px 0 0;
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  font-size: 0.86rem; color: var(--text);
}
.test-card__detail span { white-space: nowrap; }
.test-card__detail b {
  font-weight: 700; color: var(--ink);
}
.test-card__detail .muted { color: var(--muted); font-weight: 600; }

/* État avertissement : test non trouvé (alerte douce, pas alarmiste) */
.test-card--warn {
  border-color: rgba(255,194,75,0.55);
  border-left-color: var(--gold);
  background: rgba(255,194,75,0.10);
}
.test-card--warn .test-card__label { color: #9a6b00; }
.test-card__warn {
  margin: 6px 0 0;
  font-size: 0.92rem; font-weight: 600; color: #8a5a00;
}

/* =====================================================================
 * ÉTAPES — une carte par étape, en PLEINE LARGEUR de la page.
 * Le bandeau "Tu évalues …" et le header gardent la colonne centrée
 * (.wrap = 720px) ; seuls le formulaire et la barre de progression
 * occupent toute la largeur, avec une marge latérale confortable.
 * ===================================================================== */
.steps-wrap { position: relative; z-index: 2; padding: 18px 0 56px; }

/* Surcharge LOCALE de .wrap : pleine largeur pour le formulaire + la barre.
   (Ne touche pas au .wrap global utilisé par le header et le bandeau.) */
.steps-wrap > .wrap,
.progress-wrap {
  max-width: 960px;
  padding-left: 28px;
  padding-right: 28px;
}
@media (min-width: 760px) {
  .steps-wrap > .wrap,
  .progress-wrap { padding-left: 40px; padding-right: 40px; }
}

.step-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 20px 22px;
  box-shadow: 0 24px 60px -34px rgba(30,12,54,0.5);
}
.step-card__titre {
  margin: 0 0 4px;
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 1.5rem; letter-spacing: 0.02em; color: var(--text);
}
.step-card__hint {
  margin: 0 0 18px;
  font-size: 0.82rem; color: var(--muted);
}

/* Section titrée à l'intérieur d'une étape */
.section { margin-top: 22px; }
.section:first-of-type { margin-top: 6px; }
.section__titre {
  margin: 0 0 4px;
  font-size: 0.74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--violet);
}
.section__note {
  margin: 0 0 14px;
  font-size: 0.8rem; color: var(--muted); line-height: 1.45;
}
.section__titre + .section__note { margin-top: 6px; }
/* Trait de séparation discret entre sections (sauf la 1re) */
.section + .section {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

/* À partir d'une largeur confortable, on exploite la pleine largeur :
   les champs courts d'une section se rangent en colonnes auto-fit,
   les champs longs (textarea, checklist) gardent une ligne entière. */
@media (min-width: 720px) {
  .section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 8px 22px;
    align-items: start;
  }
  /* Titre, note et bloc Coordonnées s'étendent sur toute la largeur. */
  .section > .section__titre,
  .section > .section__note,
  .section > .grid2,
  .section > .field--wide {
    grid-column: 1 / -1;
  }
  /* La marge basse des champs est remplacée par le gap de la grille. */
  .section > .field { margin-bottom: 6px; }
}

/* =====================================================================
 * CHAMPS — cohérents avec le test (mêmes inputs/select)
 * ===================================================================== */
.field { margin: 0 0 18px; }
.field:last-child { margin-bottom: 0; }
.field > label,
.field > .field__label {
  display: block; margin-bottom: 8px;
  font-size: 0.9rem; font-weight: 600; color: var(--text);
}
/* Coordonnées : grille responsive. Les 4 champs (prénom/nom/tél/email)
   s'étalent sur une ligne en grand écran, repassent en colonne sur mobile. */
.grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

input[type="text"], input[type="email"], input[type="tel"],
input[type="date"], select, textarea {
  width: 100%;
  font-family: var(--body); font-size: 1rem; color: var(--text);
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background: #fdfcff;
  -webkit-appearance: none; appearance: none;
}
textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23975afd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
/* date : on garde l'indicateur natif visible (pas de masquage appearance) */
input[type="date"] { -webkit-appearance: none; min-height: 48px; }
input::placeholder { color: #b3acc4; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--violet);
  box-shadow: 0 0 0 4px rgba(151,90,253,0.16);
}

/* =====================================================================
 * RATING ÉTOILES (1..max) — la SIGNATURE de cet outil de notation.
 * Groupe de radios stylé en étoiles cliquables. Sélection en violet.
 * Accessible : vrais <input radio> + <label>, navigables au clavier.
 * Le "remplissage au survol jusqu'à l'étoile pointée" se fait en CSS
 * via l'ordre inverse (flex-direction:row-reverse + ~).
 * ===================================================================== */
.rating {
  display: inline-flex;
  flex-direction: row-reverse;     /* astuce : permet le ~ vers la gauche */
  gap: 4px;
}
.rating input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;                      /* invisible mais focusable au clavier */
  pointer-events: none;
}
.rating label {
  cursor: pointer;
  font-size: 2rem; line-height: 1;
  color: var(--line);             /* étoile vide */
  transition: color 0.1s ease, transform 0.1s ease;
  padding: 2px;
}
.rating label::before { content: "★"; }
/* Étoile cochée + toutes celles à sa droite visuelle (= avant, vu le reverse) */
.rating input:checked ~ label { color: var(--violet); }
/* Survol : éclaire jusqu'à l'étoile pointée */
.rating:hover label { color: var(--line); }
.rating label:hover,
.rating label:hover ~ label { color: var(--violet-up); }
.rating label:hover { transform: scale(1.12); }
/* Focus clavier visible sur l'étoile dont la radio a le focus */
.rating input:focus-visible + label {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  border-radius: 6px;
}
/* Petit rappel chiffré de la note choisie, à droite des étoiles */
.rating-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rating-value {
  font-family: var(--display);
  font-size: 1.1rem; color: var(--ink);
  min-width: 3.2ch;
}
.rating-value .muted { color: var(--muted); font-size: 0.8rem; }

/* =====================================================================
 * SCALE (1..10) — pastilles numériques cliquables.
 * Même principe a11y : radios cachées + labels-pastilles.
 * ===================================================================== */
.scale {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.scale input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}
.scale label {
  cursor: pointer;
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fdfcff;
  font-weight: 700; font-size: 0.95rem; color: var(--muted);
  transition: border-color 0.1s ease, background 0.1s ease, color 0.1s ease, transform 0.1s ease;
}
.scale label:hover { border-color: var(--lilac); transform: translateY(-1px); }
.scale input:checked + label {
  border-color: var(--violet);
  background: var(--violet);
  color: #fff;
}
.scale input:focus-visible + label {
  outline: 3px solid var(--ink); outline-offset: 2px;
}

/* =====================================================================
 * CHECKLIST (multi) — cases à cocher en liste (style "option" du test).
 * ===================================================================== */
.checklist { display: grid; gap: 10px; }
.check {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px;
  border: 1.5px solid var(--line); border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.check:hover { border-color: var(--lilac); }
.check input { width: 20px; height: 20px; accent-color: var(--violet); flex: 0 0 auto; }
.check span { font-size: 0.96rem; color: var(--text); }
.check.is-checked {
  border-color: var(--violet); background: #f4eeff;
  box-shadow: inset 0 0 0 1px var(--violet);
}

/* Checkbox simple (confirmation unique) — même rendu, mais isolée */
.checkbox-single .check { max-width: 100%; }

/* =====================================================================
 * RADIO INLINE (Oui/Non, Admissible/Non) — boutons segmentés.
 * ===================================================================== */
.segmented {
  display: inline-flex;
  border: 1.5px solid var(--line);
  border-radius: var(--pill);
  background: #fdfcff;
  padding: 4px;
  gap: 4px;
  flex-wrap: wrap;
}
.segmented input {
  position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none;
}
.segmented label {
  cursor: pointer;
  padding: 9px 18px;
  border-radius: var(--pill);
  font-size: 0.92rem; font-weight: 600; color: var(--muted);
  transition: background 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}
.segmented label:hover { color: var(--ink); }
.segmented input:checked + label {
  background: var(--violet); color: #fff;
}
.segmented input:focus-visible + label {
  outline: 3px solid var(--ink); outline-offset: 2px;
}

/* =====================================================================
 * BOUTONS — repris du test (dégradé/pilule violet)
 * ===================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--body); font-size: 1.02rem; font-weight: 700;
  padding: 15px 26px; border: none; border-radius: var(--pill);
  cursor: pointer; color: #fff;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn-primary {
  background: var(--violet);
  box-shadow: 0 14px 30px -12px rgba(151,90,253,0.8);
}
.btn-primary:hover:not(:disabled) { background: var(--violet-up); transform: translateY(-1px); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
/* Bouton secondaire (Précédent) : contour, sobre */
.btn-ghost {
  background: transparent;
  color: var(--violet);
  border: 1.5px solid var(--line);
  box-shadow: none;
}
.btn-ghost:hover:not(:disabled) { border-color: var(--violet); background: #f7f3ff; }
.btn:disabled { background: #d6cfe8; color: #fff; box-shadow: none; cursor: not-allowed; opacity: 0.7; }
.btn-ghost:disabled { background: transparent; color: #c3bbd6; border-color: var(--line); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* Barre de navigation Précédent / Suivant / Envoyer */
.nav-actions {
  display: flex; gap: 12px; align-items: center;
  margin-top: 22px;
}
.nav-actions .btn-ghost { flex: 0 0 auto; }
.nav-actions .btn-primary { flex: 1 1 auto; }

/* =====================================================================
 * MESSAGE D'ERREUR (validation à l'envoi)
 * ===================================================================== */
.erreur {
  margin: 18px 0 0; padding: 13px 15px;
  background: rgba(255,91,82,0.10); border: 1px solid rgba(255,91,82,0.4);
  color: #a3271f; border-radius: 12px; font-weight: 600; font-size: 0.92rem;
}
/* Champ pointé par la validation : liseré rouge temporaire */
.field--invalid input,
.field--invalid select,
.field--invalid textarea { border-color: var(--coral); }
.field--invalid .rating label::before,
.field--invalid .segmented { /* signal doux sur les groupes */ }
.field--invalid > .field__label { color: var(--coral); }

/* =====================================================================
 * ÉCRAN FIN — repris du test (carte aubergine, message neutre)
 * ===================================================================== */
#screen-fin { padding: 60px 0; }
.fin-card {
  background: var(--ink);
  background-image: radial-gradient(100% 80% at 80% -10%, rgba(151,90,253,0.5), transparent 60%);
  color: var(--mist);
  border-radius: var(--radius-lg);
  padding: 44px 26px; text-align: center;
  box-shadow: 0 30px 70px -34px rgba(30,12,54,0.6);
}
.fin-check {
  width: 64px; height: 64px; margin: 0 auto 20px;
  display: grid; place-items: center;
  background: var(--violet); color: #fff;
  border-radius: 50%; font-size: 2rem; font-weight: 700;
}
.fin-card h1 {
  margin: 0 0 10px;
  font-family: var(--display); text-transform: uppercase;
  font-size: 2.4rem; letter-spacing: 0.02em; color: #fff;
}
.fin-card p { margin: 0; color: var(--lilac); font-size: 1rem; }

/* =====================================================================
 * TRANSITION SOBRE entre étapes (fondu + léger glissement)
 * ===================================================================== */
.step-card { animation: stepIn 0.28s cubic-bezier(0.2,0.7,0.2,1) both; }
@keyframes stepIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* =====================================================================
 * RESPONSIVE
 * ===================================================================== */
@media (min-width: 760px) {
  .ident { padding: 34px 0 36px; }
  .step-card { padding: 30px 28px 26px; }
}

/* =====================================================================
 * ACCESSIBILITÉ — focus visible, mouvement réduit
 * ===================================================================== */
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .scale label:hover, .rating label:hover { transform: none; }
}
