/* ============================================================
   Design system — sobre, rassurant, mobile-first
   Police système uniquement (perf + aucune requête externe)
   ============================================================ */

:root {
  --color-bg: #f7f9fa;
  --color-surface: #ffffff;
  --color-text: #1c2b33;
  --color-text-muted: #5b6b73;
  --color-border: #dde4e7;

  --color-primary: #0f6e6a;
  --color-primary-dark: #0a4f4c;
  --color-primary-tint: #e3f2f1;

  --color-success: #1e7d4f;
  --color-success-tint: #e5f4ec;
  --color-warning: #8a5a00;
  --color-warning-tint: #fdf1dc;
  --color-danger: #a3352c;
  --color-danger-tint: #fbe9e7;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 2px 10px rgba(15, 40, 40, 0.06);
  --max-width: 720px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.55;
  font-size: 17px;
}

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

a {
  color: var(--color-primary);
}

h1, h2, h3 {
  line-height: 1.25;
  color: var(--color-text);
}

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

/* ---------- Header ---------- */

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--color-primary-dark);
}

.site-nav {
  display: flex;
  gap: 18px;
  font-size: 0.95rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--color-text-muted);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-primary-dark);
}

/* ---------- Hero ---------- */

.hero {
  padding: 40px 0 28px;
  text-align: center;
}

.hero h1 {
  font-size: 1.7rem;
  margin: 0 0 12px;
}

.hero p.lead {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin: 0 0 24px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

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

.btn-secondary {
  background: transparent;
  color: var(--color-primary-dark);
  border: 1px solid var(--color-primary);
}

.btn-block {
  display: block;
  width: 100%;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- Cards / sections ---------- */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.section {
  padding: 28px 0;
}

.reassurance-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.reassurance-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.reassurance-list .icon {
  font-size: 1.2rem;
  line-height: 1;
}

/* ---------- Forms ---------- */

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: var(--color-surface);
  color: var(--color-text);
}

input:focus,
select:focus,
button:focus,
a:focus {
  outline: 3px solid var(--color-primary-tint);
  outline-offset: 1px;
}

.field {
  margin-bottom: 18px;
}

.field-hint {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: 6px;
}

.checkbox-row,
.radio-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: var(--color-surface);
  cursor: pointer;
  font-weight: 400;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.checkbox-row:hover,
.radio-row:hover {
  border-color: var(--color-primary);
}

.checkbox-row input,
.radio-row input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
  pointer-events: none;
}

.checkbox-row span,
.radio-row span {
  flex: 1;
}

.checkbox-row:has(input:checked),
.radio-row:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-tint);
}

.checkbox-row:has(input:focus-visible),
.radio-row:has(input:focus-visible) {
  outline: 3px solid var(--color-primary-tint);
  outline-offset: 1px;
}

.checkbox-row input:focus,
.radio-row input:focus {
  outline: none;
}

.consent-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 16px 0;
}

.consent-row input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.consent-row label {
  font-weight: 400;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

/* ---------- Email capture ---------- */

.email-capture {
  background: var(--color-primary-tint);
  border-radius: var(--radius);
  padding: 24px 20px;
}

.email-capture h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

.form-status {
  margin-top: 12px;
  font-size: 0.95rem;
}

.form-status.success {
  color: var(--color-success);
}

.form-status.error {
  color: var(--color-danger);
}

/* ---------- Simulator ---------- */

.simulator-shell {
  padding: 28px 0 60px;
}

.progress-bar {
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 24px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--color-primary);
  transition: width 0.25s ease;
}

.step-count {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.step {
  display: none;
}

.step.active {
  display: block;
}

.step h2 {
  font-size: 1.3rem;
  margin-top: 0;
}

.step-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.step-actions .btn {
  flex: 1;
}

.step-back {
  background: none;
  border: none;
  color: var(--color-text-muted);
  text-decoration: underline;
  cursor: pointer;
  padding: 10px 0;
  font-size: 0.95rem;
}

.inline-fields {
  display: flex;
  gap: 14px;
}

.inline-fields .field {
  flex: 1;
}

/* ---------- Result screen ---------- */

.result-status {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.result-status .badge {
  font-size: 2.2rem;
  line-height: 1;
}

.result-status h2 {
  margin: 0;
  font-size: 1.25rem;
}

.result-card.status-ok {
  background: var(--color-success-tint);
  border-color: var(--color-success);
}

.result-card.status-warning {
  background: var(--color-warning-tint);
  border-color: var(--color-warning);
}

.result-card.status-danger {
  background: var(--color-danger-tint);
  border-color: var(--color-danger);
}

.roadmap {
  margin: 18px 0;
  padding: 0;
  list-style: none;
  counter-reset: roadmap-step;
}

.roadmap li {
  counter-increment: roadmap-step;
  position: relative;
  padding: 4px 0 4px 40px;
  margin-bottom: 14px;
}

.roadmap li::before {
  content: counter(roadmap-step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.info-note {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.doc-list {
  margin: 8px 0 0;
  padding-left: 20px;
}

.doc-list li {
  margin-bottom: 6px;
}

/* ---------- Disclaimer / footer ---------- */

.disclaimer-banner {
  background: #eef2f2;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 12px 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}

.disclaimer-strong {
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 24px;
}

.site-footer {
  padding: 32px 0 60px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.site-footer a {
  color: var(--color-text-muted);
}

.site-footer nav {
  margin-top: 10px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- FAQ ---------- */

.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 16px 0;
}

.faq-item h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
}

.faq-item p {
  color: var(--color-text-muted);
  margin: 0;
}

/* ---------- Utilities ---------- */

.text-center {
  text-align: center;
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (min-width: 640px) {
  body {
    font-size: 18px;
  }
  .hero h1 {
    font-size: 2.1rem;
  }
}

/* ---------- Contenu long format (/parcours) ---------- */

[id] {
  scroll-margin-top: 90px;
}

.parcours-content h2 {
  margin-top: 40px;
  font-size: 1.4rem;
}

.parcours-content p,
.parcours-content ul {
  color: var(--color-text);
}

.parcours-content ul {
  padding-left: 22px;
}

.parcours-content li {
  margin-bottom: 8px;
}

.sommaire {
  margin: 24px 0 32px;
}

.sommaire h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.sommaire ol {
  margin: 0;
  padding-left: 20px;
}

.sommaire li {
  margin-bottom: 6px;
}

.sommaire a {
  text-decoration: none;
}

.sommaire a:hover {
  text-decoration: underline;
}

.cta-box {
  background: var(--color-primary-tint);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
  margin: 32px 0;
}

.cta-box h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.todo-marker {
  color: var(--color-warning);
  font-weight: 600;
}

/* ---------- Annuaire ---------- */

.annuaire-meta {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.annuaire-filter {
  margin: 24px 0 28px;
}

.annuaire-filter select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: var(--color-surface);
  color: var(--color-text);
}

.region-group {
  margin-bottom: 32px;
}

.region-group h2 {
  font-size: 1.15rem;
  margin: 0 0 14px;
}

.centre-list {
  display: grid;
  gap: 14px;
}

.centre-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.centre-card h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.centre-card p {
  margin: 4px 0;
  color: var(--color-text);
}

.centre-card .etablissement {
  color: var(--color-text-muted);
}

.centre-card .site-link {
  display: inline-block;
  margin-top: 6px;
  text-decoration: none;
}

.centre-card .site-link:hover {
  text-decoration: underline;
}

.badge-pediatrie {
  display: inline-block;
  background: var(--color-primary-tint);
  color: var(--color-primary-dark);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
}

.annuaire-empty {
  color: var(--color-text-muted);
  padding: 20px 0;
}

/* ---------- Avertissement d'inversion taille / poids ---------- */

.swap-warning {
  background: var(--color-warning-tint);
  border: 1px solid var(--color-warning);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 12px;
}

.swap-warning p {
  margin: 0 0 12px;
  font-weight: 600;
}

.swap-warning-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.swap-warning-actions .btn {
  flex: 1;
  min-width: 160px;
}
