/* ============================================================
   Espace cabinet · Design system
   DA héritée de mapi-suivi-client (tokens, typo, composants).
   Marque blanche : tout passe par les variables --brand-* ;
   theme.js (assets/js/common.js) peut les surcharger par cabinet.
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

@font-face {
  font-family: 'Museo Sans';
  src: local('Museo Sans');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ----- Marque (surchargeable, marque blanche) ----- */
  --brand-primary: #006DEC;
  --brand-primary-dark: #0055BB;
  --brand-primary-rgb: 0, 109, 236;
  --brand-pale: #EBF6FF;
  --brand-muted: #D4EAFF;
  --brand-accent: #FF934F;
  --brand-accent-soft: #FFF3EB;
  --brand-accent-text: #9A4A0E;
  --brand-gold: #FCC844;

  /* ----- Sémantique ----- */
  --success: #34C759;
  --success-bg: #E8F9ED;
  --success-text: #15803D;
  --danger: #D92D20;
  --danger-bg: #FDEBEA;
  --danger-text: #B42318;

  --text-primary: #28323E;
  --text-secondary: #626263;
  --text-muted: #8E9AAB;
  --bg: #F7F9FC;
  --surface: #FFFFFF;
  --border: #EDF1F5;
  --border-strong: #D8DEE6;

  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-pill: 32px;
  --shadow-sm: 0 2px 8px rgba(var(--brand-primary-rgb), 0.06);
  --shadow-md: 0 4px 20px rgba(var(--brand-primary-rgb), 0.10);
  --shadow-lg: 0 8px 32px rgba(var(--brand-primary-rgb), 0.14);

  /* ----- Motion (game feel) ----- */
  --ease-spring: cubic-bezier(0.34, 1.25, 0.5, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --t-press: 130ms;
  --t-hover: 240ms;

  --font-display: 'Museo Sans', 'Mukta Mahee', system-ui, sans-serif;
  --font-body: 'Mukta Mahee', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

img, svg { vertical-align: middle; }

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

:focus-visible {
  outline: 3px solid rgba(var(--brand-primary-rgb), 0.5);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection { background: var(--brand-muted); }

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

/* ============ Layout ============ */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow { max-width: 840px; }

.section { padding: 48px 0; }
.section--tight { padding: 28px 0; }
.section--alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head { max-width: 680px; margin-bottom: 28px; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 30px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
}
.section-head p { color: var(--text-secondary); font-size: 16px; }

.grid-2, .grid-3, .grid-4 { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ============ Header / nav ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 249, 252, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}
.brand-logo {
  height: 34px;
  width: auto;
  flex-shrink: 0;
}
.brand-kit {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-primary);
  background: var(--brand-pale);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  min-height: 44px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.nav-link svg { width: 16px; height: 16px; }
.nav-link:hover { background: var(--brand-pale); color: var(--brand-primary); }
.nav-link.is-active {
  background: var(--brand-primary);
  color: #fff;
  font-weight: 700;
}
.nav-link.nav-cta {
  border: 1.5px solid var(--brand-muted);
  color: var(--brand-primary);
  font-weight: 700;
  background: var(--surface);
}
.nav-link.nav-cta:hover { background: var(--brand-pale); }
.nav-link.nav-cta.is-active { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}
.nav-toggle:hover { border-color: var(--brand-primary); background: var(--brand-pale); }
.nav-toggle svg { width: 20px; height: 20px; color: var(--text-primary); }
.nav-toggle .icon-close { display: none; }

@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 20px 18px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .site-header.nav-open .main-nav { display: flex; }
  .site-header.nav-open .icon-burger { display: none; }
  .site-header.nav-open .icon-close { display: block; }
  .nav-link { justify-content: flex-start; font-size: 15px; }
}

/* ============ Hero de page ============ */

.page-hero {
  position: relative;
  padding: 52px 0 40px;
  background:
    radial-gradient(600px 280px at 85% -40%, rgba(var(--brand-primary-rgb), 0.10), transparent 70%),
    radial-gradient(420px 240px at 8% -30%, var(--brand-accent-soft), transparent 75%);
}

.page-hero--center { text-align: center; }
.page-hero--center .lead, .page-hero--center .eyebrow { margin-inline: auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--brand-primary);
  background: var(--surface);
  border: 1.5px solid var(--brand-muted);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}
.eyebrow svg { width: 14px; height: 14px; }
.eyebrow--accent { color: var(--brand-accent-text); border-color: var(--brand-accent-soft); background: var(--brand-accent-soft); }

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.5px;
  max-width: 760px;
  margin-bottom: 14px;
}
.page-hero--center h1 { margin-inline: auto; }

.page-hero h1 .accent { color: var(--brand-primary); }

.lead {
  font-size: 17.5px;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.6;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.page-hero--center .hero-actions { justify-content: center; }

.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
}
.hero-meta svg { width: 16px; height: 16px; color: var(--brand-accent); }
.hero-meta strong { color: var(--text-primary); }

/* ============ Boutons ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 24px;
  min-height: 46px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }

.btn:active { transform: scale(0.98); }

.btn--primary { background: var(--brand-primary); color: #fff; }
.btn--primary:hover { background: var(--brand-primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn--ghost {
  background: var(--surface);
  color: var(--brand-primary);
  border: 1.5px solid var(--brand-muted);
}
.btn--ghost:hover { background: var(--brand-pale); transform: translateY(-1px); }

.btn--white { background: #fff; color: var(--brand-primary); }
.btn--white:hover { background: var(--brand-pale); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }

.btn--soft { background: var(--brand-pale); color: var(--brand-primary-dark); }
.btn--soft:hover { background: var(--brand-muted); }

.btn--lg { padding: 15px 30px; font-size: 16px; }

/* ============ Pastilles / pills ============ */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.pill svg { width: 12px; height: 12px; }
.pill--blue { background: var(--brand-pale); color: var(--brand-primary-dark); }
.pill--accent { background: var(--brand-accent-soft); color: var(--brand-accent-text); }
.pill--success { background: var(--success-bg); color: var(--success-text); }
.pill--danger { background: var(--danger-bg); color: var(--danger-text); }
.pill--muted { background: var(--border); color: var(--text-secondary); }

/* ============ Cartes ============ */

.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.card--hover { transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s; }
.card--hover:hover { border-color: var(--brand-muted); box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card h3 {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}
.card p { font-size: 14px; color: var(--text-secondary); }
.card p + p { margin-top: 8px; }

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--brand-pale);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.card-icon svg { width: 21px; height: 21px; }
.card-icon--accent { background: var(--brand-accent-soft); color: var(--brand-accent-text); }
.card-icon--success { background: var(--success-bg); color: var(--success-text); }
.card-icon--danger { background: var(--danger-bg); color: var(--danger-text); }

.num-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============ Stats ============ */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.stat { text-align: center; padding: 18px 10px; }
.stat .value {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
}
.stat .value .highlight {
  background: linear-gradient(180deg, transparent 58%, var(--brand-accent-soft) 58%);
  padding: 0 3px;
}
.stat .label {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.stat .sub { font-size: 12.5px; color: var(--text-secondary); margin-top: 4px; }

/* ============ Callouts & citations ============ */

.callout {
  background: var(--brand-pale);
  border-left: 3px solid var(--brand-primary);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 14.5px;
  color: var(--text-primary);
}
.callout strong { font-weight: 700; }

.callout--warn { background: var(--brand-accent-soft); border-left-color: var(--brand-accent); }
.callout--warn strong { color: var(--brand-accent-text); }
.callout--danger { background: var(--danger-bg); border-left-color: var(--danger); }
.callout--danger strong { color: var(--danger-text); }
.callout--success { background: var(--success-bg); border-left-color: var(--success); }
.callout--success strong { color: var(--success-text); }

.callout-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 6px;
}
.callout-title svg { width: 18px; height: 18px; flex-shrink: 0; }
.callout--warn .callout-title { color: var(--brand-accent-text); }
.callout--danger .callout-title { color: var(--danger-text); }
.callout--success .callout-title { color: var(--success-text); }

.key-quote {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}
.key-quote .accent { color: var(--brand-primary); }

/* ============ Carte gradient (« océan ») ============ */

.gradient-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  background: linear-gradient(135deg, var(--brand-primary), #3D8EF7 60%, #68A8FA);
  background: linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-primary) 55%, #68A8FA) 60%, color-mix(in srgb, var(--brand-primary) 30%, #9CC6FB));
  color: #fff;
}

.gradient-card::before,
.gradient-card::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}
/* Vagues : sinusoïdes raccordables (même hauteur et même pente aux deux
   bords de la tuile) ; chaque boucle parcourt exactement une tuile. */
.gradient-card::before {
  bottom: -8px;
  height: 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C100,20 200,20 300,60 C400,100 500,100 600,60 C700,20 800,20 900,60 C1000,100 1100,100 1200,60 L1200,120 L0,120 Z' fill='rgba(255,255,255,0.10)'/%3E%3C/svg%3E") repeat-x;
  background-size: 600px 60px;
  animation: wave-move-a 9s linear infinite;
}
.gradient-card::after {
  bottom: -4px;
  height: 44px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C100,100 200,100 300,60 C400,20 500,20 600,60 C700,100 800,100 900,60 C1000,20 1100,20 1200,60 L1200,120 L0,120 Z' fill='rgba(255,255,255,0.06)'/%3E%3C/svg%3E") repeat-x;
  background-size: 400px 44px;
  animation: wave-move-b 14s linear infinite reverse;
}

@keyframes wave-move-a {
  to { background-position-x: 600px; }
}
@keyframes wave-move-b {
  to { background-position-x: 400px; }
}

.gradient-card > * { position: relative; z-index: 1; }
.gradient-card h2 {
  font-family: var(--font-display);
  font-size: clamp(21px, 3vw, 26px);
  font-weight: 800;
  margin-bottom: 8px;
}
.gradient-card p { font-size: 15px; opacity: 0.92; max-width: 640px; }
.gradient-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.gradient-card .big-figure {
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 800;
  line-height: 1.05;
}

/* ============ Timeline (phases) ============ */

.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 30px;
  bottom: 30px;
  width: 2.5px;
  background: var(--border-strong);
  border-radius: 2px;
}

.tl-item {
  position: relative;
  display: flex;
  gap: 16px;
  padding: 6px 0;
}

.tl-dot-wrap {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 40px;
  display: flex;
  justify-content: center;
  padding-top: 22px;
}
.tl-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-primary);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--brand-primary);
}
.tl-item--goal .tl-dot { background: var(--brand-accent); box-shadow: 0 0 0 2px var(--brand-accent); }
.tl-dot--done { background: var(--success) !important; box-shadow: 0 0 0 2px var(--success) !important; }
.tl-dot--pending { background: var(--border-strong) !important; box-shadow: 0 0 0 2px var(--border-strong) !important; }
.tl-dot--active { animation: dot-pulse 2s ease-in-out infinite; }

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--brand-primary), 0 0 0 7px rgba(var(--brand-primary-rgb), 0.18); }
  50% { box-shadow: 0 0 0 2px var(--brand-primary), 0 0 0 12px rgba(var(--brand-primary-rgb), 0); }
}

.tl-card {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 10px;
}
.tl-item--goal .tl-card { border-color: var(--brand-accent); background: linear-gradient(135deg, var(--surface), var(--brand-accent-soft)); }

.tl-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.tl-title {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
}
.tl-period { margin-left: auto; }

.tl-list { list-style: none; }
.tl-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px dashed var(--border);
}
.tl-list li:last-child { border-bottom: none; }
.tl-list li svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--brand-primary);
}
.tl-list li strong { color: var(--text-primary); }

/* ============ Checklist interactive (fiches) ============ */

.check-row {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 8px 10px;
  margin: 0 -10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s;
}
.check-row:hover { background: var(--brand-pale); }
.check-row input {
  appearance: none;
  -webkit-appearance: none;
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  margin-top: 1px;
  border: 2px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.check-row input::before {
  content: '';
  width: 11px;
  height: 11px;
  transform: scale(0);
  transition: transform 0.15s ease-out;
  background: #fff;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.check-row input:checked { background: var(--success); border-color: var(--success); }
.check-row input:checked::before { transform: scale(1); }
.check-row.is-done span { color: var(--text-muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }

/* ============ Stepper horizontal ============ */

.stepper {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  counter-reset: step;
}
.stepper li {
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  counter-increment: step;
}
.stepper li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 10px;
}
.stepper li h3 { font-family: var(--font-display); font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.stepper li p { font-size: 13px; color: var(--text-secondary); }
.stepper li.is-final { border-color: var(--success); background: linear-gradient(135deg, var(--surface), var(--success-bg)); }
.stepper li.is-final::before { background: var(--success); }

/* ============ Tableaux ============ */

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
}
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 13px 18px;
  border-bottom: 1.5px solid var(--border);
  background: var(--bg);
  white-space: nowrap;
}
.table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}
.table tr:last-child td { border-bottom: none; }
.table td strong { color: var(--text-primary); }
.table tr.is-total td {
  background: var(--brand-pale);
  color: var(--text-primary);
  font-weight: 700;
}
.table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ============ Accordéon ============ */

details.acc {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
details.acc[open] { border-color: var(--brand-muted); box-shadow: var(--shadow-sm); }
details.acc summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.2s;
}
details.acc summary:hover { background: var(--brand-pale); }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary .acc-chevron {
  margin-left: auto;
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  color: var(--brand-primary);
  transition: transform 0.25s;
}
details.acc[open] summary .acc-chevron { transform: rotate(180deg); }
.acc-body { padding: 0 20px 18px; font-size: 14.5px; color: var(--text-secondary); }
.acc-body strong { color: var(--text-primary); }

/* ============ Bloc à copier (emails, scripts) ============ */

.copy-block {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.copy-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--bg);
  border-bottom: 1.5px solid var(--border);
}
.copy-head .copy-label {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
}
.copy-head .pill { margin-right: auto; }
.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 8px 14px;
  min-height: 36px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--brand-muted);
  background: var(--surface);
  color: var(--brand-primary);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn-copy svg { width: 14px; height: 14px; }
.btn-copy:hover { background: var(--brand-pale); }
.btn-copy.is-copied { background: var(--success-bg); border-color: var(--success); color: var(--success-text); }

.copy-body {
  padding: 18px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  white-space: pre-line;
  line-height: 1.65;
}
.copy-body .obj { font-weight: 700; color: var(--text-primary); }

/* ============ Chips ============ */

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
}
.chip svg { width: 14px; height: 14px; flex-shrink: 0; }
.chip--ok { border-color: var(--success-bg); background: var(--success-bg); color: var(--success-text); }
.chip--no { border-color: var(--danger-bg); background: var(--danger-bg); color: var(--danger-text); }
.chip--blue { border-color: var(--brand-muted); background: var(--brand-pale); color: var(--brand-primary-dark); }

/* ============ Cartes profil (accueil) ============ */

.profile-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.profile-card:hover { border-color: var(--brand-primary); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.profile-card .pill { align-self: flex-start; margin-bottom: 14px; }
.profile-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 6px;
}
.profile-card p { font-size: 14px; color: var(--text-secondary); flex: 1; }
.profile-card .card-go {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-primary);
}
.profile-card .card-go svg { width: 16px; height: 16px; transition: transform 0.2s; }
.profile-card:hover .card-go svg { transform: translateX(3px); }

.profile-card--play {
  background: linear-gradient(135deg, var(--brand-primary), #3D8EF7);
  background: linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-primary) 55%, #68A8FA));
  border-color: transparent;
  color: #fff;
}
.profile-card--play p { color: rgba(255, 255, 255, 0.88); }
.profile-card--play .card-go { color: #fff; }
.profile-card--play .pill { background: rgba(255, 255, 255, 0.18); color: #fff; }

/* ============ Carte personne ============ */

.person-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary), #3D8EF7);
  background: linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-primary) 55%, #68A8FA));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(var(--brand-primary-rgb), 0.25);
}
.person-info h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.person-info p { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.person-card .btn { margin-left: auto; }

/* ============ KPI ============ */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.kpi {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}
.kpi .value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--brand-primary);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.kpi .label { font-size: 12.5px; color: var(--text-secondary); font-weight: 500; margin-top: 6px; line-height: 1.35; }
.kpi--goal { border-color: var(--brand-accent); background: linear-gradient(160deg, var(--surface), var(--brand-accent-soft)); }
.kpi--goal .value { color: var(--brand-accent-text); }

/* ============ Liste « ce que vous ne faites pas » ============ */

.strike-list { list-style: none; }
.strike-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
  font-size: 14.5px;
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: var(--border-strong);
}
.strike-list li svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 3px; color: var(--danger); }

/* ============ Sous-navigation ancres ============ */

.anchor-nav {
  position: sticky;
  top: 64px;
  z-index: 90;
  background: rgba(247, 249, 252, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.anchor-nav .container { display: flex; gap: 6px; padding-top: 10px; padding-bottom: 10px; }
.anchor-nav a {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background 0.2s, color 0.2s;
}
.anchor-nav a:hover { background: var(--brand-pale); color: var(--brand-primary); }

/* ============ Parcours (quiz) ============ */

.quiz-shell { max-width: 680px; margin: 0 auto; }

.quiz-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.quiz-module-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-primary);
  white-space: nowrap;
}
.quiz-progress {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand-primary), #3D8EF7);
  background: linear-gradient(90deg, var(--brand-primary), color-mix(in srgb, var(--brand-primary) 60%, #68A8FA));
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.quiz-score {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1.5px solid var(--border);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.quiz-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.quiz-q {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.6vw, 22px);
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 20px;
}

.choices { display: flex; flex-direction: column; gap: 10px; }
.choice {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  min-height: 54px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.choice:hover:not(:disabled) { border-color: var(--brand-primary); background: var(--brand-pale); }
.choice:active:not(:disabled) { transform: scale(0.99); }
.choice:disabled { cursor: default; }

.choice-letter {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border-strong);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.choice:hover:not(:disabled) .choice-letter { border-color: var(--brand-primary); color: var(--brand-primary); }

.choice.is-correct { border-color: var(--success); background: var(--success-bg); }
.choice.is-correct .choice-letter { background: var(--success); border-color: var(--success); color: #fff; }
.choice.is-wrong { border-color: var(--danger); background: var(--danger-bg); }
.choice.is-wrong .choice-letter { background: var(--danger); border-color: var(--danger); color: #fff; }
.choice.is-dim { opacity: 0.55; }

.feedback {
  margin-top: 16px;
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 14.5px;
  line-height: 1.55;
  animation: feedback-in 0.3s ease-out;
}
@keyframes feedback-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.feedback--ok { background: var(--success-bg); color: var(--success-text); }
.feedback--ko { background: var(--danger-bg); color: var(--danger-text); }
.feedback .feedback-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 5px;
}
.feedback .feedback-title svg { width: 18px; height: 18px; }
.feedback p { color: var(--text-primary); }

.quiz-nav { display: flex; justify-content: flex-end; margin-top: 18px; }

/* Interstitiel de module */
.module-intro { text-align: center; }
.module-intro .module-num {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--brand-pale);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.module-intro .module-num svg { width: 30px; height: 30px; }
.module-intro h2 { font-family: var(--font-display); font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.module-intro p { color: var(--text-secondary); max-width: 440px; margin: 0 auto; }

/* Écran de choix de rôle */
.role-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 26px 0 4px; }
.role-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px 22px;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.role-card:hover { border-color: var(--brand-primary); background: var(--brand-pale); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.role-card:active { transform: translateY(0) scale(0.99); }
.role-card .card-icon { margin: 0 auto 14px; }
.role-card h3 { font-family: var(--font-display); font-size: 17px; font-weight: 800; margin-bottom: 4px; color: var(--text-primary); }
.role-card p { font-size: 13px; color: var(--text-secondary); }
.role-card .role-go {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--brand-primary);
}
.role-card .role-go svg { width: 15px; height: 15px; transition: transform 0.2s; }
.role-card:hover .role-go svg { transform: translateX(3px); }

/* Écran final */
.end-screen { text-align: center; }
.badge-medal { width: 150px; height: 150px; margin: 0 auto 6px; position: relative; }
.badge-medal svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 16px rgba(var(--brand-primary-rgb), 0.25)); }
.end-score {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  color: var(--brand-primary);
  font-variant-numeric: tabular-nums;
}
.end-title { font-family: var(--font-display); font-size: 26px; font-weight: 800; margin: 6px 0 8px; }
.end-sub { color: var(--text-secondary); max-width: 460px; margin: 0 auto 22px; }

.memo-card {
  text-align: left;
  background: var(--brand-pale);
  border: 1.5px solid var(--brand-muted);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 22px 0;
}
.memo-card h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--brand-primary-dark);
  margin-bottom: 10px;
}
.memo-card ol { padding-left: 20px; font-size: 14px; color: var(--text-primary); }
.memo-card ol li { padding: 3px 0; }

/* Confettis */
.confetti-zone { position: relative; overflow: visible; }
.confetti {
  position: absolute;
  top: -10px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  opacity: 0;
  animation: confetti-fall 2.6s ease-in forwards;
}
@keyframes confetti-fall {
  0% { opacity: 1; transform: translateY(-20px) rotate(0deg); }
  100% { opacity: 0; transform: translateY(340px) rotate(540deg); }
}

/* ============ Fiches cabinets ============ */

.cab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }

.cab-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.cab-card:hover { border-color: var(--brand-primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cab-card-head { display: flex; align-items: center; gap: 12px; }
.cab-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--brand-pale);
  color: var(--brand-primary);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cab-card h3 { font-family: var(--font-display); font-size: 16.5px; font-weight: 800; line-height: 1.25; }
.cab-card .cab-ville { font-size: 12.5px; color: var(--text-muted); font-weight: 500; }
.cab-card .day-chip { margin-left: auto; }

.cab-progress { height: 7px; background: var(--border); border-radius: 4px; overflow: hidden; }
.cab-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), #3D8EF7);
  background: linear-gradient(90deg, var(--brand-primary), color-mix(in srgb, var(--brand-primary) 60%, #68A8FA));
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.cab-progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); font-weight: 600; }
.cab-progress-label .pct { color: var(--brand-primary); font-weight: 700; }
.cab-meta { display: flex; flex-wrap: wrap; gap: 6px; }

.cab-card--new {
  border-style: dashed;
  border-width: 2px;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-secondary);
  background: transparent;
}
.cab-card--new svg { width: 28px; height: 28px; color: var(--brand-primary); }
.cab-card--new:hover { background: var(--surface); }

/* Fiche détail */
.fiche { border-radius: var(--radius-lg); }
.fiche.wl-active {
  border: 2px dashed var(--brand-accent);
  padding: 18px;
  background: rgba(var(--brand-primary-rgb), 0.02);
}
.fiche-banner {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--brand-accent-soft);
  color: var(--brand-accent-text);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 18px;
}
.fiche.wl-active .fiche-banner { display: flex; }
.fiche-banner svg { width: 16px; height: 16px; flex-shrink: 0; }

.fiche-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
}
.fiche-head .cab-logo { width: 60px; height: 60px; font-size: 19px; }
.fiche-head h1 { font-family: var(--font-display); font-size: clamp(24px, 4vw, 32px); font-weight: 800; line-height: 1.15; }
.fiche-head .fiche-sub { font-size: 14px; color: var(--text-secondary); }

.day-counter {
  margin-left: auto;
  text-align: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 22px;
}
.day-counter .day-val {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--brand-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.day-counter .day-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); margin-top: 4px; }

.milestone-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 26px; }
.milestone {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 18px;
}
.milestone .ms-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.milestone .ms-icon svg { width: 19px; height: 19px; }
.milestone h3 { font-family: var(--font-display); font-size: 14px; font-weight: 700; line-height: 1.25; }
.milestone p { font-size: 12.5px; color: var(--text-secondary); }
.milestone--done { border-color: var(--success-bg); background: linear-gradient(135deg, var(--surface), var(--success-bg)); }
.milestone--done .ms-icon { background: var(--success); color: #fff; }
.milestone--urgent { border-color: var(--brand-accent); background: linear-gradient(135deg, var(--surface), var(--brand-accent-soft)); }
.milestone--urgent .ms-icon { background: var(--brand-accent); color: #fff; }
.milestone--pending .ms-icon { background: var(--border); color: var(--text-muted); }

.fiche-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 880px) { .fiche-cols { grid-template-columns: 1fr; } }

.fiche-phase { margin-bottom: 14px; }
.fiche-phase .phase-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.fiche-phase .phase-head h3 { font-family: var(--font-display); font-size: 15.5px; font-weight: 700; }
.fiche-phase .phase-count { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.wl-box { border: 1.5px dashed var(--brand-accent); background: var(--brand-accent-soft); border-radius: var(--radius); padding: 18px; }
.wl-box h3 { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 14.5px; font-weight: 800; color: var(--brand-accent-text); margin-bottom: 6px; }
.wl-box h3 svg { width: 17px; height: 17px; }
.wl-box p { font-size: 13px; color: var(--text-primary); margin-bottom: 12px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-primary);
  text-decoration: none;
  margin-bottom: 18px;
  min-height: 44px;
}
.back-link svg { width: 16px; height: 16px; }
.back-link:hover { text-decoration: underline; }

/* ============ Liens croisés bas de page ============ */

.crosslinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.crosslink {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.crosslink:hover { border-color: var(--brand-primary); box-shadow: var(--shadow-sm); }
.crosslink .card-icon { margin-bottom: 0; flex-shrink: 0; }
.crosslink h3 { font-family: var(--font-display); font-size: 14.5px; font-weight: 700; }
.crosslink p { font-size: 12.5px; color: var(--text-secondary); }
.crosslink > svg { margin-left: auto; width: 17px; height: 17px; color: var(--brand-primary); flex-shrink: 0; }

/* ============ Footer ============ */

.site-footer { margin-top: 40px; padding-bottom: 36px; text-align: center; }
.wave-divider {
  width: 60px;
  height: 3px;
  margin: 0 auto 24px;
  background: linear-gradient(90deg, var(--brand-accent), var(--brand-gold));
  border-radius: 2px;
}
.footer-logo {
  height: 30px;
  width: auto;
  opacity: 0.85;
  margin-bottom: 10px;
}
.site-footer p { font-size: 12px; color: var(--text-muted); line-height: 1.7; }
.site-footer a { color: var(--brand-primary); text-decoration: none; font-weight: 500; }
.site-footer a:hover { text-decoration: underline; }

/* ============ Apparition au scroll ============
   Masquage uniquement si JS est présent (classe .js posée dans <head>) :
   sans JS, tout reste visible. common.js révèle tout après 1,2 s
   quoi qu.il arrive, l.animation reste un bonus. */

html.js .reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.6s ease, transform 0.6s var(--ease-spring);
  transition-delay: var(--d, 0s);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* ============ Accessibilité · mouvement réduit ============ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .gradient-card::before, .gradient-card::after { animation: none; }
  .confetti { display: none; }
}

/* ============ Couche motion · « game feel » ============
   Reactions tactiles : la pression s'enfonce, le survol souleve, les
   pictos repondent. Transform/opacity uniquement (composite GPU), ease
   vif. Neutralise sur ecran tactile (hover:none) et mouvement reduit. */
.btn, .nav-link, .role-card, .choice, details.acc summary,
.check-row, .check-more, .btn-copy, .info-close, .chip-info,
.inline-more, a.brand, .anchor-nav a {
  transition: transform var(--t-press) var(--ease-spring),
              background var(--t-hover) ease, color var(--t-hover) ease,
              border-color var(--t-hover) ease, box-shadow var(--t-hover) ease;
}
.btn:active, .nav-link:active, .role-card:active, .choice:not(:disabled):active,
details.acc summary:active, .check-row:active, .check-more:active,
.btn-copy:active, .info-close:active, .chip-info:active,
.inline-more:active, a.brand:active, .anchor-nav a:active {
  transform: scale(0.955);
}
.btn--lg:active { transform: scale(0.97); }

/* Pictogrammes et icones qui repondent au survol */
.card-icon, .memo-ic, .memo-head-ic, .brand-logo, .depense-cat .card-icon {
  transition: transform var(--t-hover) var(--ease-spring);
}
.card:hover .card-icon,
.depense-cat:hover .card-icon,
.role-card:hover .card-icon { transform: scale(1.1) rotate(-3deg); }
a.brand:hover .brand-logo { transform: scale(1.05); }
.btn svg { transition: transform var(--t-hover) var(--ease-spring); }
.btn--primary:hover svg, .nav-link.nav-cta:hover svg { transform: translateX(2px); }

/* Carte CTA : bascule au pointeur (transform pose par KitAnim.tilt) */
.gradient-card { will-change: transform; }

@media (hover: none) {
  .card:hover .card-icon, .depense-cat:hover .card-icon,
  .role-card:hover .card-icon, a.brand:hover .brand-logo,
  .btn--primary:hover svg, .nav-link.nav-cta:hover svg { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gradient-card { transform: none !important; }
  .card-icon, .memo-ic, .memo-head-ic, .brand-logo, .btn svg {
    transition: none !important;
    transform: none !important;
  }
}

/* ============ Impression (kit collaborateurs) ============ */

@media print {
  .site-header, .site-footer, .anchor-nav, .no-print, .hero-actions, .crosslinks-section { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .page-hero { padding: 0 0 12px; background: none; }
  .page-hero h1 { font-size: 24px; }
  .lead { font-size: 13px; }
  .section { padding: 12px 0; }
  .card, .callout, .copy-block, .key-quote { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
  .card { padding: 12px; }
  .section-head { margin-bottom: 10px; }
  .section-head h2 { font-size: 16px; }
  .grid-2, .grid-3, .grid-4 { gap: 8px; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .btn-copy { display: none; }
  .print-footnote { display: block !important; }
}

.print-footnote { display: none; font-size: 11px; color: var(--text-muted); margin-top: 16px; }

/* ============ Responsive fin ============ */

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .section { padding: 36px 0; }
  .page-hero { padding: 38px 0 30px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .quiz-card { padding: 20px; }
  .day-counter { margin-left: 0; width: 100%; }
  .person-card .btn { margin-left: 0; width: 100%; }
  .gradient-card { padding: 26px 20px; }
  .pill { white-space: normal; text-align: left; }
  .tl-period { margin-left: 0; }
  .tl-head { row-gap: 4px; }
}

/* ============ To-do (Espace cabinet) ============ */

.todo-head { margin-bottom: 18px; }
.todo-count.is-done { color: var(--success-text); }
.todo-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 14px;
}
.todo-note svg { width: 14px; height: 14px; color: var(--success); }
.todo-reset {
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-primary);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.todo-reset:hover { background: var(--brand-pale); }

/* ============ Mémo (page dédiée) ============
   Page de référence imprimable : le contenu n'est jamais masqué
   (pas de .reveal ici) et l'export PDF rend exactement l'affichage. */

.memo-toolbar {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 24px;
}
.memo-toolbar .memo-toolbar-text { flex: 1; min-width: 220px; font-size: 14px; color: var(--text-secondary); }
.memo-toolbar .memo-toolbar-text strong { color: var(--text-primary); }
.memo-toolbar .btn { flex-shrink: 0; }

.memo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 760px) { .memo-grid { grid-template-columns: 1fr; } }
.memo-grid--single { grid-template-columns: 1fr; max-width: 640px; margin-inline: auto; }

.memo-sheet {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  break-inside: avoid;
  page-break-inside: avoid;
}

/* ----- Masthead ----- */
.memo-sheet-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  background: var(--brand-primary);
  color: #fff;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.memo-head-ic {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
}
.memo-head-ic svg { width: 22px; height: 22px; }
.memo-masthead { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.memo-masthead h2 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.05;
  color: #fff;
}
.memo-masthead .memo-role {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1px;
  color: rgba(255, 255, 255, 0.92);
}

/* ----- Corps : chaque bloc clairement identifie ----- */
.memo-content { padding: 6px 26px 26px; }
.memo-block {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  break-inside: avoid;
  page-break-inside: avoid;
}
.memo-block:first-child { margin-top: 8px; padding-top: 0; border-top: 0; }
.memo-block-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.memo-ic {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--brand-pale);
  color: var(--brand-primary);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.memo-ic svg { width: 20px; height: 20px; }
.memo-ic--danger { background: var(--danger-bg); color: var(--danger-text); }
.memo-ic--accent { background: var(--brand-accent-soft); color: var(--brand-accent-text); }
.memo-block-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.1px;
  color: var(--text-primary);
}

.memo-content ol, .memo-content ul { padding-left: 22px; margin: 0; font-size: 14.5px; }
.memo-content li { padding: 3px 0; line-height: 1.5; }
.memo-content p { margin: 0; font-size: 14.5px; line-height: 1.6; }
.memo-content p + p { margin-top: 8px; }
.memo-content strong { color: var(--text-primary); }

.memo-cle {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 11px 14px;
  background: var(--brand-pale);
  border-radius: var(--radius-sm);
  font-weight: 700;
  color: var(--brand-primary-dark);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.memo-cle svg { flex-shrink: 0; width: 18px; height: 18px; color: var(--brand-primary); }

.memo-stop { list-style: none; padding-left: 0 !important; }
.memo-stop li { position: relative; padding: 4px 0 4px 24px; color: var(--text-secondary); }
.memo-stop li::before {
  content: '\2715';
  position: absolute;
  left: 3px;
  top: 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--danger-text);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.memo-stop strong { color: var(--danger-text); }

.memo-soft {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 14px;
  background: var(--brand-accent-soft);
  border-radius: var(--radius-sm);
  color: var(--brand-accent-text);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.memo-soft svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.memo-soft strong { color: var(--brand-accent-text); }

.memo-depenses {
  list-style: none;
  padding-left: 0 !important;
  columns: 2;
  column-gap: 26px;
  margin: 2px 0 0;
  font-size: 13.5px;
}
.memo-depenses li {
  position: relative;
  padding: 4px 0 4px 14px;
  line-height: 1.4;
  color: var(--text-secondary);
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
}
.memo-depenses li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-muted);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.memo-depenses strong { color: var(--brand-primary-dark); }

.memo-phrase {
  background: var(--brand-pale);
  border-radius: var(--radius-sm);
  padding: 15px 18px;
  font-size: 15px !important;
  font-weight: 500;
  line-height: 1.55 !important;
  color: var(--text-primary);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

@media (max-width: 520px) {
  .memo-content { padding: 6px 18px 20px; }
  .memo-depenses { columns: 1; }
}

/* Export PDF / impression : exactement le mémo affiché, couleurs comprises */
@media print {
  .site-header, .site-footer, .no-print, .anchor-nav, .page-hero .eyebrow { display: none !important; }
  .page-hero { padding: 0 0 6px; background: none; }
  .page-hero h1 { font-size: 22px; }
  .lead { font-size: 12.5px; }
  .section { padding: 0; }
  .memo-grid { grid-template-columns: 1fr; gap: 14px; }
  .memo-sheet { border: 1px solid var(--border-strong); box-shadow: none; }
  .memo-sheet-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; padding: 14px 20px; }
  .memo-content { padding: 10px 20px 16px; }
  .memo-block { margin-top: 14px; padding-top: 12px; }
  .memo-block:first-child { margin-top: 4px; padding-top: 0; }
  .memo-ic { width: 32px; height: 32px; border-radius: 9px; }
  .memo-ic svg { width: 17px; height: 17px; }
  .memo-phrase { font-size: 13.5px !important; }
  .gradient-card {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 18px 20px;
  }
  .gradient-card::before, .gradient-card::after { display: none !important; }
  .gradient-card h2 { font-size: 18px; }
  .gradient-card p { font-size: 12.5px; }
}

/* ============ To-do : bouton « En savoir plus » ============ */
.check-item { display: flex; align-items: flex-start; gap: 8px; margin: 0 -10px; }
.check-item .check-row { flex: 1 1 auto; min-width: 0; margin: 0; }
.check-more {
  flex-shrink: 0;
  align-self: center;
  border: 1.5px solid var(--brand-muted);
  background: var(--surface);
  color: var(--brand-primary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  min-height: 32px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}
.check-more:hover { background: var(--brand-pale); border-color: var(--brand-primary); }

/* ============ Modale « En savoir plus » ============ */
.info-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  width: min(560px, calc(100% - 36px));
  height: fit-content;
  max-height: calc(100% - 48px);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
}
.info-dialog::backdrop {
  background: rgba(40, 50, 62, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.info-dialog[open] { animation: info-in 0.22s ease-out; }
@keyframes info-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.info-dialog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1.5px solid var(--border);
}
.info-dialog-head .card-icon { margin-bottom: 0; width: 38px; height: 38px; }
.info-dialog-head .card-icon svg { width: 19px; height: 19px; }
.info-dialog-head h2 { font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.info-close {
  margin-left: auto;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.info-close:hover { border-color: var(--brand-primary); background: var(--brand-pale); color: var(--brand-primary); }
.info-close svg { width: 17px; height: 17px; }
.info-dialog-body {
  padding: 18px 22px 22px;
  max-height: min(70vh, 640px);
  overflow: auto;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.info-dialog-body h3 {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--brand-primary-dark);
  margin: 18px 0 7px;
}
.info-dialog-body h3:first-child { margin-top: 0; }
.info-dialog-body p { margin-bottom: 9px; }
.info-dialog-body p:last-child { margin-bottom: 0; }
.info-dialog-body ul { padding-left: 20px; margin-bottom: 9px; }
.info-dialog-body li { padding: 2px 0; }
.info-dialog-body strong { color: var(--text-primary); }
.info-dialog-body a { font-weight: 600; }
.info-note {
  background: var(--brand-accent-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: inherit;
  color: var(--brand-accent-text);
  margin-top: 12px;
}
.info-note strong { color: var(--brand-accent-text); }
.info-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--brand-pale);
  color: var(--brand-primary-dark);
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
}
.info-link:hover { background: var(--brand-muted); }
.info-link svg { width: 15px; height: 15px; }

/* ============ Puce « ? » (signaux) ============ */
.chip-info {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, background 0.2s;
}
.chip-info:hover { background: var(--brand-primary-dark); transform: scale(1.12); }

/* ============ Lien « En savoir plus » inline (listes) ============ */
.inline-more {
  border: none;
  background: none;
  padding: 0;
  margin-left: 4px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-primary);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.inline-more:hover { color: var(--brand-primary-dark); }

/* ============ Catalogue des dépenses éligibles ============ */
.depenses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.depense-cat {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.depense-cat:hover { border-color: var(--brand-muted); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.depense-cat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.depense-cat-head .card-icon { margin-bottom: 0; width: 40px; height: 40px; }
.depense-cat-head h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}
.depense-list { list-style: none; }
.depense-list li {
  position: relative;
  padding: 6px 0 6px 24px;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px dashed var(--border);
}
.depense-list li:last-child { border-bottom: none; }
.depense-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-accent);
}
