/* ===== C.M. FormaRail — feuille de style principale ===== */

:root {
  --ink: #1c2024;
  --dark: #2f353c;
  --dark-2: #23272c;
  --green: #4a7c3d;
  --green-dark: #345a2b;
  --green-light: #7aa96a;
  --green-tint: #eef3ec;
  --incorrect: #dc2626;
  --incorrect-tint: #fdecea;
  --bg: #ffffff;
  --bg-alt: #f7f8f6;
  --white: #ffffff;
  --text: #2a2e33;
  --text-muted: #767c82;
  --border: #e7e9e6;
  --border-soft: #eef0ed;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 20, 0.04);
  --shadow: 0 2px 8px rgba(20, 24, 20, 0.05), 0 1px 2px rgba(20, 24, 20, 0.04);
  --shadow-lg: 0 16px 40px rgba(20, 24, 20, 0.09);
  --max-width: 1140px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font);
  letter-spacing: -0.02em;
  font-weight: 650;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

.icon {
  display: inline-flex;
  flex-shrink: 0;
}
.icon svg { width: 100%; height: 100%; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
}
.btn-primary:hover { background: var(--green-dark); }

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
}
.btn-outline:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--ink); }

.btn-sm { padding: 9px 18px; font-size: 0.84rem; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img { height: 34px; width: auto; }
.brand-text {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--ink);
}
.brand-text span { color: var(--green); font-weight: 600; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-links a {
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--bg-alt);
  color: var(--ink);
}
.nav-links .btn { margin-left: 10px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  margin: 5px 0;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero .container {
  position: relative;
  padding: 96px 28px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  max-width: 760px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-light);
  padding: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.hero-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-light);
}
.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  line-height: 1.12;
  margin: 0 0 20px;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.hero h1 em { color: var(--green-light); font-style: normal; }
.hero p {
  font-size: 1.08rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.62);
  max-width: 560px;
  margin: 0 0 36px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 48px;
  padding: 40px 0 44px;
  margin-top: 56px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}
.hero-stats div strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 650;
  color: var(--white);
  letter-spacing: -0.02em;
}
.hero-stats div span {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

.section-head {
  max-width: 600px;
  margin: 0 auto 52px;
  text-align: center;
}
.section-head.left { margin: 0 0 44px; text-align: left; }
.kicker {
  display: block;
  color: var(--green);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 14px;
  color: var(--ink);
}
.section-head p { color: var(--text-muted); margin: 0; font-size: 1.02rem; }
.arg-pill-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.arg-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--green-tint);
  color: var(--green-dark);
}

/* ---------- Grille de cartes ---------- */
.grid {
  display: grid;
  gap: 20px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { border-color: var(--border); box-shadow: var(--shadow); }

.icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--green-tint);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.icon-badge .icon { width: 20px; height: 20px; }
.card h3 { margin: 0 0 10px; font-size: 1.08rem; color: var(--ink); font-weight: 600; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.94rem; }

/* ---------- Formation / module cards ---------- */
.module-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.module-top {
  padding: 28px 28px 0;
}
.module-tag {
  display: inline-block;
  color: var(--green-dark);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.module-card h3 { margin: 0 0 10px; color: var(--ink); font-size: 1.18rem; font-weight: 600; letter-spacing: -0.01em; }
.module-card p { color: var(--text-muted); font-size: 0.93rem; margin: 0 0 18px; }
.module-meta {
  display: flex;
  gap: 18px;
  padding: 0 28px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 22px;
}
.module-meta span { display: flex; align-items: center; gap: 6px; }
.module-meta .icon { width: 15px; height: 15px; color: var(--text-muted); }
.module-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
  padding: 20px 28px;
  border-top: 1px solid var(--border-soft);
  flex-wrap: wrap;
}
.module-actions .btn { flex: 1; }

.resource-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.resource-list li a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.87rem;
  color: var(--text);
  font-weight: 500;
}
.resource-list li a .icon { width: 15px; height: 15px; color: var(--text-muted); }
.resource-list li a:hover { color: var(--green-dark); }

/* ---------- Feature list ---------- */
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.feature-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.feature-check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--green-tint);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-check .icon { width: 13px; height: 13px; }
.feature-list h4 { margin: 0 0 4px; color: var(--ink); font-size: 0.98rem; font-weight: 600; }
.feature-list p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h2 { margin: 0 0 8px; font-size: 1.4rem; font-weight: 600; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, 0.6); }

/* ---------- Quiz ---------- */
.quiz-shell {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.quiz-picker {
  padding: 32px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, 1fr);
}
.quiz-option {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  background: var(--white);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.quiz-option:hover { border-color: var(--green-light); }
.quiz-option.selected { border-color: var(--green); background: var(--green-tint); }
.quiz-option h4 { margin: 0 0 6px; color: var(--ink); font-weight: 600; font-size: 0.98rem; }
.quiz-option p { margin: 0; font-size: 0.86rem; color: var(--text-muted); }
.quiz-option .badge-count {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--green-dark);
}

.quiz-option-link { display: block; text-decoration: none; }

.quiz-folder {
  grid-column: 1 / -1;
  background: var(--green-tint);
  border-color: var(--green-light);
}
.quiz-folder:hover { border-color: var(--green); }
.quiz-folder h4::before { content: "📁 "; }

.quiz-folder-back {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  background: none;
  border: none;
  padding: 4px 0 4px;
  margin-bottom: 4px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--green-dark);
  cursor: pointer;
}
.quiz-folder-back:hover { text-decoration: underline; }

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border-soft);
}
.quiz-progress-track {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  margin: 0 24px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: var(--green);
  width: 0%;
  transition: width 0.25s ease;
}
#quiz-timer.low-time { background: var(--incorrect-tint); color: var(--incorrect); }
.quiz-score-pill {
  background: var(--bg-alt);
  color: var(--ink);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.quiz-body { padding: 40px 32px; }
.quiz-question-kicker {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.quiz-question { font-size: 1.2rem; color: var(--ink); margin: 0 0 28px; font-weight: 600; letter-spacing: -0.01em; }

.quiz-choices { display: grid; gap: 10px; margin-bottom: 28px; }
.quiz-choice {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  background: var(--white);
  color: var(--text);
  font-size: 0.96rem;
  text-align: left;
  width: 100%;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.quiz-choice:hover:not([disabled]) { border-color: var(--green-light); }
.quiz-choice .letter {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
}
.quiz-choice.correct { border-color: var(--green); background: var(--green-tint); }
.quiz-choice.correct .letter { background: var(--green); color: var(--white); }
.quiz-choice.incorrect { border-color: var(--incorrect); background: var(--incorrect-tint); }
.quiz-choice.incorrect .letter { background: var(--incorrect); color: var(--white); }
.quiz-choice[disabled] { cursor: default; }

.quiz-explanation {
  background: var(--bg-alt);
  border-left: 2px solid var(--green);
  padding: 16px 18px;
  border-radius: 0 8px 8px 0;
  font-size: 0.91rem;
  color: var(--text);
  margin-bottom: 26px;
  display: none;
}
.quiz-explanation.visible { display: block; }
.quiz-reference { margin: 10px 0 0; font-size: 0.8rem; color: var(--text-muted); font-style: italic; }

.dev-correction-box {
  background: var(--bg-alt);
  border-left: 2px solid var(--green);
  padding: 16px 18px;
  border-radius: 0 8px 8px 0;
  font-size: 0.91rem;
  color: var(--text);
}
.dev-correction-box strong { display: block; margin-bottom: 8px; color: var(--ink); }
.dev-correction-box ul { margin: 0; padding-left: 20px; }
.dev-correction-box li { margin-bottom: 4px; }
.dev-selfassess-label { margin: 18px 0 10px; font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.dev-selfassess-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-selfassess {
  flex: 1;
  min-width: 200px;
  padding: 13px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-selfassess-correct { background: var(--green-tint); color: var(--green-dark); border-color: var(--green-light); }
.btn-selfassess-correct:hover { background: var(--green); color: var(--white); }
.btn-selfassess-incorrect { background: var(--incorrect-tint); color: var(--incorrect); border-color: var(--incorrect); }
.btn-selfassess-incorrect:hover { background: var(--incorrect); color: var(--white); }

.quiz-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.quiz-result { text-align: center; padding: 20px 0; }
.quiz-result .score-ring {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: conic-gradient(var(--green) calc(var(--pct) * 1%), var(--border) 0);
}
.quiz-result .score-ring-inner {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.quiz-result .score-ring-inner strong { font-size: 1.5rem; color: var(--ink); font-weight: 650; }
.quiz-result .score-ring-inner span { font-size: 0.74rem; color: var(--text-muted); }
.quiz-result h3 { color: var(--ink); margin: 0 0 8px; font-weight: 600; }
.quiz-result p { color: var(--text-muted); margin: 0 0 26px; }
.quiz-result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.quiz-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 22px 32px 0;
  padding: 14px 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.quiz-note .icon { width: 17px; height: 17px; color: var(--green-dark); margin-top: 1px; }

/* ---------- Timeline / process ---------- */
.timeline { display: grid; gap: 0; grid-template-columns: repeat(4, 1fr); position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: var(--border);
}
.timeline-step { text-align: center; position: relative; padding: 0 14px; }
.timeline-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  position: relative;
  z-index: 1;
}
.timeline-step h4 { margin: 0 0 8px; color: var(--ink); font-size: 0.98rem; font-weight: 600; }
.timeline-step p { margin: 0; font-size: 0.86rem; color: var(--text-muted); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  align-items: start;
}
.contact-info-card {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.contact-info-card h3 { margin-top: 0; font-weight: 600; }
.contact-info-card p { color: rgba(255, 255, 255, 0.55); }
.contact-info-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.contact-info-row:first-of-type { border-top: none; }
.contact-info-row .icon-badge { margin-bottom: 0; background: rgba(255, 255, 255, 0.08); color: var(--green-light); }
.contact-info-row strong { display: block; font-size: 0.92rem; font-weight: 600; }
.contact-info-row span { font-size: 0.85rem; color: rgba(255, 255, 255, 0.55); }
.placeholder-note {
  margin-top: 8px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--green-light);
  display: inline-block;
}

.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background: var(--bg-alt);
  color: var(--text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  background: var(--white);
}
.form-note { font-size: 0.81rem; color: var(--text-muted); margin-top: 12px; }
.form-success {
  display: none;
  background: var(--green-tint);
  border: 1px solid var(--green-light);
  color: var(--green-dark);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.89rem;
  margin-bottom: 18px;
}
.form-success.visible { display: block; }

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  background: transparent;
}
.faq-item:last-child { border-bottom: none; }
.faq-question {
  width: 100%;
  text-align: left;
  padding: 20px 0;
  background: none;
  border: none;
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.faq-question .plus { transition: transform 0.2s ease; color: var(--text-muted); font-size: 1.1rem; font-weight: 400; }
.faq-item.open .faq-question .plus { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.faq-item.open .faq-answer { max-height: 300px; padding-bottom: 20px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.65);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-brand .brand-text { color: var(--white); }
.footer-brand p { font-size: 0.87rem; margin-top: 16px; color: rgba(255, 255, 255, 0.5); }
.footer-col h5 {
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 18px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer-col a { font-size: 0.87rem; color: rgba(255, 255, 255, 0.55); }
.footer-col a:hover { color: var(--green-light); }
.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.79rem;
  color: rgba(255, 255, 255, 0.4);
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Page hero (pages secondaires) ---------- */
.page-hero {
  background: var(--ink);
  color: var(--white);
  padding: 72px 0;
}
.page-hero .kicker { color: var(--green-light); }
.page-hero h1 { font-size: clamp(1.9rem, 3.5vw, 2.5rem); margin: 0 0 14px; font-weight: 650; letter-spacing: -0.02em; }
.page-hero p { color: rgba(255, 255, 255, 0.6); max-width: 620px; margin: 0; font-size: 1.02rem; }
.breadcrumb { font-size: 0.84rem; color: rgba(255, 255, 255, 0.45); margin-bottom: 20px; }
.breadcrumb a { color: rgba(255, 255, 255, 0.75); }
.breadcrumb a:hover { color: var(--white); }

/* ---------- Identifiant (fiche professionnelle) ---------- */
.id-page { max-width: 820px; }

.id-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}
.id-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.id-card-head h2 { margin: 0 0 4px; font-size: 1.1rem; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.id-card-head p { margin: 0; font-size: 0.86rem; color: var(--text-muted); }

.id-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.id-grid .form-group { margin-bottom: 0; }
.id-grid .span-2 { grid-column: 1 / -1; }

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-ok { background: var(--green-tint); color: var(--green-dark); }
.status-soon { background: #fdf1de; color: #8a5a12; }
.status-expired { background: #fbeceb; color: #b23c30; }
.status-none { background: var(--border-soft); color: var(--text-muted); }

.id-privacy {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-top: 22px;
  padding: 14px 16px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
}
.id-privacy .icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; color: var(--text-muted); }

/* ---------- Authentification locale ---------- */
.auth-card { max-width: 440px; margin: 40px auto; }

.auth-error {
  display: none;
  color: #b23c30;
  font-size: 0.85rem;
  margin: -6px 0 16px;
}
.auth-error.visible { display: block; }
.auth-error.success { color: var(--green-dark); }

.auth-link-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 14px 0 0;
}
.auth-link-btn:hover { color: var(--green-dark); text-decoration: underline; }

.recovery-code-box {
  background: var(--ink);
  color: var(--white);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  user-select: all;
}
.recovery-confirm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--text);
  margin: 16px 0;
  cursor: pointer;
}
.recovery-confirm-row input { width: 16px; height: 16px; accent-color: var(--green); }

.account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  margin-bottom: 24px;
  font-size: 0.87rem;
  color: var(--text-muted);
}
.account-bar strong { color: var(--ink); }
.account-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.pwd-change-form {
  display: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin: -14px 0 24px;
}
.pwd-change-form.visible { display: block; }

/* ---------- Tableau de bord ---------- */
.dash-page { max-width: 980px; }

.dash-greeting { margin-bottom: 28px; }
.dash-greeting h2 { margin: 0 0 6px; font-size: 1.3rem; font-weight: 650; color: var(--ink); letter-spacing: -0.01em; }
.dash-greeting p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

/* Stat tiles */
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-tile {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.stat-tile .stat-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.stat-tile .stat-value { font-size: 1.55rem; font-weight: 650; color: var(--ink); letter-spacing: -0.01em; }
.stat-tile .stat-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

/* Objectif */
.goal-card { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 28px; }
.goal-form .form-row-3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
.goal-summary {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.goal-summary .goal-status-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.goal-summary .goal-title { font-size: 0.98rem; font-weight: 600; color: var(--ink); margin: 0; }
.goal-summary .goal-meta { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.goal-progress-track { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.goal-progress-fill { height: 100%; border-radius: 999px; transition: width 0.3s ease; }
.goal-progress-fill.status-ok { background: var(--green); }
.goal-progress-fill.status-soon { background: #d69a3d; }
.goal-progress-fill.status-expired { background: #c65b4e; }
.goal-progress-fill.status-none { background: var(--text-muted); }
.goal-empty { color: var(--text-muted); font-size: 0.88rem; text-align: center; padding: 20px 0; }

/* Chart */
.chart-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.chart-wrap { position: relative; }
.chart-wrap svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--ink);
  color: var(--white);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.4;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 12px));
  opacity: 0;
  transition: opacity 0.12s ease;
  z-index: 5;
}
.chart-tooltip.visible { opacity: 1; }
.chart-tooltip strong { font-weight: 650; }
.chart-tooltip .tt-sub { color: rgba(255, 255, 255, 0.6); }
.chart-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.chart-table-toggle { margin-top: 14px; }
.chart-table-wrap { display: none; margin-top: 16px; overflow-x: auto; }
.chart-table-wrap.visible { display: block; }
.chart-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.chart-table th, .chart-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); }
.chart-table th { color: var(--text-muted); font-weight: 600; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.03em; }
.chart-table td { color: var(--text); }

/* Suggestions */
.suggestion-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.suggestion-card .suggestion-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.suggestion-card h3 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.suggestion-card p { margin: 0; font-size: 0.88rem; color: var(--text-muted); }
.suggestion-meta { font-size: 0.82rem; color: var(--text-muted); }


#announcements-list { display: flex; flex-direction: column; gap: 10px; }
.announcement-item {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--green-light);
  background: var(--green-tint);
}
.announcement-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.announcement-head strong { color: var(--ink); }
.announcement-date { font-size: 0.78rem; color: var(--text-muted); flex-shrink: 0; }
.announcement-item p { margin: 6px 0 0; font-size: 0.9rem; color: var(--text); }

.simulation-iframe { height: 640px; }

@media print {
  .site-header, .site-footer, .page-hero .breadcrumb, .id-privacy,
  .account-bar, .pwd-change-form { display: none !important; }
  body { background: var(--white); }
  .page-hero { background: var(--white); color: var(--ink); padding: 0 0 24px; }
  .page-hero p, .page-hero .kicker { color: var(--text-muted); }
  .id-card { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
  section { padding: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .quiz-picker { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .timeline::before { display: none; }
  .hero-stats { gap: 32px; }
  .stat-tiles { grid-template-columns: 1fr 1fr; }
  .goal-card { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  body.nav-open .nav-links {
    display: flex;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  body.nav-open .nav-links a { padding: 12px 14px; }
  .hero .container { padding-top: 64px; }
  .hero-stats { gap: 24px; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; text-align: center; padding: 40px 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .quiz-header { flex-wrap: wrap; gap: 10px; }
  .quiz-progress-track { order: 3; width: 100%; margin: 8px 0 0; }
  .quiz-picker { padding: 20px; }
  .quiz-body { padding: 28px 20px; }
  .id-grid { grid-template-columns: 1fr; }
  .id-card { padding: 22px; }
  .stat-tiles { grid-template-columns: 1fr; }
  .goal-form .form-row-3 { grid-template-columns: 1fr; }
  .simulation-iframe { height: 460px; }
}

@media (max-width: 420px) {
  .container { padding: 0 18px; }
  .page-hero h1 { font-size: clamp(1.6rem, 8vw, 2rem); }
  .hero h1 { font-size: clamp(1.7rem, 8vw, 2.2rem); }
  .brand-text { font-size: 0.92rem; }
  .brand img { height: 28px; }
  .quiz-choice { padding: 12px 14px; font-size: 0.92rem; }
  .id-card { padding: 18px; }
  .hero-stats { gap: 20px; }
  .simulation-iframe { height: 380px; }
}

/* ---------- Fiche de révision (contenu imprimable) ---------- */
.fiche-actions { text-align: right; margin-bottom: 20px; }
.fiche-intro { color: var(--text-muted); margin: 0 0 24px; }
.fiche-section { margin-bottom: 32px; }
.fiche-section:last-child { margin-bottom: 0; }
.fiche-section h2 { font-size: 1.3rem; margin: 0 0 10px; color: var(--ink); }
.fiche-section h3 { font-size: 1.05rem; margin: 20px 0 8px; color: var(--ink); }
.fiche-section h4 { font-size: 0.92rem; margin: 16px 0 6px; color: var(--ink); }
.fiche-section p { margin: 0 0 12px; }
.fiche-section p:last-child { margin-bottom: 0; }
.fiche-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 0 0 16px; }
.fiche-table th, .fiche-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.fiche-table th { color: var(--text-muted); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; }
.fiche-table td { color: var(--text); }
.fiche-hr { border: none; border-top: 1px solid var(--border); margin: 28px 0; }
.fiche-note { background: var(--green-tint); border-left: 3px solid var(--green); padding: 12px 16px; margin: 0 0 16px; font-size: 0.92rem; border-radius: var(--radius-sm); }
.fiche-note p { margin: 0; }
.fiche-tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 0.7rem; font-weight: 600; white-space: nowrap; }
.fiche-tag-basique { background: var(--bg-alt); color: var(--text-muted); }
.fiche-tag-ferroviaire { background: var(--green-tint); color: var(--green-dark); }

@media print {
  .site-header, .site-footer, .page-hero, .fiche-actions { display: none !important; }
  body { background: #fff; }
  .id-card { border: none; padding: 0; box-shadow: none; }
  .fiche-section { break-inside: avoid; }
}
