/* Diagnostic Pipsia. Palette : identite/identite-marque.md */

:root {
  --bg: #0A0E14;
  --surface: #121826;
  --border: #232B3B;
  --text: #E9ECF2;
  --text-2: #98A2B3;
  --accent: #6C8CFF;
  --accent-hover: #8AA4FF;
  --green: #3ECF8E;
  --amber: #E8B450;
  --red: #E5484D;
  --radius: 12px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 680px; margin: 0 auto; padding: 0 24px; width: 100%; }

header {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 20, 0.85);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-size: 1.35rem; font-weight: 650; color: var(--text); text-decoration: none; }
.logo::after { content: "."; color: var(--accent); }
.badge {
  font-size: 0.8rem; font-weight: 600; color: var(--accent);
  background: rgba(108, 140, 255, 0.1);
  border: 1px solid rgba(108, 140, 255, 0.3);
  padding: 4px 12px; border-radius: 999px;
}

main { flex: 1; padding: 48px 0 64px; }

.ecran { display: none; }
.ecran.actif { display: block; animation: apparition 0.25s ease; }
@keyframes apparition { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

h1 { font-size: clamp(1.7rem, 5vw, 2.3rem); line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 16px; }
h2 { font-size: 1.35rem; line-height: 1.35; margin-bottom: 24px; }
.lede { color: var(--text-2); font-size: 1.1rem; margin-bottom: 16px; }
.note { color: var(--text-2); font-size: 0.9rem; margin-bottom: 28px; }
.note a { color: var(--accent); }

.btn {
  display: inline-block; border: none; cursor: pointer; text-decoration: none;
  font-family: var(--font-sans); font-weight: 600; font-size: 1rem;
  padding: 13px 26px; border-radius: 9px; transition: background 0.15s ease;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }
.btn-ghost { background: none; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--text-2); }
.btn-petit { font-size: 0.85rem; padding: 8px 14px; margin-top: 24px; color: var(--text-2); }

/* Quiz */
.progression { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; }
.progression-barre {
  flex: 1; height: 6px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; overflow: hidden;
}
#progression-remplie {
  height: 100%; width: 0; background: var(--accent);
  border-radius: 999px; transition: width 0.25s ease;
}
.progression-texte { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-2); white-space: nowrap; }

.question-competence {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--accent); margin-bottom: 10px;
}

.options { display: flex; flex-direction: column; gap: 10px; }
.option {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px 18px;
  color: var(--text); font-family: var(--font-sans); font-size: 0.98rem;
  text-align: left; cursor: pointer; line-height: 1.5;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.option:hover { border-color: var(--accent); background: rgba(108, 140, 255, 0.06); }

/* Résultats */
.resultat-global { display: flex; align-items: center; gap: 16px; margin: 8px 0 28px; }
.niveau-badge {
  font-weight: 700; color: var(--accent);
  background: rgba(108, 140, 255, 0.1); border: 1px solid rgba(108, 140, 255, 0.3);
  padding: 6px 16px; border-radius: 999px;
}
.niveau-pct { font-family: var(--font-mono); color: var(--text-2); }

.jauges { display: flex; flex-direction: column; gap: 18px; margin-bottom: 40px; }
.jauge-ligne { }
.jauge-entete { display: flex; justify-content: space-between; margin-bottom: 6px; }
.jauge-label { font-size: 0.95rem; }
.jauge-valeur { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text-2); }
.jauge-piste {
  height: 10px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; overflow: hidden;
}
.jauge-remplie {
  height: 100%; width: 0; background: var(--accent);
  border-radius: 999px 0 0 999px; transition: width 0.6s ease;
}

.capture-carte {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
}
.capture-carte h2 { margin-bottom: 10px; font-size: 1.2rem; }
.capture-carte p { color: var(--text-2); font-size: 0.95rem; margin-bottom: 18px; }
#form-capture { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
#form-capture input[type="text"], #form-capture input[type="email"] {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  font-family: var(--font-sans); font-size: 1rem;
  padding: 12px 16px; border-radius: 9px;
}
#form-capture input:focus { outline: none; border-color: var(--accent); }
#champ-website { position: absolute; left: -9999px; opacity: 0; height: 0; }
.erreur { color: var(--red); font-size: 0.9rem; min-height: 1.4em; }

/* Plan */
.plan { margin-bottom: 32px; }
.plan h3 { font-size: 1.15rem; margin: 28px 0 12px; }
.plan p { margin-bottom: 16px; }
.plan ul { margin: 0 0 16px 22px; }
.plan li { margin-bottom: 10px; }

.disclaimer {
  border: 1px solid rgba(232, 180, 80, 0.35);
  background: rgba(232, 180, 80, 0.06);
  border-radius: var(--radius); padding: 18px 22px;
  color: var(--text-2); font-size: 0.9rem;
}
.disclaimer strong { color: var(--amber); }
.apres-plan { margin-top: 28px; }

/* Chargement */
.chargement { text-align: center; padding: 80px 0; color: var(--text-2); }
.spinner {
  width: 36px; height: 36px; margin: 0 auto 20px;
  border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: rotation 0.8s linear infinite;
}
@keyframes rotation { to { transform: rotate(360deg); } }

footer {
  border-top: 1px solid var(--border);
  padding: 24px 0; color: var(--text-2); font-size: 0.82rem;
}
footer a { color: var(--text-2); }
