/* ============================================================
   LexEase — Feuille de style client particulier
   ============================================================ */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── VARIABLES ── */
:root {
  --blue:      #2563eb;
  --blue-dark: #1d4ed8;
  --blue-pale: #eff6ff;
  --blue-ring: #bfdbfe;
  --blue-bg:   #eff6ff;
  --ink:       #0f172a;
  --ink-soft:  #475569;
  --ink-muted: #94a3b8;
  --ink-mid:   #334155;
  --surface:   #f8fafc;
  --card:      #ffffff;
  --border:    #e2e8f0;
  --border-md: #cbd5e1;
  --green:     #16a34a;
  --green-pale:#f0fdf4;
  --green-ring:#bbf7d0;
  --green-bg:  #f0fdf4;
  --amber:     #d97706;
  --amber-pale:#fffbeb;
  --amber-ring:#fde68a;
  --amber-bg:  #fffbeb;
  --red:       #dc2626;
  --red-bg:    #fef2f2;
  --red-ring:  #fecaca;
  --red-line:  #fecaca;
  --blue-line: #bfdbfe;
  --amber-line:#fde68a;
  --green-line:#bbf7d0;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--surface);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 620px; margin: 0 auto; padding: 20px 16px 60px; }

/* ── CARD PRINCIPALE ── */
.shell {
  background: var(--card);
  border-radius: 24px;
  box-shadow: 0 2px 4px rgba(0,0,0,.04), 0 8px 32px rgba(0,0,0,.08);
  overflow: hidden;
}

/* ── EN-TÊTE ── */
.app-header {
  padding: 20px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.app-logo { display: flex; align-items: center; gap: 10px; }
.app-logo i { color: var(--blue); font-size: 20px; }
.app-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 19px; font-weight: 700; color: var(--ink);
  letter-spacing: -.3px;
}
.app-tagline { font-size: 12px; color: var(--ink-muted); }

/* ── PROGRESS ── */
.progress-track {
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.steps-row {
  display: flex; align-items: flex-start;
  position: relative;
  padding: 14px 0 10px;
}
.steps-row::before {
  content: '';
  position: absolute;
  top: 26px; left: 20px; right: 20px;
  height: 1.5px; background: var(--border); z-index: 0;
}
.step-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 5px;
  position: relative; z-index: 1;
}
.step-dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  color: var(--ink-muted);
  transition: background .25s, color .25s;
}
.step-label {
  font-size: 10px; color: var(--ink-muted); font-weight: 500;
  text-align: center; white-space: nowrap;
  transition: color .25s;
}
.progression-step.active .step-dot { background: var(--blue); color: #fff; }
.progression-step.active .step-label { color: var(--blue); font-weight: 600; }
.progression-step[data-etape="0"],
.progression-step[data-etape="4"] { display: none; }

/* ── ÉCRANS ── */
.ecran-container { display: none; }
.ecran-container.visible { display: block; }
.ecran-body { padding: 28px 24px 20px; }
.nav-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  gap: 12px;
}
.nav-row .btn-primary { margin-left: auto; }

/* ── BOUTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; border: none;
  font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all .16s; text-decoration: none;
}
.btn-primary {
  background: var(--blue); color: #fff;
  box-shadow: 0 1px 6px rgba(37,99,235,.25);
}
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  background: #93c5fd; box-shadow: none;
  cursor: not-allowed; transform: none;
}
.btn-secondary {
  background: var(--surface); color: var(--ink-soft);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }
.btn-large { padding: 14px 24px; font-size: 15px; width: 100%; justify-content: center; }

/* ── ÉCRAN 0 : LANDING ── */
.landing-micro { text-align: center; padding: 32px 24px 24px; }
.landing-micro h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 27px; font-weight: 700;
  color: var(--ink); letter-spacing: -.4px;
  line-height: 1.25; margin-bottom: 8px;
}
.landing-micro h1 em { font-style: italic; color: var(--blue); }
.landing-micro p { font-size: 14px; color: var(--ink-soft); margin: 0 0 24px; line-height: 1.55; }
.landing-trust { display: flex; justify-content: center; gap: 20px; margin-bottom: 28px; }
.trust-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-muted); }
.trust-item i { color: var(--green); font-size: 13px; }

/* ── ÉCRAN 1 : SAISIE ── */
.screen-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px; font-weight: 700;
  color: var(--ink); letter-spacing: -.3px;
  margin: 0 0 4px;
}
.screen-sub { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 20px; line-height: 1.55; }

.guide-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.guide-pill {
  padding: 7px 14px;
  border: 1.5px solid var(--blue-ring);
  border-radius: 50px;
  background: var(--blue-pale);
  color: var(--blue-dark);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  display: flex; align-items: center; gap: 6px;
}
.guide-pill:hover {
  background: var(--blue); color: #fff;
  border-color: var(--blue);
  transform: translateY(-1px);
}

#editor {
  min-height: 130px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14.5px; line-height: 1.65;
  color: var(--ink); font-family: inherit;
  margin-bottom: 14px;
  outline: none; transition: border-color .2s;
  overflow-y: auto; max-height: 240px;
}
#editor:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
#editor.placeholder-text { color: var(--ink-muted); font-style: italic; }

.mode-row { display: flex; gap: 8px; margin-bottom: 10px; }
.mode-btn {
  flex: 1; padding: 9px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: all .18s;
}
.mode-btn.active, .mode-btn:hover {
  border-color: var(--blue); background: var(--blue-pale); color: var(--blue);
}

.audio-controls.hidden, .text-controls.hidden { display: none; }
.audio-controls, .text-controls { margin-top: 4px; }
.meter-wrap { margin-bottom: 10px; }
.meter-label {
  font-size: 12px; color: var(--ink-soft); margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.status-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 20px; background: #fee2e2; color: var(--red);
}
.status-badge.recording { background: var(--green-pale); color: var(--green); }
#meter { width: 100%; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
#level {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #22c55e, #86efac);
  border-radius: 3px; transition: width .1s;
}
.audio-btns { display: flex; gap: 8px; margin-top: 8px; }
.audio-btn {
  flex: 1; padding: 10px; border-radius: 9px; border: none;
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--blue); color: #fff; transition: background .18s;
}
.audio-btn.hidden { display: none; }
.audio-btn.stop { background: var(--red); }
.audio-btn:hover { opacity: .88; }

.privacy-hint {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; color: var(--ink-muted);
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 8px;
  margin-top: 8px;
}
.privacy-hint i { color: var(--ink-muted); margin-top: 1px; flex-shrink: 0; }

/* ── ÉCRAN 2 : VÉRIFICATION ── */
.situation-display {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  font-size: 14.5px; line-height: 1.7;
  color: var(--ink);
  min-height: 80px; margin-bottom: 6px;
  transition: border-color .2s;
}
.situation-display:focus { border-color: var(--blue); outline: none; }
.edit-hint {
  font-size: 12px; color: var(--ink-muted);
  display: flex; align-items: center; gap: 5px;
  margin-bottom: 16px;
}
#inputSourceMessage { font-size: 13px; color: var(--green); }

.source-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 50px;
  background: var(--green-pale); border: 1px solid var(--green-ring);
  font-size: 13px; color: #15803d;
  margin-bottom: 14px;
}

/* ── ÉCRAN 3 : RÉSULTATS ── */
.loading-block { text-align: center; padding: 40px 20px; }
.loading-block.hidden { display: none; }
.spinner-ring {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block p { color: var(--ink-soft); font-size: 14px; margin: 0; }
.loading-block small { color: var(--ink-muted); font-size: 12px; display: block; margin-top: 5px; }

.result-section { margin-bottom: 20px; }
.result-section-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px;
  color: var(--ink-muted);
  margin: 0 0 10px;
  display: flex; align-items: center; gap: 6px;
}
.result-section-title i { color: var(--blue); font-size: 13px; }

#legalDomains { display: flex; flex-wrap: wrap; gap: 8px; }
.domaine-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: var(--blue-pale); border: 1.5px solid var(--blue-ring);
  border-radius: 50px;
  font-size: 14px; font-weight: 600; color: #1d4ed8;
}

#legalRules {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
#legalRules li {
  background: var(--surface);
  border-left: 3px solid var(--blue);
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  font-size: 13.5px; line-height: 1.55; color: #334155;
}

#legalReformulation > div { margin-bottom: 0; }
#legalReformulation p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.55; }
#legalReformulation p:last-child { margin: 0; }
#legalReformulation strong { color: var(--ink); }
#legalReformulation span { color: var(--ink-soft); }

.grille-point {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.grille-point:last-of-type { border-bottom: none; margin-bottom: 0; }
.grille-domaine {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px;
  color: var(--blue); background: var(--blue-pale);
  border: 1px solid var(--blue-ring);
  border-radius: 4px; padding: 2px 8px;
  margin-bottom: 8px;
}
.grille-corps p { margin: 0 0 7px; font-size: 13.5px; line-height: 1.6; color: var(--ink); }
.grille-demarche {
  margin-top: 8px !important;
  font-size: 13px !important;
  color: var(--ink-soft) !important;
  font-style: italic;
  padding-left: 10px;
  border-left: 2px solid var(--border-md);
}
.grille-cloture {
  margin-top: 14px;
  font-size: 12px; color: var(--ink-muted);
  font-style: italic; line-height: 1.5;
}

.point-sensible-item {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13.5px; line-height: 1.5;
  padding: 9px 12px; margin-bottom: 7px;
  border-radius: 8px;
}
.point-sensible-item:last-child { margin-bottom: 0; }
.point-sensible-icon { flex-shrink: 0; font-weight: 700; margin-top: 1px; }
.point-sensible-txt { color: inherit; }
.point-sensible-label { font-weight: 700; }

.point-sensible-item.niveau-amber {
  background: var(--amber-pale); border: 1px solid var(--amber-ring); color: var(--ink-soft);
}
.point-sensible-item.niveau-amber .point-sensible-icon { color: var(--amber); }

.point-sensible-item.niveau-rouge {
  background: var(--red-bg); border: 1px solid var(--red-ring); color: #7f1d1d;
}
.point-sensible-item.niveau-rouge .point-sensible-icon { color: var(--red); }

.placeholder-tag { font-size: 13px; color: var(--ink-muted); font-style: italic; }
.placeholder-text { color: var(--ink-muted); font-style: italic; }

.legal-note {
  font-size: 11px; color: var(--ink-muted);
  border-top: 1px solid var(--border);
  padding-top: 14px; margin-top: 20px;
  line-height: 1.55;
  display: flex; gap: 6px; align-items: flex-start;
}
.legal-note i { color: var(--border-md); margin-top: 1px; font-size: 11px; }

.analysis-ready-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, var(--blue) 100%);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 20px;
  display: none;
  color: #fff;
}
.analysis-ready-banner.show { display: block; }
.analysis-ready-banner .banner-label {
  font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; opacity: .75; margin-bottom: 6px;
}
.analysis-ready-banner h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px; font-weight: 700; margin-bottom: 6px;
}
.analysis-ready-banner p { font-size: 13px; opacity: .85; }

/* ── ÉCRAN 5 : RDV ── */
.rdv-hero { text-align: center; padding: 20px 0 24px; }
.rdv-hero i { font-size: 48px; color: var(--blue); display: block; margin-bottom: 14px; }
.rdv-hero h3 { font-size: 20px; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.rdv-hero p { font-size: 14px; color: var(--ink-soft); margin: 0; line-height: 1.55; }

.value-prop {
  background: var(--blue-pale);
  border: 1.5px solid var(--blue-ring);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  display: flex; gap: 12px; align-items: flex-start;
}
.value-prop i { color: var(--blue); font-size: 18px; margin-top: 2px; flex-shrink: 0; }
.value-prop strong { font-size: 14px; color: var(--ink); display: block; margin-bottom: 4px; }
.value-prop p { font-size: 13px; color: var(--ink-soft); margin: 0; }

.rdv-confirmation { display: none; text-align: center; padding: 32px 16px; }
.rdv-confirmation.show { display: block; }
.rdv-confirmation i { font-size: 52px; color: var(--green); display: block; margin-bottom: 14px; }
.rdv-confirmation h4 { font-size: 20px; font-weight: 700; color: var(--ink); margin: 0 0 10px; }
.rdv-slot-confirm { font-size: 16px; font-weight: 600; color: var(--blue); margin: 10px 0; }
.rdv-confirmation p { color: var(--ink-soft); font-size: 13.5px; margin: 0; }

/* ── PLANNING MODAL ── */
.planning-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  z-index: 1000; display: none;
  align-items: flex-end; justify-content: center;
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-height: 600px) { .planning-overlay { align-items: center; } }
.planning-overlay.show { display: flex; }
.planning-modal {
  background: var(--card); border-radius: 20px 20px 12px 12px;
  width: 100%; max-width: 540px; max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  animation: slideUp .28s ease-out;
}
@media (min-height: 600px) { .planning-modal { border-radius: 20px; } }
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.planning-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; background: var(--card); z-index: 10;
}
.planning-header h3 { font-size: 17px; font-weight: 700; color: var(--ink); margin: 0; }
.planning-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: var(--surface);
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); transition: background .15s;
}
.planning-close:hover { background: var(--border); }
.planning-body { padding: 16px 20px; }
.planning-loading { text-align: center; padding: 36px 20px; color: var(--ink-soft); }
.planning-loading .spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border); border-top-color: var(--blue);
  border-radius: 50%; animation: spin .8s linear infinite;
  margin: 0 auto 14px;
}
.planning-empty { text-align: center; padding: 36px 20px; color: var(--ink-soft); }
.planning-empty i { font-size: 40px; color: var(--border); margin-bottom: 14px; display: block; }
.planning-empty p { font-size: 14px; }

.juriste-bloc { margin-bottom: 16px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.juriste-bloc-header {
  background: var(--surface); padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border);
}
.juriste-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px;
}
.juriste-name { font-weight: 600; color: var(--ink); font-size: 14px; }
.juriste-slots { padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.slot-btn {
  padding: 8px 14px;
  border: 1.5px solid var(--blue);
  border-radius: 50px; background: var(--card);
  color: var(--blue); font-size: 13px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  transition: all .18s;
}
.slot-btn:hover { background: var(--blue); color: #fff; }
.slot-btn:active { transform: scale(.96); }
.slot-btn:disabled {
  border-color: var(--border-md); color: var(--ink-muted);
  background: var(--surface); cursor: not-allowed;
}
.slot-btn:disabled:hover { background: var(--surface); color: var(--ink-muted); }

/* ── CLARIFICATION ENTITÉ ── */
.clarify-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  z-index: 1000; display: none;
  align-items: flex-end; justify-content: center;
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-height: 600px) { .clarify-overlay { align-items: center; } }
.clarify-overlay.show { display: flex; }
.clarify-modal {
  background: var(--card); border-radius: 20px 20px 12px 12px;
  width: 100%; max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  animation: slideUp .28s ease-out;
  padding: 20px;
}
@media (min-height: 600px) { .clarify-modal { border-radius: 20px; } }
.clarify-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.clarify-header h4 { font-size: 17px; font-weight: 700; color: var(--ink); margin: 0; }
.clarify-body p { font-size: 14px; color: var(--ink-soft); margin: 0 0 10px; }
.clarify-context { font-style: italic; color: var(--ink-muted); font-size: 13px; }
.clarify-choices { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

/* ── INFO CARDS ── */
.info-card {
  border-radius: 10px; padding: 12px 14px;
  margin-bottom: 12px;
  display: flex; gap: 10px; align-items: flex-start;
}
.info-card.tip  { background: var(--blue-pale); border: 1px solid var(--blue-ring); }
.info-card.warn { background: var(--amber-pale); border: 1px solid var(--amber-ring); }
.info-card.ok   { background: var(--green-pale); border: 1px solid var(--green-ring); }
.info-card i    { margin-top: 2px; font-size: 14px; flex-shrink: 0; }
.info-card.tip  i { color: var(--blue); }
.info-card.warn i { color: var(--amber); }
.info-card.ok   i { color: var(--green); }
.info-card p, .info-card strong { margin: 0; font-size: 13px; line-height: 1.5; }
.info-card p { color: var(--ink-soft); margin-top: 3px; }
.info-card strong { color: var(--ink); }

/* ============================================================
   RENDUS STRUCTURÉS — renderFiche() / renderSensibles()
   ============================================================ */
.fiche-entete { margin-bottom: 12px; }
.fiche-titre  { font-size: 20px; line-height: 1.25; margin: 0 0 8px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 12px; font-weight: 600;
  color: var(--ink-soft);
}
.tag.blue {
  background: var(--blue-pale);
  border-color: var(--blue-ring);
  color: var(--blue-dark);
}
.tag.amber {
  background: var(--amber-pale);
  border-color: var(--amber-ring);
  color: var(--amber);
}

.result {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--green-pale);
  border: 1px solid var(--green-ring);
  border-radius: 10px;
  font-size: 13.5px; line-height: 1.5;
  color: var(--ink);
}
.result small {
  display: block;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--green);
  margin-bottom: 4px;
}

.kicker {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
}

.card.takeaway {
  background: linear-gradient(135deg, #1e3a8a 0%, var(--blue) 100%);
  color: #fff;
  border: none;
}
.card.takeaway .inner { padding: 18px 20px; }
.card.takeaway .kicker {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  opacity: .78; margin-bottom: 6px; font-weight: 600;
}
.card.takeaway .answer { font-size: 15px; line-height: 1.55; }
.card.takeaway .precision {
  font-size: 13px; color: rgba(255,255,255,.82);
  margin-top: 10px; line-height: 1.5;
}

.card.section > summary {
  cursor: pointer;
  padding: 14px 18px;
  display: flex; align-items: center; gap: 10px;
  list-style: none;
  font-size: 14px; font-weight: 600; color: var(--ink);
}
.card.section > summary::-webkit-details-marker { display: none; }
.card.section > summary > span:nth-child(2) {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.card.section > summary .icon {
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue-pale); color: var(--blue);
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.card.section > summary .st { display: block; }
.card.section > summary .sh {
  display: block; font-size: 12px; font-weight: 400; color: var(--ink-muted);
}
.card.section .body { padding: 0 18px 16px; }
.card.section.objective > summary .icon { background: var(--green-pale); color: var(--green); }
.card.section.examine   > summary .icon { background: var(--amber-pale); color: var(--amber); }
.card.section.neutral   > summary .icon { background: var(--surface);    color: var(--ink-soft); }
.card.section.options   > summary .icon { background: var(--blue-pale);  color: var(--blue); }

.card.section .body p {
  margin: 0 0 8px; font-size: 13.5px; line-height: 1.55; color: var(--ink-soft);
}
.card.section .body p:last-child { margin-bottom: 0; }
.card.section .body p strong { color: var(--ink); }

.calc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.metric {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px;
  display: flex; flex-direction: column; gap: 2px;
  min-width: 100px;
}
.metric span {
  font-size: 11px; color: var(--ink-muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.metric b { font-size: 14px; color: var(--ink); }

.indices { display: flex; flex-direction: column; gap: 8px; }
.indice {
  background: var(--surface); border-radius: 8px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.indice small {
  font-size: 11px; color: var(--ink-muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.indice strong { font-size: 13.5px; color: var(--ink); font-weight: 600; }
.status {
  display: inline-block; align-self: flex-start;
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 20px; margin-top: 4px;
}
.status.examine { background: var(--amber-pale); color: var(--amber); }
.status.missing { background: var(--red-bg);     color: var(--red); }
.status.known   { background: var(--green-pale); color: var(--green); }

.why {
  margin-top: 12px; padding: 10px 12px;
  background: var(--surface); border-radius: 8px; font-size: 13px;
}
.why strong { color: var(--ink); }
.why ul { margin: 6px 0 0; padding-left: 18px; }
.why li { margin-bottom: 4px; color: var(--ink-soft); }

.horizon { display: flex; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.h { flex: 1 1 180px; padding: 10px 12px; border-radius: 8px; font-size: 13px; line-height: 1.5; }
.h b {
  display: block; font-size: 11px; text-transform: uppercase;
  letter-spacing: .04em; margin-bottom: 4px;
}
.h.past   { background: var(--surface);   color: var(--ink-soft); }
.h.future { background: var(--blue-pale); color: #1d4ed8; }

.steps { margin: 0; padding-left: 0; list-style: none; counter-reset: step; }
.steps li {
  counter-increment: step; position: relative;
  padding: 10px 0 10px 36px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px; line-height: 1.55;
}
.steps li:last-child { border-bottom: none; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 10px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.steps li strong { display: block; color: var(--ink); margin-bottom: 2px; }

.list { list-style: none; padding: 0; margin: 0; }
.list li {
  padding: 8px 0 8px 20px; border-bottom: 1px solid var(--border);
  font-size: 13.5px; line-height: 1.55; color: var(--ink-soft);
  position: relative;
}
.list li:last-child { border-bottom: none; }
.list li:before {
  content: "→"; position: absolute; left: 0; top: 8px;
  color: var(--amber); font-weight: 700;
}
.list li.deadline {
  background: var(--red-bg);
  border-radius: 8px;
  padding: 10px 10px 10px 30px;
  border-bottom: none;
  color: #7f1d1d;
}
.list li.deadline:before { color: var(--red); top: 10px; }

.conclusion {
  margin-top: 12px; padding: 12px 14px;
  background: var(--blue-pale); border: 1px solid var(--blue-ring);
  border-radius: 10px; font-size: 13.5px; line-height: 1.55;
  color: var(--ink-soft);
}

/* ============================================================
   ENVELOPPE P1 — écran 3 (résultats)
   ============================================================ */
#ecran3 .brand {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; font-size: 13px; color: var(--ink-muted);
}
#ecran3 .brand b { color: var(--blue); font-size: 15px; }

#ecran3 .context {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue-line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 15px;
  line-height: 1.55;
}
#ecran3 .context small {
  display: block; font-size: 11px; color: var(--ink-muted);
  text-transform: uppercase; letter-spacing: .08em;
  font-weight: 700; margin-bottom: 6px;
}
#ecran3 .context p { margin: 0; }

#p1Titre {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px; line-height: 1.2;
  font-weight: 700; letter-spacing: -.3px;
  color: var(--ink);
  margin: 0 0 8px;
}

#p1Tags { margin-bottom: 16px; }

#ecran3 .card.section > summary .sh {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}

#ecran3 .sources {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px;
}
#ecran3 .source {
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 8px;
  background: var(--surface);
  color: var(--ink-soft);
}

#ecran3 .legend {
  display: flex; gap: 10px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--ink-muted);
  margin-top: 6px;
}

#ecran3 .secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
#ecran3 .secondary-actions .sec {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 700; font-size: 14px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all .15s;
}
#ecran3 .secondary-actions .sec:hover {
  border-color: var(--blue-ring);
  background: var(--blue-pale);
}
#ecran3 .secondary-actions .sec small {
  display: block;
  font-weight: 500; font-size: 11.5px;
  color: var(--ink-muted);
  margin-top: 2px;
}

#ecran3 .scope {
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 10px;
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 14px;
  line-height: 1.55;
}
#ecran3 .scope strong { color: var(--ink-mid); }

#ecran3 .ecran-body { padding-bottom: 130px; }

/* Dock collant — CTA principal
   MODIFIÉ : bouton centré, texte masqué (Option 2) */
#p1Dock.dock {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: rgba(248,250,252,.96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-top: 1px solid var(--border);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  z-index: 50;
}
#p1Dock .in {
  max-width: 620px; margin: 0 auto;
  display: flex; align-items: center;
  justify-content: center; /* <-- CORRECTIF : centre le bouton */
}
#p1Dock .txt {
  display: none; /* <-- CORRECTIF : masque le texte */
}
#p1Dock .pri {
  background: #185FA5;
  border: 1px solid #185FA5;
  color: #fff;
  white-space: nowrap;
  border-radius: 10px;
  padding: 12px 20px; /* <-- légèrement élargi pour l'équilibre */
  font-weight: 700; font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
}
#p1Dock .pri:hover { background: #134a80; }
#p1Dock .pri:disabled { opacity: .55; cursor: not-allowed; }
#p1Dock .pri:disabled:hover { background: #185FA5; }

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .ecran-body { padding: 22px 18px 16px; }
  .nav-row { padding: 14px 18px 18px; }
  .app-header { padding: 16px 18px; }
}

@media (max-width: 520px) {
  #ecran3 .secondary-actions { grid-template-columns: 1fr; }
  #p1Dock .pri { width: 100%; }
  #p1Titre { font-size: 20px; }
  #ecran3 .horizon { flex-direction: column; }
}

/* ── ACTIONS POST-RDV ── */
.post-rdv-actions {
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.post-rdv-actions .btn {
  flex: 1 1 auto;
  justify-content: center;
  min-width: 130px;
}
/* CORRECTIF : neutralise le margin-left:auto hérité de .nav-row .btn-primary */
.post-rdv-actions .btn-primary {
  margin-left: 0;
}
@media (max-width: 520px) {
  .post-rdv-actions {
    flex-direction: column;
  }
  .post-rdv-actions .btn {
    width: 100%;
  }
}