/* ==========================================================================
   Éternelle Sérénité — feuille de style
   Palette : #FFFFFF #CED4DB #ACB5BD #6B757D #484F58 #000000
   Polices : Lexend (principale), Cormorant Garamond (secondaire / titres)
   ========================================================================== */

/* ---------- Polices auto-hébergées ---------- */
@font-face { font-family: 'Lexend'; font-style: normal; font-weight: 300; font-display: swap; src: url('/fonts/lexend/lexend-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Lexend'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/lexend/lexend-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Lexend'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/lexend/lexend-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Lexend'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/lexend/lexend-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/cormorant/cormorant-garamond-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/cormorant/cormorant-garamond-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/cormorant/cormorant-garamond-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 400; font-display: swap; src: url('/fonts/cormorant/cormorant-garamond-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap; src: url('/fonts/cormorant/cormorant-garamond-latin-500-italic.woff2') format('woff2'); }

:root {
  /* Palette de marque (constante dans les deux thèmes) */
  --k-white: #FFFFFF;
  --k-mist: #CED4DB;
  --k-silver: #ACB5BD;
  --k-slate: #6B757D;
  --k-graphite: #484F58;
  --k-black: #000000;

  /* ===== Thème sombre (par défaut) =====
     Les noms ci-dessous sont des rôles : --white = surface, --black = texte fort,
     --graphite = texte courant et boutons, --slate = texte secondaire, --tint = fond alterné, --tint-2 = filets. */
  color-scheme: dark;
  --white: #16181B;
  --mist: #3A3F46;
  --silver: #5A616A;
  --slate: #A3ABB4;
  --graphite: #D5DAE0;
  --black: #FFFFFF;
  --tint: #0F1113;
  --tint-2: #2A2E34;
  --danger: #E39A9A;
  --danger-bg: rgba(142, 58, 58, .2);
  --danger-line: rgba(227, 154, 154, .35);
  --danger-hover: #F0B8B8;
  --header-bg: rgba(22, 24, 27, .9);
  --topbar-bg: rgba(15, 17, 19, .9);
  --footer-bg: #0B0C0E;
  --band-bg: #22262B;
  --focus-ring: rgba(213, 218, 224, .2);
  --shadow: 0 0 0 1px rgba(255, 255, 255, .05), 0 10px 30px rgba(0, 0, 0, .45);
  --shadow-lg: 0 0 0 1px rgba(255, 255, 255, .07), 0 20px 50px rgba(0, 0, 0, .55);

  --font: 'Lexend', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --radius: 14px;
  --radius-sm: 8px;
  --container: 1160px;
  --t: .2s ease;
}

[data-theme="light"] {
  color-scheme: light;
  --white: #FFFFFF;
  --mist: #CED4DB;
  --silver: #ACB5BD;
  --slate: #6B757D;
  --graphite: #484F58;
  --black: #000000;
  --tint: #F3F5F7;
  --tint-2: #E7EBEF;
  --danger: #8E3A3A;
  --danger-bg: #F7EDED;
  --danger-line: #E3C9C9;
  --danger-hover: #6F2B2B;
  --header-bg: rgba(255, 255, 255, .92);
  --topbar-bg: rgba(243, 245, 247, .92);
  --footer-bg: #484F58;
  --band-bg: #484F58;
  --focus-ring: rgba(72, 79, 88, .12);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(72, 79, 88, .08);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .04), 0 18px 48px rgba(72, 79, 88, .14);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--graphite);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--graphite); text-decoration-color: var(--silver); text-underline-offset: 3px; transition: color var(--t), text-decoration-color var(--t); }
a:hover { color: var(--black); text-decoration-color: var(--black); }
strong { font-weight: 500; color: var(--black); }
hr { border: 0; border-top: 1px solid var(--tint-2); margin: 1.5rem 0; }
:focus-visible { outline: 2px solid var(--graphite); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, .h2 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--black);
  line-height: 1.15;
  margin: 0 0 .6em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
h2, .h2 { font-size: clamp(1.7rem, 3vw, 2.25rem); }
h3 { font-size: 1.45rem; }
h1 em, h2 em { font-style: italic; color: var(--slate); }
p { margin: 0 0 1em; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--slate); }
.small { font-size: .85rem; }
.mono { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; letter-spacing: .04em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--black); color: var(--white); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; color: var(--white); }
.js .js-hide { display: none; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.eyebrow {
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: .9rem;
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--slate); max-width: 62ch; }
.lead-small { font-size: 1.05rem; color: var(--slate); }
.note { font-size: .85rem; color: var(--slate); }
.signature { font-family: var(--serif); font-style: italic; font-size: 1.35rem; color: var(--black); }

.stat-value, .perf-value, .price, .error-code, .step-num, .presta-num, .code-value { font-variant-numeric: lining-nums; }

/* ---------- Boutons ---------- */
.btn {
  --bg: var(--graphite); --fg: var(--white); --bd: var(--graphite);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.5rem;
  font: 400 .95rem/1.2 var(--font);
  color: var(--fg); background: var(--bg);
  border: 1px solid var(--bd); border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
}
.btn:hover { --bg: var(--black); --bd: var(--black); color: var(--fg); box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-small { padding: .45rem 1rem; font-size: .85rem; }
.btn-block { display: flex; width: 100%; }
.btn-outline { --bg: transparent; --fg: var(--graphite); --bd: var(--silver); }
.btn-outline:hover { --bg: var(--graphite); --fg: var(--white); --bd: var(--graphite); }
.btn-ghost { --bg: transparent; --fg: var(--graphite); --bd: transparent; }
.btn-ghost:hover { --bg: var(--tint); --fg: var(--black); --bd: var(--tint); box-shadow: none; }
.btn-light { --bg: var(--k-white); --fg: var(--k-black); --bd: var(--k-white); }
.btn-light:hover { --bg: var(--k-mist); --fg: var(--k-black); --bd: var(--k-mist); }
.btn-ghost-light { --bg: transparent; --fg: var(--k-white); --bd: rgba(255, 255, 255, .45); }
.btn-ghost-light:hover { --bg: rgba(255, 255, 255, .1); --fg: var(--k-white); --bd: var(--k-white); }
.btn-outline-light { --bg: transparent; --fg: var(--k-mist); --bd: rgba(206, 212, 219, .35); }
.btn-outline-light:hover { --bg: rgba(255, 255, 255, .08); --fg: var(--k-white); --bd: var(--k-mist); }
.btn-danger { --bg: var(--danger); --bd: var(--danger); }
.btn-danger:hover { --bg: var(--danger-hover); --bd: var(--danger-hover); }
.btn-danger-ghost { --bg: transparent; --fg: var(--danger); --bd: transparent; }
.btn-danger-ghost:hover { --bg: var(--danger-bg); --fg: var(--danger); --bd: var(--danger-bg); box-shadow: none; }
.link-arrow { font-weight: 400; text-decoration: none; border-bottom: 1px solid var(--silver); padding-bottom: 2px; }
.link-arrow::after { content: ' →'; }
.link-back { font-size: .9rem; text-decoration: none; color: var(--slate); }
.link-back::before { content: '← '; }

/* ---------- En-tête public ---------- */
.site-header, .app-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--tint-2);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--black); }
.brand:hover { color: var(--black); }
.logo-mark { width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; }
.brand-name { font-family: var(--serif); font-size: 1.55rem; font-weight: 500; letter-spacing: .01em; line-height: 1; }
.main-nav { display: flex; align-items: center; gap: .3rem; }
.main-nav > a:not(.btn) {
  position: relative; padding: .5rem .8rem; font-size: .92rem; font-weight: 400;
  text-decoration: none; color: var(--slate); border-radius: 999px;
}
.main-nav > a:not(.btn):hover { color: var(--black); background: var(--tint); }
.main-nav > a[aria-current="page"] { color: var(--black); }
.main-nav > a[aria-current="page"]::after {
  content: ''; position: absolute; left: 50%; bottom: .15rem; width: 18px; height: 1px; background: var(--black); transform: translateX(-50%);
}
.nav-cta { margin-left: .6rem; white-space: nowrap; }
.brand-name { white-space: nowrap; }
@media (min-width: 961px) and (max-width: 1180px) {
  .main-nav > a:not(.btn) { padding: .5rem .5rem; font-size: .86rem; }
  .brand-name { font-size: 1.3rem; }
  .header-inner { gap: 1rem; }
}
.inline-form { display: inline; margin: 0; }
.main-nav .inline-form { margin-left: .6rem; }

.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--tint-2); border-radius: 50%; background: var(--white); cursor: pointer; position: relative; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  position: absolute; left: 50%; width: 18px; height: 1.5px; background: var(--graphite); transform: translateX(-50%); transition: transform var(--t), opacity var(--t);
}
.nav-toggle-bar { top: 50%; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ''; left: 0; transform: none; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

.theme-toggle {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 40px; height: 40px; padding: 0;
  color: var(--graphite); background: transparent;
  border: 1px solid var(--tint-2); border-radius: 50%; cursor: pointer;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.theme-toggle:hover { color: var(--black); background: var(--tint); border-color: var(--silver); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }
.header-tools { display: flex; align-items: center; gap: .6rem; }
.header-inner > .main-nav { order: 2; margin-left: auto; }
.header-inner > .header-tools-mobile { order: 3; }

.count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.35rem; height: 1.35rem; padding: 0 .4rem;
  font-size: .72rem; font-weight: 500; line-height: 1;
  color: var(--white); background: var(--black); border-radius: 999px;
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(3.5rem, 7vw, 6rem); background: linear-gradient(180deg, var(--white) 0%, var(--tint) 100%); }
.hero::before {
  content: ''; position: absolute; right: -12%; top: -30%; width: 60vw; height: 60vw; max-width: 820px; max-height: 820px;
  border-radius: 50%; border: 1px solid var(--tint-2); pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.35fr 1fr; align-items: center; gap: 3rem; }
.hero h1 { margin-bottom: .45em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.center-actions { justify-content: center; }
.hero-visual { display: flex; justify-content: center; }
.hero-logo { width: min(440px, 100%); height: auto; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .18)); }

.page-hero { padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 3.5rem); background: var(--tint); border-bottom: 1px solid var(--tint-2); text-align: center; }
.page-hero .lead { margin-inline: auto; }
.page-hero h1 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-tinted { background: var(--tint); }
.section-form { background: var(--tint); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split-top { align-items: start; grid-template-columns: 1.5fr 1fr; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: s; }
.step { position: relative; padding: 2rem; border: 1px solid var(--tint-2); border-radius: var(--radius); background: var(--white); }
.step-num {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 1.2rem;
  font-family: var(--serif); font-size: 1.4rem; color: var(--black);
  border: 1px solid var(--silver); border-radius: 50%;
}
.step h3 { margin-bottom: .4rem; }
.step p { color: var(--slate); margin: 0; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-bottom: 2.5rem; }
.card { padding: 1.8rem; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform var(--t), box-shadow var(--t); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--slate); margin: 0; font-size: .95rem; }
.card-center { text-align: center; }

.checklist { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.checklist li { position: relative; padding: .35rem 0 .35rem 1.9rem; }
.checklist li::before {
  content: ''; position: absolute; left: 0; top: .78rem; width: 1.05rem; height: 1.05rem; border-radius: 50%;
  border: 1px solid var(--silver); background: var(--white);
}
.checklist li::after {
  content: ''; position: absolute; left: .37rem; top: 1.02rem; width: .32rem; height: .5rem;
  border: solid var(--graphite); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translate(-1px, -2px);
}

.quote { margin: 0; padding: clamp(2rem, 4vw, 3rem); background: var(--k-graphite); color: var(--k-mist); border-radius: var(--radius); position: relative; }
.quote::before { content: '“'; position: absolute; top: -.2rem; left: 1.4rem; font-family: var(--serif); font-size: 7rem; line-height: 1; color: var(--k-slate); }
.quote blockquote { margin: 0 0 1.4rem; font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-style: italic; line-height: 1.35; color: var(--k-white); position: relative; }
.quote figcaption { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }

.cta-band { background: var(--footer-bg); color: var(--k-mist); padding: clamp(3rem, 6vw, 4.5rem) 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-band h2 { color: var(--k-white); margin-bottom: .3rem; }
.cta-band p { margin: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.panel { padding: clamp(1.4rem, 3vw, 2.2rem); background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel h3 { margin-bottom: .8rem; }
.panel-success { text-align: center; padding: 3rem 2rem; }
.panel-dashed { box-shadow: none; border: 1.5px dashed var(--silver); background: transparent; }
.panel-narrow { max-width: 860px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-size: 1.6rem; }

/* ---------- Prestations ---------- */
.presta-list { display: grid; gap: 0; }
.presta { display: grid; grid-template-columns: 90px 1fr; gap: 1.5rem; padding: 2rem 0; border-bottom: 1px solid var(--tint-2); }
.presta:first-child { padding-top: 0; }
.presta-num { font-family: var(--serif); font-size: 2.6rem; line-height: 1; color: var(--silver); }
.presta h2 { font-size: 1.75rem; margin-bottom: .4rem; }
.presta p { color: var(--slate); max-width: 70ch; }
.tags { list-style: none; padding: 0; margin: .6rem 0 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.tags li { padding: .25rem .8rem; font-size: .8rem; color: var(--graphite); background: var(--tint); border: 1px solid var(--tint-2); border-radius: 999px; }

/* ---------- Tarifs ---------- */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.5rem; align-items: stretch; margin-bottom: 2rem; }
.price-card { position: relative; display: flex; flex-direction: column; padding: 2.4rem 2rem 2rem; border: 1px solid var(--tint-2); border-radius: var(--radius); background: var(--white); }
.price-card .checklist { flex: 1; }
.price-card h2 { font-size: 2rem; margin-bottom: .2rem; }
.price-sub { color: var(--slate); font-size: .95rem; min-height: 3em; }
.price { font-family: var(--serif); font-size: 2.2rem; color: var(--black); margin: .2rem 0 1.2rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--tint-2); }
.price-card.is-featured { background: var(--k-graphite); color: var(--k-mist); border-color: var(--k-graphite); box-shadow: var(--shadow-lg); }
.price-card.is-featured h2, .price-card.is-featured .price { color: var(--k-white); }
.price-card.is-featured .price-sub { color: var(--k-silver); }
.price-card.is-featured .price { border-color: rgba(255, 255, 255, .15); }
.price-card.is-featured .checklist li::before { background: transparent; border-color: var(--k-slate); }
.price-card.is-featured .checklist li::after { border-color: var(--k-white); }
.price-card.is-featured .btn { --bg: var(--k-white); --fg: var(--k-black); --bd: var(--k-white); }
.badge-featured { position: absolute; top: -.8rem; left: 2rem; padding: .25rem .9rem; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; background: var(--white); color: var(--black); border-radius: 999px; box-shadow: var(--shadow); }

/* ---------- Formulaires ---------- */
.form fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }
.form legend { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; color: var(--black); margin-bottom: 1rem; padding: 0; }
.field { margin-bottom: 1.1rem; }
.field label, .label { display: block; margin-bottom: .4rem; font-size: .88rem; font-weight: 400; color: var(--graphite); }
.hint { color: var(--slate); font-size: .8rem; }
.req { color: var(--danger); }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="search"], input[type="number"], input:not([type]), select, textarea {
  width: 100%; padding: .75rem .95rem;
  font: 300 1rem/1.4 var(--font); color: var(--black);
  background: var(--white); border: 1px solid var(--mist); border-radius: var(--radius-sm);
  transition: border-color var(--t), box-shadow var(--t);
}
textarea { resize: vertical; min-height: 6rem; }
input:hover, select:hover, textarea:hover { border-color: var(--silver); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--graphite); box-shadow: 0 0 0 3px var(--focus-ring); }
input[type="file"] { width: 100%; padding: .6rem; font: 300 .9rem var(--font); border: 1px dashed var(--silver); border-radius: var(--radius-sm); background: var(--tint); cursor: pointer; }
input[type="file"]::file-selector-button { margin-right: 1rem; padding: .45rem 1rem; font: 400 .85rem var(--font); color: var(--white); background: var(--graphite); border: 0; border-radius: 999px; cursor: pointer; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--slate) 50%), linear-gradient(135deg, var(--slate) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.4rem; }
.has-error input, .has-error textarea, .has-error select { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .82rem; margin: .35rem 0 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }
.radios, .checks { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1.2rem; }
.checks-inline { display: flex; margin-bottom: 1rem; }
.radio, .check { display: flex; align-items: flex-start; gap: .6rem; font-size: .92rem; color: var(--graphite); cursor: pointer; margin: 0; }
.radio input, .check input { margin-top: .3rem; accent-color: var(--graphite); width: 1rem; height: 1rem; flex-shrink: 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.form-compact .field { margin-bottom: .8rem; }
.stack { display: grid; gap: .6rem; }

.alert { padding: .9rem 1.2rem; border-radius: var(--radius-sm); margin-bottom: 1.2rem; font-size: .93rem; border: 1px solid transparent; }
.alert-succes { background: var(--tint); border-color: var(--mist); color: var(--black); }
.alert-succes::before { content: '✓  '; }
.alert-info { background: var(--tint); border-color: var(--tint-2); color: var(--graphite); }
.alert-erreur { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger); }

/* ---------- Connexion ---------- */
.login-section { background: linear-gradient(180deg, var(--tint) 0%, var(--white) 100%); min-height: calc(100vh - 76px - 260px); display: flex; align-items: center; }
.login-card { max-width: 460px; margin: 0 auto; text-align: center; padding: clamp(2rem, 5vw, 3rem); }
.login-card h1 { font-size: 2.4rem; margin-bottom: .3rem; }
.login-logo { width: 150px; height: 150px; margin: -.5rem auto 1rem; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .15)); }
.login-card .form { text-align: left; margin-top: 1.5rem; }
.code-input { text-align: center; font-family: ui-monospace, Consolas, monospace !important; font-size: 1.5rem !important; letter-spacing: .32em; text-transform: uppercase; padding: 1rem !important; }
.code-input::placeholder { color: var(--mist); }
.login-card .note { margin-top: 1.5rem; margin-bottom: 0; }

.error-code { font-family: var(--serif); font-size: 6rem; line-height: 1; color: var(--mist); margin: 0; }

/* ---------- Pages légales ---------- */
.prose h2 { font-size: 1.75rem; margin-top: 2.2rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.legal { font-size: .96rem; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 1rem 0 1.5rem; }
.table th, .table td { text-align: left; padding: .75rem .8rem; border-bottom: 1px solid var(--tint-2); vertical-align: top; }
.table th { font-weight: 500; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--slate); background: var(--tint); }
.table-hover tbody tr:hover { background: var(--tint); }
.table-wrap { overflow-x: auto; margin: 0 -.5rem; padding: 0 .5rem; }
.th-actions, .td-actions { text-align: right; white-space: nowrap; }
.td-actions .btn, .td-actions form { margin-left: .2rem; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--footer-bg); color: var(--k-mist); padding: 4rem 0 0; font-size: .9rem; }
.site-footer a { color: var(--k-mist); text-decoration-color: var(--k-slate); }
.site-footer a:hover { color: var(--k-white); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 3rem; }
.brand-footer { color: var(--k-white); margin-bottom: 1rem; }
.brand-footer:hover { color: var(--k-white); }
.brand-footer .logo-mark { width: 64px; height: 64px; }
.footer-title { font-family: var(--font); font-size: .75rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--k-silver); margin-bottom: 1rem; }
.footer-text { color: var(--k-mist); }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.footer-links a { text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 2rem; padding: 1.4rem 0; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .8rem; color: var(--k-silver); }
.footer-bottom a { color: inherit; }

/* ==========================================================================
   Espace famille
   ========================================================================== */
.app { background: var(--tint); }
.app-header { background: var(--header-bg); }
.dossier-band { background: var(--band-bg); color: var(--k-mist); font-size: .88rem; }
.dossier-band .container { display: flex; flex-wrap: wrap; gap: .3rem .7rem; align-items: center; padding: .6rem 0; }
.dossier-band strong { color: var(--k-white); }
.dossier-band-sep { color: var(--k-slate); }
@media (max-width: 640px) { .dossier-band-sep { display: none; } .dossier-band .container { flex-direction: column; align-items: flex-start; } }
.app-main { padding: 2.5rem 0 4rem; min-height: calc(100vh - 200px); }
.app-footer { background: var(--white); border-top: 1px solid var(--tint-2); color: var(--slate); }
.app-footer .footer-bottom { border: 0; color: var(--slate); }
.welcome { margin-bottom: 2rem; }
.welcome h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: .3rem; }
.page-title { margin-bottom: 1.6rem; }
.page-title h1 { margin-bottom: .2rem; }
.page-title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.grid-main { display: grid; grid-template-columns: 1.7fr 1fr; gap: 1.5rem; align-items: start; margin-bottom: 1.5rem; }
.grid-main-wide { grid-template-columns: 1.35fr 1fr; }
.grid-gap { gap: 1.5rem; margin-bottom: 1.5rem; }

.stats { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.stats-3 { grid-template-columns: repeat(3, 1fr); }
.stats-4 { grid-template-columns: repeat(4, 1fr); }
.stat { display: flex; flex-direction: column; padding: 1.4rem 1.5rem; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--graphite); border: 1px solid transparent; transition: border-color var(--t), transform var(--t); }
.stat-link:hover { border-color: var(--silver); transform: translateY(-2px); color: var(--graphite); }
.stat-value { font-family: var(--serif); font-size: 2.6rem; line-height: 1.05; color: var(--black); }
.stat-label { font-size: .9rem; font-weight: 400; }
.stat-sub { font-size: .78rem; color: var(--slate); margin-top: .2rem; }
.stat-alert { border-color: var(--graphite); }
.stat-alert .stat-value::after { content: ''; display: inline-block; width: .5rem; height: .5rem; margin-left: .5rem; vertical-align: super; background: var(--black); border-radius: 50%; }

.action-list { list-style: none; margin: 0; padding: 0; }
.action-item { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: start; padding: 1.1rem 0; border-bottom: 1px solid var(--tint-2); }
.action-item:last-child { border-bottom: 0; }
.action-main { min-width: 0; }
.action-title { margin: 0; font-weight: 500; color: var(--black); }
.action-desc { margin: .15rem 0 0; font-size: .92rem; color: var(--graphite); white-space: pre-line; overflow-wrap: anywhere; }
.action-desc-full { white-space: pre-line; background: var(--tint); padding: 1rem 1.2rem; border-radius: var(--radius-sm); }
.action-date { margin: .25rem 0 0; font-size: .8rem; color: var(--slate); }
.action-links { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.sens { display: inline-block; min-width: 6.8rem; text-align: center; padding: .25rem .6rem; font-size: .72rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; margin-top: .1rem; }
.sens-envoi { background: var(--graphite); color: var(--white); }
.sens-reception { background: var(--white); color: var(--graphite); border: 1px solid var(--silver); }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1.2rem; }
.filters input[type="search"] { flex: 1 1 260px; width: auto; }
.filters select { width: auto; min-width: 180px; }
.filters label { font-size: .88rem; }
.pdf-viewer { width: 100%; height: 78vh; min-height: 480px; border: 1px solid var(--tint-2); border-radius: var(--radius-sm); background: var(--tint); margin-top: 1rem; }

/* Messagerie */
.panel-thread { display: flex; flex-direction: column; }
.thread { display: flex; flex-direction: column; gap: 1rem; }
.thread-messages { display: flex; flex-direction: column; gap: .8rem; max-height: 60vh; min-height: 260px; overflow-y: auto; padding: 1rem; background: var(--tint); border-radius: var(--radius-sm); }
.thread-empty { margin: auto; color: var(--slate); font-size: .92rem; }
.msg { max-width: 82%; }
.msg-meta { font-size: .74rem; color: var(--slate); margin-bottom: .2rem; }
.msg-body { padding: .75rem 1rem; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .95rem; line-height: 1.55; }
.msg-other { align-self: flex-start; }
.msg-other .msg-body { background: var(--white); color: var(--black); border-bottom-left-radius: 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.msg-mine { align-self: flex-end; text-align: right; }
.msg-mine .msg-body { background: var(--graphite); color: var(--white); border-bottom-right-radius: 4px; text-align: left; }
.thread-form { display: grid; grid-template-columns: 1fr auto; gap: .7rem; align-items: end; }
.thread-form textarea { min-height: 3.2rem; }
.thread-error { color: var(--danger); font-size: .85rem; margin: 0; }
.thread-closed { text-align: center; color: var(--slate); font-size: .9rem; margin: 0; }

.badge { display: inline-block; padding: .18rem .65rem; font-family: var(--font); font-size: .72rem; font-weight: 500; letter-spacing: .04em; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.badge-actif { background: var(--graphite); color: var(--white); }
.badge-suspendu { background: var(--white); color: var(--danger); border: 1px solid var(--danger-line); }
.badge-cloture, .badge-muted { background: var(--tint-2); color: var(--slate); }
.badge-devis { background: var(--black); color: var(--white); }
.badge-contact { background: var(--white); color: var(--graphite); border: 1px solid var(--silver); }

/* ==========================================================================
   Panel accompagnatrice
   ========================================================================== */
.app-admin { background: var(--tint); }
.admin-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 1.5rem 1rem; background: var(--footer-bg); color: var(--k-mist); overflow-y: auto; }
.brand-admin { color: var(--k-white); padding: 0 .5rem 1.5rem; margin-bottom: 1rem; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.brand-admin:hover { color: var(--k-white); }
.brand-admin .logo-mark { width: 52px; height: 52px; }
.brand-admin .brand-name { display: block; font-size: 1.3rem; }
.brand-sub { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--k-silver); margin-top: .2rem; }
.admin-nav { display: grid; gap: .15rem; }
.admin-nav a { display: flex; justify-content: space-between; align-items: center; padding: .65rem .8rem; font-size: .92rem; font-weight: 300; color: var(--k-mist); text-decoration: none; border-radius: var(--radius-sm); }
.admin-nav a:hover { background: rgba(255, 255, 255, .06); color: var(--k-white); }
.admin-nav a[aria-current="page"] { background: var(--k-white); color: var(--k-black); font-weight: 400; }
.admin-nav .count { background: var(--k-white); color: var(--k-black); }
.admin-nav a[aria-current="page"] .count { background: var(--k-black); color: var(--k-white); }
.admin-sidebar-foot { margin-top: auto; display: grid; gap: .8rem; padding: 1rem .5rem 0; font-size: .85rem; border-top: 1px solid rgba(255, 255, 255, .08); }
.admin-sidebar-foot a { color: var(--k-silver); }
.admin-content { min-width: 0; }
.admin-topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem; padding: .9rem clamp(1rem, 3vw, 2.5rem); background: var(--topbar-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--tint-2); }
.admin-topbar-title { flex: 1; font-weight: 400; color: var(--slate); font-size: .92rem; }
.admin-main { padding: clamp(1.2rem, 3vw, 2.5rem); max-width: 1400px; }
.admin-main > .h2:first-child { margin-bottom: 1.2rem; }

.simple-list { list-style: none; padding: 0; margin: 0; }
.simple-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--tint-2); }
.simple-list li:last-child { border-bottom: 0; }
.simple-list a { text-decoration: none; }
.kv { list-style: none; padding: 0; margin: 0; }
.kv li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--tint-2); font-size: .9rem; }
.kv li:last-child { border-bottom: 0; }
.kv span { color: var(--slate); }
.kv strong { text-align: right; font-weight: 400; overflow-wrap: anywhere; }
.kv-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 2rem; margin-top: 1.5rem; }
.kv-cols li:last-child { border-bottom: 1px solid var(--tint-2); }
.kv-inline { display: flex; flex-wrap: wrap; gap: .3rem 1.6rem; margin: .6rem 0; }
.kv-inline li { border: 0; padding: 0; gap: .5rem; }

.chart { width: 100%; height: auto; }
.chart-grid { stroke: var(--tint-2); stroke-width: 1; }
.chart-bar { fill: var(--mist); transition: fill var(--t); }
.chart-bar.is-today { fill: var(--graphite); }
.chart g:hover .chart-bar { fill: var(--slate); }
.chart-value { font: 400 15px var(--font); fill: var(--graphite); }
.chart-label { font: 300 14px var(--font); fill: var(--slate); }

.perf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.perf { display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem 1.2rem; border: 1px solid var(--tint-2); border-radius: var(--radius-sm); }
.perf-label { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); }
.perf-value { font-family: var(--serif); font-size: 2rem; line-height: 1.1; color: var(--black); }
.perf-sub { font-size: .78rem; color: var(--slate); }
progress { width: 100%; height: 6px; appearance: none; border: 0; border-radius: 999px; background: var(--tint-2); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--tint-2); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--graphite); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--graphite); border-radius: 999px; }

.dossier-head { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: start; margin: 1rem 0 1.5rem; }
.dossier-head h1 { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-bottom: .3rem; }
.dossier-head .eyebrow { margin-bottom: .4rem; }
.code-card { display: flex; flex-direction: column; align-items: center; gap: .4rem; min-width: 280px; padding: 1.2rem 1.5rem; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
.code-card.is-new { outline: 2px solid var(--graphite); outline-offset: 3px; }
.code-label { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--slate); }
.code-value { font-size: 1.9rem; font-weight: 500; color: var(--black); letter-spacing: .18em; }
.code-actions { display: flex; gap: .4rem; }
.code-hint { font-size: .8rem; color: var(--slate); margin: .3rem 0 0; max-width: 300px; }

.add-action { margin-bottom: 1rem; }
.add-action > summary { list-style: none; margin-bottom: 1rem; }
.add-action > summary::-webkit-details-marker { display: none; }
.add-action[open] > summary { --bg: transparent; --fg: var(--graphite); --bd: var(--silver); }
.add-action > form { padding: 1.2rem; margin-bottom: 1.2rem; background: var(--tint); border-radius: var(--radius-sm); }
.edit-action { margin-top: .4rem; }
.edit-action > summary { font-size: .8rem; color: var(--slate); cursor: pointer; display: inline-block; }
.edit-action > form { margin-top: .7rem; padding: 1rem; background: var(--tint); border-radius: var(--radius-sm); }
.deleted-actions { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--tint-2); }
.deleted-actions > summary { cursor: pointer; font-size: .88rem; color: var(--slate); }

.conv-list { list-style: none; padding: 0; margin: 0; }
.conv { display: flex; align-items: center; gap: 1rem; border-bottom: 1px solid var(--tint-2); }
.conv:last-child { border-bottom: 0; }
.conv a { flex: 1; display: block; padding: 1rem .5rem; text-decoration: none; min-width: 0; }
.conv a:hover { background: var(--tint); }
.conv-head { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: baseline; }
.conv-date { margin-left: auto; font-size: .78rem; color: var(--slate); }
.conv-preview { display: block; font-size: .9rem; color: var(--slate); margin-top: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv.is-unread .conv-preview { color: var(--black); font-weight: 400; }

.demandes { display: grid; gap: 1rem; }
.demande { padding: 1.3rem 1.4rem; border: 1px solid var(--tint-2); border-radius: var(--radius-sm); }
.demande.is-new { border-color: var(--silver); border-left: 3px solid var(--graphite); }
.demande-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; }
.demande-msg { white-space: pre-line; background: var(--tint); padding: .9rem 1.1rem; border-radius: var(--radius-sm); margin: .8rem 0; font-size: .93rem; overflow-wrap: anywhere; }
.demande-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.formules-admin { display: grid; gap: 1.2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-4, .perf-grid { grid-template-columns: repeat(2, 1fr); }
  .kv-cols { grid-template-columns: repeat(2, 1fr); }
  .grid-main, .grid-main-wide { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .nav-toggle { display: inline-block; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .8rem 1.25rem 1.4rem; background: var(--white); border-bottom: 1px solid var(--tint-2);
    box-shadow: 0 18px 30px rgba(0, 0, 0, .06);
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav > a:not(.btn) { padding: .8rem .4rem; border-radius: 0; border-bottom: 1px solid var(--tint); }
  .main-nav > a[aria-current="page"]::after { display: none; }
  .nav-cta, .main-nav .inline-form { margin: 1rem 0 0; }
  .main-nav .inline-form .btn { width: 100%; }
  .hero-inner, .split, .split-top { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .steps, .cards { grid-template-columns: 1fr 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: fixed; z-index: 60; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform var(--t); box-shadow: var(--shadow-lg); }
  .admin-sidebar.is-open { transform: none; }
  .nav-toggle-admin { display: inline-block; }
  .dossier-head { grid-template-columns: 1fr; }
  .code-card { align-items: flex-start; text-align: left; }
}

@media (max-width: 640px) {
  body { font-size: .96rem; }
  .brand-name { font-size: 1.3rem; }
  .logo-mark { width: 42px; height: 42px; }
  .steps, .cards, .grid-2, .grid-3, .checks, .stats-3, .stats-4, .perf-grid, .kv-cols, .footer-grid { grid-template-columns: 1fr; }
  .presta { grid-template-columns: 1fr; gap: .4rem; }
  .action-item { grid-template-columns: 1fr; gap: .5rem; }
  .action-links { justify-content: flex-start; }
  .thread-form { grid-template-columns: 1fr; }
  .msg { max-width: 92%; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .td-actions { white-space: normal; }
  .admin-topbar .btn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .app-header, .site-footer, .app-footer, .admin-sidebar, .admin-topbar, .btn, .cta-band { display: none !important; }
  body, .app { background: #fff; }
  .panel { box-shadow: none; }
}
