/* ——— En-tête ——— */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); flex-wrap: wrap; padding-block: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.1rem; }
.brand__logo {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--primary); color: var(--on-primary); font-weight: 800;
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / 15%);
}
.brand__logo { font-size: 1.3rem; line-height: 1; background: var(--primary-soft); box-shadow: none; }
.brand__name span { color: var(--primary); }

.main-nav { display: flex; gap: 4px; order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--muted);
  font-weight: 600; font-size: .95rem; white-space: nowrap;
}
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a[aria-current="page"] { color: var(--primary); background: var(--primary-soft); }

.profile-chip {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; font-weight: 600; font-size: .9rem;
}
.profile-chip:hover { border-color: var(--primary); }
.profile-chip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

@media (min-width: 860px) {
  .main-nav { order: 0; width: auto; margin-left: 24px; }
}

.site-footer { border-top: 1px solid var(--border); padding-block: 24px; color: var(--muted); font-size: .875rem; }

/* ——— Boutons ——— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 12px;
  border: 2px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn--secondary { background: var(--primary-soft); color: var(--primary); }
.btn--secondary:hover { border-color: var(--primary); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--lg { min-height: 52px; padding: 12px 28px; font-size: 1.05rem; }
.btn--sm { min-height: 40px; padding: 8px 14px; font-size: .9rem; }
.btn--icon { width: 44px; padding: 0; font-size: 1.2rem; }
.btn--block { width: 100%; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
.actions--end { justify-content: flex-end; }

/* ——— Typo utilitaires ——— */
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.lead { font-size: 1.1rem; }
.small { font-size: .875rem; }
.center { text-align: center; }
.h3 { font-size: 1.1rem; }
.highlight { background: linear-gradient(transparent 62%, var(--accent) 62%); padding-inline: 4px; }

/* ——— Cartes, alertes, badges ——— */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
@media (min-width: 768px) { .card { padding: 28px; } }

.alert { border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 16px; border: 1px solid transparent; }
.alert--info { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 25%, transparent); }
.alert--success { background: var(--success-soft); color: var(--text); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.alert--warning { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 30%, transparent); }
.alert .btn { margin-top: 8px; }
.alert--danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge--weak { background: var(--danger-soft); color: var(--danger); }
.badge--medium { background: var(--warning-soft); color: var(--warning); }
.badge--strong { background: var(--success-soft); color: var(--success); }
.badge--unknown { background: var(--neutral-soft); color: var(--muted); }
.badge--grave { background: var(--danger); color: var(--on-status); }

.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-block: 8px; }
.progress__bar { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 60%, var(--accent))); transition: width .4s ease; }

.breadcrumb { font-size: .9rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); }

.count { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding-inline: 8px; margin-left: 6px; border-radius: 999px; background: var(--surface-2); font-size: .85rem; vertical-align: middle; }

/* ——— Accueil ——— */
.hero { display: grid; gap: 32px; align-items: center; padding-block: 24px 40px; }
.hero__lead { font-size: 1.15rem; color: var(--muted); max-width: 52ch; }
.hero__visual { position: relative; min-height: 220px; display: grid; gap: 14px; align-content: center; }
.hero-card {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); font-weight: 700; animation: float 5s ease-in-out infinite;
}
.hero-card span { font-size: 1.5rem; }
.hero-card b { margin-left: auto; }
.hero-card--b { margin-left: 24px; animation-delay: -1.5s; }
.hero-card--c { margin-right: 24px; animation-delay: -3s; background: var(--primary); color: var(--on-primary); border-color: transparent; }
@keyframes float { 50% { transform: translateY(-6px); } }
@media (min-width: 900px) { .hero { grid-template-columns: 1.2fr 1fr; padding-block: 48px 64px; } }

.section { margin-top: 40px; }
.section__head { margin-bottom: 16px; }
.section__head p { margin: 0; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.step__num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #1a1400; font-weight: 800; margin-bottom: 12px; }

/* ——— Pop-up questionnaire ——— */
.dialog {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  padding: 0; border: none; border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
.dialog::backdrop { background: rgb(15 16 32 / 55%); backdrop-filter: blur(4px); }
.dialog[open] { animation: pop .22s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.dialog__form { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 600px) { .dialog__form { padding: 28px; } }
.dialog__header { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.dialog__title { margin: 0; font-size: 1.45rem; }
.dialog__title:focus { outline: none; }
.dialog__footer { display: flex; justify-content: space-between; gap: 12px; }

.dots { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; }
.dots li { width: 28px; height: 6px; border-radius: 999px; background: var(--surface-2); }
.dots li.is-current { background: var(--primary); }
.dots li.is-done { background: color-mix(in srgb, var(--primary) 45%, var(--surface-2)); }

.choice-grid { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
.choice-grid--two { grid-template-columns: 1fr; }
@media (min-width: 480px) { .choice-grid--two { grid-template-columns: 1fr 1fr; } }
.choice-card {
  position: relative; display: flex; gap: 14px; align-items: center; padding: 16px;
  border: 2px solid var(--border); border-radius: var(--radius); cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.choice-card:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.choice-card:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice-card__icon { font-size: 1.8rem; }
.choice-card__body { display: flex; flex-direction: column; }
.choice-card__title { font-weight: 700; }
.choice-card__text { color: var(--muted); font-size: .9rem; }

.stepper { display: flex; justify-content: center; align-items: center; gap: 16px; margin-block: 8px; }
.stepper .btn { background: var(--surface-2); }
.stepper__value {
  width: 96px; height: 72px; text-align: center; font-size: 2.2rem; font-weight: 800;
  border: 2px solid var(--border); border-radius: var(--radius); background: var(--surface);
  -moz-appearance: textfield;
}
.stepper__value::-webkit-inner-spin-button { -webkit-appearance: none; }
.done-panel { text-align: center; }
.done-panel__emoji { font-size: 3rem; margin: 0; }

/* ——— Import ——— */
.page-header { margin-bottom: 24px; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 40px 20px; border: 2px dashed var(--border); border-radius: var(--radius-lg);
  background: var(--surface); transition: border-color .15s ease, background-color .15s ease;
}
.dropzone.is-dragging { border-color: var(--primary); background: var(--primary-soft); }
.dropzone:has(input:focus-visible) label { outline: 3px solid var(--focus); outline-offset: 2px; }
.dropzone__icon { color: var(--primary); margin-bottom: 8px; }
.dropzone__title { font-weight: 700; font-size: 1.1rem; margin: 0; }
.dropzone .small { margin: 0; }
.dropzone .btn { margin-top: 16px; }
.dropzone__privacy { margin: 12px 0 0; text-align: center; }
.import--pick { max-width: 520px; margin-inline: auto; }
.import--pick .page-header { text-align: center; }

.alt-options { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 768px) { .alt-options { grid-template-columns: 1fr 1fr; } }

.reading { text-align: center; max-width: 480px; margin-inline: auto; }
.reading__label { font-weight: 700; }
.spinner { width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%; border: 4px solid var(--surface-2); border-top-color: var(--primary); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.score-banner { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: var(--radius); margin-bottom: 16px; font-weight: 600; }
.score-banner.is-fail { background: var(--danger-soft); }
.score-banner.is-pass { background: var(--success-soft); }
.score-banner__value { font-size: 2rem; font-weight: 800; }
.score-banner__value small { font-size: 1rem; color: var(--muted); }

.review__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.review__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.review__item fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.review__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 700; padding: 0; margin-bottom: 8px; }
.review__evidence { margin: 0 0 10px; overflow-wrap: anywhere; }

.segmented { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
@media (min-width: 640px) { .segmented { grid-template-columns: repeat(4, 1fr); } }
.segmented__option { position: relative; }
.segmented__option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented__option span {
  display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 10px;
  border-radius: 10px; border: 2px solid var(--border); font-weight: 600; font-size: .9rem; text-align: center;
}
.segmented__option input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.segmented__option--weak input:checked + span { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.segmented__option--medium input:checked + span { background: var(--warning-soft); border-color: var(--warning); color: var(--warning); }
.segmented__option--strong input:checked + span { background: var(--success-soft); border-color: var(--success); color: var(--success); }
.segmented__option--unknown input:checked + span { background: var(--neutral-soft); border-color: var(--muted); }

.sticky-actions {
  position: sticky; bottom: 0; display: flex; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 30%);
}

/* ——— Tableau de bord ——— */
.dash-hero { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.dash-hero .lead { margin: 0; max-width: 60ch; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.stat__label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.stat__value { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.stat__value small { font-size: 1rem; color: var(--muted); }
.stat__hint { font-size: .85rem; color: var(--muted); }
.stat--weak .stat__value { color: var(--danger); }
.stat--strong .stat__value { color: var(--success); }

.priorities { padding: 20px; border-radius: var(--radius-lg); background: var(--accent-soft); }
@media (min-width: 768px) { .priorities { padding: 28px; } }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

.topic-card {
  display: flex; flex-direction: column; gap: 12px; padding: 18px;
  background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.topic-card--weak { border-left-color: var(--danger); }
.topic-card--medium { border-left-color: var(--warning); }
.topic-card--strong { border-left-color: var(--success); }
.topic-card__head { display: flex; gap: 12px; align-items: flex-start; }
.topic-card__icon { font-size: 1.6rem; line-height: 1; }
.topic-card__rank { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--primary); color: var(--on-primary); font-weight: 800; }
.topic-card__title { margin: 0 0 2px; }
.topic-card__summary { margin: 0; color: var(--muted); font-size: .92rem; }
.topic-card__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.topic-card__progress .progress { margin-bottom: 0; }
.topic-card__actions { display: flex; gap: 8px; margin-top: auto; }
.topic-card__actions .btn { flex: 1; }

.empty-state { text-align: center; max-width: 480px; margin: 48px auto; }
.empty-state__icon { font-size: 3rem; margin: 0; }
.empty-state .actions { justify-content: center; }

/* ——— Matière ——— */
.topic-header { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.topic-header__icon { font-size: 2.6rem; line-height: 1; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.topic-header .lead { margin-bottom: 8px; }
.topic-layout { display: grid; gap: 16px; align-items: start; }
@media (min-width: 900px) { .topic-layout { grid-template-columns: 1.6fr 1fr; } .practice-card { position: sticky; top: calc(var(--header-h) + 16px); } }

.key-points { padding: 0; list-style: none; display: grid; gap: 10px; margin: 0 0 24px; }
.key-points li { position: relative; padding: 12px 14px 12px 40px; background: var(--surface-2); border-radius: var(--radius-sm); }
.key-points li::before { content: "✓"; position: absolute; left: 14px; top: 12px; font-weight: 800; color: var(--primary); }

.resources { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.resource { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; color: var(--text); }
.resource:hover { border-color: var(--primary); }
.resource > span:nth-child(2) { display: flex; flex-direction: column; }
.resource__title { font-weight: 600; }

/* ——— Quiz ——— */
.quiz { max-width: 720px; margin-inline: auto; }
.quiz__top { display: flex; justify-content: space-between; }
.quiz__card { margin-top: 16px; }
.quiz__question { font-size: clamp(1.2rem, 1vw + 1rem, 1.5rem); margin: 8px 0 20px; }
.quiz__question:focus { outline: none; }
.answers { display: grid; gap: 10px; }
.answer {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; min-height: 56px;
  text-align: left; background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
  cursor: pointer; font-weight: 600; transition: border-color .15s ease, background-color .15s ease;
}
.answer:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-soft); }
.answer:disabled { cursor: default; }
.answer__letter { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2); font-weight: 800; }
.answer.is-correct { border-color: var(--success); background: var(--success-soft); }
.answer.is-correct .answer__letter { background: var(--success); color: var(--on-status); }
.answer.is-wrong { border-color: var(--danger); background: var(--danger-soft); }
.answer.is-wrong .answer__letter { background: var(--danger); color: var(--on-status); }
.answer:disabled:not(.is-correct):not(.is-wrong) { opacity: .6; }

.feedback:not(:empty) { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm); }
.feedback--right { background: var(--success-soft); }
.feedback--wrong { background: var(--danger-soft); }
.feedback p { margin: 0; }
.feedback__title { font-weight: 800; margin-bottom: 4px !important; }

.result { text-align: center; }
.result h1:focus { outline: none; }
.result__emoji { font-size: 3.5rem; margin: 0; }
.result .actions { justify-content: center; }
.mistakes { text-align: left; margin-top: 24px; }
.mistakes ul { padding-left: 20px; display: grid; gap: 12px; }

/* ——— Conseils ——— */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.toc a {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  text-decoration: none; color: var(--text); font-weight: 600; font-size: .9rem;
}
.toc a:hover { border-color: var(--primary); color: var(--primary); }
.guide { display: grid; gap: 16px; }
.guide__section { scroll-margin-top: calc(var(--header-h) + 16px); }
.guide__section:focus { outline: none; }
.guide__section .lead { color: var(--muted); }
.guide__section .key-points { margin-bottom: 16px; }
.guide__links-title { margin-top: 8px; }
.guide__disclaimer { margin-top: 24px; }

.checklist { margin-bottom: 16px; }
.checklist__count { font-weight: 700; margin: 0; }
.checklist ul { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
@media (min-width: 768px) { .checklist ul { grid-template-columns: 1fr 1fr; } }
.check {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px;
  border: 2px solid var(--border); border-radius: var(--radius-sm); cursor: pointer;
}
.check input { width: 22px; height: 22px; flex: none; accent-color: var(--success); cursor: pointer; }
.check:has(input:checked) { border-color: var(--success); background: var(--success-soft); }
.check:has(input:checked) span { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text) 40%, transparent); }

.guide-promo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }
.guide-promo h2 { margin: 0 0 4px; }
.guide-promo p { margin: 0; }

/* ——— Accueil : encart confiance ——— */
.trust { display: grid; gap: 16px; margin-top: 8px; }
.trust__stat {
  position: relative; overflow: hidden; padding: 24px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #4338ca, #241d7a);
  color: #fff;
}
@media (min-width: 768px) { .trust__stat { padding: 32px; } }
.trust__stat::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 35%, transparent); filter: blur(10px); pointer-events: none;
}
.trust__stat .eyebrow { color: var(--accent); }
.trust__headline { font-size: clamp(1.3rem, 1.5vw + 1rem, 1.7rem); font-weight: 700; margin-bottom: 20px; }
.trust__big { display: block; font-size: clamp(3rem, 6vw + 1rem, 4.5rem); font-weight: 800; line-height: 1; color: var(--accent); letter-spacing: -0.03em; }
.trust__bars { display: grid; gap: 12px; margin-bottom: 20px; }
.pass-bar__label { display: flex; justify-content: space-between; gap: 8px; font-size: .9rem; margin-bottom: 6px; }
.pass-bar__track { height: 10px; border-radius: 999px; background: rgb(255 255 255 / 20%); overflow: hidden; }
.pass-bar__fill { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.trust__message { font-size: 1.05rem; }
.trust__source { margin: 0; color: rgb(255 255 255 / 75%); }
.trust__source a { color: inherit; }
.trust__stat :focus-visible { outline-color: var(--accent); }


/* ——— Prof virtuel ——— */
.sticky-actions { padding-right: 72px; }
.tutor { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.tutor__bubble {
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--primary); color: var(--on-primary); font-size: 1.8rem;
  box-shadow: 0 8px 24px rgb(67 56 202 / 40%); transition: transform .15s ease;
}
.tutor__bubble:hover { transform: scale(1.06); }
.tutor.is-open .tutor__bubble { transform: scale(.9); }
.tutor__panel {
  display: flex; flex-direction: column; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100dvh - 120px));
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  overflow: hidden; animation: pop .2s ease;
}
.tutor__panel[hidden] { display: none; }
.tutor__header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: linear-gradient(135deg, #4338ca, #241d7a); color: #fff; }
.tutor__avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgb(255 255 255 / 15%); font-size: 1.4rem; }
.tutor__title { margin: 0; font-size: 1.05rem; }
.tutor__mode { margin: 0; opacity: .8; }
.tutor__close { margin-left: auto; color: #fff; border-color: rgb(255 255 255 / 30%); }
.tutor__close:hover { background: rgb(255 255 255 / 12%); }
.tutor__messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.tutor__msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: .95rem; overflow-wrap: anywhere; }
.tutor__msg p { margin: 0 0 .5em; }
.tutor__msg p:last-child { margin-bottom: 0; }
.tutor__msg ul { margin: 0 0 .5em; padding-left: 18px; }
.tutor__msg--assistant { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.tutor__msg--user { align-self: flex-end; background: #4338ca; color: #fff; border-bottom-right-radius: 4px; }
.tutor__links { font-weight: 600; }
.tutor__typing { letter-spacing: 2px; color: var(--muted); animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }
.tutor__suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px; }
.tutor__suggestions:not(:empty) { padding-bottom: 10px; }
.chip {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-size: .85rem; font-weight: 600; cursor: pointer; text-align: left;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.tutor__form { display: flex; gap: 8px; align-items: flex-end; padding: 12px; border-top: 1px solid var(--border); }
.tutor__form textarea {
  flex: 1; resize: none; min-height: 44px; max-height: 120px; padding: 10px 14px; border-radius: 14px;
  border: 2px solid var(--border); background: var(--bg); line-height: 1.4;
}
.tutor__form textarea:focus { outline: none; border-color: var(--primary); }
@media (max-width: 640px) {
  .tutor { right: 12px; bottom: 12px; }
  .tutor.is-open { left: 12px; }
  .tutor__panel { width: 100%; height: calc(100dvh - 100px); }
}

/* ——— Parcours d'examen ——— */
.routes-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.routes-header__art { font-size: 4rem; line-height: 1; display: none; }
@media (min-width: 768px) { .routes-header__art { display: block; } }

.center-picker { display: grid; gap: 12px; margin-bottom: 8px; }
@media (min-width: 700px) { .center-picker { grid-template-columns: repeat(3, 1fr); } }
.center-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius);
  border: 2px solid var(--border); background: var(--surface); text-decoration: none; color: var(--text);
  transition: border-color .15s ease, background-color .15s ease;
}
.center-card:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); }
.center-card.is-active { border-color: var(--primary); background: var(--primary-soft); }
.center-card__icon { font-size: 1.5rem; }
.center-card__body { display: flex; flex-direction: column; }
.center-card__name { font-weight: 700; }

.routes-summary { display: grid; gap: 12px; margin-bottom: 16px; }
@media (min-width: 768px) { .routes-summary { grid-template-columns: 1.6fr 1fr; align-items: center; } }
.routes-summary h2, .routes-summary p { margin: 0; }
.routes-summary__progress .progress { margin-bottom: 0; }

.circuits { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.circuit { padding: 18px; transition: border-color .15s ease; }
.circuit.is-driven { border-color: var(--success); }
.circuit__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.circuit__title { margin: 0; }
.circuit__done { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--muted); cursor: pointer; min-height: 44px; }
.circuit__done input { width: 20px; height: 20px; accent-color: var(--success); cursor: pointer; }
.circuit.is-driven .circuit__done { color: var(--success); }

.road { display: block; width: 100%; height: auto; margin: 8px 0 12px; overflow: visible; }
.road__asphalt { fill: none; stroke: var(--surface-2); stroke-width: 16; stroke-linecap: round; }
.road__line { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 6 6; opacity: .6; }
.road__pin circle { stroke: var(--surface); stroke-width: 3; }
.road__pin text { fill: #fff; font-size: 12px; font-weight: 800; text-anchor: middle; font-family: var(--font); }
.road__pin--1 circle, .circuit__num--1 { fill: var(--primary); background: var(--primary); }
.road__pin--2 circle, .circuit__num--2 { fill: #e8590c; background: #e8590c; }
.road__pin--3 circle, .circuit__num--3 { fill: var(--success); background: var(--success); }
:root[data-theme="dark"] .road__pin text { fill: #0f1020; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .road__pin text { fill: #0f1020; } }

.circuit__points { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.circuit__points li { display: flex; align-items: center; gap: 10px; }
.circuit__num { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; color: var(--on-status); font-size: .8rem; font-weight: 800; }
.circuit__place { flex: 1; font-weight: 600; }
.circuit__map { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; text-decoration: none; }
.circuit__map:hover { background: var(--surface-2); }

/* ——— Illustrations des exercices ——— */
:root {
  --scene-grass: #cfe8c6; --scene-road: #5b6070; --scene-line: #ffffff; --scene-island: #9fd18f;
  --scene-car: #f59f00; --scene-me: #4338ca; --scene-glass: #dbe4ff; --scene-bike: #1f2937; --scene-rider: #e8590c;
  --scene-tram: #e03131; --scene-label: #14162b; --scene-arrow: #f5b400;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --scene-grass: #23402b; --scene-road: #3b3f52; --scene-island: #2f5a37; --scene-me: #8b85ff;
    --scene-glass: #2a2858; --scene-bike: #e5e7eb; --scene-label: #eef0fb;
  }
}
:root[data-theme="dark"] {
  --scene-grass: #23402b; --scene-road: #3b3f52; --scene-island: #2f5a37; --scene-me: #8b85ff;
  --scene-glass: #2a2858; --scene-bike: #e5e7eb; --scene-label: #eef0fb;
}
.illus { margin: 0 0 20px; display: flex; justify-content: center; }
.illus--sign img { width: auto; max-width: 220px; height: 120px; filter: drop-shadow(0 4px 8px rgb(0 0 0 / 18%)); }
.illus--scene svg { width: 100%; max-width: 480px; height: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.mistakes .illus { justify-content: flex-start; margin-bottom: 6px; }
.mistakes .illus--sign img { height: 56px; }
.mistakes .illus--scene svg { max-width: 220px; }
.sc-grass { fill: var(--scene-grass); }
.sc-road { fill: var(--scene-road); }
.sc-island { fill: var(--scene-island); }
.sc-line { stroke: var(--scene-line); stroke-width: 2; stroke-dasharray: 10 8; fill: none; }
.sc-rail { stroke: #9aa0b4; stroke-width: 3; fill: none; }
.sc-car { fill: var(--scene-car); stroke: rgb(0 0 0 / 25%); stroke-width: 1; }
.sc-car-me { fill: var(--scene-me); stroke: rgb(0 0 0 / 25%); stroke-width: 1; }
.sc-glass { fill: var(--scene-glass); }
.sc-bike { fill: var(--scene-bike); }
.sc-rider { fill: var(--scene-rider); }
.sc-helmet { fill: #ffd43b; stroke: rgb(0 0 0 / 30%); stroke-width: .6; }
.sc-tram { fill: var(--scene-tram); }
.sc-tram-door { stroke: rgb(255 255 255 / 70%); stroke-width: 2; }
.sc-arrow { stroke: var(--scene-arrow); stroke-width: 4; fill: none; stroke-linecap: round; }
.sc-arrow-head { fill: var(--scene-arrow); }
.sc-gap { stroke: var(--scene-arrow); stroke-width: 2.5; fill: none; }
.sc-label { fill: var(--scene-label); font: 700 12px var(--font); text-anchor: middle; paint-order: stroke; stroke: var(--scene-grass); stroke-width: 3px; }
.sc-label--left { text-anchor: start; }
.sc-label--big { font-size: 22px; }

.sc-line-solid { stroke: var(--scene-line); stroke-width: 3; fill: none; }
.sc-line-thin { stroke: var(--scene-line); stroke-width: 2; stroke-dasharray: 4 6; fill: none; }
.sc-zebra { fill: #f8f9fa; }
.sc-sidewalk { fill: #adb5bd; }
.sc-bikelane { fill: #c92a2a; opacity: .75; }
.sc-hole { fill: #212529; opacity: .75; }
.sc-road-cross { fill: var(--scene-road); filter: brightness(1.08); }
.sc-stopline { stroke: #f8f9fa; stroke-width: 4; }
.sc-light-box { fill: #212529; }
.sc-light-off { fill: #495057; }
.sc-light-orange { fill: #f59f00; filter: drop-shadow(0 0 4px #f59f00); }
.sc-sky { fill: #d0ebff; }
.sc-road-side { stroke: var(--scene-road); stroke-width: 8; fill: none; }
.sc-truck { fill: #868e96; }
.sc-wheel { fill: #212529; }
.sc-bus { fill: #1c7ed6; stroke: rgb(0 0 0 / 25%); }
.sc-head { fill: #ffd8a8; stroke: rgb(0 0 0 / 35%); stroke-width: .8; }
.sc-post { fill: #1c7ed6; stroke: #fff; stroke-width: 1.5; }
.sc-post-text { fill: #fff; font: 800 9px var(--font); text-anchor: middle; }
.sc-works { fill: #fd7e14; opacity: .35; }
.sc-cone { fill: #fd7e14; stroke: #fff; stroke-width: 1; }
.sc-ball { fill: #fff; stroke: #e03131; stroke-width: 3; }
.sc-blink { fill: #ffa94d; animation: blink 1s steps(2, start) infinite; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sc-sky { fill: #1c2541; } :root:not([data-theme="light"]) .sc-sidewalk { fill: #5c636a; } }
:root[data-theme="dark"] .sc-sky { fill: #1c2541; }
:root[data-theme="dark"] .sc-sidewalk { fill: #5c636a; }

/* ——— Leçons ——— */
.lesson { max-width: 820px; margin-inline: auto; display: grid; gap: 16px; }
.lesson__header { display: flex; gap: 16px; align-items: flex-start; }
.lesson__header h1 { margin-bottom: 8px; }
.lesson__icon { font-size: 2.4rem; line-height: 1; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.lesson__remember { padding: 18px 20px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.lesson__remember h2 { margin: 0 0 10px; }
.lesson__remember ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lesson__remember li { padding: 6px 12px; border-radius: 999px; background: var(--surface); font-weight: 700; font-size: .92rem; }
.lesson__signs { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.lesson__signs .illus { margin: 0; }
.lesson__signs .illus--sign img { height: 90px; }
.lesson__section h2 { font-size: 1.2rem; }
.lesson__section .key-points { margin-bottom: 0; }
.lesson__practice h2 { font-size: 1.2rem; }
.lesson__topics { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.lesson__topic { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius); border: 2px solid var(--border); background: var(--surface); text-decoration: none; color: var(--text); }
.lesson__topic:hover { border-color: var(--primary); }
.lesson__topic > span:first-child { font-size: 1.5rem; }
.lesson__next { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); }
.lesson__next:hover { border-color: var(--primary); }
.lesson__next-title { font-weight: 700; color: var(--primary); }

/* ——— Barre d'onglets mobile ——— */
.tabbar { display: none; }

/* =========================================================
   Mise en page mobile (< 768 px)
   ========================================================= */
@media (max-width: 767px) {
  :root { --tabbar-h: 64px; --header-h: 56px; }

  /* En-tête compact sur une seule ligne, navigation déplacée en bas */
  .site-header__inner { flex-wrap: nowrap; min-height: var(--header-h); padding-block: 6px; gap: 10px; }
  .main-nav { display: none; }
  .brand { font-size: 1rem; gap: 8px; }
  .brand__logo { width: 32px; height: 32px; }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: flex; justify-content: space-around;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 20px rgb(0 0 0 / 8%);
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    min-height: 50px; justify-content: center; border-radius: 12px;
    text-decoration: none; color: var(--muted); font-size: .7rem; font-weight: 700;
  }
  .tabbar a[hidden] { display: none; }
  .tabbar__icon { font-size: 1.3rem; line-height: 1; filter: grayscale(.6); opacity: .8; }
  .tabbar a[aria-current="page"] { color: var(--primary); background: var(--primary-soft); }
  .tabbar a[aria-current="page"] .tabbar__icon { filter: none; opacity: 1; }

  #app { padding-block: 16px calc(var(--tabbar-h) + 48px); }
  .site-footer { padding-bottom: calc(var(--tabbar-h) + 24px); font-size: .8rem; }

  /* Bulle du prof au-dessus de la barre d'onglets */
  .tutor { bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); right: 12px; }
  .tutor__bubble { width: 52px; height: 52px; font-size: 1.5rem; }
  .tutor.is-open { left: 12px; top: calc(var(--header-h) + 8px); }
  .tutor__panel { width: 100%; height: 100%; }
  .tutor.is-open .tutor__bubble { display: none; }
  .quiz .actions--end, .result .actions { padding-right: 60px; }

  /* Boutons et actions : pleine largeur, faciles à toucher */
  .actions { gap: 10px; }
  .actions > .btn, .actions--end > .btn { flex: 1 1 100%; }
  .sticky-actions { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 10px 64px 10px 0; background: linear-gradient(transparent, var(--bg) 25%); }
  .sticky-actions .btn { white-space: nowrap; min-height: 48px; padding-inline: 14px; }
  .sticky-actions .btn--primary { flex: 1; }

  /* Typo un peu plus compacte */
  h1 { font-size: 1.65rem; }
  h2 { font-size: 1.2rem; }
  .lead { font-size: 1rem; }
  .breadcrumb { font-size: .8rem; margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .card { padding: 16px; border-radius: 14px; }

  /* Accueil */
  .hero { padding-block: 8px 16px; gap: 16px; }
  .hero__visual { display: none; }
  .hero__lead { font-size: 1.02rem; }
  .trust__stat { padding: 20px; }
  .step { padding: 18px; }

  /* Tableau de bord */
  .dash-hero { margin-bottom: 16px; }
  .dash-hero .btn { width: 100%; }
  .stats { gap: 10px; }
  .stat { padding: 14px; }
  .stat__value { font-size: 1.7rem; }
  .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .priorities { padding: 16px; margin-inline: -4px; }
  .section { margin-top: 28px; }
  .topic-card { padding: 16px; }
  .guide-promo .btn { width: 100%; }

  /* Matière : l'entraînement d'abord, la théorie ensuite */
  .topic-header { gap: 12px; margin-bottom: 16px; }
  .topic-header__icon, .lesson__icon { font-size: 1.8rem; padding: 10px; }
  .topic-layout { display: flex; flex-direction: column; }
  .practice-card { order: -1; }

  /* Quiz */
  .quiz__card { margin-top: 12px; }
  .quiz__question { font-size: 1.15rem; margin-bottom: 14px; }
  .answer { padding: 12px 14px; min-height: 52px; font-size: .95rem; }
  .illus { margin-bottom: 14px; }
  .illus--sign img { height: 96px; }
  .result .actions { flex-direction: column; }

  /* Import */
  .dropzone { padding: 28px 16px; }
  .segmented__option span { font-size: .82rem; padding: 6px; }

  /* Conseils, parcours, leçons */
  .toc { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .toc::-webkit-scrollbar { display: none; }
  .toc a { white-space: nowrap; }
  .circuit { padding: 14px; }
  .center-picker { display: flex; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px 6px; scroll-snap-type: x mandatory; }
  .center-picker::-webkit-scrollbar { display: none; }
  .center-card { flex: 0 0 auto; max-width: 78%; scroll-snap-align: start; padding: 10px 14px; }
  .routes-header .lead { margin-bottom: 0; }
  .lesson__remember { padding: 14px 16px; }

  /* Pop-up d'accueil en panneau bas */
  .dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 22px 22px 0 0; max-height: 92dvh; }
  .dialog__form { padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
  .dialog__footer .btn { flex: 1; }
  .dialog__footer > span:empty { display: none; }
}

.illus--photo { flex-direction: column; align-items: center; gap: 4px; }
.illus--photo img { width: 100%; max-width: 480px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); }
.illus--photo figcaption { font-size: .7rem; color: var(--muted); }
.illus--photo figcaption a { color: inherit; }
.mistakes .illus--photo img { max-width: 220px; }
.mistakes .illus--photo { align-items: flex-start; }

/* ——— Exercices en voiture ——— */
.drills { margin-top: 16px; }
.drills__head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.drills__head p { margin: 0; }
.drills__count { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--success-soft); color: var(--success); font-weight: 800; }
.drills__list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
@media (min-width: 900px) { .drills__list { grid-template-columns: 1fr 1fr; } }
.drill { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 2px solid var(--border); border-radius: var(--radius-sm); transition: border-color .15s ease, background-color .15s ease; }
.drill.is-done { border-color: var(--success); background: var(--success-soft); }
.drill__check { display: grid; place-items: center; min-width: 44px; min-height: 44px; margin: -10px -6px -10px -10px; cursor: pointer; }
.drill__check input { width: 22px; height: 22px; accent-color: var(--success); cursor: pointer; }
.drill__title { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 1rem; }
.drill__num { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: .75rem; font-weight: 800; }
.drill__how { margin: 0; color: var(--muted); font-size: .92rem; }

/* ——— Diagnostic ——— */
.quiz__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.quiz__tags:empty { display: none; }
.diag-intro { max-width: 640px; margin-inline: auto; text-align: center; }
.diag-intro__emoji { font-size: 3rem; margin: 0; }
.diag-intro h1:focus { outline: none; }
.diag-intro__topics { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.diag-intro__topics li { padding: 8px 14px; border-radius: 14px; background: var(--warning-soft); font-weight: 700; font-size: .92rem; }
.diag-intro .actions { justify-content: center; }

.diag-result { max-width: 760px; margin-inline: auto; display: grid; gap: 16px; }
.diag-score { display: flex; align-items: center; gap: 24px; }
.diag-score h1 { font-size: 1.6rem; margin-bottom: 6px; }
.diag-score h1:focus { outline: none; }
.diag-score .lead { margin: 0; }

.ring { position: relative; flex: none; width: 140px; height: 140px; }
.ring svg { width: 100%; height: 100%; }
.ring__track { fill: none; stroke: var(--surface-2); stroke-width: 12; }
.ring__value { fill: none; stroke-width: 12; stroke-linecap: round; transition: stroke-dasharray .8s ease; }
.ring--strong .ring__value { stroke: var(--success); }
.ring--medium .ring__value { stroke: var(--warning); }
.ring--weak .ring__value { stroke: var(--danger); }
.ring__label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 2px; font-size: 2.2rem; font-weight: 800; }
.ring__label small { font-size: 1rem; color: var(--muted); }

.diag-topics { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.diag-topic { display: grid; gap: 6px; }
.diag-topic__head { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; }
.diag-topic__pct { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.diag-bar { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.diag-bar span { display: block; height: 100%; border-radius: inherit; }
.diag-bar--strong span { background: var(--success); }
.diag-bar--medium span { background: var(--warning); }
.diag-bar--weak span { background: var(--danger); }

.diag-plan { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.diag-plan__item { display: flex; gap: 12px; align-items: flex-start; }
.diag-plan__item p { margin: 2px 0 8px; }
.diag-plan__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.diag-promo { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 24px; }
.diag-promo__text { flex: 1 1 260px; }
.diag-promo h2 { margin: 0 0 4px; }
.diag-promo p { margin: 0; }
.diag-promo__pct { font-size: 2rem; font-weight: 800; color: var(--primary); }

@media (max-width: 767px) {
  .diag-score { flex-direction: column; text-align: center; gap: 12px; }
  .ring { width: 130px; height: 130px; }
  .diag-plan__actions .btn { flex: 1; }
  .diag-promo .btn { width: 100%; }
  .diag-intro .btn--lg { width: 100%; }
}

/* ——— Lancement du diagnostic ——— */
.launch { max-width: 560px; margin: 8px auto 0; text-align: center; }
.launch h1:focus { outline: none; }
.launch__steps { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 10px; text-align: left; }
.launch__step { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); border: 2px solid var(--border); color: var(--muted); font-weight: 700; transition: all .25s ease; }
.launch__step.is-active { border-color: var(--primary); color: var(--text); background: var(--primary-soft); }
.launch__step.is-done { border-color: var(--success); color: var(--text); background: var(--success-soft); }
.launch__dot { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); font-size: .85rem; font-weight: 800; }
.launch__step.is-active .launch__dot { background: var(--primary); color: var(--on-primary); animation: pulse 1.2s ease-in-out infinite; }
.launch__step.is-done .launch__dot { background: var(--success); color: var(--on-status); }
.launch__label { flex: 1; display: flex; flex-direction: column; gap: 2px; padding-top: 3px; }
.launch__label .progress { margin: 6px 0 0; }
.launch__go { width: 100%; margin-top: 8px; }
@keyframes pulse { 50% { transform: scale(1.12); } }

/* ——— Tableau de bord épuré ——— */
.dash-head { margin-bottom: 16px; }
.dash-head h1 { margin-bottom: 4px; }
.dash-head p { margin: 0; }
.main-action { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.main-action__text { flex: 1 1 220px; }
.main-action__text h2 { margin: 0 0 2px; font-size: 1.2rem; }
.main-action__text p { margin: 0; }
.main-action__pct { font-size: 2.4rem; font-weight: 800; color: var(--primary); line-height: 1; }
.main-action__pct small { font-size: 1.1rem; color: var(--muted); }
.main-action__emoji { font-size: 2.4rem; line-height: 1; }
.main-action__alt { flex-basis: 100%; text-align: center; font-size: .9rem; }
.topic-list { display: grid; gap: 8px; }
.topic-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 60px;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface);
  text-decoration: none; color: var(--text);
}
.topic-row:hover { border-color: var(--primary); }
.topic-row__icon { font-size: 1.4rem; }
.topic-row__body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topic-row__title { font-weight: 700; }
.topic-row__chevron { font-size: 1.4rem; color: var(--muted); }
.all-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.all-head h2 { margin: 0; }
.all-topics summary { cursor: pointer; padding: 10px 0; font-weight: 700; color: var(--primary); list-style: none; }
.all-topics summary::-webkit-details-marker { display: none; }
.all-topics summary::after { content: " ▾"; }
.all-topics[open] summary::after { content: " ▴"; }
@media (max-width: 767px) {
  .main-action { flex-direction: column; text-align: center; }
  .main-action__text { flex: none; }
  .main-action .btn--primary { width: 100%; }
  .topic-row .badge { font-size: .7rem; padding: 2px 8px; }
}
.import-alt { margin-top: 16px; text-align: center; color: var(--muted); font-size: .92rem; }
.link-btn { background: none; border: 0; padding: 4px; color: var(--primary); font-weight: 700; text-decoration: underline; cursor: pointer; }
.diag-topic { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: var(--text); }
.diag-topic:hover { border-color: var(--primary); }
.diag-topics { gap: 8px; }
.diag-mistakes summary { cursor: pointer; font-weight: 700; color: var(--primary); }
.diag-mistakes .mistakes { margin-top: 12px; }
.diag-fix { text-align: center; }
.guide { gap: 10px; }
.guide__section { padding: 0; }
.guide__section > :not(summary) { margin-inline: 20px; }
.guide__section > :last-child { margin-bottom: 20px; }
.guide__summary { display: flex; align-items: center; gap: 12px; padding: 16px 20px; min-height: 60px; cursor: pointer; list-style: none; font-weight: 700; font-size: 1.05rem; }
.guide__summary::-webkit-details-marker { display: none; }
.guide__icon { font-size: 1.5rem; }
.guide__title { flex: 1; }
.guide__chevron { color: var(--muted); transition: transform .2s ease; }
.guide__section[open] .guide__chevron { transform: rotate(180deg); }
.guide__section[open] .guide__summary { border-bottom: 1px solid var(--border); margin-bottom: 14px; }
@media (max-width: 767px) { .guide__section > :not(summary) { margin-inline: 16px; } .guide__summary { padding: 14px 16px; } }
.topic-more summary { cursor: pointer; padding: 8px 0; font-weight: 700; color: var(--primary); }
.topic-more .resources { margin-top: 8px; }

/* ——— Programme ——— */
.program-next { display: grid; gap: 8px; }
.program-next__top { display: flex; justify-content: space-between; align-items: baseline; }
.program-next__top strong { font-size: 1.3rem; color: var(--primary); }
.program-next .progress { margin: 0 0 6px; }
.program-next h2 { margin: 4px 0 0; font-size: 1.2rem; }
.program-next p { margin: 0 0 6px; }
.program-steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.program-step { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.program-step.is-current { border: 2px solid var(--primary); }
.program-step.is-next { opacity: .85; }
.program-step summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 56px; cursor: pointer; list-style: none; font-weight: 700; }
.program-step summary::-webkit-details-marker { display: none; }
.program-step__dot { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); font-size: .85rem; font-weight: 800; }
.program-step.is-current .program-step__dot { background: var(--primary); color: var(--on-primary); }
.program-step.is-done .program-step__dot { background: var(--success); color: var(--on-status); }
.program-step__title { flex: 1; }
.program-tasks { list-style: none; padding: 0 12px 12px; margin: 0; display: grid; gap: 6px; }
.program-task { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 52px; border-radius: var(--radius-sm); background: var(--surface-2); text-decoration: none; color: var(--text); }
.program-task:hover { outline: 2px solid var(--primary); }
.program-task.is-done { background: var(--success-soft); }
.program-task__check { flex: none; width: 24px; text-align: center; font-weight: 800; }
.program-task.is-done .program-task__check { color: var(--success); }
.program-task__body { flex: 1; display: flex; flex-direction: column; }

/* ——— Incontournables ——— */
.mock-score { gap: 20px; }
.mock-score__pct { font-size: 3rem; font-weight: 800; line-height: 1; }
.mock-score__pct small { font-size: 1.2rem; color: var(--muted); }
.mock-score.is-pass .mock-score__pct { color: var(--success); }
.mock-score.is-fail .mock-score__pct { color: var(--danger); }

/* ——— Leçon lue ——— */
.lesson__read { display: grid; gap: 8px; }
.lesson__back { text-align: center; font-weight: 700; }
.mistakes ul { list-style: none; padding-left: 0; }
.mistakes li { padding: 12px 0; border-top: 1px solid var(--border); }
.mistakes .illus--photo img { max-width: 160px; }

/* ——— Compte ——— */
.account-btn {
  position: relative; display: grid; place-items: center; width: 40px; height: 40px; margin-left: auto;
  border-radius: 50%; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 1.1rem;
}
.account-btn[hidden] { display: none; }
.account-btn:hover { border-color: var(--primary); }
.account-btn.is-connected::after { content: ""; position: absolute; right: 1px; bottom: 1px; width: 10px; height: 10px; border-radius: 50%; background: var(--success); border: 2px solid var(--surface); }
.account-btn:not([hidden]) + .profile-chip { margin-left: 0; }
.dialog--small { width: min(420px, calc(100vw - 24px)); }
.account { gap: 12px; }
.account__emoji { font-size: 2.4rem; margin: 0; text-align: center; }
.account .dialog__title { margin: 0; }
.account p { margin: 0; }
.field { display: grid; gap: 6px; font-weight: 700; font-size: .92rem; }
.field input {
  min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--border);
  background: var(--bg); font-weight: 500; font-size: 1rem;
}
.field input:focus { outline: none; border-color: var(--primary); }
.account__error { color: var(--danger); font-weight: 600; font-size: .9rem; min-height: 1.2em; text-align: center; }
.save-hint { margin-top: 8px !important; font-size: .9rem; color: var(--muted); }
@media (max-width: 767px) { .account-btn { width: 36px; height: 36px; } }
@media (max-width: 767px) { .dialog--small { width: 100vw; max-width: 100vw; } }

/* ——— Accueil : « Pourquoi tu vas adorer… » ——— */
.why__title { text-align: center; max-width: 620px; margin: 0 auto 28px; }
.why__grid {
  display: grid; gap: 20px 32px; align-items: center;
  grid-template-columns: 1fr 1.3fr 1fr;
  grid-template-areas: "b1 art b2" "b3 art b4";
}
.why__b1 { grid-area: b1; }
.why__b2 { grid-area: b2; align-self: start; margin-top: 40px; }
.why__b3 { grid-area: b3; padding-left: 40px; }
.why__b4 { grid-area: b4; }
.why__art { grid-area: art; }
.why__art svg { width: 100%; height: auto; display: block; }
.why__item h3 { margin: 6px 0 4px; font-size: 1.15rem; }
.why__item p { margin: 0; font-size: .95rem; }
.why__icon { font-size: 2rem; line-height: 1; }

.why-svg__shadow { fill: rgb(0 0 0 / 25%); }
.why-svg__base { fill: #2c2f4d; }
.why-svg__screen-frame { fill: #23264a; stroke: var(--primary); stroke-width: 3; }
.why-svg__screen { fill: #12142a; }
.why-svg__road { fill: none; stroke: #4a4f6e; stroke-width: 22; stroke-linecap: round; }
.why-svg__road-line { fill: none; stroke: #fff; stroke-width: 2; stroke-dasharray: 8 8; opacity: .7; }
.why-svg__car { fill: #e03131; }
.why-svg__glass { fill: #dbe4ff; }
.why-svg__bubble { fill: var(--success); }
.why-svg__score { fill: #0f1020; font: 800 15px var(--font); text-anchor: middle; }
.why-svg__sign { fill: var(--primary); }
.why-svg__check { fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.why-svg__cone { fill: #fd7e14; }
.why-svg__cone-band { fill: #fff; }
.why-svg__pole { fill: #8b8fa8; }
.why-svg__warning { fill: #fff; stroke: #e03131; stroke-width: 4; stroke-linejoin: round; }
.why-svg__warning-mark { fill: #14162b; font: 800 16px var(--font); text-anchor: middle; }

@media (max-width: 860px) {
  .why__grid { grid-template-columns: 1fr 1fr; grid-template-areas: "art art" "b1 b2" "b3 b4"; gap: 20px; }
  .why__b2 { margin-top: 0; }
  .why__b3 { padding-left: 0; }
  .why__art { max-width: 340px; margin: 0 auto; }
}
@media (max-width: 480px) {
  .why__grid { grid-template-columns: 1fr; grid-template-areas: "art" "b1" "b2" "b3" "b4"; }
  .why__item { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; }
  .why__icon { grid-row: span 2; font-size: 1.8rem; }
  .why__item h3 { margin-top: 0; }
}

/* ——— Accueil : « Ils ont réussi grâce à nous » ——— */
.success__title { text-align: center; margin-bottom: 6px; }
.success__intro { text-align: center; margin: 0 auto 24px; font-size: .92rem; }
.success__grid { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.success__card { margin: 0; display: grid; gap: 10px; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.success__img { position: relative; display: block; border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.success__img img { display: block; width: 100%; height: 230px; object-fit: cover; object-position: top; transition: transform .25s ease; }
.success__img:hover img { transform: scale(1.03); }
.success__badge { position: absolute; left: 10px; bottom: 10px; padding: 5px 10px; border-radius: 999px; background: var(--success); color: var(--on-status); font-weight: 800; font-size: .82rem; }
.success__card figcaption { display: flex; flex-direction: column; gap: 2px; padding: 0 4px 4px; }
.success__tag { display: none; }
@media (max-width: 767px) {
  /* Mobile : une liste compacte, miniature à gauche, texte à droite. */
  .success__intro { margin-bottom: 16px; }
  .success__grid { grid-template-columns: 1fr; gap: 10px; }
  .success__card { grid-template-columns: 96px 1fr; align-items: center; gap: 14px; padding: 10px; }
  .success__img img { height: 96px; }
  .success__badge { display: none; }
  .success__card figcaption { padding: 0; gap: 3px; }
  .success__tag {
    display: inline-flex; align-self: flex-start; padding: 2px 9px; border-radius: 999px;
    background: var(--success-soft); color: var(--success); font-weight: 800; font-size: .75rem;
  }
}

/* ——— Badge de l'examen préparé (en-tête) ——— */
.profile-chip {
  gap: 6px; padding: 6px 14px 6px 8px; border: 0; white-space: nowrap;
  background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: .88rem;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 35%, transparent);
}
.profile-chip:hover { box-shadow: inset 0 0 0 2px var(--primary); }
.profile-chip__icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); font-size: .95rem; }
.profile-chip[data-exam="pratique"] { background: var(--success-soft); color: var(--success); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--success) 35%, transparent); }
.profile-chip[data-exam="pratique"]:hover { box-shadow: inset 0 0 0 2px var(--success); }

/* =========================================================
   Barre du haut flottante (style carte arrondie à ombre décalée)
   ========================================================= */
.site-header { background: transparent; backdrop-filter: none; border-bottom: 0; padding: 12px 16px 0; }
.site-header__inner {
  max-width: 1120px; margin-inline: auto; padding: 10px 12px 10px 16px; min-height: 64px; flex-wrap: nowrap;
  background: var(--surface); border: 2px solid #2e3252; border-radius: 22px;
  box-shadow: 5px 5px 0 var(--accent);
}
.brand { font-size: 1.2rem; letter-spacing: -0.02em; }
.brand__logo { width: 38px; height: 38px; border-radius: 12px; }
.main-nav { order: 0; width: auto; min-width: 0; flex: 0 1 auto; margin-left: 20px; gap: 4px; }
.main-nav a { color: var(--text); font-weight: 700; padding: 8px 12px; }
.main-nav a:hover { background: var(--surface-2); }
.main-nav a[aria-current="page"] { color: var(--primary); background: var(--primary-soft); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.profile-chip, .profile-chip[data-exam="pratique"] {
  margin-left: 0; gap: 8px; padding: 6px 12px 6px 6px; min-height: 44px;
  background: transparent; color: var(--text); border: 2px solid var(--text); border-radius: 999px;
  box-shadow: none; font-weight: 800; font-size: .92rem;
}
.profile-chip:hover, .profile-chip[data-exam="pratique"]:hover { box-shadow: none; background: var(--surface-2); }
.profile-chip__icon { width: 28px; height: 28px; background: var(--surface-2); }
.profile-chip__chevron { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.account-btn, .account-btn:not([hidden]) {
  width: auto; height: auto; min-height: 44px; margin-left: 0; padding: 0 20px; border-radius: 999px; border: 0;
  background: var(--primary); color: var(--on-primary); font-weight: 800; font-size: .95rem;
}
.account-btn:hover { background: var(--primary-hover); border: 0; }
.account-btn.is-connected::after { right: 4px; bottom: 4px; }

@media (max-width: 767px) {
  .site-header { padding: 8px 12px 0; }
  .site-header__inner { min-height: 56px; padding: 6px 8px 6px 10px; border-radius: 18px; box-shadow: 4px 4px 0 var(--accent); gap: 8px; }
  .brand { font-size: 1.02rem; gap: 8px; }
  .brand__logo { width: 32px; height: 32px; font-size: 1.1rem; }
  .header-actions { gap: 6px; }
  .profile-chip, .profile-chip[data-exam="pratique"] { min-height: 38px; padding: 4px 10px 4px 4px; font-size: .82rem; gap: 6px; }
  .profile-chip__icon { width: 26px; height: 26px; font-size: .85rem; }
  .account-btn, .account-btn:not([hidden]) { min-height: 38px; padding: 0 12px; font-size: .82rem; }
  html { scroll-padding-top: 90px; }
}
@media (max-width: 440px) { .brand__name { display: none; } .site-header__inner:has(.account-btn[hidden]) .brand__name { display: inline; } }

/* ——— Gros boutons d'action : même style que la barre du haut ——— */
.btn--primary.btn--lg {
  border-radius: 999px; border: 2px solid #2e3252;
  box-shadow: 4px 4px 0 var(--accent);
  transition: transform .12s ease, box-shadow .12s ease, background-color .15s ease;
}
.btn--primary.btn--lg:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--accent); }
.btn--primary.btn--lg:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--accent); }

/* ——— Tous les boutons : pilule, contour foncé et ombre jaune décalée ——— */
.btn {
  border-radius: 999px; border: 2px solid #2e3252;
  box-shadow: 3px 3px 0 var(--accent);
  transition: transform .12s ease, box-shadow .12s ease, background-color .15s ease;
}
.btn--lg { box-shadow: 4px 4px 0 var(--accent); }
.btn--sm { box-shadow: 2px 2px 0 var(--accent); }
.btn--icon { border-radius: 50%; }
.btn--secondary { background: var(--primary-soft); color: var(--primary); }
.btn--secondary:hover:not(:disabled) { border-color: #2e3252; background: color-mix(in srgb, var(--primary-soft) 80%, var(--primary)); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: #2e3252; }
.btn--ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn:hover:not(:disabled) { transform: translate(-1px, -1px); }
.btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--accent); }
.btn:disabled { box-shadow: none; }
.account-btn:not([hidden]) {
  border: 2px solid #2e3252; box-shadow: 3px 3px 0 var(--accent);
  transition: transform .12s ease, box-shadow .12s ease;
}
.account-btn:hover { transform: translate(-1px, -1px); }
.account-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--accent); }
@media (max-width: 767px) {
  .result .actions { padding-right: 0; align-items: stretch; }
  .result .actions .btn { width: 100%; }
}

/* ——— Barre d'onglets mobile : carte flottante au style des boutons ——— */
@media (max-width: 767px) {
  :root { --tabbar-h: 84px; }
  .tabbar {
    left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    padding: 6px; gap: 4px;
    background: var(--surface); backdrop-filter: none;
    border: 2px solid #2e3252; border-top-width: 2px; border-radius: 22px;
    box-shadow: 4px 4px 0 var(--accent);
  }
  .tabbar a { border-radius: 16px; min-height: 52px; color: var(--muted); }
  .tabbar a[aria-current="page"] {
    background: var(--primary); color: var(--on-primary);
    box-shadow: inset 0 0 0 2px #2e3252;
  }
  .tabbar__icon { filter: none; opacity: .9; }
}

/* ——— Parcours d'examen (version épurée) ——— */
.center-tabs { display: flex; gap: 8px; margin: 4px 0 18px; overflow-x: auto; scrollbar-width: none; }
.center-tabs::-webkit-scrollbar { display: none; }
.center-tab {
  flex: none; padding: 9px 16px; border-radius: 999px; border: 2px solid #2e3252;
  background: var(--surface); color: var(--text); text-decoration: none; font-weight: 800; font-size: .92rem;
}
.center-tab[aria-current="page"] { background: var(--primary); color: var(--on-primary); box-shadow: 3px 3px 0 var(--accent); }
.routes-progress { margin-bottom: 14px; }
.routes-progress__top { display: flex; justify-content: space-between; font-weight: 700; font-size: .92rem; }
.routes-progress__top strong { color: var(--success); }
.route-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.route {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface);
}
.route.is-driven { border-color: var(--success); background: var(--success-soft); }
.route__check { display: grid; place-items: center; min-width: 32px; min-height: 32px; margin: -2px 0 0 -4px; cursor: pointer; }
.route__check input { width: 22px; height: 22px; accent-color: var(--success); cursor: pointer; }
.route__body { flex: 1; min-width: 0; }
.route__title { display: block; margin-bottom: 2px; }
.route__points { margin: 0; font-size: .92rem; color: var(--muted); line-height: 1.6; }
.route__points a { color: var(--text); text-decoration: underline dotted; text-underline-offset: 3px; }
.route__arrow { margin: 0 6px; color: var(--accent); font-weight: 800; }
.routes-note { margin-top: 16px; text-align: center; }
@media (min-width: 900px) { .route-list { grid-template-columns: 1fr 1fr; } }

/* ——— Quiz en fin de leçon ——— */
.lesson__quiz { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; border: 2px solid var(--primary); }
.lesson__quiz h2 { margin: 0 0 2px; }
.lesson__quiz p { margin: 0; }
@media (max-width: 599px) { .lesson__quiz .btn { width: 100%; } }

/* ——— Parcours payants : aperçu flouté + carte d'achat ——— */
.paywall { position: relative; }
.paywall__preview { filter: blur(5px); opacity: .7; pointer-events: none; user-select: none; }
.paywall__card {
  position: absolute; top: 24px; left: 50%; transform: translateX(-50%);
  width: min(100% - 24px, 380px); text-align: center; display: grid; gap: 10px;
  border: 2px solid #2e3252; box-shadow: 5px 5px 0 var(--accent);
}
.paywall__card h2 { margin: 0; font-size: 1.25rem; }
.paywall__card p { margin: 0; }
.paywall__icon { font-size: 2rem; }

/* ——— Parcours débloqués : circuits dépliables, conseils par type de passage ——— */
.route__body > summary { list-style: none; cursor: pointer; position: relative; padding-right: 26px; }
.route__body > summary::-webkit-details-marker { display: none; }
.route__body > summary::after { content: '▾'; position: absolute; right: 0; top: 0; color: var(--muted); transition: transform .2s; }
.route__body[open] > summary::after { transform: rotate(180deg); }
.route__body > summary .route__points { display: block; margin: 0; font-size: .92rem; color: var(--muted); line-height: 1.6; }
.route__icons { margin-left: 6px; font-size: .9rem; }
.route__steps { list-style: none; padding: 0; margin: 14px 0 12px; display: grid; gap: 12px; }
.route__steps li { display: flex; gap: 10px; }
.route__steps a { color: var(--text); font-weight: 700; text-decoration: underline dotted; text-underline-offset: 3px; }
.route__steps p { margin: 2px 0 0; }
.route__step-num {
  flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary); color: var(--on-primary); font-weight: 800; font-size: .8rem;
}
.route__kind { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2, rgba(255,255,255,.06)); font-size: .78rem; }
.routes-help { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px dashed var(--border); }
.routes-help summary { cursor: pointer; font-weight: 700; }
.routes-help ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); }
.routes-kinds { margin-top: 26px; display: grid; gap: 8px; }
.routes-kinds h2 { margin: 0 0 4px; }
.routes-kind { padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); }
.routes-kind > summary { list-style: none; cursor: pointer; display: flex; gap: 12px; align-items: center; }
.routes-kind > summary::-webkit-details-marker { display: none; }
.routes-kind__icon { font-size: 1.5rem; }
.routes-kind .illus { margin: 12px auto 4px; max-width: 360px; }

/* ——— Taux de réussite estimé (bas de page) ——— */
.readiness-wrap { margin-top: 32px; margin-bottom: 8px; }
.readiness { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 16px 18px; }
.readiness__ring {
  --p: 0; --ring: var(--primary);
  flex: none; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%;
  background: conic-gradient(var(--ring) calc(var(--p) * 1%), var(--border) 0);
}
.readiness.is-ready .readiness__ring { --ring: var(--success); }
.readiness__ring > span {
  display: flex; align-items: baseline; justify-content: center; padding-top: 17px; width: 58px; height: 58px; border-radius: 50%; box-sizing: border-box;
  background: var(--surface); font-weight: 800; font-size: 1.15rem;
}
.readiness__ring small { font-size: .7rem; }
.readiness__body { flex: 1; min-width: 200px; }
.readiness__body p { margin: 0 0 4px; }
.readiness__title { font-weight: 800; }
.readiness__review { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.readiness__review a {
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--text); text-decoration: none; font-weight: 600;
}
.readiness__review a:hover { border-color: var(--primary); }
.readiness__how { margin-top: 6px; }
.readiness__how summary { cursor: pointer; }
@media (max-width: 599px) {
  .readiness-wrap { margin-top: 24px; }
  .readiness { gap: 12px; padding: 14px; }
  .readiness__ring { width: 60px; height: 60px; }
  .readiness__ring > span { width: 48px; height: 48px; font-size: 1rem; padding-top: 14px; }
  .readiness > .btn { width: 100%; }
}

/* ——— « Ils ont réussi » : cartes et images au style des boutons (contour sombre, ombre jaune décalée) ——— */
.success__grid { gap: 22px; }
.success__card {
  gap: 14px; padding: 14px; border-radius: 22px;
  border: 2px solid #2e3252; box-shadow: 5px 5px 0 var(--accent);
  transition: transform .15s ease, box-shadow .15s ease;
}
.success__card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--accent); }
.success__img { border-radius: 14px; border: 2px solid #2e3252; box-shadow: 3px 3px 0 var(--accent); }
.success__img img { height: 210px; }
.success__badge {
  left: 10px; bottom: 10px; padding: 5px 12px;
  border: 2px solid #2e3252; box-shadow: 2px 2px 0 var(--accent);
}
.success__card figcaption { padding: 0 4px 2px; }
.success__card figcaption strong { font-size: 1.1rem; }
@media (max-width: 767px) {
  .success__grid { gap: 14px; }
  .success__card { padding: 10px; border-radius: 18px; box-shadow: 4px 4px 0 var(--accent); }
  .success__img { border-radius: 10px; box-shadow: 2px 2px 0 var(--accent); }
  .success__img img { height: 92px; }
  .success__card figcaption strong { font-size: 1rem; }
}

/* ——— Analyse de réussite : style des boutons, version verrouillée (4 €) ——— */
.readiness {
  display: grid; gap: 14px; padding: 18px 20px; border-radius: 22px;
  background: var(--surface); border: 2px solid #2e3252; box-shadow: 5px 5px 0 var(--accent);
}
.readiness > .alert { margin: 0; }
.readiness__head { display: flex; gap: 16px; align-items: center; }
.readiness__head p { margin: 0 0 3px; }
.readiness__title { font-weight: 800; font-size: 1.05rem; }
.readiness__verdict { font-weight: 700; }
.readiness.is-ready .readiness__verdict { color: var(--success); }
.readiness__ring { border: 2px solid #2e3252; box-shadow: 3px 3px 0 var(--accent); }
.readiness__blur { filter: blur(4px); }
.readiness__review { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.readiness__review a {
  padding: 5px 12px; border-radius: 999px; border: 2px solid #2e3252; box-shadow: 2px 2px 0 var(--accent);
  background: var(--bg, transparent); color: var(--text); text-decoration: none; font-weight: 700;
  transition: transform .15s ease, box-shadow .15s ease;
}
.readiness__review a:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--accent); border-color: #2e3252; }
.readiness__perks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.readiness--locked > .btn { justify-self: start; }
.readiness__fine { margin: -6px 0 0; }
.readiness__how { margin: 0; }
@media (max-width: 599px) {
  .readiness { padding: 16px; border-radius: 18px; box-shadow: 4px 4px 0 var(--accent); }
  .readiness__head { gap: 12px; align-items: flex-start; }
  .readiness__perks { flex-direction: column; gap: 6px; }
  .readiness > .btn, .readiness--locked > .btn { width: 100%; justify-self: stretch; }
}

/* Carte d'analyse : pas de grand vide au-dessus ; sur mobile, contenu centré. */
#app:has(+ .readiness-wrap:not([hidden])) { padding-bottom: 8px; }
@media (max-width: 599px) {
  .readiness-wrap { margin-top: 16px; }
  .readiness--locked { text-align: center; justify-items: center; }
  .readiness--locked .readiness__head { flex-direction: column; align-items: center; gap: 10px; }
  .readiness--locked .readiness__perks { align-items: center; }
  .readiness--locked .readiness__fine { margin-top: -4px; }
}

/* ——— Tableau de bord professionnel ——— */
.dash-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.dash-top h1 { margin: 0 0 2px; }
.dash-top p { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px;
  background: var(--surface); border: 2px solid #2e3252; border-radius: 16px;
}
.kpi__label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.kpi__value { font-size: 1.9rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi__value small { font-size: .95rem; color: var(--muted); font-weight: 700; }
.kpi__sub { font-size: .8rem; color: var(--muted); }
.kpi--good .kpi__value { color: var(--success); }
.kpi--bad .kpi__value { color: var(--danger); }
.next-step {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
  padding: 16px 20px; margin-bottom: 16px; border-radius: 18px;
  background: var(--primary-soft); border: 2px solid #2e3252; box-shadow: 5px 5px 0 var(--accent);
}
.next-step p { margin: 0; }
.next-step__label { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--primary); }
.next-step__text { font-weight: 700; }
.panel { padding: 18px 20px; margin-bottom: 16px; border-radius: 18px; background: var(--surface); border: 2px solid #2e3252; }
.panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel__head h2 { margin: 0; font-size: 1.1rem; }
.panel__legend { display: inline-flex; align-items: center; gap: 6px; }
.mastery { display: grid; }
.mastery__row {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(80px, 1fr) 48px 104px; align-items: center; gap: 14px;
  padding: 10px 6px; border-top: 1px solid var(--border); color: var(--text); text-decoration: none;
}
.mastery > .mastery__row:first-child { border-top: 0; }
.mastery__row:hover { background: var(--primary-soft); border-radius: 10px; }
.mastery__name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mastery__prio { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #14162b; font-size: .68rem; font-weight: 800; vertical-align: 2px; }
.mastery__bar { position: relative; height: 8px; border-radius: 999px; background: var(--neutral-soft, var(--border)); }
.mastery__fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; }
.mastery__fill--strong { background: var(--success); }
.mastery__fill--medium { background: var(--primary); }
.mastery__fill--weak { background: var(--danger); }
.mastery__goal, .mastery__goal-key { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); opacity: .45; }
.mastery__goal-key { position: static; display: inline-block; height: 12px; }
.mastery__pct { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.mastery__status { font-size: .78rem; font-weight: 700; text-align: right; color: var(--muted); }
.mastery__status--strong { color: var(--success); }
.mastery__status--weak { color: var(--danger); }
.mastery__more { margin-top: 6px; }
.mastery__more summary { cursor: pointer; padding: 8px 6px; font-weight: 700; color: var(--primary); }
.history { width: 100%; border-collapse: collapse; font-size: .92rem; }
.history th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0 6px 8px; }
.history td { padding: 9px 6px; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.history__score--strong { color: var(--success); }
.history__score--weak { color: var(--danger); }
@media (max-width: 767px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi__value { font-size: 1.6rem; }
  .next-step { padding: 14px 16px; box-shadow: 4px 4px 0 var(--accent); }
  .next-step .btn { width: 100%; }
  .panel { padding: 14px 14px; }
  .mastery__row { grid-template-columns: minmax(0, 1fr) 48px; grid-template-areas: "name pct" "bar bar"; gap: 6px 10px; padding: 10px 4px; }
  .mastery__name { grid-area: name; }
  .mastery__pct { grid-area: pct; }
  .mastery__bar { grid-area: bar; }
  .mastery__status { display: none; }
}
@media (max-width: 767px) {
  .dash-top { align-items: center; }
  .dash-top h1 { font-size: 1.7rem; white-space: nowrap; }
  .dash-top__save { flex: none; min-height: 40px; padding: 8px 12px; }
  .dash-top__save span { display: none; }
}

/* « Tableau de bord » en toutes lettres : sur les écrans moyens, liens plus serrés, logo seul. */
@media (min-width: 768px) and (max-width: 1180px) {
  .main-nav { margin-left: 12px; gap: 2px; }
  .main-nav a { padding: 8px 9px; font-size: .9rem; }
}
@media (min-width: 768px) and (max-width: 1060px) {
  .brand__name { display: none; }
}
@media (min-width: 768px) and (max-width: 960px) {
  .profile-chip [data-profile-label] { display: none; }
  .profile-chip { padding-right: 10px; }
}
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; }
.footer-links a { color: var(--muted); font-weight: 700; }
.seo .brand__name { display: inline; }
.seo__main { padding-top: 36px; }
.seo__main > .btn--lg { margin-bottom: 8px; }
.seo__section { margin-top: 40px; }

/* ——— Parcours verrouillés : les avantages de l'offre (style « Pourquoi » de l'accueil) ——— */
.routes-why { margin-top: 48px; }
.routes-svg__street { stroke: #23264a; stroke-width: 10; fill: none; }
.routes-svg__pin { fill: var(--primary); stroke: #12142a; stroke-width: 2; }
.routes-svg__pin--3 { fill: var(--success); }
.routes-svg__pin-num { fill: #12142a; font: 800 12px var(--font); text-anchor: middle; }
.paywall { min-height: 400px; }

/* ——— Choix du centre (11 centres) ——— */
.center-select { display: flex; align-items: center; gap: 10px; margin: 4px 0 18px; font-weight: 700; color: var(--muted); }
.center-select select {
  flex: 1; max-width: 340px; appearance: none; padding: 10px 40px 10px 16px; border-radius: 999px;
  border: 2px solid #2e3252; box-shadow: 3px 3px 0 var(--accent); background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238b85ff' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 16px center;
  color: var(--text); font: inherit; font-weight: 800; cursor: pointer;
}
.center-select select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.center-select > span { white-space: nowrap; }
