/* ==================================================================
   Diag Fluide — Design system
   Direction artistique : cabinet de stratégie contemporain + magazine
   éditorial. Chaleureux, sobre, minéral. Pas de bleu corporate, pas
   de robot, pas d'engrenage.
   ================================================================== */

:root {
  /* --- Fonds : papier chaud, jamais blanc pur --- */
  --paper: #faf7f2;
  --paper-deep: #f3ede3;
  --paper-card: #ffffff;
  --paper-tint: #efe8dc;

  /* --- Encres : noir chaud, jamais #000 --- */
  --ink: #1b1815;
  --ink-soft: #4a443c;
  --ink-mute: #7d746a;
  --ink-faint: #a89e91;
  --rule: #e0d7c9;
  --rule-soft: #ebe4d8;

  /* --- Accent principal : terre cuite --- */
  --clay: #b4472f;
  --clay-soft: #cf7057;
  --clay-wash: #f7e9e3;

  /* --- Accent secondaire : ocre --- */
  --ochre: #b5872b;
  --ochre-wash: #f8f0dc;

  /* --- Accent tertiaire : vert profond --- */
  --moss: #4a6b4a;
  --moss-wash: #e8eee6;

  /* --- Signal d'alerte doux --- */
  --plum: #7c4a5c;
  --plum-wash: #f5e9ee;

  /* --- Niveaux de score --- */
  --lvl-solide: #4a6b4a;
  --lvl-correct: #8a7b3f;
  --lvl-fragile: #c07a3a;
  --lvl-critique: #b4472f;

  /* --- Typographie --- */
  --display: 'Fraunces', 'Georgia', serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* --- Rythme --- */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(27, 24, 21, 0.04), 0 2px 8px rgba(27, 24, 21, 0.03);
  --shadow-md: 0 2px 4px rgba(27, 24, 21, 0.04), 0 8px 24px rgba(27, 24, 21, 0.06);
  --shadow-lg: 0 4px 8px rgba(27, 24, 21, 0.05), 0 20px 48px rgba(27, 24, 21, 0.09);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ------------------------------------------------------------------ */
/* Base                                                               */
/* ------------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: 'kern' 1, 'liga' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.022em;
  margin: 0;
  font-variation-settings: 'SOFT' 20, 'WONK' 1;
}

h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.1rem);
}
h2 {
  font-size: clamp(1.85rem, 3.3vw, 2.85rem);
}
h3 {
  font-size: clamp(1.3rem, 2vw, 1.72rem);
}
h4 {
  font-size: 1.12rem;
  letter-spacing: -0.012em;
}

p {
  margin: 0 0 1em;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

::selection {
  background: var(--clay);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ------------------------------------------------------------------ */
/* Layout                                                             */
/* ------------------------------------------------------------------ */

.wrap {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 26px;
}

.wrap-narrow {
  max-width: 760px;
}
.wrap-tight {
  max-width: 620px;
}

.section {
  padding: 82px 0;
}
.section-sm {
  padding: 50px 0;
}

.eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 18px;
}

.lead {
  font-size: clamp(1.08rem, 1.5vw, 1.28rem);
  color: var(--ink-soft);
  line-height: 1.62;
  max-width: 62ch;
}

.muted {
  color: var(--ink-mute);
}
.small {
  font-size: 0.875rem;
  line-height: 1.55;
}
.tiny {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-mute);
}

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

/* ------------------------------------------------------------------ */
/* En-tête public                                                     */
/* ------------------------------------------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--rule-soft);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 7px;
  background: var(--ink);
  position: relative;
  overflow: hidden;
}

.brand-mark::after {
  content: '';
  position: absolute;
  inset: 7px 7px auto 7px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--paper);
  box-shadow: 0 5px 0 var(--clay-soft), 0 10px 0 var(--paper);
}

.brand-mark::before {
  content: '';
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--clay);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.nav-links a {
  transition: color 0.2s var(--ease);
}
.nav-links a:hover {
  color: var(--ink);
}

/* ------------------------------------------------------------------ */
/* Boutons                                                            */
/* ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 100px;
  font-size: 0.94rem;
  font-weight: 550;
  letter-spacing: -0.008em;
  transition: all 0.24s var(--ease);
  white-space: nowrap;
  line-height: 1.2;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(27, 24, 21, 0.2);
}

.btn-clay {
  background: var(--clay);
  color: #fff;
}
.btn-clay:hover {
  background: #9e3d28;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(180, 71, 47, 0.26);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: rgba(27, 24, 21, 0.03);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
}
.btn-sm {
  padding: 9px 16px;
  font-size: 0.85rem;
}
.btn-block {
  width: 100%;
}
.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-text {
  background: none;
  border: 0;
  padding: 0;
  color: var(--clay);
  font-size: 0.9rem;
  font-weight: 550;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}
.btn-text:hover {
  border-bottom-color: var(--clay);
}

/* ------------------------------------------------------------------ */
/* Cartes                                                            */
/* ------------------------------------------------------------------ */

.card {
  background: var(--paper-card);
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-lg);
  padding: 28px;
}

.card-flush {
  padding: 0;
  overflow: hidden;
}

.card-lift {
  transition: transform 0.32s var(--ease), box-shadow 0.32s var(--ease), border-color 0.32s var(--ease);
}
.card-lift:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--rule);
}

.card-wash {
  background: var(--paper-deep);
  border-color: transparent;
}

.grid {
  display: grid;
  gap: 22px;
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.grid-1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
}

/* ------------------------------------------------------------------ */
/* Landing — héro                                                     */
/* ------------------------------------------------------------------ */

.hero {
  position: relative;
  padding: 96px 0 72px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -280px;
  right: -220px;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180, 71, 47, 0.09) 0%, rgba(180, 71, 47, 0) 68%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -320px;
  left: -240px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 107, 74, 0.07) 0%, rgba(74, 107, 74, 0) 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: 17ch;
  margin-bottom: 26px;
}

.hero h1 em {
  font-style: italic;
  color: var(--clay);
  font-variation-settings: 'SOFT' 60, 'WONK' 1;
}

.hero-lead {
  font-size: clamp(1.1rem, 1.7vw, 1.34rem);
  color: var(--ink-soft);
  max-width: 54ch;
  line-height: 1.6;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 22px;
}

.hero-note {
  font-size: 0.83rem;
  color: var(--ink-mute);
}

/* Ordre pédagogique : SUPPRIMER → … → AUTOMATISER */
.logic-chain {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  margin: 52px 0 0;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.logic-step {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 4px 15px;
  position: relative;
  transition: color 0.3s var(--ease);
}

.logic-step:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -5px;
  color: var(--rule);
  font-weight: 400;
}

.logic-step.is-on {
  color: var(--clay);
}

/* ------------------------------------------------------------------ */
/* Blocs de contenu                                                   */
/* ------------------------------------------------------------------ */

.promise {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.24;
  letter-spacing: -0.02em;
  font-weight: 400;
  max-width: 26ch;
}

.promise em {
  font-style: italic;
  color: var(--clay);
}

.feature {
  padding: 26px 0;
  border-top: 1px solid var(--rule);
}

.feature-num {
  font-family: var(--display);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--clay);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.feature h4 {
  margin-bottom: 9px;
}

.feature p {
  color: var(--ink-soft);
  font-size: 0.94rem;
  margin: 0;
}

.quote-block {
  background: var(--paper-deep);
  border-radius: var(--r-xl);
  padding: 46px 44px;
  position: relative;
}

.quote-block p {
  font-family: var(--display);
  font-size: clamp(1.24rem, 2.2vw, 1.72rem);
  line-height: 1.36;
  letter-spacing: -0.018em;
  margin: 0;
  max-width: 40ch;
}

/* Deux niveaux de diagnostic */
.path-card {
  background: var(--paper-card);
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.32s var(--ease);
}

.path-card:hover {
  border-color: var(--rule);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.path-card.is-pro {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.path-card.is-pro .path-meta,
.path-card.is-pro .path-desc {
  color: rgba(250, 247, 242, 0.68);
}

.path-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.path-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--clay);
}

.path-card.is-pro .path-kicker {
  color: var(--clay-soft);
}

.path-card h3 {
  margin-bottom: 12px;
}

.path-desc {
  color: var(--ink-soft);
  font-size: 0.95rem;
  flex: 1;
  margin-bottom: 22px;
}

.path-meta {
  font-size: 0.82rem;
  color: var(--ink-mute);
  margin-bottom: 20px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.path-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  font-size: 0.92rem;
}

.path-list li {
  padding: 7px 0 7px 22px;
  position: relative;
  color: var(--ink-soft);
}

.path-card.is-pro .path-list li {
  color: rgba(250, 247, 242, 0.86);
}

.path-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15px;
  width: 9px;
  height: 1.5px;
  background: var(--clay);
}

.path-card.is-pro .path-list li::before {
  background: var(--clay-soft);
}

/* ------------------------------------------------------------------ */
/* Questionnaire                                                      */
/* ------------------------------------------------------------------ */

.quiz-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.quiz-top {
  border-bottom: 1px solid var(--rule-soft);
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.quiz-top-inner {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.quiz-section-name {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  white-space: nowrap;
}

.progress-track {
  flex: 1;
  height: 3px;
  background: var(--rule-soft);
  border-radius: 3px;
  overflow: hidden;
  min-width: 60px;
}

.progress-fill {
  height: 100%;
  background: var(--clay);
  border-radius: 3px;
  transition: width 0.5s var(--ease);
  width: 0;
}

.quiz-counter {
  font-size: 0.8rem;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.quiz-body {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 58px 26px 120px;
}

.quiz-stage {
  width: 100%;
  max-width: 690px;
}

.q-enter {
  animation: qIn 0.44s var(--ease-out) both;
}

@keyframes qIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.q-section {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 16px;
}

.q-label {
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.7vw, 1.95rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0 0 14px;
}

.q-help {
  font-size: 0.92rem;
  color: var(--ink-mute);
  margin: 0 0 30px;
  max-width: 54ch;
  line-height: 1.55;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.opt {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 18px 21px;
  background: var(--paper-card);
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-md);
  text-align: left;
  transition: all 0.2s var(--ease);
  font-size: 0.98rem;
  color: var(--ink);
  line-height: 1.45;
  width: 100%;
}

.opt:hover {
  border-color: var(--ink-faint);
  transform: translateX(3px);
}

.opt.is-sel {
  border-color: var(--clay);
  background: var(--clay-wash);
  box-shadow: 0 0 0 1px var(--clay);
}

.opt-mark {
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 1.5px solid var(--rule);
  margin-top: 1px;
  position: relative;
  transition: all 0.2s var(--ease);
}

.opt.check .opt-mark {
  border-radius: 5px;
}

.opt.is-sel .opt-mark {
  border-color: var(--clay);
  background: var(--clay);
}

.opt.is-sel .opt-mark::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2.5px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(43deg);
}

.opt-body {
  flex: 1;
}

.opt-hint {
  display: block;
  font-size: 0.845rem;
  color: var(--ink-mute);
  margin-top: 3px;
}

.opt.is-sel .opt-hint {
  color: var(--ink-soft);
}

/* Curseur d'intensité */
.scale-wrap {
  padding: 6px 0 0;
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--ink-mute);
  margin-bottom: 16px;
  gap: 12px;
}

.scale-labels span:last-child {
  text-align: right;
}

.scale-mid {
  text-align: center;
  font-size: 0.84rem;
  color: var(--ink-faint);
  margin: -4px 0 14px;
}

.scale-dots {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.scale-dot {
  flex: 1;
  height: 52px;
  background: var(--paper-card);
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-sm);
  color: var(--ink-mute);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s var(--ease);
  font-variant-numeric: tabular-nums;
}

.scale-dot:hover {
  border-color: var(--ink-faint);
  color: var(--ink);
}

.scale-dot.is-sel {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.scale-readout {
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
  min-height: 22px;
}

/* Réponse libre */
.free-wrap {
  position: relative;
}

.free-input {
  width: 100%;
  padding: 19px 21px;
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-md);
  background: var(--paper-card);
  color: var(--ink);
  line-height: 1.55;
  resize: vertical;
  min-height: 108px;
  transition: border-color 0.2s var(--ease);
}

.free-input::placeholder {
  color: var(--ink-faint);
}

.free-input:focus {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(180, 71, 47, 0.1);
}

.optional-tag {
  font-size: 0.78rem;
  color: var(--ink-faint);
  font-style: italic;
  margin-top: 10px;
  display: block;
}

/* Pied du questionnaire */
.quiz-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--rule-soft);
}

/* Message intermédiaire */
.interstitial {
  text-align: center;
  padding: 30px 0;
}

.interstitial-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--clay-wash);
  position: relative;
}

.interstitial-icon::after {
  content: '';
  position: absolute;
  left: 13px;
  top: 13px;
  width: 8px;
  height: 13px;
  border: solid var(--clay);
  border-width: 0 2px 2px 0;
  transform: rotate(43deg);
}

.interstitial p {
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.4vw, 1.62rem);
  line-height: 1.32;
  letter-spacing: -0.018em;
  color: var(--ink);
  max-width: 40ch;
  margin: 0 auto 28px;
}

/* ------------------------------------------------------------------ */
/* Scores et graphiques                                              */
/* ------------------------------------------------------------------ */

.score-hero {
  display: flex;
  align-items: center;
  gap: 34px;
  flex-wrap: wrap;
}

.score-dial {
  flex: 0 0 176px;
  width: 176px;
  height: 176px;
  position: relative;
}

.score-dial svg {
  transform: rotate(-90deg);
  overflow: visible;
}

.dial-track {
  fill: none;
  stroke: var(--rule-soft);
  stroke-width: 9;
}

.dial-value {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.3s var(--ease-out);
}

.dial-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dial-num {
  font-family: var(--display);
  font-size: 3rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.dial-den {
  font-size: 0.8rem;
  color: var(--ink-mute);
  margin-top: 2px;
}

.score-caption {
  font-size: 0.8rem;
  color: var(--ink-mute);
  max-width: 34ch;
  line-height: 1.5;
}

/* Barres de sous-scores */
.bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bar-row {
  display: grid;
  grid-template-columns: 190px 1fr 46px;
  align-items: center;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--rule-soft);
}

.bar-row:first-child {
  border-top: 0;
}

.bar-name {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.bar-track {
  height: 7px;
  background: var(--paper-tint);
  border-radius: 7px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 7px;
  width: 0;
  transition: width 1.1s var(--ease-out);
}

.bar-num {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.lvl-solide {
  background: var(--lvl-solide);
  color: var(--lvl-solide);
}
.lvl-correct {
  background: var(--lvl-correct);
  color: var(--lvl-correct);
}
.lvl-fragile {
  background: var(--lvl-fragile);
  color: var(--lvl-fragile);
}
.lvl-critique {
  background: var(--lvl-critique);
  color: var(--lvl-critique);
}

/* Indicateurs secondaires */
.metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-md);
  overflow: hidden;
}

.metric {
  background: var(--paper-card);
  padding: 22px 20px;
}

.metric-label {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 9px;
}

.metric-value {
  font-family: var(--display);
  font-size: 1.72rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.metric-note {
  font-size: 0.79rem;
  color: var(--ink-mute);
  margin-top: 5px;
  line-height: 1.45;
}

/* Étiquettes */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 100px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--paper-tint);
  color: var(--ink-soft);
}

.tag-cat {
  background: var(--clay-wash);
  color: var(--clay);
}

.tag-impact {
  background: var(--moss-wash);
  color: var(--moss);
}

.tag-effort {
  background: var(--ochre-wash);
  color: #8a6620;
}

.impact-grid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------ */
/* Recommandations                                                    */
/* ------------------------------------------------------------------ */

.rec {
  background: var(--paper-card);
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-lg);
  padding: 26px;
  transition: all 0.28s var(--ease);
}

.rec:hover {
  border-color: var(--rule);
  box-shadow: var(--shadow-sm);
}

.rec-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.rec h4 {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.28;
  margin-bottom: 14px;
}

.rec-chain {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin: 16px 0;
  padding: 17px 19px;
  background: var(--paper-deep);
  border-radius: var(--r-md);
}

.chain-item {
  font-size: 0.875rem;
  line-height: 1.52;
  color: var(--ink-soft);
}

.chain-key {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 3px;
}

.chain-item.is-root .chain-key {
  color: var(--clay);
}

.rec-steps {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: st;
}

.rec-steps li {
  position: relative;
  padding: 8px 0 8px 34px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-soft);
  counter-increment: st;
}

.rec-steps li::before {
  content: counter(st);
  position: absolute;
  left: 0;
  top: 9px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--paper-tint);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.anti {
  margin-top: 17px;
  padding: 15px 18px;
  border-left: 2.5px solid var(--clay);
  background: var(--clay-wash);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 0.875rem;
  line-height: 1.52;
  color: var(--ink-soft);
}

.anti strong {
  color: var(--clay);
  display: block;
  margin-bottom: 3px;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rec-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--rule-soft);
}

/* ------------------------------------------------------------------ */
/* Rapport                                                            */
/* ------------------------------------------------------------------ */

.report-page {
  background: var(--paper-card);
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-lg);
  padding: 50px 52px;
  margin-bottom: 22px;
}

.report-num {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 14px;
}

.report-page h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  margin-bottom: 20px;
}

.report-page h3 {
  font-size: 1.18rem;
  margin: 32px 0 14px;
}

.report-page ul {
  padding-left: 20px;
  color: var(--ink-soft);
}

.report-page li {
  margin-bottom: 9px;
  line-height: 1.55;
}

.kv {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 0;
  font-size: 0.9rem;
  border-top: 1px solid var(--rule-soft);
}

.kv dt {
  padding: 12px 0;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--rule-soft);
}

.kv dd {
  padding: 12px 0;
  margin: 0;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink);
}

/* ------------------------------------------------------------------ */
/* Plan 30/60/90                                                      */
/* ------------------------------------------------------------------ */

.phase {
  border-top: 2px solid var(--ink);
  padding-top: 22px;
}

.phase-label {
  font-family: var(--display);
  font-size: 1.34rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.phase-intent {
  font-size: 0.88rem;
  color: var(--ink-mute);
  margin-bottom: 20px;
}

.phase-item {
  padding: 15px 0;
  border-top: 1px solid var(--rule-soft);
}

.phase-item:first-of-type {
  border-top: 0;
}

.phase-item h4 {
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.42;
  margin-bottom: 7px;
}

/* ------------------------------------------------------------------ */
/* Formulaires                                                        */
/* ------------------------------------------------------------------ */

.field {
  margin-bottom: 19px;
}

.field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--ink-soft);
}

.input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--paper-card);
  color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.input:focus {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(180, 71, 47, 0.1);
}

.input-lg {
  padding: 15px 18px;
  font-size: 1.02rem;
}

.alert {
  padding: 13px 17px;
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  margin-bottom: 19px;
  line-height: 1.5;
}

.alert-error {
  background: var(--clay-wash);
  color: #8d3520;
  border: 1px solid #eccfc4;
}

.alert-ok {
  background: var(--moss-wash);
  color: #37523a;
  border: 1px solid #cfdccb;
}

/* ------------------------------------------------------------------ */
/* Dashboard                                                          */
/* ------------------------------------------------------------------ */

.dash-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  padding: 38px 0 26px;
  border-bottom: 1px solid var(--rule);
}

.dash-greet {
  font-family: var(--display);
  font-size: clamp(1.72rem, 3.2vw, 2.4rem);
  letter-spacing: -0.025em;
  font-weight: 500;
  margin-bottom: 6px;
}

.spot {
  border-radius: var(--r-lg);
  padding: 26px;
  border: 1px solid var(--rule-soft);
  background: var(--paper-card);
  height: 100%;
}

.spot-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 11px;
}

.spot-title {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin-bottom: 9px;
}

.spot-body {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.52;
}

.spot-clay {
  background: var(--clay-wash);
  border-color: #eed4ca;
}
.spot-moss {
  background: var(--moss-wash);
  border-color: #d3dfcf;
}
.spot-ochre {
  background: var(--ochre-wash);
  border-color: #ecdcb8;
}

/* Tableau d'actions */
.act-row {
  display: grid;
  grid-template-columns: 1fr 128px 118px 128px 40px;
  gap: 14px;
  align-items: center;
  padding: 15px 0;
  border-top: 1px solid var(--rule-soft);
}

.act-row:first-child {
  border-top: 0;
}

.act-title {
  font-size: 0.92rem;
  font-weight: 550;
  line-height: 1.42;
}

.act-title small {
  display: block;
  font-weight: 400;
  color: var(--ink-mute);
  font-size: 0.8rem;
  margin-top: 3px;
}

.select-mini {
  padding: 7px 11px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--paper-card);
  font-size: 0.83rem;
  color: var(--ink);
  width: 100%;
}

.select-mini:focus {
  outline: none;
  border-color: var(--clay);
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 7px;
}

.st-todo {
  background: var(--ink-faint);
}
.st-doing {
  background: var(--ochre);
}
.st-done {
  background: var(--moss);
}
.st-dropped {
  background: var(--rule);
}

/* ------------------------------------------------------------------ */
/* Bibliothèque                                                       */
/* ------------------------------------------------------------------ */

.lib-item {
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 168px;
  gap: 26px;
  align-items: start;
}

.lib-item:first-child {
  border-top: 0;
}

.lib-item h4 {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 9px;
  line-height: 1.32;
}

.lib-item p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0 0 9px;
  line-height: 1.55;
}

.filters {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.chip {
  padding: 7px 15px;
  border: 1px solid var(--rule);
  border-radius: 100px;
  background: transparent;
  font-size: 0.83rem;
  color: var(--ink-soft);
  transition: all 0.2s var(--ease);
}

.chip:hover {
  border-color: var(--ink-faint);
  color: var(--ink);
}

.chip.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ------------------------------------------------------------------ */
/* Offres                                                             */
/* ------------------------------------------------------------------ */

.offer {
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-lg);
  padding: 30px;
  background: var(--paper-card);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.3s var(--ease);
}

.offer:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.offer.is-featured {
  border-color: var(--ink);
  box-shadow: var(--shadow-md);
  position: relative;
}

.offer-badge {
  position: absolute;
  top: -11px;
  left: 30px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 13px;
  border-radius: 100px;
}

.offer-price {
  font-family: var(--display);
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 14px 0 5px;
}

.offer-price span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--ink-mute);
  font-family: var(--body);
  letter-spacing: 0;
}

/* ------------------------------------------------------------------ */
/* Divers                                                             */
/* ------------------------------------------------------------------ */

.center {
  text-align: center;
}
.mt-0 {
  margin-top: 0;
}
.mt-1 {
  margin-top: 10px;
}
.mt-2 {
  margin-top: 20px;
}
.mt-3 {
  margin-top: 32px;
}
.mt-4 {
  margin-top: 48px;
}
.mb-0 {
  margin-bottom: 0;
}
.mb-1 {
  margin-bottom: 10px;
}
.mb-2 {
  margin-bottom: 20px;
}
.mb-3 {
  margin-bottom: 32px;
}
.flex {
  display: flex;
}
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.flex-center {
  display: flex;
  align-items: center;
  gap: 12px;
}
.gap-1 {
  gap: 10px;
}
.gap-2 {
  gap: 18px;
}
.hidden {
  display: none !important;
}

footer {
  border-top: 1px solid var(--rule);
  padding: 44px 0 34px;
  margin-top: 72px;
}

.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--ink-mute);
}

.foot-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.foot-links a:hover {
  color: var(--ink);
}

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--ink);
  color: var(--paper);
  padding: 13px 22px;
  border-radius: 100px;
  font-size: 0.88rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all 0.34s var(--ease-out);
  z-index: 200;
  pointer-events: none;
}

.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

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

/* ------------------------------------------------------------------ */
/* Animations d'apparition                                            */
/* ------------------------------------------------------------------ */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------------ */
/* Responsive                                                         */
/* ------------------------------------------------------------------ */

@media (max-width: 900px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .report-page {
    padding: 34px 28px;
  }
  .act-row {
    grid-template-columns: 1fr 1fr;
    gap: 11px;
  }
  .lib-item {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .kv {
    grid-template-columns: 1fr;
  }
  .kv dt {
    border-bottom: 0;
    padding-bottom: 2px;
  }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .grid-auto {
    grid-template-columns: 1fr;
  }
  .wrap {
    padding: 0 18px;
  }
  .section {
    padding: 56px 0;
  }
  .hero {
    padding: 62px 0 48px;
  }
  .nav-links {
    display: none;
  }
  .quiz-body {
    padding: 36px 18px 100px;
  }
  .bar-row {
    grid-template-columns: 118px 1fr 40px;
    gap: 11px;
  }
  .bar-name {
    font-size: 0.82rem;
  }
  .score-dial {
    flex: 0 0 148px;
    width: 148px;
    height: 148px;
  }
  .dial-num {
    font-size: 2.4rem;
  }
  .quote-block {
    padding: 32px 24px;
  }
  .report-page {
    padding: 28px 20px;
  }
  .logic-chain {
    gap: 2px;
  }
  .logic-step {
    padding: 4px 10px 4px 0;
    font-size: 0.72rem;
  }
  .logic-step:not(:last-child)::after {
    right: -2px;
  }
}

/* ------------------------------------------------------------------ */
/* Impression — export PDF du rapport                                 */
/* ------------------------------------------------------------------ */

@media print {
  @page {
    size: A4;
    margin: 14mm;
  }

  body {
    background: #fff;
    font-size: 10.5pt;
  }

  .topbar,
  .btn,
  .toast,
  .foot-links,
  footer,
  .no-print {
    display: none !important;
  }

  .report-page {
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 0 0 16mm;
    page-break-after: always;
    break-after: page;
  }

  .report-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .card,
  .rec,
  .spot,
  .anti,
  .rec-chain {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none !important;
  }

  h1,
  h2,
  h3 {
    break-after: avoid;
  }

  .bar-fill,
  .dial-value {
    transition: none !important;
  }

  a[href]::after {
    content: '';
  }
}

/* ------------------------------------------------------------------ */
/* Compléments : listes, tableaux, champs compacts                    */
/* ------------------------------------------------------------------ */

.plain-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.plain-list li {
  padding: 11px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.plain-list li:last-child {
  border-bottom: none;
}

.plain-list li::before {
  content: '—';
  color: var(--clay);
  margin-right: 9px;
  font-weight: 600;
}

/* Marqueur discret pour les listes sans puces numérotées */
.plain-list.is-dot li::before {
  content: '·';
  font-size: 1.5em;
  line-height: 0;
  vertical-align: -3px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.table th {
  text-align: left;
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-deep);
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background: var(--paper);
}

.input-mini {
  padding: 7px 10px;
  font-size: 0.86rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--rule);
  background: var(--paper-card);
  max-width: 150px;
  min-width: 96px;
}

.input-mini:focus {
  border-color: var(--clay);
  outline: none;
  box-shadow: 0 0 0 3px var(--clay-wash);
}

.quiz-kind {
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: var(--ink-mute);
  margin-bottom: 2px;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--paper-tint);
  color: var(--ink-soft);
}

/* Signets d'avancement sur le tableau de bord */
.spot .btn-text {
  padding-left: 0;
  margin-top: 8px;
}

/* La page de rapport ne doit pas être bridée en largeur sur écran large */
.report {
  width: 100%;
}

/* Une carte de recommandation dans le rapport reste lisible à l'impression */
@media print {
  .plain-list li {
    padding: 4px 0;
  }
}
