/* === PARTICIPANT.CSS — Formation : Renaître ===
   App shell, topbar, code gate, hero, course, formulaires, échelles, résultat
   ============================================================================ */

/* ── App shell ───────────────────────────────────────────────────────────── */
#participant-app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

/* ── Topbar ──────────────────────────────────────────────────────────────── */
#topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 58px;
  background: var(--navy);
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
  position: sticky;
  top: 0;
  z-index: 200;
  gap: 12px;
}
#topbar .brand {
  font-family: var(--font-head);
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: bold;
  text-decoration: none;
}
#topbar .brand span { color: var(--gold-soft); }
#topbar-actions { display: flex; gap: 8px; align-items: center; }
.topbar-btn {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: var(--white);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: .85rem;
  cursor: pointer;
  min-height: 36px;
  transition: background var(--transition);
}
.topbar-btn:hover { background: rgba(255,255,255,.2); }

/* ── Code gate ───────────────────────────────────────────────────────────── */
#code-gate-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 48px 24px;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  text-align: center;
}
#code-gate-screen.hidden { display: none; }

.codegate-inner {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 32px 28px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

/* Icône clé */
.codegate-icon {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 14px;
  display: block;
}

.codegate-heading {
  font-family: var(--font-head);
  font-size: 1.55rem;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 8px;
  font-weight: 700;
}

.codegate-desc {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 22px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Combo input + bouton ── */
.codegate-combo {
  display: flex;
  border: 2px solid var(--navy);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(23,58,99,.12);
  margin-bottom: 12px;
  transition: box-shadow .2s;
}
.codegate-combo:focus-within {
  box-shadow: 0 0 0 3px rgba(23,58,99,.2);
}

.codegate-input {
  flex: 1;
  min-width: 0;
  padding: 14px 14px;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: #fff;
  color: var(--navy);
}
.codegate-input::placeholder {
  letter-spacing: .5px;
  text-transform: none;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: .88rem;
  opacity: .7;
}

/* Bouton intégré à droite du champ */
.codegate-submit-btn {
  flex-shrink: 0;
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 0 20px;
  font-size: .9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s;
  min-height: 48px;
}
.codegate-submit-btn:hover {
  background: #2d5282;
}
.codegate-submit-btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: -2px;
}

.codegate-error {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-size: .84rem;
  color: var(--danger);
  font-weight: 600;
  text-align: center;
  padding: 8px 12px;
  background: #fef2f2;
  border-radius: var(--radius);
  border: 1px solid #fecaca;
  margin: 0 0 10px;
  line-height: 1.45;
  text-wrap: pretty;
}
.codegate-error.hidden { display: none; }

.codegate-hint {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 8px;
}

/* ── Champ prénom dans le code gate ── */
.codegate-name-wrap {
  margin-top: 18px;
  text-align: left;
}
.codegate-name-wrap.hidden { display: none; }
.codegate-name-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.codegate-name-input {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--navy);
  border-radius: 10px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--navy);
  background: #fff;
  outline: none;
  box-sizing: border-box;
  transition: box-shadow .2s;
}
.codegate-name-input:focus {
  box-shadow: 0 0 0 3px rgba(23,58,99,.18);
}
.codegate-name-hint {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 7px;
  padding: 8px 10px;
  background: #f0f6ff;
  border-left: 3px solid var(--gold);
  border-radius: 0 6px 6px 0;
}

/* ── Bloc "Comment ça fonctionne" (details/summary) ── */
.codegate-info {
  margin-top: 18px;
  border: 1px solid var(--light);
  border-radius: var(--radius);
  text-align: left;
  overflow: hidden;
}
.codegate-info-toggle {
  list-style: none;
  padding: 10px 14px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  user-select: none;
  background: #f8fafb;
}
.codegate-info-toggle::-webkit-details-marker { display: none; }
.codegate-info-toggle::marker { display: none; }
.codegate-info-body {
  padding: 10px 14px 14px;
  border-top: 1px solid var(--light);
  background: #fff;
}
.codegate-info-body p {
  font-size: .81rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 7px 0;
}
.codegate-info-body p:last-child { margin-bottom: 0; }

@media (max-width: 480px) {
  .codegate-inner { padding: 28px 18px 22px; }
  .codegate-submit-btn { padding: 0 14px; font-size: .84rem; }
}

/* ── Progress bar ────────────────────────────────────────────────────────── */
#progress-wrap {
  height: 5px;
  background: var(--light);
}
#progress-bar {
  height: 100%;
  background: linear-gradient(to right, var(--navy), var(--gold));
  transition: width .4s ease;
}

/* ── Navigation par module ───────────────────────────────────────────────── */
#module-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--light);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: sticky;
  top: 58px;
  z-index: 150;
}
#module-nav::-webkit-scrollbar { display: none; }
#module-nav.hidden { display: none; }
.module-pill {
  flex-shrink: 0;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .3px;
  border: 1.5px solid var(--light);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  white-space: nowrap;
  min-height: 32px;
}
.module-pill:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: rgba(var(--navy-rgb, 26,47,80), .05);
}
.module-pill.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.module-pill.locked {
  border-color: var(--light);
  color: var(--light);
  opacity: .55;
  cursor: not-allowed;
}
.module-pill.locked:hover {
  background: transparent;
  border-color: var(--light);
  color: var(--light);
}
.module-pill-sep {
  flex-shrink: 0;
  color: var(--light);
  font-size: .9rem;
  user-select: none;
}
@media (max-width: 480px) {
  #module-nav { padding: 8px 12px; gap: 5px; }
  .module-pill { padding: 4px 10px; font-size: .74rem; }
}

/* ── Hero (accueil participant) ──────────────────────────────────────────── */
#home-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 48px 24px;
  text-align: center;
  background: linear-gradient(160deg, var(--paper) 60%, var(--gold-bg) 100%);
}
#home-screen.hidden { display: none; }
.hero-badge {
  background: var(--gold);
  color: var(--white);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
}
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--navy);
  margin-bottom: 14px;
  line-height: 1.2;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 500px;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

.name-field-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 320px;
  width: 100%;
  margin-bottom: 24px;
}
.name-field-wrap label {
  font-size: .9rem;
  font-weight: 600;
  color: var(--navy);
  text-align: left;
}
.name-field-wrap input {
  padding: 10px 14px;
  border: 2px solid var(--light);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color var(--transition);
  background: var(--white);
  color: var(--ink);
}
.name-field-wrap input:focus { border-color: var(--navy); outline: none; }

/* ── Course screen ───────────────────────────────────────────────────────── */
#course-screen {
  display: flex;
  flex-direction: column;
  flex: 1;
}
#course-screen.hidden { display: none; }

/* ── Step header ─────────────────────────────────────────────────────────── */
.step-header {
  padding: 32px 24px 0;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}
.step-module-badge {
  display: inline-block;
  background: var(--gold-soft);
  color: var(--navy);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 50px;
  margin-bottom: 12px;
}
.step-title {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.3;
}
.step-subtitle {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Step body ───────────────────────────────────────────────────────────── */
.step-body {
  flex: 1;
  padding: 24px 24px 32px;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}
.step-img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.step-text {
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.8;
  margin-bottom: 16px;
}
.step-text ul, .step-text ol { padding-left: 24px; }
.step-text li { margin-bottom: 6px; }
.step-text strong { color: var(--navy); }
.step-note {
  background: var(--gold-bg);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 12px 16px;
  font-size: .95rem;
  color: var(--ink);
  margin-top: 16px;
}

/* ── Formulaires ─────────────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.form-group label {
  font-weight: 600;
  font-size: .95rem;
  color: var(--navy);
}
.form-group .label-hint {
  font-size: .85rem;
  color: var(--muted);
  font-weight: 400;
}
.form-group textarea,
.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
  padding: 10px 14px;
  border: 2px solid var(--light);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  resize: vertical;
  min-height: 44px;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--white);
  color: var(--ink);
}
.form-group textarea:focus,
.form-group input:focus,
.form-group select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(23,58,99,.12);
  outline: none;
}
.form-group textarea { min-height: 100px; }
.form-group textarea.private-field { border-color: #dbeafe; background: #f0f6ff; }
.question-number {
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}
.private-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .75rem;
  color: #3b82f6;
  background: #dbeafe;
  border-radius: 4px;
  padding: 2px 8px;
}

/* ── Onglets de questions ───────────────────────────────────────────────── */
.ex-tabs {
  display: flex;
  gap: 10px;
  margin: 12px 0 18px;
}
.ex-tab {
  flex: 1;
  padding: 11px 16px;
  border: 2px solid var(--gold);
  border-radius: 8px;
  background: transparent;
  color: var(--gold);
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: background .18s, color .18s, transform .18s;
}
.ex-tab.active {
  background: var(--gold);
  color: var(--white);
}
.ex-tab:hover:not(.active) {
  background: rgba(201, 162, 39, 0.08);
}
.ex-tab-panel {
  display: none;
}
.ex-tab-panel.active {
  display: block;
}

/* ── Checkboxes / radio ───────────────────────────────────────────────────── */
.check-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--white);
  border: 2px solid var(--light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.check-item:hover { border-color: var(--navy); }
.check-item input[type="checkbox"],
.check-item input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--navy);
  flex-shrink: 0;
}
.check-item.selected { border-color: var(--navy); background: #eef3fb; }
.check-item label { cursor: pointer; font-size: .95rem; color: var(--ink); flex: 1; }

/* ── Échelle 1-5 ──────────────────────────────────────────────────────────── */
.scale-group { margin-bottom: 28px; }
.scale-question {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 14px;
  line-height: 1.5;
}
.scale-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.scale-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--light);
  background: var(--white);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  color: var(--muted);
  transition: all var(--transition);
  flex-shrink: 0;
}
.scale-btn:hover { border-color: var(--navy); color: var(--navy); }
.scale-btn.selected { background: var(--navy); border-color: var(--navy); color: var(--white); }
.scale-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: .8rem;
  color: var(--muted);
}

/* ── Section "âme / corps / esprit" (soul type) ──────────────────────────── */
.soul-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.soul-pillar {
  background: var(--white);
  border: 2px solid var(--light);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
}
.soul-pillar .pillar-icon { font-size: 2rem; margin-bottom: 8px; }
.soul-pillar .pillar-name {
  font-family: var(--font-head);
  font-weight: bold;
  color: var(--navy);
  margin-bottom: 8px;
}
.soul-pillar .pillar-text { font-size: .9rem; color: var(--muted); line-height: 1.6; }

/* ── Triangle dans participant ───────────────────────────────────────────── */
.participant-triangle {
  max-width: 460px;
  margin: 0 auto 20px;
}

/* ── Résultat / bilan ────────────────────────────────────────────────────── */
#result-screen { padding-bottom: 60px; }
.result-header {
  background: linear-gradient(135deg, var(--navy-2), var(--navy));
  color: var(--white);
  padding: 40px 24px;
  text-align: center;
}
.result-header .result-title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 8px;
}
.result-header .result-name { color: var(--gold-soft); font-size: 1.1rem; }
.result-header .result-date { font-size: .9rem; color: rgba(255,255,255,.55); margin-top: 4px; }

.result-section {
  padding: 32px 24px;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}
.result-section-title {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--navy);
  border-bottom: 2px solid var(--gold-soft);
  padding-bottom: 8px;
  margin-bottom: 20px;
}

/* Portrait par axe */
.axis-card {
  background: var(--white);
  border: 2px solid var(--light);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 14px;
}
.axis-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.axis-name { font-weight: 700; color: var(--navy); font-size: 1rem; }
.axis-level {
  font-size: .8rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 50px;
}
.axis-level.a-dev    { background: #fee2e2; color: #991b1b; }
.axis-level.en-dev   { background: #fef9c3; color: #854d0e; }
.axis-level.etabli   { background: #dcfce7; color: #166534; }
.axis-bar-bg {
  height: 8px;
  background: var(--light);
  border-radius: 4px;
  overflow: hidden;
}
.axis-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .6s ease;
}
.axis-bar-fill.a-dev  { background: #f87171; }
.axis-bar-fill.en-dev { background: #facc15; }
.axis-bar-fill.etabli { background: #4ade80; }
.axis-note { font-size: .85rem; color: var(--muted); margin-top: 8px; line-height: 1.5; }

/* Forces / axes à approfondir */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag-force    { background: #dcfce7; color: #166534; padding: 5px 14px; border-radius: 50px; font-size: .85rem; font-weight: 600; }
.tag-approf   { background: #fee2e2; color: #991b1b; padding: 5px 14px; border-radius: 50px; font-size: .85rem; font-weight: 600; }

/* Plan d'action */
.action-card {
  background: var(--gold-bg);
  border: 2px solid var(--gold-soft);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 14px;
}
.action-label { font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); font-weight: 700; margin-bottom: 4px; }
.action-value { color: var(--ink); font-size: 1rem; line-height: 1.6; }
.action-value:empty::before { content: "—"; color: var(--muted); }

/* Disclaimer */
.disclaimer {
  background: var(--light-2);
  border: 1px solid var(--light);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.6;
  text-align: center;
  margin-top: 8px;
}
.disclaimer strong { color: var(--navy); }

/* PDF opt-in */
.pdf-optin {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--white);
  border: 2px solid var(--light);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  cursor: pointer;
}
.pdf-optin input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--navy); flex-shrink: 0; margin-top: 2px; }
.pdf-optin label { font-size: .95rem; color: var(--ink); cursor: pointer; line-height: 1.6; }

/* ── Boutons navigation ──────────────────────────────────────────────────── */
#step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid var(--light);
  background: var(--white);
  position: sticky;
  bottom: 0;
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0,0,0,.06);
}
#step-nav .step-counter {
  font-size: .9rem;
  color: var(--muted);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .soul-pillars { grid-template-columns: 1fr; }
  .scale-btn { width: 42px; height: 42px; font-size: .95rem; }
  #step-nav { padding: 12px 16px; }
  #topbar { padding: 0 16px; }
  .step-body { padding: 16px 16px 24px; }
}

@media (min-width: 900px) {
  .step-header, .step-body, .result-section { max-width: 820px; }
}

/* ── Additions: home-screen aliases & layout helpers ─────────────────── */

/* Participant topbar (different from original #topbar) */
#participant-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 54px;
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 200;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.20);
}
.part-back-link {
  color: #c8d5ea;
  text-decoration: none;
  font-size: .88rem;
  white-space: nowrap;
  transition: color .15s;
}
.part-back-link:hover { color: #fff; }
.part-topbar-title {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--gold);
  flex: 1;
  text-align: center;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ── Timer d'expiration du code de session ── */
.session-timer {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  letter-spacing: .03em;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.25);
  white-space: nowrap;
  transition: background .3s, color .3s, border-color .3s;
}
.session-timer.hidden { display: none; }
.session-timer.timer-warn {
  background: rgba(234,179,8,.25);
  color: #fef08a;
  border-color: rgba(234,179,8,.5);
}
.session-timer.timer-urgent {
  background: rgba(239,68,68,.3);
  color: #fca5a5;
  border-color: rgba(239,68,68,.5);
  animation: timer-pulse 1s ease-in-out infinite;
}
@keyframes timer-pulse {
  0%,100% { opacity: 1; }
  50% { opacity: .6; }
}

/* ── Écran d'authentification ────────────────────────────────────────── */
#auth-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 48px 24px;
  text-align: center;
  background: linear-gradient(160deg, var(--paper) 60%, var(--gold-bg) 100%);
}
#auth-screen.hidden { display: none; }
.auth-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}
.auth-badge {
  background: var(--navy);
  color: var(--gold);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
}
.auth-heading {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: 12px;
}
.auth-heading em { color: var(--gold); font-style: normal; }
.auth-desc {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 360px;
}
.auth-field {
  width: 100%;
  margin-bottom: 16px;
  text-align: left;
}
.auth-field label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.auth-field input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--light);
  border-radius: 10px;
  font-size: 1rem;
  background: var(--white);
  color: var(--text);
  transition: border-color .2s;
  box-sizing: border-box;
}
.auth-field input:focus {
  outline: none;
  border-color: var(--navy);
}
#btn-send-link { width: 100%; margin-top: 4px; }
.auth-error {
  color: #c0392b;
  font-size: .88rem;
  margin-top: 10px;
  text-align: center;
}
.auth-error.hidden { display: none; }
#auth-confirm { width: 100%; }
.auth-confirm-icon {
  font-size: 3rem;
  margin: 24px 0 12px;
}
.auth-confirm-text {
  font-size: 1.05rem;
  color: var(--navy);
  line-height: 1.7;
  margin-bottom: 12px;
}
.auth-muted {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.6;
}
.auth-legal {
  margin-top: 32px;
  font-size: .78rem;
  color: var(--muted);
}
@media (max-width: 480px) {
  #auth-screen { padding: 32px 16px; }
  .auth-heading { font-size: 1.7rem; }
}

/* Home screen new classes (aliases) */
.home-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}
.home-badge {
  background: var(--gold);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
}
.home-heading {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--navy);
  margin-bottom: 14px;
  line-height: 1.2;
  text-align: center;
}
.home-heading em { font-style: italic; color: var(--gold); }
.home-desc {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 28px;
  line-height: 1.55;
  text-align: center;
}
.home-name-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 340px;
  width: 100%;
  margin-bottom: 24px;
  text-align: left;
}
.home-name-field label {
  font-size: .9rem;
  font-weight: 600;
  color: var(--navy);
}
.home-name-field input {
  padding: 10px 14px;
  border: 2px solid #d0ccc4;
  border-radius: var(--radius);
  font-size: 1rem;
  background: #fff;
  color: var(--ink);
  transition: border-color .2s;
}
.home-name-field input:focus { border-color: var(--navy); outline: none; }
.home-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
}
.home-features {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.home-feature {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  color: var(--muted);
}

/* Outils de sauvegarde manuelle */
.home-data-tools {
  margin-top: 28px;
  padding: 18px 20px;
  background: #f7f9fc;
  border: 1px solid #dde5f0;
  border-radius: 12px;
  text-align: center;
}
.home-data-label {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 12px;
}
.home-data-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.home-import-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.home-import-label input[type="file"] {
  display: none;
}
.home-data-hint {
  margin-top: 10px;
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Bloc "Comment fonctionne le parcours" */
.home-how-it-works {
  margin-top: 28px;
  padding: 18px 20px;
  background: #f0f6ff;
  border: 1px solid #c3d9f5;
  border-radius: 12px;
  text-align: left;
}
.home-how-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 12px 0;
}
.home-how-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.home-how-list li {
  font-size: .82rem;
  color: #334155;
  line-height: 1.55;
  padding-left: 14px;
  border-left: 3px solid var(--gold);
}

/* Prototype local et consentement de sauvegarde */
.local-dev-notice {
  padding: 9px 16px;
  background: #fff4d8;
  border-bottom: 1px solid #e7d39f;
  color: #604711;
  text-align: center;
  font-size: .8rem;
  line-height: 1.4;
}

#consent-screen {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
  background: #f3f5f3;
}
#consent-screen.hidden { display: none; }

.consent-inner {
  width: 100%;
  max-width: 680px;
  padding: 36px 40px;
  background: var(--white);
  border: 1px solid #d8dedb;
  border-top: 4px solid var(--navy);
  border-radius: 4px;
}
.consent-eyebrow {
  margin: 0 0 12px;
  color: #765611;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.consent-heading {
  max-width: 540px;
  margin: 0 0 12px;
  color: var(--navy);
  font-family: var(--font-head);
  font-size: 2rem;
  line-height: 1.2;
}
.consent-intro {
  margin: 0 0 22px;
  color: #465361;
  font-size: 1rem;
  line-height: 1.65;
}
.consent-scope {
  padding: 0 0 20px;
  border-bottom: 1px solid #d8dedb;
}
.consent-scope h2 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 1rem;
}
.consent-scope ul {
  margin: 0;
  padding-left: 20px;
  color: #465361;
  font-size: .9rem;
  line-height: 1.65;
}
.consent-signature { padding-top: 20px; }
.consent-signature > label:first-child {
  display: block;
  margin-bottom: 7px;
  color: var(--navy);
  font-size: .9rem;
  font-weight: 700;
}
#consent-signature-name {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #aeb9c2;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
#consent-signature-name:focus-visible,
.consent-checkbox input:focus-visible {
  outline: 3px solid rgba(23, 58, 99, .28);
  outline-offset: 2px;
}
.consent-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 18px;
  color: #273443;
  font-size: .9rem;
  line-height: 1.55;
  cursor: pointer;
}
.consent-checkbox input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--navy);
  flex: 0 0 20px;
}
.consent-policy-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.5;
}
.consent-error {
  margin: 12px 0 0;
  color: #9d2727;
  font-size: .88rem;
}
.consent-error.hidden { display: none; }
.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.consent-actions .btn { min-height: 48px; }
.consent-actions .btn:disabled { cursor: not-allowed; opacity: .55; }

@media print {
  @page { size: A4; margin: 16mm; }

  body,
  #participant-app,
  #course-screen {
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
    background: #fff !important;
    color: #111 !important;
  }

  #participant-topbar,
  .local-dev-notice,
  #progress-wrap,
  #module-nav,
  #step-nav,
  .module-result-actions,
  .result-actions,
  #toast,
  #modal-overlay {
    display: none !important;
  }

  #participant-app { display: block !important; }
  #course-screen { display: block !important; padding: 0 !important; }
  .step-header,
  .step-body,
  .module-result,
  #result-inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
  .step-header,
  .module-result-field,
  .action-card,
  .result-section { break-inside: avoid; }
  textarea,
  input,
  select {
    color: #111 !important;
    background: #fff !important;
    box-shadow: none !important;
  }
  textarea { min-height: 2em; overflow: visible; }
}

@media (max-width: 600px) {
  .local-dev-notice { text-align: left; }
  #participant-topbar {
    min-height: 54px;
    height: auto;
    padding: 7px 12px;
    gap: 7px;
  }
  .part-back-link { font-size: .76rem; }
  .part-topbar-title {
    flex: 0 1 auto;
    font-size: .82rem;
    white-space: nowrap;
  }
  .topbar-actions { gap: 4px; }
  #topbar-restart, #topbar-logout {
    box-sizing: border-box;
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
    white-space: nowrap;
  }
  #topbar-restart::before { content: '↺'; font-size: 1.1rem; }
  #topbar-logout::before { content: '⎋'; font-size: 1.1rem; }
  #consent-screen { padding: 20px 14px; }
  .consent-inner { padding: 26px 20px; }
  .consent-heading { font-size: 1.65rem; }
  .consent-actions { flex-direction: column; }
  .consent-actions .btn { width: 100%; }
}

/* Modal overlay */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 20px;
}
#modal-overlay.hidden { display: none; }
#modal-box {
  background: #fff;
  border-radius: 14px;
  padding: 32px 28px 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
#modal-box h2 {
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 12px;
}
#modal-box p {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.5;
  margin-bottom: 20px;
}
#modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Flex helpers */
.flex-center { display: flex; justify-content: center; align-items: center; }
.gap-2 { gap: 12px; }
.mt-2 { margin-top: 16px; }

/* ── Bilan de module ──────────────────────────────────────────────────── */
.module-result {
  max-width: 680px;
  margin: 0 auto;
}
.module-result-header {
  text-align: center;
  margin-bottom: 24px;
}
.module-result-icon {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 8px;
}
.module-result-subtitle {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.5;
}
.module-result-recap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.module-result-field {
  background: var(--bg-card, #f5f0e8);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  padding: 12px 16px;
}
.module-result-field-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.module-result-field-value {
  font-size: .95rem;
  color: var(--navy);
  line-height: 1.5;
  white-space: pre-wrap;
}
.module-result-empty {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 24px;
}
/* Scores Module 4 */
.module-result-scores {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.module-result-score-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card, #f5f0e8);
  border-radius: 8px;
  padding: 10px 14px;
}
.score-name {
  flex: 1;
  font-size: .9rem;
  font-weight: 600;
  color: var(--navy);
}
.score-bars {
  display: flex;
  gap: 4px;
}
.score-bar {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background: #ddd;
  border: 1px solid #ccc;
}
.score-bar.active {
  background: var(--gold);
  border-color: var(--gold);
}
.score-num {
  font-size: .85rem;
  font-weight: 700;
  color: var(--navy);
  min-width: 28px;
  text-align: right;
}
/* Champ synthèse */
.module-result-synthesis {
  background: #fff;
  border: 1.5px solid var(--gold-soft, #c9a227);
  border-radius: 10px;
  padding: 18px;
  margin-top: 16px;
}
.module-result-synthesis .field-label {
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  display: block;
  margin-bottom: 6px;
}
.module-result-synthesis .field-hint {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.module-result-synthesis .field-textarea {
  width: 100%;
  box-sizing: border-box;
}

/* ── Bouton Suivant verrouillé ───────────────────────────────────────────── */
#btn-next.btn-locked {
  background: var(--light-2, #e8eef6);
  color: var(--muted, #8aa3c0);
  border-color: var(--light-2, #e8eef6);
  cursor: not-allowed;
  opacity: .75;
}
#btn-next.btn-locked::after {
  content: ' 🔒';
}
