/* ==========================================================================
   LCF · Formation CRM — Chapitre 1
   Design system repris de lcf-preproduction.wappizy.com
   ========================================================================== */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('fonts/PlusJakartaSans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('fonts/PlusJakartaSans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Neutres (échelle slate de la plateforme) */
  --ink:        #0F172A;
  --ink-soft:   #1A202C;
  --slate:      #475569;
  --muted:      #64748B;
  --muted-2:    #94A3B8;
  --line:       #E2E8F0;
  --line-2:     #CBD5E1;
  --surface:    #FFFFFF;
  --surface-2:  #F8FAFC;
  --surface-3:  #F1F5F9;
  --bg:         #F4F7F9;

  /* Teal — identité LCF */
  --teal-900:   #072E2E;
  --teal-800:   #0A3838;
  --teal-700:   #0C4646;
  --teal-600:   #0D6B6B;
  --teal-550:   #156E6E;
  --teal-500:   #31707B;
  --teal-400:   #4A9D9C;
  --teal-200:   #CCE8E8;
  --teal-100:   #F0FBFB;
  --mint:       #5ED7C8;

  /* Corail — action principale */
  --coral:      #EF6B56;
  --coral-600:  #E2543C;
  --coral-500:  #EB5D45;
  --coral-100:  #FDEBE7;

  /* Sémantique */
  --warn:       #B45309;
  --warn-bg:    #FFFBEB;
  --warn-line:  #FDE68A;
  --danger:     #C0392B;
  --danger-bg:  #FEF2F2;
  --ok:         #0F766E;
  --ok-bg:      #ECFDF5;
  --violet:     #7C3AED;
  --violet-bg:  #F5F3FF;

  /* Formes */
  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 100px;

  --sh-card:  0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -18px rgba(15, 23, 42, .22);
  --sh-pop:   0 24px 60px -20px rgba(10, 56, 56, .35);
  --sh-teal:  0 4px 12px rgba(49, 112, 123, .2);

  --shell-nav: 272px;
}

/* Rail plus compact dans les fenêtres étroites (iframes de LMS) */
@media (max-width: 1240px) { :root { --shell-nav: 232px; } }

/* ---------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--teal-500); }

/* ================================================================ SHELL == */
.shell {
  display: grid;
  grid-template-columns: var(--shell-nav) minmax(0, 1fr);
  min-height: 100vh;
  max-width: 100%;
}

/* -- Rail de navigation ------------------------------------------------- */
.rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(168deg, var(--teal-700) 0%, var(--teal-800) 46%, var(--teal-900) 100%);
  color: #fff;
  overflow: hidden;
}
.rail__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 22px 18px;
}
.brand-mark {
  width: 40px; height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.2; }
.brand-txt b { font-size: 15px; font-weight: 800; letter-spacing: .01em; }
.brand-txt span { font-size: 11px; color: rgba(255,255,255,.55); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

.rail__progress { padding: 0 22px 16px; }
.rail__progress .pmeta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.5); margin-bottom: 8px;
}
.rail__progress .pmeta b { color: var(--mint); font-size: 12px; letter-spacing: 0; }
.ptrack { height: 5px; border-radius: 99px; background: rgba(255,255,255,.14); overflow: hidden; }
.pfill {
  height: 100%; width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--mint), var(--teal-400));
  transition: width .45s cubic-bezier(.4, 0, .2, 1);
}

.rail__nav { flex: 1; overflow-y: auto; padding: 4px 12px 18px; }
.rail__nav::-webkit-scrollbar { width: 6px; }
.rail__nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 99px; }
.nav-group {
  font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.38);
  padding: 16px 10px 7px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  padding: 9px 10px;
  border: 0; border-radius: var(--r-sm);
  background: transparent;
  color: rgba(255,255,255,.74);
  font-size: 13.5px; font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background .16s, color .16s;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item[aria-current='true'] { background: rgba(94, 215, 200, .14); color: #fff; }
.nav-item[aria-current='true'] .nav-dot { background: var(--mint); border-color: var(--mint); color: var(--teal-900); }
.nav-dot {
  flex: 0 0 22px; width: 22px; height: 22px;
  border-radius: 99px;
  border: 1.5px solid rgba(255,255,255,.3);
  display: grid; place-items: center;
  font-size: 10.5px; font-weight: 800;
  color: rgba(255,255,255,.7);
  transition: all .16s;
}
.nav-item.is-done .nav-dot { background: rgba(94,215,200,.2); border-color: transparent; color: var(--mint); }
.nav-item > span:last-child { flex: 1; min-width: 0; }
.nav-item > span.nav-dot { flex: 0 0 22px; }

.rail__foot {
  padding: 13px 18px 16px;
  border-top: 1px solid rgba(255,255,255,.09);
  font-size: 10.5px; color: rgba(255,255,255,.42); font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.rail__foot > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail__foot button {
  border: 0; background: rgba(255,255,255,.09); color: rgba(255,255,255,.8);
  border-radius: var(--r-pill); padding: 5px 12px; font-size: 11px; font-weight: 700;
  cursor: pointer;
}
.rail__foot button:hover { background: rgba(255,255,255,.16); color: #fff; }

/* -- Zone principale ---------------------------------------------------- */
.main { display: flex; flex-direction: column; min-width: 0; max-width: 100%; overflow-x: hidden; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: 14px 40px;
  background: rgba(244, 247, 249, .86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.crumb { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
.crumb b { color: var(--teal-500); }
.topbar__spacer { flex: 1; }
.chip-step {
  font-size: 12px; font-weight: 700; color: var(--slate);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 6px 14px;
}

.stage { flex: 1; min-width: 0; padding: 34px 40px 40px; }
@media (max-width: 1240px) { .stage { padding: 28px 26px 36px; } .topbar { padding: 13px 26px; } .actionbar { padding: 13px 26px; } }
.screen { display: none; max-width: 1140px; margin: 0 auto; min-width: 0; }
.screen.is-active { display: block; animation: rise .42s cubic-bezier(.16, 1, .3, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* -- Barre d'actions ---------------------------------------------------- */
.actionbar {
  position: sticky; bottom: 0; z-index: 30;
  margin-top: auto;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 40px;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line);
}
.actionbar__hint { flex: 1; font-size: 13px; color: var(--muted); font-weight: 600; }
.actionbar__hint.is-lock { color: var(--warn); }

/* ============================================================== TYPO ==== */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal-500);
  background: var(--teal-100);
  border: 1px solid var(--teal-200);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  margin-bottom: 16px;
}
h1.title { font-size: 40px; line-height: 1.12; font-weight: 800; letter-spacing: -.022em; color: var(--ink); }
h2.title { font-size: 30px; line-height: 1.18; font-weight: 800; letter-spacing: -.018em; color: var(--ink); }
.lede { font-size: 17px; line-height: 1.62; color: var(--slate); max-width: 72ch; margin-top: 14px; }
.section-h {
  font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted-2); margin: 34px 0 14px;
  display: flex; align-items: center; gap: 10px;
}
.section-h::after { content: ''; flex: 1; height: 1px; background: var(--line); }
p + p { margin-top: 12px; }
.prose { color: var(--slate); font-size: 15.5px; line-height: 1.68; max-width: 74ch; }
.prose strong { color: var(--ink); font-weight: 700; }
code.k {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em; background: var(--surface-3); border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 6px; color: var(--teal-600); font-weight: 600;
}

/* ============================================================== CARDS === */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-card);
  padding: 26px;
}
.card + .card { margin-top: 18px; }
.card__h { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card__h h3 { font-size: 17px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.card__ico {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 10px; display: grid; place-items: center;
  background: var(--teal-100); color: var(--teal-500);
}
.card__ico svg { width: 18px; height: 18px; }

.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid.c3, .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.tile::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--accent, var(--teal-400));
}
.tile h4 { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.tile p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.tile .num {
  font-size: 11px; font-weight: 800; letter-spacing: .1em;
  color: var(--accent, var(--teal-400)); text-transform: uppercase; margin-bottom: 8px; display: block;
}

/* Encadrés */
.note {
  border-radius: var(--r-md);
  padding: 16px 18px 16px 46px;
  position: relative;
  font-size: 14.5px; line-height: 1.6;
  margin: 18px 0;
}
.note::before {
  content: ''; position: absolute; left: 17px; top: 18px;
  width: 18px; height: 18px; background-size: contain; background-repeat: no-repeat;
}
.note b { font-weight: 700; }
.note--tip   { background: var(--teal-100);  border: 1px solid var(--teal-200);  color: var(--teal-700); }
.note--warn  { background: var(--warn-bg);   border: 1px solid var(--warn-line); color: #78350F; }
.note--dang  { background: var(--danger-bg); border: 1px solid #FECACA;          color: #991B1B; }
.note--info  { background: var(--surface-2); border: 1px solid var(--line);      color: var(--slate); }
.note__ico { position: absolute; left: 16px; top: 16px; width: 20px; height: 20px; }

/* Liste à puces personnalisée */
.blist li {
  position: relative; padding-left: 26px; margin-bottom: 10px;
  font-size: 14.5px; color: var(--slate); line-height: 1.6;
}
.blist li::before {
  content: ''; position: absolute; left: 4px; top: 8px;
  width: 7px; height: 7px; border-radius: 99px;
  background: var(--teal-400);
}
.blist li strong { color: var(--ink); font-weight: 700; }
.blist.ok li::before  { background: var(--mint); }
.blist.no li::before  { background: #FCA5A5; }

/* Tableau de référence */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tbl th {
  text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted-2);
  padding: 10px 14px; border-bottom: 1px solid var(--line);
}
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--surface-3); color: var(--slate); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td:first-child { font-weight: 700; color: var(--ink); }
.wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.wrap .tbl { min-width: 300px; }

/* ============================================================ BUTTONS === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 0; border-radius: var(--r-pill);
  padding: 11px 22px;
  font-size: 14.5px; font-weight: 700;
  cursor: pointer;
  transition: transform .12s, box-shadow .16s, background .16s, color .16s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn--primary { background: var(--coral); color: #fff; box-shadow: 0 8px 20px -10px rgba(239,107,86,.9); }
.btn--primary:hover { background: var(--coral-600); }
.btn--teal { background: var(--teal-500); color: #fff; box-shadow: var(--sh-teal); }
.btn--teal:hover { background: var(--teal-600); }
.btn--ghost { background: var(--surface); color: var(--slate); border: 1px solid var(--line-2); }
.btn--ghost:hover { border-color: var(--teal-400); color: var(--teal-600); }
.btn--quiet { background: transparent; color: var(--muted); padding: 11px 12px; }
.btn--quiet:hover { color: var(--ink); }
.btn[disabled] { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn[disabled]:active { transform: none; }

/* ============================================== SIMULATEUR DE PLATEFORME */
/* Cadre « aperçu de l'application » */
.sim {
  border-radius: var(--r-lg);
  border: 1px solid var(--line-2);
  background: var(--bg);
  overflow: hidden;
  box-shadow: 0 30px 70px -40px rgba(10, 56, 56, .55);
  margin: 20px 0;
}
.sim__bar {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  background: linear-gradient(180deg, #FFF, #F6F8FA);
  border-bottom: 1px solid var(--line);
}
.sim__dots { display: flex; gap: 6px; }
.sim__dots i { width: 10px; height: 10px; border-radius: 99px; background: var(--line-2); display: block; }
.sim__url {
  flex: 1; text-align: center;
  font-size: 11.5px; font-weight: 600; color: var(--muted-2);
  background: var(--surface-3); border-radius: var(--r-pill); padding: 4px 12px;
  max-width: 420px; margin: 0 auto;
}
.sim__tag {
  font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--teal-500); background: var(--teal-100);
  border-radius: var(--r-pill); padding: 3px 9px;
}
.sim__body { display: flex; min-height: 260px; background: var(--bg); }

/* Rail applicatif (réplique) */
.app-rail {
  flex: 0 0 62px;
  margin: 12px 0 12px 12px;
  border-radius: 22px;
  background: linear-gradient(170deg, #2F6B67, #14504E 60%, #0C4040);
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 0;
  gap: 22px;
}
.app-rail .logo {
  width: 30px; height: 30px;
  display: grid; place-items: center;
}
.app-rail .logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.app-rail .sep { width: 26px; height: 1px; background: rgba(255,255,255,.18); }
.app-rail i.ico {
  width: 22px; height: 22px; display: grid; place-items: center;
  color: rgba(255,255,255,.6);
}
.app-rail i.ico svg { width: 19px; height: 19px; }
.app-rail i.ico.on { color: #fff; }
.app-canvas { flex: 1; min-width: 0; padding: 12px 14px 16px; }

/* Header applicatif (réplique) */
.app-head {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 9px 12px;
}
.app-head__title { font-size: 13px; font-weight: 800; letter-spacing: .06em; color: var(--muted-2); text-transform: uppercase; }
.app-search {
  flex: 1 1 0; min-width: 0; max-width: 320px;
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 7px 12px; font-size: 12.5px; color: var(--muted-2);
  white-space: nowrap; overflow: hidden;
}
.app-search svg { width: 15px; height: 15px; margin-left: auto; flex: 0 0 15px; }
.app-search > span { overflow: hidden; text-overflow: ellipsis; }
.app-cta {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--coral); color: #fff;
  border: 0; border-radius: var(--r-pill);
  padding: 8px 16px; font-size: 13px; font-weight: 700;
  cursor: pointer;
}
.app-cta svg { width: 15px; height: 15px; }
.app-user { display: flex; align-items: center; gap: 8px; }
.app-avatar {
  width: 28px; height: 28px; border-radius: 99px;
  background: #FDE7C7; color: #92400E;
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
}
.app-user .who { line-height: 1.15; }
.app-user .who b { display: block; font-size: 11.5px; font-weight: 800; color: var(--ink); }
.app-user .who span { font-size: 10.5px; color: var(--muted-2); font-weight: 600; }

/* Carte / formulaire applicatif (réplique) */
.app-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-card);
  overflow: hidden;
}
.app-card__h {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--surface-3);
}
.app-card__h .ic {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--teal-100); color: var(--teal-500);
  display: grid; place-items: center;
}
.app-card__h .ic svg { width: 18px; height: 18px; }
.app-card__h b { font-size: 16px; font-weight: 800; color: var(--teal-700); letter-spacing: -.01em; }
.app-card__h span { display: block; font-size: 12.5px; color: var(--muted-2); font-weight: 600; }
.app-card__b { padding: 20px; }

.app-legend {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 800; color: var(--teal-600);
  padding-bottom: 10px; margin: 4px 0 14px;
  border-bottom: 1px solid var(--surface-3);
}
.app-legend svg { width: 16px; height: 16px; }
.app-legend .pill-count {
  background: var(--teal-100); color: var(--teal-600);
  border-radius: 99px; padding: 1px 9px; font-size: 11px; font-weight: 800;
}
.app-legend .pill-opt {
  background: var(--surface-3); color: var(--muted);
  border-radius: 99px; padding: 2px 9px; font-size: 9.5px; font-weight: 800; letter-spacing: .08em;
}

.fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 18px; }
.fields.one { grid-template-columns: 1fr; }
.fields.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.f { min-width: 0; }
.f > label {
  display: block;
  font-size: 10.5px; font-weight: 800; letter-spacing: .085em; text-transform: uppercase;
  color: var(--teal-600); margin-bottom: 6px;
}
.f > label i { color: var(--coral); font-style: normal; }
.ctrl {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: #fff;
  padding: 9px 13px;
  font-size: 14px; color: var(--ink); font-weight: 500;
  min-height: 40px;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.ctrl.ph { color: var(--muted-2); font-weight: 500; }
.ctrl svg { width: 15px; height: 15px; margin-left: auto; color: var(--muted-2); flex: 0 0 15px; }
.ctrl--sel { cursor: pointer; }
.ctrl.is-target {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(239, 107, 86, .16);
  cursor: pointer;
  animation: pulseTarget 1.9s ease-in-out infinite;
}
@keyframes pulseTarget {
  0%, 100% { box-shadow: 0 0 0 4px rgba(239, 107, 86, .16); }
  50%      { box-shadow: 0 0 0 8px rgba(239, 107, 86, .06); }
}
.ctrl.is-filled { border-color: var(--teal-400); background: #FCFEFE; }
.ctrl.is-locked { background: var(--surface-2); color: var(--muted-2); }
.f__help { font-size: 11.5px; color: var(--coral-600); font-weight: 600; margin-top: 5px; }
.f__help a { color: var(--coral-600); }

.app-addbtn {
  display: block; width: 100%;
  border: 1px dashed var(--line-2); background: var(--surface-2);
  color: var(--muted); border-radius: var(--r-sm);
  padding: 11px; font-size: 13.5px; font-weight: 700;
  text-align: center; cursor: default;
}

.app-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.app-choice__sep {
  text-align: center; font-size: 12.5px; color: var(--muted-2); font-weight: 600;
  margin: 18px 0 12px; position: relative;
}
.choice {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border-radius: var(--r-md); padding: 18px 14px;
  font-size: 14px; font-weight: 700;
  cursor: pointer; border: 1px solid transparent;
  transition: transform .14s, box-shadow .16s;
}
.choice svg { width: 22px; height: 22px; }
.choice--coral { background: var(--coral); color: #fff; }
.choice--outline { background: #fff; border-color: var(--teal-500); color: var(--teal-600); }
.choice:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -16px rgba(15,23,42,.5); }
.choice small { font-weight: 600; font-size: 11.5px; opacity: .8; }

/* Modale applicative (réplique) */
.app-modal-wrap {
  position: relative;
  border-radius: var(--r-md);
  background: rgba(10, 80, 91, .5);
  padding: 34px 20px;
  display: grid; place-items: center;
}
.app-modal {
  width: 100%; max-width: 420px;
  background: #fff; border-radius: var(--r-lg);
  box-shadow: var(--sh-pop);
  padding: 26px 24px;
  text-align: center;
}
.app-modal .mico {
  width: 52px; height: 52px; border-radius: 99px; margin: 0 auto 14px;
  display: grid; place-items: center;
}
.app-modal .mico svg { width: 24px; height: 24px; }
.app-modal .mico--warn { background: #FEF3C7; color: #D97706; }
.app-modal .mico--ok   { background: var(--ok-bg); color: var(--ok); }
.app-modal .mico--send { background: var(--teal-100); color: var(--teal-500); }
.app-modal h4 { font-size: 18px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.app-modal p  { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.app-modal .who-card {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 12px; margin: 16px 0;
}
.app-modal .who-card .av {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 99px;
  background: var(--teal-600); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
}
.app-modal .who-card b { display: block; font-size: 13.5px; color: var(--ink); }
.app-modal .who-card span { font-size: 11.5px; color: var(--muted); }
.app-modal .who-card .tagd {
  display: inline-block; margin-top: 4px;
  font-size: 10px; font-weight: 800; color: var(--teal-600);
  background: var(--teal-100); border-radius: 99px; padding: 2px 8px;
}
.app-modal__actions { display: flex; gap: 10px; justify-content: center; margin-top: 6px; }
.app-modal__actions .btn { flex: 1; padding: 10px 14px; font-size: 13.5px; }
.app-modal__skip {
  display: block; margin: 18px auto 0; background: none; border: 0;
  font-size: 13px; font-weight: 700; color: var(--slate);
  text-decoration: underline; cursor: pointer;
}

/* Stepper « générer / transmettre » */
.mini-steps { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; }
.mini-steps .ms { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--muted-2); }
.mini-steps .ms b {
  width: 20px; height: 20px; border-radius: 99px; background: var(--line);
  color: var(--muted); display: grid; place-items: center; font-size: 11px;
}
.mini-steps .ms.on { color: var(--ink); }
.mini-steps .ms.on b { background: var(--ok); color: #fff; }
.mini-steps .bar { flex: 1; height: 1px; background: var(--line); }

.doc-row {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px; text-align: left;
}
.doc-row .di {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px;
  background: var(--ok-bg); color: var(--ok);
  display: grid; place-items: center;
}
.doc-row .di svg { width: 17px; height: 17px; }
.doc-row .dt { flex: 1; min-width: 0; }
.doc-row .dt em {
  font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .1em;
  color: var(--teal-500); text-transform: uppercase; display: block;
}
.doc-row .dt b { font-size: 14px; color: var(--ink); font-weight: 700; }
.doc-row .dt span { display: block; font-size: 11.5px; font-weight: 700; color: var(--warn); }
.doc-row .dt span::before { content: '● '; }

.missing {
  background: var(--warn-bg); border: 1px solid var(--warn-line);
  border-radius: var(--r-sm); padding: 14px; text-align: left; margin-top: 12px;
}
.missing > b { font-size: 13.5px; color: #78350F; display: block; }
.missing > p { font-size: 12px; color: #92400E; margin: 2px 0 10px; }
.missing .lbl { font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--warn); }
.missing .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.missing .tags span {
  font-size: 11.5px; font-weight: 600; color: #92400E;
  background: #fff; border: 1px solid var(--warn-line);
  border-radius: 99px; padding: 3px 10px;
}
.missing .tags span::after { content: ' +'; font-weight: 800; }

/* ============================================== FICHE DOSSIER (réplique) */
.fiche { display: grid; grid-template-columns: 210px 1fr 230px; gap: 12px; }
@media (max-width: 980px) { .fiche { grid-template-columns: 1fr; } }
.fiche__col { display: flex; flex-direction: column; gap: 10px; }
.fbox {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px;
  position: relative;
  cursor: pointer;
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
.fbox:hover, .fbox.is-open { border-color: var(--teal-400); box-shadow: 0 10px 26px -18px rgba(10,56,56,.6); }
.fbox.is-open { transform: translateY(-1px); }
.fbox__t {
  font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 9px; display: flex; align-items: center; gap: 6px;
}
.fbox__t::before { content:''; width: 3px; height: 11px; border-radius: 2px; background: var(--teal-400); }
.fbox--teal { background: linear-gradient(160deg, #2F6B67, #14504E); border-color: transparent; color: #fff; }
.fbox--teal .fbox__t { color: rgba(255,255,255,.6); }
.fbox--teal .fbox__t::before { background: var(--coral); }
.qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.qa {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: var(--r-xs);
  padding: 7px 8px; font-size: 11.5px; font-weight: 700; color: var(--slate);
}
.qa svg { width: 13px; height: 13px; color: var(--teal-500); }
.fdoss-title { font-size: 19px; font-weight: 800; color: var(--ink); letter-spacing: -.015em; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; }
.badge {
  font-size: 9.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  border-radius: 99px; padding: 3px 9px;
}
.badge--status { background: var(--teal-100); color: var(--teal-600); }
.badge--cold   { background: #E0F2FE; color: #0369A1; }
.badge--soft   { background: var(--surface-3); color: var(--muted); }
.ref { font-size: 11px; color: var(--muted-2); font-weight: 700; }
.ftabs { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.ftab {
  font-size: 12px; font-weight: 700; color: var(--muted);
  border: 0; background: transparent; border-radius: var(--r-md);
  padding: 8px 15px; cursor: pointer; white-space: nowrap;
}
.ftab.on { background: var(--teal-500); color: #fff; box-shadow: var(--sh-teal); }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip {
  font-size: 11.5px; font-weight: 600; color: var(--slate);
  border: 1px solid var(--line); border-radius: 99px; padding: 4px 11px;
  background: #fff;
}
.timeline { position: relative; padding-left: 16px; }
.timeline::before { content: ''; position: absolute; left: 4px; top: 5px; bottom: 5px; width: 1px; background: var(--line); }
.timeline li { position: relative; padding-bottom: 12px; }
.timeline li::before {
  content: ''; position: absolute; left: -16px; top: 5px;
  width: 9px; height: 9px; border-radius: 99px;
  border: 2px solid var(--teal-400); background: #fff;
}
.timeline b { display: block; font-size: 12px; color: var(--ink); font-weight: 700; line-height: 1.4; }
.timeline span { font-size: 10.5px; color: var(--muted-2); font-weight: 600; }
.faisa-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; padding: 5px 0; }
.faisa-line span { color: var(--slate); font-weight: 600; }
.faisa-line b { color: var(--ink); font-weight: 800; white-space: nowrap; }
.faisa-h { font-size: 11px; font-weight: 800; color: var(--ink); margin: 10px 0 4px; }

/* Bulle explicative sur la fiche */
.hotpop {
  display: none;
  margin-top: 10px; padding: 12px;
  background: var(--teal-100); border: 1px solid var(--teal-200);
  border-radius: var(--r-sm);
  font-size: 12.5px; line-height: 1.55; color: var(--teal-700);
}
.fbox.is-open .hotpop { display: block; animation: rise .3s ease; }
.hotpop b { color: var(--teal-800); }

/* ============================================== PARCOURS 8 ÉTAPES ====== */
.wiz-strip {
  display: flex; flex-wrap: wrap; gap: 4px;
  background: var(--surface-3); border-radius: var(--r-pill);
  padding: 6px; margin-bottom: 18px;
}
.wiz-strip button {
  display: inline-flex; align-items: center; gap: 7px;
  border: 0; background: transparent; border-radius: var(--r-pill);
  padding: 8px 14px; font-size: 13px; font-weight: 700; color: var(--slate);
  cursor: pointer; transition: background .16s, color .16s;
}
.wiz-strip button:hover { background: rgba(255,255,255,.7); }
.wiz-strip button .n { font-weight: 800; color: var(--muted-2); }
.wiz-strip button.on { background: var(--teal-800); color: #fff; }
.wiz-strip button.on .n { color: var(--mint); }
.wiz-strip button.done .n { color: var(--teal-400); }
.wiz-strip button.done .n::before { content: '✓'; }
.wiz-strip button.done .n span { display: none; }

.wiz-pane { display: none; }
.wiz-pane.on { display: block; animation: rise .3s ease; }
.wiz-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 4px; }
.wiz-head .idx {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px;
  background: var(--teal-800); color: #fff;
  display: grid; place-items: center; font-size: 16px; font-weight: 800;
}
.wiz-head h3 { font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: -.015em; }
.wiz-head p { font-size: 14px; color: var(--muted); margin-top: 2px; }

/* Petits blocs « ce que vous saisissez » */
.kv { display: grid; grid-template-columns: 200px 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { font-weight: 700; color: var(--ink); }
.kv dd { color: var(--slate); margin: 0; }
@media (max-width: 720px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 8px; } }

/* Segments Oui/Non & Froid/Tiède/Chaud (réplique) */
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 3px; gap: 3px; }
.seg span {
  font-size: 12.5px; font-weight: 700; color: var(--muted);
  padding: 6px 16px; border-radius: 7px;
}
.seg span.on { background: var(--teal-600); color: #fff; }
.seg--cold span.on { background: var(--teal-600); }

/* KPI récap (réplique) */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 11px 12px; min-width: 0; }
.kpi em {
  font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted-2); display: block; margin-bottom: 4px;
  line-height: 1.3;
}
.kpi b {
  font-size: 18px; font-weight: 800; color: var(--ink); letter-spacing: -.02em;
  white-space: nowrap; display: block;
}
.kpi.good b { color: var(--ok); }

/* ============================================================== QUIZ === */
.q { border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; padding: 20px; }
.q + .q { margin-top: 14px; }
.q__n {
  font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--teal-500); margin-bottom: 7px;
}
.q__t { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.45; margin-bottom: 14px; }
.opts { display: grid; gap: 8px; }
.opt {
  display: flex; align-items: flex-start; gap: 11px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: #fff; padding: 12px 14px;
  font-size: 14.5px; color: var(--slate); text-align: left;
  cursor: pointer; transition: border-color .14s, background .14s;
}
.opt:hover { border-color: var(--teal-400); background: var(--teal-100); }
.opt .mk {
  flex: 0 0 20px; width: 20px; height: 20px; margin-top: 1px;
  border-radius: 6px; border: 1.5px solid var(--line-2);
  display: grid; place-items: center; font-size: 11px; font-weight: 800; color: transparent;
  transition: all .14s;
}
.opt.sel { border-color: var(--teal-500); background: var(--teal-100); }
.opt.sel .mk { background: var(--teal-500); border-color: var(--teal-500); color: #fff; }
.q.locked .opt { cursor: default; }
.q.locked .opt:hover { border-color: var(--line-2); background: #fff; }
.opt.right { border-color: var(--ok); background: var(--ok-bg); color: #065F46; }
.opt.right .mk { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.wrong { border-color: #FCA5A5; background: var(--danger-bg); color: #991B1B; }
.opt.wrong .mk { background: var(--danger); border-color: var(--danger); color: #fff; }
.q__fb {
  display: none; margin-top: 12px; padding: 12px 14px;
  border-radius: var(--r-sm); font-size: 13.5px; line-height: 1.55;
}
.q.answered .q__fb { display: block; animation: rise .28s ease; }
.q.ok .q__fb  { background: var(--ok-bg); border: 1px solid #A7F3D0; color: #065F46; }
.q.ko .q__fb  { background: var(--danger-bg); border: 1px solid #FECACA; color: #991B1B; }

.scorebox {
  display: flex; align-items: center; gap: 22px;
  background: linear-gradient(150deg, var(--teal-700), var(--teal-900));
  color: #fff; border-radius: var(--r-lg); padding: 26px 28px;
}
.scorebox .ring {
  --p: 0;
  width: 108px; height: 108px; flex: 0 0 108px; border-radius: 99px;
  background: conic-gradient(var(--mint) calc(var(--p) * 1%), rgba(255,255,255,.14) 0);
  display: grid; place-items: center;
  position: relative;
}
.scorebox .ring::after {
  content: ''; position: absolute; inset: 9px; border-radius: 99px;
  background: var(--teal-800);
}
.scorebox .ring b { position: relative; z-index: 1; font-size: 26px; font-weight: 800; }
.scorebox h3 { font-size: 21px; font-weight: 800; margin-bottom: 6px; }
.scorebox p { font-size: 14px; color: rgba(255,255,255,.72); line-height: 1.55; }

/* ============================================================ COUVERTURE */
.cover {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl);
  background: linear-gradient(145deg, #0C4646 0%, #0A3838 52%, #072E2E 100%);
  color: #fff;
  padding: 52px 48px;
}
.cover::after {
  content: ''; position: absolute; right: -120px; top: -140px;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(94,215,200,.24), transparent 68%);
}
.cover::before {
  content: ''; position: absolute; left: -80px; bottom: -180px;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(239,107,86,.2), transparent 68%);
}
.cover > * { position: relative; z-index: 1; }
.cover .eyebrow { background: rgba(94,215,200,.14); border-color: rgba(94,215,200,.3); color: var(--mint); }
.cover h1 { font-size: 46px; line-height: 1.08; font-weight: 800; letter-spacing: -.028em; }
.cover .sub { font-size: 18px; color: rgba(255,255,255,.75); margin-top: 16px; max-width: 62ch; line-height: 1.6; }
.cover .meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.cover .meta span {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--r-pill); padding: 8px 16px;
  font-size: 13px; font-weight: 700; color: rgba(255,255,255,.9);
}
.cover .meta svg { width: 15px; height: 15px; color: var(--mint); }
.cover .cta-row { margin-top: 32px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cover .resume-note { font-size: 13px; color: rgba(255,255,255,.6); font-weight: 600; }

/* Flux visuel */
.flow {
  display: grid;
  grid-template-columns: 1fr 24px 1fr 24px 1fr 24px 1fr;
  align-items: stretch;
}
.flow__node {
  min-width: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px; position: relative; z-index: 1;
}
.flow__node b { display: block; font-size: 13.5px; font-weight: 800; color: var(--ink); margin-bottom: 3px; }
.flow__node span { font-size: 11.5px; color: var(--muted); line-height: 1.45; display: block; }
.flow__node em {
  font-style: normal; display: inline-block; margin-bottom: 7px;
  font-size: 9.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: #fff; background: var(--teal-500); border-radius: 99px; padding: 2px 8px;
}
.flow__node.accent em { background: var(--coral); }
.flow__arrow { display: grid; place-items: center; color: var(--line-2); }
.flow__arrow svg { width: 16px; height: 16px; }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; }
  .flow__arrow { transform: rotate(90deg); height: 24px; }
}

/* Utilitaires */
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.center { text-align: center; }
.hide { display: none !important; }
.tag-ok, .tag-ko {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  border-radius: 99px; padding: 3px 10px;
}
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.tag-ko { background: var(--danger-bg); color: var(--danger); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translate(-50%, 20px);
  background: var(--teal-800); color: #fff;
  border-radius: var(--r-pill); padding: 11px 22px;
  font-size: 13.5px; font-weight: 700;
  box-shadow: var(--sh-pop);
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Responsive shell */
@media (max-width: 900px) {
  :root { --shell-nav: 0px; }
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  .stage { padding: 24px 18px 32px; }
  .topbar { padding: 12px 18px; }
  h1.title { font-size: 30px; }
  .cover { padding: 34px 24px; }
  .cover h1 { font-size: 32px; }
  .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; }
  .fields, .fields.three { grid-template-columns: 1fr; }
}

@media print { .rail, .actionbar, .topbar { display: none; } .screen { display: block !important; } }

/* ==========================================================================
   Simulation jouable du parcours (assets/sim.js)
   ========================================================================== */
input.ctrl, select.ctrl, textarea.ctrl {
  font-family: inherit;
  appearance: none; -webkit-appearance: none;
  display: block; width: 100%;
  outline: 0;
}
input.ctrl::placeholder { color: var(--muted-2); font-weight: 500; }
input.ctrl:hover, select.ctrl:hover { border-color: var(--teal-400); }
input.ctrl:focus, select.ctrl:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(49, 112, 123, .14);
}
select.ctrl {
  cursor: pointer; padding-right: 34px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 15px;
}
input.ctrl[type="date"] { padding-right: 10px; }
input.ctrl:not(:placeholder-shown), select.ctrl:valid { border-color: var(--teal-400); }
select.ctrl:invalid, select.ctrl option[value=""]:checked { color: var(--muted-2); }

/* Segments cliquables */
.seg span { cursor: pointer; user-select: none; transition: background .14s, color .14s; }
.seg span:hover:not(.on) { background: var(--surface-3); color: var(--ink); }

/* Champ mis en évidence quand on clique une étiquette « élément manquant » */
.f.is-flash > label { color: var(--coral-600); }
.f.is-flash .ctrl {
  border-color: var(--coral);
  animation: flashField 1.8s ease;
}
@keyframes flashField {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 107, 86, 0); }
  15%, 65% { box-shadow: 0 0 0 6px rgba(239, 107, 86, .22); }
}

/* Barre de navigation interne à la simulation */
.wiz-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--line);
}
.wiz-nav__mid {
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted-2);
}
.wiz-strip button[disabled] { cursor: not-allowed; }

/* Liens « champ manquant » dans l'encadré d'avertissement */
.miss-link {
  cursor: pointer; font-weight: 800; text-decoration: underline;
  text-underline-offset: 2px;
}
.miss-link:hover { color: var(--coral-600); }

/* Étiquettes cliquables du récapitulatif */
.missing .tags span[data-goto] { cursor: pointer; transition: background .14s, border-color .14s; }
.missing .tags span[data-goto]:hover { background: var(--warn-line); border-color: var(--warn); }

/* La simulation défile si l'écran est étroit */
#simRoot { align-items: stretch; }
#simRoot .app-canvas { overflow-x: auto; }
@media (max-width: 1080px) { .fin-grid { grid-template-columns: 1fr !important; } }
@media (max-width: 900px)  { #simRoot .app-rail { display: none; } }
