/* ===========================================================================
   STUDIO — la feuille de style du systeme de design.

   Tout est sous `.st`, et chaque classe commence par « s- » (l'application)
   ou « l- » (la page d'accueil). Rien ne fuit donc vers le reste d'un site
   existant, et rien du site ne vient abimer ces ecrans : les balises nues
   (button, input, h1…) sont remises a plat juste en dessous.

   Les regles du systeme :
   - grille de 4 px : tous les espaces sont des multiples de 4 ;
   - UNE couleur d'accent (--accent), le vert pour l'argent et ce qui est
     acquis, l'ambre pour ce qui attend, le rouge pour ce qui bloque ;
   - une seule police (Geist), graisses 400 a 600, chiffres a chasse fixe ;
   - des traits fins plutot que des ombres ; une ombre seulement au survol ;
   - rayons : 6 (etiquette) · 8 (petit bouton) · 10 (bouton, champ) ·
     12 (encart) · 16 (carte) · 20 (grand bloc).

   Clair par defaut. Sombre : data-tone="dark" sur `.st`.
   Changer de marque : redefinir --accent, rien d'autre.
   =========================================================================== */

:root:has(.st), body:has(.st) { margin: 0; background: #f2f2f4; color-scheme: light; }
:root:has(.st[data-tone='dark']), body:has(.st[data-tone='dark']) { background: #09080b; color-scheme: dark; }

.st {
  /* --- la marque : la seule ligne a changer d'un projet a l'autre --- */
  --accent: #a626c4;

  /* derives de l'accent */
  --accent-hi: color-mix(in srgb, var(--accent) 86%, white);   /* survol d'un bouton */
  --accent-ink: color-mix(in srgb, var(--accent) 84%, black);  /* l'accent ecrit en texte, lisible sur fond clair */
  --accent-soft: color-mix(in srgb, var(--accent) 70%, black); /* survol d'un lien */
  --tint: color-mix(in srgb, var(--accent) 10%, var(--s1));    /* fond d'une option choisie */
  --bubble: color-mix(in srgb, var(--accent) 17%, var(--s1));  /* ma bulle dans une conversation */

  /* --- surfaces, du fond vers le premier plan --- */
  --bg: #f2f2f4;      /* la page */
  --bg-2: #ebebef;    /* un creux dans une carte */
  --s1: #ffffff;      /* une carte */
  --s2: #f1f1f4;      /* un element pose sur une carte, un survol */
  --s3: #e3e3e8;      /* une piste, un avatar vide */
  --field: #ffffff;   /* un champ */
  --hover: #ffffff;
  --line: rgba(14, 14, 16, 0.09);
  --line-2: rgba(14, 14, 16, 0.17);

  /* --- texte --- */
  --ink: #0e0e10;     /* ce qui se lit */
  --mut: #55555f;     /* ce qui accompagne */
  --faint: #73737e;   /* ce qui se devine */
  --ph: #9a9aa5;      /* texte d'exemple d'un champ */

  /* --- etats --- */
  --ok: #12854a;
  --ok-fill: #12854a;
  --warn: #8a5a00;
  --bad: #b3261e;
  --urgent: #c62a2a;
  --soon: #a86400;
  --tint-warn: #fcf3df;
  --wallet-top: #eef8f2;

  /* --- bouton « encre » : noir sur clair, clair sur sombre --- */
  --btn-ink: var(--ink);
  --btn-ink-hi: #2a2a30;
  --btn-ink-text: #ffffff;

  --ink-rgb: 14, 14, 16;
  --bg-rgb: 242, 242, 244;
  --bar-rgb: 255, 255, 255;
  --sh-1: rgba(14, 14, 16, 0.12);
  --sh-2: rgba(14, 14, 16, 0.16);
  --sh-3: rgba(14, 14, 16, 0.22);

  /* --- police : Geist partout, titres et chiffres compris --- */
  --f-sans: var(--font-geist-sans, 'Geist'), system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-display: var(--f-sans);
  --f-mono: var(--f-sans);
  --fw-d: 600;

  --wrap: 1200px;
  --gutter: clamp(16px, 3vw, 32px);

  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  overflow-x: clip;
  color-scheme: light;
}

.st[data-tone='dark'] {
  --accent-hi: color-mix(in srgb, var(--accent) 86%, white);
  --accent-ink: color-mix(in srgb, var(--accent) 58%, white);
  --accent-soft: color-mix(in srgb, var(--accent) 34%, white);
  --tint: color-mix(in srgb, var(--accent) 9%, var(--s1));
  --bubble: color-mix(in srgb, var(--accent) 36%, var(--bg));
  --bg: #09080b;
  --bg-2: #0d0c10;
  --s1: #111015;
  --s2: #1a1820;
  --s3: #24212b;
  --field: #0d0c10;
  --hover: #14131a;
  --line: rgba(240, 238, 245, 0.08);
  --line-2: rgba(240, 238, 245, 0.14);
  --ink: #f2f0f5;
  --mut: #aca8b5;
  --faint: #8a8693;
  --ph: #6f6b78;
  --ok: #4cc38a;
  --ok-fill: #1f8f5e;
  --warn: #e2b260;
  --bad: #f0768a;
  --urgent: #f0768a;
  --soon: #e2b260;
  --tint-warn: #17130b;
  --wallet-top: #14161a;
  --btn-ink: #f2f0f5;
  --btn-ink-hi: #ffffff;
  --btn-ink-text: #09080b;
  --ink-rgb: 240, 238, 245;
  --bg-rgb: 9, 8, 11;
  --bar-rgb: 13, 12, 16;
  --sh-1: rgba(0, 0, 0, 0.5);
  --sh-2: rgba(0, 0, 0, 0.6);
  --sh-3: rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}
/* Sur fond clair, une carte cliquable se detache par une ombre legere au survol. */
.st:not([data-tone='dark']) :is(a.s-pick, a.s-camp):hover { box-shadow: 0 8px 24px rgba(14, 14, 16, 0.08); }
/* Ce qui est ecrit SUR une image reste clair sur voile sombre, dans les deux tons. */
.st .s-auth-art { --ink: #f2f0f5; --mut: #c9c5d1; --faint: #a8a4b1; color: #f2f0f5; }

.st > main { flex: 1; }
.st *, .st *::before, .st *::after { box-sizing: border-box; }

/* --- remise a plat des balises stylees par le reste du site --- */
.st h1, .st h2, .st h3, .st p, .st figure, .st dl, .st dd { margin: 0; }
.st h1, .st h2, .st h3 { font-family: var(--f-sans); font-size: inherit; font-weight: 600; letter-spacing: 0; line-height: 1.25; }
.st ul, .st ol { margin: 0; padding: 0; list-style: none; }
.st a { color: var(--accent-ink); text-decoration: none; }
.st a:hover { color: var(--accent-soft); }
.st label { display: block; }
.st img { max-width: 100%; }
.st button {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 0; padding: 0; margin: 0;
  color: inherit; font: inherit; box-shadow: none; filter: none; transition: none; cursor: pointer;
}
.st button:hover { filter: none; }
.st button:disabled { opacity: 0.5; cursor: default; }
.st input, .st select, .st textarea {
  width: auto; background: none; border: 0; border-radius: 0; padding: 0; margin: 0;
  color: inherit; font: inherit; box-shadow: none; transition: none;
}
.st input:hover, .st select:hover, .st textarea:hover { border-color: inherit; }
.st input:focus, .st select:focus, .st textarea:focus { box-shadow: none; }
.st :focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 6px; }
.st ::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }

/* --- petites briques --- */
.st .s-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.st .s-mut { color: var(--mut); }
.st .s-faint { color: var(--faint); }
.st .s-ok { color: var(--ok); }
.st .s-warn { color: var(--warn); }
.st .s-bad { color: var(--bad); }
.st .s-small { font-size: 13px; }
.st .s-num { font-family: var(--f-mono); letter-spacing: -0.01em; }
.st .s-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.st .s-between { justify-content: space-between; }
.st .s-stack { display: flex; flex-direction: column; gap: 16px; }
.st .s-grow { flex: 1 1 0; min-width: 0; }
.st .s-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.st .s-clip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* --- boutons --- */
.st .s-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  background: var(--accent); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  font: 600 14px/1 var(--f-sans); white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background-color 0.12s;
}
.st .s-btn:hover { background: var(--accent-hi); color: #fff; }
.st .s-btn.lg { height: 48px; padding: 0 20px; font-size: 15px; }
.st .s-btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.st .s-btn.full { width: 100%; }
.st .s-btn.ink { background: var(--btn-ink); color: var(--btn-ink-text); box-shadow: none; }
.st .s-btn.ink:hover { background: var(--btn-ink-hi); color: var(--btn-ink-text); }
.st .s-btn.soft { background: var(--s2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.st .s-btn.soft:hover { background: var(--s3); color: var(--ink); }
.st .s-btn.quiet { background: transparent; color: var(--mut); box-shadow: none; font-weight: 500; }
.st .s-btn.quiet:hover { background: var(--s2); color: var(--ink); }
.st .s-btn.ok { background: var(--ok-fill); }
.st .s-btn.ok:hover { background: color-mix(in srgb, var(--ok-fill) 88%, white); }
.st .s-linkbtn { color: var(--mut); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.st .s-linkbtn:hover { color: var(--ink); }
.st .s-back { display: inline-flex; align-items: center; gap: 6px; color: var(--mut); font-size: 14px; }
.st .s-back:hover { color: var(--ink); }

/* --- champs --- */
.st .s-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--mut); min-width: 0; }
.st .s-field > span.opt { font-weight: 400; color: var(--faint); }
.st .s-hint { font-size: 12.5px; font-weight: 400; color: var(--faint); }
.st .s-input, .st textarea.s-input, .st select.s-input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 10px;
  background: var(--field); border: 1px solid var(--line-2); color: var(--ink);
  font: 400 16px/1.4 var(--f-sans); outline: none; transition: border-color 0.12s, box-shadow 0.12s;
}
.st textarea.s-input { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.st select.s-input { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23aca8b5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.st select.s-input option { background: var(--s1); color: var(--ink); }
.st .s-input::placeholder { color: var(--ph); }
.st .s-input:hover { border-color: rgba(var(--ink-rgb), 0.24); }
.st .s-input:focus { border-color: var(--accent-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-ink) 18%, transparent); }
.st .s-input.mono { font-family: var(--f-mono); font-size: 15px; }
.st .s-money { position: relative; }
.st .s-money::before { content: var(--currency, '$'); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); font: 500 18px var(--f-mono); pointer-events: none; }
.st .s-money .s-input { padding-left: 34px; font: 500 20px var(--f-mono); height: 52px; }
.st .s-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.st .s-error { color: var(--bad); font-size: 14px; }
.st .s-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--mut); cursor: pointer; }
.st .s-check input { appearance: none; flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; display: grid; place-items: center; }
.st .s-check input:checked { background: var(--accent); border-color: var(--accent); }
.st .s-check input:checked::after { content: ''; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.st input[type='range'].s-range { width: 100%; height: 24px; accent-color: var(--accent); cursor: pointer; }

/* Choix : montants, quantites, styles */
.st .s-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.st .s-seg button, .st .s-seg a, .st .s-seg label > span {
  display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 14px; border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); font: 500 14px var(--f-sans); white-space: nowrap; cursor: pointer;
}
.st .s-seg.mono button { font-family: var(--f-mono); }
.st .s-seg button:hover, .st .s-seg a:hover, .st .s-seg label:hover > span { background: var(--s2); color: var(--ink); }
.st .s-seg button[aria-pressed='true'], .st .s-seg a[aria-current='true'], .st .s-seg label input:checked + span { background: var(--ink); color: var(--bg); box-shadow: none; }
.st .s-seg label { position: relative; }
.st .s-seg label input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.st .s-seg label input:focus-visible + span { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.st .s-seg.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter); }
.st .s-seg.scroll::-webkit-scrollbar { display: none; }
.st .s-seg.scroll > * { flex: none; }

/* --- etiquettes --- */
.st .s-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--s2); color: var(--mut); }
.st .s-pill.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.st .s-pill.warn { background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); }
.st .s-pill.bad { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.st .s-pill.accent { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-ink); }

.st .s-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; color: var(--mut); white-space: nowrap; }
.st .s-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 8px; border-radius: 10px; background: var(--accent); color: #fff; font: 600 12px/1 var(--f-sans); vertical-align: 2px; }

/* --- images --- */
.st .s-cover { display: grid; place-items: center; flex: none; overflow: hidden; background: var(--s2); color: var(--faint); border-radius: 10px; }
.st .s-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st .s-cover-sm { width: 44px; height: 44px; border-radius: 8px; }
.st .s-cover-md { width: 64px; height: 64px; }
.st .s-cover-lg { width: 112px; height: 112px; border-radius: 14px; }
.st .s-av { display: grid; place-items: center; flex: none; overflow: hidden; border-radius: 50%; background: var(--s3); color: var(--faint); }
.st .s-av img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- cartes --- */
.st .s-card { background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 20px; min-width: 0; }
.st .s-card.pad { padding: clamp(20px, 3vw, 28px); }
.st .s-card.flat { background: var(--bg-2); }
.st .s-card > h2, .st .s-h2 { font-size: 17px; font-weight: 600; }
.st .s-note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--ok) 8%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 24%, transparent); font-size: 14px; }
.st .s-note svg { flex: none; margin-top: 2px; color: var(--ok); }
.st .s-note.warn { background: color-mix(in srgb, var(--warn) 8%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 24%, transparent); }
.st .s-note.warn svg { color: var(--warn); }
.st .s-note.bad { background: color-mix(in srgb, var(--bad) 8%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 24%, transparent); }
.st .s-note.bad svg { color: var(--bad); }
.st .s-note.accent { background: color-mix(in srgb, var(--accent) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-ink) 28%, transparent); }
.st .s-note.accent svg { color: var(--accent-ink); }
.st .s-note.plain { background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--mut); }
.st .s-note.plain svg { color: var(--mut); }
.st .s-note.plain b { color: var(--ink); font-weight: 500; }
.st .s-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 32px 20px; border-radius: 16px; border: 1px dashed var(--line-2); text-align: center; color: var(--mut); font-size: 14px; }
.st .s-empty svg { color: var(--faint); margin-bottom: 8px; }
.st .s-empty b { color: var(--ink); font-weight: 500; font-size: 15px; }
.st .s-empty p { max-width: 44ch; }

/* --- en-tete --- */
.st .s-top { position: sticky; top: 0; z-index: 30; background: rgba(var(--bg-rgb), 0.86); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid var(--line); }
.st .s-top-in { max-width: var(--wrap); margin: 0 auto; height: 64px; padding: 0 var(--gutter); display: flex; align-items: center; gap: 32px; }
.st .s-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); flex: none; }
.st .s-brand:hover { color: var(--ink); }
.st .s-brand img { width: 32px; height: 32px; display: block; }
.st .s-brand span { font: var(--fw-d) 16px/1 var(--f-display); letter-spacing: -0.02em; }
.st .s-nav { display: flex; gap: 4px; min-width: 0; }
.st .s-nav a { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 8px; color: var(--mut); font-size: 14px; white-space: nowrap; }
.st .s-nav a:hover { color: var(--ink); }
.st .s-nav a[aria-current='page'] { color: var(--ink); background: var(--s2); }
.st .s-top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: none; }
.st .s-tone { flex: none; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--mut); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line-2); transition: background 0.12s, color 0.12s; }
.st .s-tone:hover { background: var(--s2); color: var(--ink); }
.st .s-toplink { color: var(--mut); font-size: 14px; padding: 0 4px; }
.st .s-toplink:hover { color: var(--ink); }
.st .s-me { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 14px; font-weight: 500; max-width: 220px; }
.st .s-me:hover { color: var(--ink); }
.st .s-bal { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 8px; background: color-mix(in srgb, var(--ok) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); font: 500 14px var(--f-mono); letter-spacing: -0.01em; white-space: nowrap; }
.st .s-bal:hover { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.st .s-me span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- barre du bas (telephone) --- */
.st .s-tabbar { display: none; }

/* --- pied --- */
.st .s-auth + .s-foot { margin-top: 0; }
.st .s-foot { border-top: 1px solid var(--line); margin-top: 96px; }
.st .s-foot-in { max-width: var(--wrap); margin: 0 auto; padding: 28px var(--gutter); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 13px; color: var(--faint); }
.st .s-foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.st .s-foot a { color: var(--mut); }
.st .s-foot a:hover, .st .s-foot button:hover { color: var(--ink); }
.st .s-foot button { color: var(--mut); font-size: 13px; }

/* --- pages de l'application --- */
.st .s-main { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 32px var(--gutter) 0; display: flex; flex-direction: column; gap: 32px; }
.st .s-main.narrow { max-width: 760px; }
.st .s-main.slim { max-width: 520px; }
.st .s-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.st .s-head h1, .st .s-title { font: var(--fw-d) clamp(26px, 3.4vw, 36px)/1.12 var(--f-display); letter-spacing: -0.03em; }
.st .s-head p { margin-top: 8px; color: var(--mut); max-width: 60ch; }
.st .s-section { display: flex; flex-direction: column; gap: 12px; }
.st .s-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.st .s-section-head h2 { font-size: 17px; font-weight: 600; }
.st .s-list { display: flex; flex-direction: column; gap: 12px; }
.st .s-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.st .s-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 24px; align-items: start; }
.st .s-split > .sticky { position: sticky; top: 88px; }

/* Chiffres cles */
.st .s-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.st .s-stat { background: var(--s1); padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.st .s-stat b { font: 500 24px/1.2 var(--f-mono); letter-spacing: -0.03em; }
.st .s-stat span { font-size: 13px; color: var(--mut); }
.st .s-stat.ok b { color: var(--ok); }

/* Le solde du client : le chiffre qui compte, puis ou est le reste */
.st .s-wallet { border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(180deg, var(--wallet-top), var(--s1) 70%); overflow: hidden; }
.st .s-wallet .top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; padding: clamp(20px, 3vw, 32px); }
.st .s-wallet .amount { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.st .s-wallet .amount > span { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--mut); }
.st .s-wallet .amount b { font: 500 clamp(44px, 8vw, 64px)/1 var(--f-mono); letter-spacing: -0.045em; color: var(--ok); }
.st .s-wallet .amount small { font-size: 14px; color: var(--mut); max-width: 46ch; }
.st .s-wallet .acts { display: flex; flex-wrap: wrap; gap: 10px; }
.st .s-wallet .cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.st .s-wallet .cells:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.st .s-wallet .cells > div { background: var(--s1); padding: 14px clamp(16px, 3vw, 32px); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st .s-wallet .cells dd { order: -1; }
.st .s-wallet .cells dt { font-size: 13px; color: var(--mut); }
.st .s-wallet .cells dd { font: 500 20px/1.2 var(--f-mono); letter-spacing: -0.03em; }

.st .s-switch { position: relative; flex: none; width: 44px; height: 26px; }
.st .s-switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 1; }
.st .s-switch i { position: absolute; inset: 0; border-radius: 13px; background: var(--s3); box-shadow: inset 0 0 0 1px var(--line-2); transition: background-color 0.15s; }
.st .s-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(14, 14, 16, 0.25); transition: transform 0.15s; }
.st .s-switch input:checked + i { background: var(--accent); box-shadow: none; }
.st .s-switch input:checked + i::after { transform: translateX(18px); }
.st .s-switch input:focus-visible + i { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

/* Premiers pas du client */
.st .s-start { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: var(--s1); overflow: hidden; }
.st .s-start li { display: flex; align-items: center; gap: 16px; padding: 16px 20px; }
.st .s-start li + li { border-top: 1px solid var(--line); }
.st .s-start i { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); font: 500 14px var(--f-mono); font-style: normal; color: var(--mut); }
.st .s-start li.done i { background: var(--ok-fill); box-shadow: none; color: #fff; }
.st .s-start li > div { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st .s-start b { font-weight: 600; }
.st .s-start span { font-size: 13.5px; color: var(--mut); }

/* Choix d'un montant : une ligne par option, avec ce qu'elle donne */
.st .s-opts { display: flex; flex-direction: column; gap: 8px; }
.st .s-opts button { display: flex; align-items: center; justify-content: flex-start; gap: 16px; width: 100%; min-height: 56px; padding: 10px 16px 10px 14px; border-radius: 12px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line-2); text-align: left; }
.st .s-opts button::before { content: ''; flex: none; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.st .s-opts button:hover { background: var(--s2); }
.st .s-opts button[aria-checked='true'] { background: var(--tint); box-shadow: inset 0 0 0 1.5px var(--accent-ink); }
.st .s-opts button[aria-checked='true']::before { box-shadow: inset 0 0 0 5px var(--accent-ink); background: #fff; }
.st .s-opts b { flex: none; min-width: 72px; font: 500 18px var(--f-mono); letter-spacing: -0.02em; }
.st .s-opts span { flex: 1 1 0; min-width: 0; font-size: 13.5px; color: var(--mut); line-height: 1.4; }

/* Budget */
.st .s-budget { display: flex; flex-direction: column; gap: 10px; }
.st .s-meter { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--s3); }
.st .s-meter i { display: block; min-width: 3px; }
.st .s-meter .spent, .st .s-legend .spent { background: var(--accent); }
.st .s-meter .held, .st .s-legend .held { background: var(--ok); }
.st .s-meter .free, .st .s-legend .free { background: var(--s3); }
.st .s-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--mut); }
.st .s-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.st .s-legend i { width: 8px; height: 8px; border-radius: 2px; }
.st .s-legend .free { box-shadow: inset 0 0 0 1px var(--line-2); }

/* Lignes de montants */
.st .s-sum { display: flex; flex-direction: column; }
.st .s-sum > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; font-size: 14px; border-bottom: 1px solid var(--line); }
.st .s-sum > div:last-child { border-bottom: 0; }
.st .s-sum dt, .st .s-sum > div > span:first-child { color: var(--mut); display: flex; align-items: center; gap: 10px; }
.st .s-sum dd, .st .s-sum > div > span:last-child { font-family: var(--f-mono); text-align: right; }
.st .s-sum .total { min-height: 52px; font-size: 16px; font-weight: 500; }
.st .s-sum .total > span:first-child, .st .s-sum .total dt { color: var(--ink); }
.st .s-sum .total > span:last-child, .st .s-sum .total dd { font-size: 20px; font-weight: 500; }
.st .s-sum i.dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }

/* Carte de campagne (liste) */
.st .s-camp { display: flex; flex-direction: column; gap: 16px; color: var(--ink); transition: border-color 0.12s, background-color 0.12s; }
.st a.s-camp:hover { border-color: var(--line-2); background: var(--hover); color: var(--ink); }
.st .s-camp-head { display: flex; gap: 14px; align-items: center; min-width: 0; }
.st .s-camp-head > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st .s-camp-title { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st .s-camp-sub { font-size: 13px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st .s-camp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.st .s-camp-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.st .s-camp-foot b { font: 500 18px var(--f-mono); color: var(--ok); letter-spacing: -0.02em; }

/* Carte de campagne (catalogue) : la pochette en grand */
.st .s-fill .bar { height: 6px; border-radius: 3px; overflow: hidden; background: rgba(var(--ink-rgb), 0.16); }
.st .s-fill .bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.st .s-fill { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 12px; background: var(--s2); }
.st .s-fill > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.st .s-fill span { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.st .s-fill b { font: 500 22px/1 var(--f-mono); letter-spacing: -0.03em; }
.st .s-fill small { font-size: 13px; color: var(--mut); }
.st .s-promo { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-ink) 28%, transparent); color: var(--ink); transition: background-color 0.12s; }
.st a.s-promo:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--ink); }
.st .s-promo .ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--accent-ink) 16%, transparent); color: var(--accent-ink); }
.st .s-promo .txt { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st .s-promo .txt b { font-size: 16px; font-weight: 600; }
.st .s-promo .txt span { font-size: 14px; color: var(--mut); }
.st .s-promo .s-btn { flex: none; }

/* Catalogue : un rayon par origine, jamais melanges */
.st .s-pill .live { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
/* Le catalogue des campagnes ouvertes : une grille reguliere de petites
   cartes, la pochette entiere, rien pose dessus qu'une pastille. */
.st .s-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px; }
.st .s-pick { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 12px 12px 14px; border-radius: 16px; background: var(--s1); border: 1px solid var(--line); color: var(--ink); transition: border-color 0.12s, background 0.12s; }
.st a.s-pick:hover { border-color: var(--line-2); background: var(--hover); color: var(--ink); }
.st .s-pick .art { position: relative; display: grid; place-items: center; aspect-ratio: 1; margin-bottom: 9px; border-radius: 10px; overflow: hidden; background: var(--s2); color: var(--faint); }
.st .s-pick .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st .s-pick .art .s-pill { position: absolute; top: 8px; right: 8px; height: 22px; border-radius: 11px; background: var(--accent); color: #fff; font-weight: 600; font-size: 11.5px; }
.st .s-pick .by { font-size: 12.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st .s-pick b { font-weight: 600; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st .s-pick .art .s-pill.hot { background: var(--urgent); }
.st .s-pick .left { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; }
.st .s-pick .amt { font-weight: 600; font-size: 14px; color: var(--ok); white-space: nowrap; }
.st .s-pick .left small { font-size: 12px; color: var(--faint); white-space: nowrap; }
.st .s-pick .bar { display: block; height: 6px; margin-top: 6px; border-radius: 3px; overflow: hidden; background: var(--s3); }
.st .s-pick .bar i { display: block; height: 100%; border-radius: 3px; background: var(--ok); }
.st .s-pick[data-level='soon'] .amt { color: var(--soon); }
.st .s-pick[data-level='soon'] .bar i { background: var(--soon); }
.st .s-pick[data-level='urgent'] .amt { color: var(--urgent); }
.st .s-pick[data-level='urgent'] .bar i { background: var(--urgent); }
.st .s-pick .meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 8px; margin-top: 10px; }
.st .s-pick .act { font-size: 12px; color: var(--mut); white-space: nowrap; }
.st .s-pick[data-level='urgent'] .act { color: var(--urgent); font-weight: 500; }
/* Le point qui bat : « ouvert en ce moment ». Immobile si l'appareil le demande. */
.st .s-pill .live.beat { animation: s-beat 1.6s ease-in-out infinite; }
@keyframes s-beat { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.7); } }
@media (prefers-reduced-motion: reduce) { .st .s-pill .live.beat { animation: none; } }
.st .s-shelf { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 88px; }
.st .s-shelf + .s-shelf { padding-top: 32px; border-top: 1px solid var(--line); }
.st .s-shelf > header { display: flex; align-items: center; gap: 14px; min-width: 0; }
.st .s-shelf > header img { flex: none; display: block; }
.st .s-shelf > header > div { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st .s-shelf h2 { font: var(--fw-d) clamp(19px, 2.2vw, 24px)/1.2 var(--f-display); letter-spacing: -0.03em; }
.st .s-shelf > header p { font-size: 14px; color: var(--mut); }
.st .s-shelf > header > span { flex: none; font-size: 13px; color: var(--ok); white-space: nowrap; }
.st .s-shelf-empty { padding: 20px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--mut); font-size: 14px; }

/* Offre */
.st .s-offer { display: flex; flex-direction: column; gap: 16px; }
.st .s-offer-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.st .s-who { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 0; }
.st .s-who > div { min-width: 0; display: flex; flex-direction: column; }
.st .s-who b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st .s-who small { font-size: 13px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st .s-who small a { color: var(--mut); }
.st .s-who small a:hover { color: var(--ink); }
.st .s-price { text-align: right; flex: none; display: flex; flex-direction: column; }
.st .s-price b { font: 500 20px/1.2 var(--f-mono); letter-spacing: -0.03em; }
.st .s-price small { font-size: 12.5px; color: var(--mut); font-family: var(--f-mono); }
.st .s-quote { padding: 12px 14px; border-radius: 10px; background: var(--bg-2); color: var(--mut); font-size: 14px; }
.st .s-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.st .s-actions form { display: contents; }

/* Messages : la liste a gauche, la conversation a droite ; toute la hauteur
   de l'ecran, sans pied de page. Sur un telephone : la liste, puis la
   conversation seule en plein ecran. */
.st:has(.s-chat-shell) { height: 100vh; height: 100dvh; min-height: 0; }
.st:has(.s-chat-shell) .s-foot { display: none; }
.st > main.s-chat-shell { flex: 1 1 0; min-height: 0; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 16px var(--gutter); display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; }
.st > main.s-chat-shell.solo { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.st .s-chat-list, .st .s-chat, .st .s-chat-none { min-height: 0; background: var(--s1); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.st .s-chat-list { display: flex; flex-direction: column; }
.st .s-chat-list-head { padding: 20px 20px 12px; border-bottom: 1px solid var(--line); }
.st .s-chat-list-head h1 { font: 600 20px/1.2 var(--f-sans); }
.st .s-chat-list-head p { margin-top: 4px; font-size: 13px; color: var(--mut); }
.st .s-chat-list .s-empty { border: 0; margin: auto 0; }
.st .s-chat-rows { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
.st .s-chat-rows a { display: flex; gap: 12px; padding: 12px 16px; color: var(--ink); min-width: 0; border-bottom: 1px solid var(--line); }
.st .s-chat-rows a:hover { background: var(--s2); color: var(--ink); }
.st .s-chat-rows a[aria-current='page'] { background: var(--s2); box-shadow: inset 3px 0 0 var(--accent); }
.st .s-chat-rows .pic, .st .s-chat-head .pic { flex: none; width: 48px; height: 48px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--s3); color: var(--faint); }
.st .s-chat-rows .pic.round, .st .s-chat-head .pic.round { border-radius: 50%; }
.st .s-chat-rows .pic img, .st .s-chat-head .pic img { width: 100%; height: 100%; object-fit: cover; }
.st .s-chat-rows .txt { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.st .s-chat-rows .top { display: flex; align-items: baseline; gap: 8px; width: 100%; }
.st .s-chat-rows .top b { flex: 1 1 0; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st .s-chat-rows .top time { flex: none; font-size: 12px; color: var(--faint); }
.st .s-chat-rows a.new .top time { color: var(--accent-ink); }
.st .s-chat-rows .sub { font-size: 13px; color: var(--mut); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st .s-chat-rows .last { display: flex; align-items: center; gap: 8px; width: 100%; font-size: 13.5px; color: var(--faint); }
.st .s-chat-rows .last > span { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st .s-chat-rows a.new .last > span { color: var(--ink); font-weight: 500; }
.st .s-chat-rows .last i { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font: 600 12px/20px var(--f-sans); font-style: normal; text-align: center; }
.st .s-chat-rows .s-pill { margin-top: 4px; height: 20px; font-size: 11.5px; }
.st .s-chat-none { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 32px; text-align: center; color: var(--mut); }
.st .s-chat-none svg { color: var(--faint); }
.st .s-chat-none b { color: var(--ink); font-weight: 600; }
.st .s-chat-none p { max-width: 320px; font-size: 14px; }

.st .s-chat { display: flex; flex-direction: column; min-width: 0; }
.st .s-chat-head { flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--s1); }
.st .s-chat-head .back { display: none; flex: none; width: 36px; height: 36px; margin-left: -8px; border-radius: 8px; place-items: center; color: var(--ink); }
.st .s-chat-shell.solo .s-chat-head .back { display: grid; }
.st .s-chat-head .pic { width: 40px; height: 40px; }
.st .s-chat-head .who { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.st .s-chat-head .who b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st .s-chat-head .who small { font-size: 13px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st .s-chat-head .s-btn { flex: none; }

.st .s-chat-msgs { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 6px; padding: 16px; }
.st .s-chat-msgs > li.sys { margin: auto; font-size: 13.5px; color: var(--faint); text-align: center; }
.st .s-chat-msgs .row { display: flex; flex-direction: column; gap: 6px; }
.st .s-chat-msgs .day, .st .s-chat-msgs .row .sys { align-self: center; max-width: 92%; padding: 4px 10px; border-radius: 8px; background: var(--s2); color: var(--mut); font-size: 12px; text-align: center; }
.st .s-chat-msgs .day { margin: 8px 0 2px; }
.st .s-chat-msgs .bubble { align-self: flex-start; max-width: min(78%, 560px); min-width: 0; padding: 8px 12px; border-radius: 4px 14px 14px 14px; background: var(--s2); display: flex; flex-direction: column; gap: 2px; }
.st .s-chat-msgs .bubble.me { align-self: flex-end; border-radius: 14px 4px 14px 14px; background: var(--bubble); }
.st .s-chat-msgs .bubble small { font-size: 12px; font-weight: 500; color: var(--accent-ink); }
.st .s-chat-msgs .bubble p { font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.st .s-chat-msgs .bubble time { float: right; margin: 6px 0 0 12px; font-size: 11px; color: rgba(var(--ink-rgb), 0.55); }
.st .s-chat-msgs .bubble.offer { min-width: 190px; box-shadow: inset 0 0 0 1px var(--line-2); }
.st .s-chat-msgs .bubble.offer.me { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-ink) 35%, transparent); }
.st .s-chat-msgs .bubble.offer b { font: 500 20px/1.3 var(--f-mono); letter-spacing: -0.02em; }
.st .s-chat-msgs .bubble.offer span { font-size: 12.5px; color: var(--mut); }

.st .s-chat-foot { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--s1); }
.st .s-chat-form { display: flex; gap: 8px; align-items: flex-end; }
.st .s-chat-form textarea.s-input { flex: 1 1 0; min-width: 0; min-height: 44px; height: 44px; max-height: 140px; padding: 10px 14px; border-radius: 22px; font-size: 16px; resize: none; field-sizing: content; }
.st .s-chat-form .s-btn { flex: none; border-radius: 22px; }
.st .s-chat-foot .s-hint { font-size: 12px; }

@media (max-width: 860px) {
  .st > main.s-chat-shell { grid-template-columns: minmax(0, 1fr); padding: 0; gap: 0; }
  .st .s-chat-list, .st .s-chat, .st .s-chat-none { border: 0; border-radius: 0; }
  .st .s-chat-none { display: none; }
  .st .s-chat-shell:has(.s-chat) .s-chat-list { display: none; }
  .st .s-chat-head .back { display: grid; }
  .st .s-chat-head .s-btn { display: none; }
  /* La conversation ouverte prend tout l'ecran : ni en-tete du site, ni barre du bas. */
  .st:has(.s-chat) .s-top, .st:has(.s-chat) .s-tabbar { display: none; }
  .st.st-app:has(.s-chat) { padding-bottom: 0; }
  .st .s-chat-msgs .bubble { max-width: 86%; }
}

/* Liens d'edits livres */
.st .s-links { display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.st .s-links li + li { border-top: 1px solid var(--line); }
.st .s-links a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; color: var(--ink); font-size: 14px; }
.st .s-links a:hover { background: var(--s2); color: var(--ink); }
.st .s-links .n { font-weight: 500; flex: none; }
.st .s-links .u { flex: 1 1 0; min-width: 0; color: var(--faint); font: 400 12.5px var(--f-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st .s-links .go { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--accent-ink); font-size: 13px; }

/* Etapes d'une commande */
.st .s-steps { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--faint); flex-wrap: wrap; }
.st .s-steps li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.st .s-steps li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.st .s-steps li.done { color: var(--mut); }
.st .s-steps li.done::before { background: var(--ok); box-shadow: none; }
.st .s-steps li.on { color: var(--ink); font-weight: 500; }
.st .s-steps li.on::before { background: var(--accent-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-ink) 20%, transparent); }
.st .s-steps li + li::after { content: none; }

/* A faire (accueil client) */
.st .s-todo { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--s1); }
.st .s-todo a { display: flex; align-items: center; gap: 14px; padding: 12px 16px; color: var(--ink); min-width: 0; }
.st .s-todo a + a { border-top: 1px solid var(--line); }
.st .s-todo a:hover { background: var(--s2); color: var(--ink); }
.st .s-todo .txt { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.st .s-todo .txt b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st .s-todo .txt small { font-size: 13px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st .s-todo svg { color: var(--faint); flex: none; }

/* Entete d'une campagne */
.st .s-hero { display: flex; gap: 20px; align-items: center; min-width: 0; }
.st .s-hero > div { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.st .s-hero h1 { font: var(--fw-d) clamp(24px, 3.4vw, 36px)/1.1 var(--f-display); letter-spacing: -0.03em; overflow-wrap: anywhere; }

/* Formulaire de campagne : etapes numerotees */
.st .s-step { display: flex; flex-direction: column; gap: 20px; }
.st .s-step-head { display: flex; align-items: center; gap: 12px; }
.st .s-step-head i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--s2); font: 500 13px var(--f-mono); font-style: normal; color: var(--mut); flex: none; }
.st .s-step-head h2 { font-size: 17px; font-weight: 600; }

.st .s-auth { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.st .s-auth-form { display: flex; flex-direction: column; justify-content: center; gap: 24px; padding: 48px var(--gutter); width: 100%; max-width: 480px; margin: 0 auto; }
.st .s-auth-art { position: relative; overflow: hidden; background: var(--bg-2); border-left: 1px solid var(--line); min-height: 560px; }
.st .s-auth-art .cols { position: absolute; inset: -40px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0 24px; transform: rotate(-4deg) scale(1.08); }
.st .s-auth-art .cols > div { display: flex; flex-direction: column; gap: 12px; }
.st .s-auth-art .cols > div:nth-child(2) { margin-top: -80px; }
.st .s-auth-art img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 14px; display: block; opacity: 0.72; }
.st .s-auth-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 12, 16, 0.2), rgba(13, 12, 16, 0.92) 78%); }
.st .s-auth-art blockquote { position: absolute; z-index: 1; left: 40px; right: 40px; bottom: 40px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.st .s-auth-art blockquote b { font: var(--fw-d) 28px/1.15 var(--f-display); letter-spacing: -0.03em; }
.st .s-auth-art blockquote span { color: var(--mut); font-size: 14px; }

.st .l-sec { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 112px var(--gutter) 0; display: flex; flex-direction: column; gap: 40px; scroll-margin-top: 48px; }
.st .l-eyebrow { font-size: 14px; color: var(--accent-ink); }
.st .l-h2 { font: var(--fw-d) clamp(28px, 3.8vw, 48px)/1.08 var(--f-display); letter-spacing: -0.03em; text-wrap: balance; }
.st .l-sechead { display: flex; flex-wrap: wrap; gap: 16px 48px; justify-content: space-between; align-items: flex-end; }
.st .l-sechead > div { display: flex; flex-direction: column; gap: 12px; max-width: 700px; }
.st .l-sechead > p { max-width: 380px; font-size: 16px; line-height: 1.55; color: var(--mut); }

.st .l-hero { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 48px var(--gutter) 88px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.st .l-hero-text { display: flex; flex-direction: column; gap: 28px; align-items: flex-start; min-width: 0; }

.st .l-hero h1 { font: var(--fw-d) clamp(36px, 5vw, 66px)/1.04 var(--f-display); letter-spacing: -0.035em; text-wrap: balance; }
.st .l-hero h1 em { font-style: normal; color: var(--accent-ink); }
.st .l-lead { max-width: 34rem; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.55; color: var(--mut); }

.st .l-under { font-size: 13px; color: var(--faint); margin-top: -12px; }
.st .l-cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* --- page d'accueil : chiffres, prix, dernier appel --- */
.st .l-numbers { max-width: var(--wrap); margin: 0 auto; padding: 40px var(--gutter); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }
.st .l-numbers div { display: flex; flex-direction: column-reverse; gap: 4px; }
.st .l-numbers dd { font: var(--fw-d) clamp(28px, 3vw, 36px)/1.1 var(--f-display); letter-spacing: -0.03em; }
.st .l-numbers dt { font-size: 14px; color: var(--mut); }
.st .l-pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.st .l-amount { font: 500 56px/1 var(--f-mono); letter-spacing: -0.04em; }
.st .l-pricing .l-offer { gap: 14px; }
.st .l-final { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 112px var(--gutter) 16px; display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; }
.st .l-final > div { display: flex; align-items: center; gap: 24px; max-width: 780px; }
.st .l-final img { width: 88px; height: 88px; flex: none; }

.st .s-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
.st .s-tabs button { height: 36px; padding: 0 14px; border-radius: 8px; color: var(--mut); font: 500 14px var(--f-sans); white-space: nowrap; }
.st .s-tabs button[aria-selected='true'] { background: var(--s2); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); }

/* --- tableau : des lignes separees d'un trait, dans une carte --- */
.st .s-table-wrap { background: var(--s1); border: 1px solid var(--line); border-radius: 16px; overflow-x: auto; }
.st .s-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.st .s-table th { height: 40px; padding: 0 16px; text-align: left; font-size: 12.5px; font-weight: 500; color: var(--mut); white-space: nowrap; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.st .s-table td { height: 52px; padding: 8px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.st .s-table tr:last-child td { border-bottom: 0; }
.st .s-table tbody tr:hover td { background: var(--s2); }
.st .s-table .num { text-align: right; font-family: var(--f-mono); white-space: nowrap; }
.st .s-table td b { font-weight: 500; }

/* Le mot « optional » a cote du nom d'un champ : <span>Brief <span class="opt">optional</span></span> */
.st .s-field .opt { font-weight: 400; color: var(--faint); }

/* --- fenetre posee par-dessus la page (balise <dialog>) --- */
.st dialog.s-modal { width: min(480px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--s1); color: var(--ink); box-shadow: 0 32px 80px var(--sh-2); }
.st dialog.s-modal::backdrop { background: rgba(9, 8, 11, 0.5); backdrop-filter: blur(2px); }
.st .s-modal-in { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.st .s-modal-in h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.st .s-modal-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 8px; }

/* --- ecrans moyens --- */
@media (max-width: 1020px) {
  .st .s-split { grid-template-columns: minmax(0, 1fr); }
  .st .s-split > .sticky { position: static; }
  .st .s-auth { grid-template-columns: minmax(0, 1fr); }
  .st .s-auth-art { display: none; }
  .st .l-hero { grid-template-columns: minmax(0, 1fr); }
}

/* --- telephone : le menu passe en barre du bas, les grilles sur une ou deux colonnes --- */
@media (max-width: 760px) {
  .st .wide { display: none; }
  .st .s-top-in { height: 56px; gap: 12px; }
  .st .s-nav { display: none; }
  .st .s-me span:last-child { display: none; }
  .st.st-app { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .st .s-tabbar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: flex; padding: 0 8px env(safe-area-inset-bottom); background: rgba(var(--bar-rgb), 0.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .st .s-tabbar a { flex: 1 1 0; min-width: 0; height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--faint); font-size: 11.5px; font-weight: 500; }
  .st .s-tabbar a[aria-current='page'] { color: var(--ink); }
  .st .s-tabbar .ic { position: relative; display: grid; place-items: center; }
  .st .s-tabbar .ic i { position: absolute; top: -4px; left: 14px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff; font: 600 10px/16px var(--f-sans); font-style: normal; text-align: center; }
  .st .s-foot { margin-top: 64px; }
  .st .s-foot-in { flex-direction: column; }
  .st .s-main { padding-top: 24px; gap: 24px; }
  .st .s-card { padding: 16px; }
  .st .s-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st .s-stat { padding: 14px 16px; }
  .st .s-stat b { font-size: 20px; }
  .st .s-grid { grid-template-columns: minmax(0, 1fr); }
  .st .s-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .st .s-pick { padding: 10px 10px 12px; }
  .st .s-promo { flex-wrap: wrap; padding: 16px; gap: 12px; }
  .st .s-promo .txt { flex-basis: calc(100% - 60px); }
  .st .s-promo .s-btn { flex: 1 1 100%; justify-content: center; }
  .st .s-hero { gap: 14px; align-items: flex-start; }
  .st .s-cover-lg { width: 80px; height: 80px; border-radius: 12px; }
  .st .s-links .u { display: none; }
  .st .s-links .n { flex: 1 1 0; }
  .st .s-actions .s-btn { flex: 1 1 auto; }
  .st .s-bal { height: 32px; padding: 0 10px; font-size: 13px; }
  .st .s-wallet .acts { width: 100%; }
  .st .s-wallet .acts .s-btn { flex: 1 1 0; padding: 0 12px; }
  .st .s-wallet .cells > div { padding: 12px; }
  .st .s-wallet .cells dd { font-size: 16px; }
  .st .s-wallet .cells dt { font-size: 12px; }
  .st .s-start li { flex-wrap: wrap; padding: 16px; gap: 12px; }
  .st .s-start li > div { flex-basis: calc(100% - 48px); }
  .st .s-start .s-btn { margin-left: 44px; }
  .st .s-opts b { min-width: 60px; font-size: 16px; }
  .st .s-shelf > header { flex-wrap: wrap; }
  .st .s-shelf > header > span { flex-basis: 100%; }
  .st .s-who small { white-space: normal; }
  .st .s-table th, .st .s-table td { padding-left: 12px; padding-right: 12px; }
  /* Le bouton principal d'un formulaire long reste a portee de pouce. */
  .st .s-paybar { position: fixed; z-index: 35; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: rgba(var(--bar-rgb), 0.96); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .st:not(.st-app) .s-paybar { bottom: 0; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .st .s-paybar .s-btn { flex: 1; }
  .st .has-paybar { padding-bottom: 72px; }
  .st .l-sec { padding-top: 80px; gap: 28px; }
  .st .l-hero { padding: 24px var(--gutter) 56px; gap: 32px; }
  .st .l-hero-text { gap: 24px; }
  .st .l-cta-row { width: 100%; }
  .st .l-cta-row .s-btn { flex: 1 1 auto; }
  .st .l-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 32px var(--gutter); gap: 24px 16px; }
  .st .l-pricing { grid-template-columns: minmax(0, 1fr); }
  .st .l-amount { font-size: 44px; }
  .st .l-final { padding-top: 80px; }
  .st .l-final > div { flex-direction: column; align-items: flex-start; gap: 16px; }
  .st .l-final .s-btn { width: 100%; }
}

/* Colonne laterale ecrite en premier (elle passe en tete sur telephone), affichee a droite sur ordinateur. */
@media (min-width: 1021px) {
  .st .s-split.rev > :first-child { grid-column: 2; grid-row: 1; }
  .st .s-split.rev > :last-child { grid-column: 1; grid-row: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .st * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .st { background: #fff !important; }
  .st .s-top, .st .s-foot, .st .s-tabbar { display: none !important; }
  .st .s-main { padding: 0; max-width: none; }
}

/* ===========================================================================
   Complements venus des premiers essais du systeme sur d'autres projets.
   =========================================================================== */

/* L'attribut hidden doit toujours cacher, meme un element en display:flex. */
.st [hidden] { display: none !important; }

/* Le grand chiffre quand c'est une somme DUE, pas une somme disponible : encre et fond ambre, jamais vert. */
.st .s-wallet.due { --wallet-top: var(--tint-warn); }
.st .s-wallet.due .amount b { color: var(--ink); }

/* Avatars : trois tailles, initiales en 600 quand il n'y a pas de photo. */
.st .s-av-sm { width: 32px; height: 32px; font-size: 12px; font-weight: 600; }
.st .s-av-md { width: 40px; height: 40px; font-size: 14px; font-weight: 600; }
.st .s-av-lg { width: 56px; height: 56px; font-size: 18px; font-weight: 600; }

/* Des lignes dans un seul cadre, chacune avec son montant, son etat et SON bouton
   (a la difference de .s-todo, ou toute la ligne est un lien). */
.st .s-rows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: var(--s1); overflow: hidden; }
.st .s-rows > * { display: flex; align-items: center; gap: 14px; padding: 12px 16px; min-width: 0; }
.st .s-rows > * + * { border-top: 1px solid var(--line); }
.st .s-rows .txt { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.st .s-rows .txt b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st .s-rows .txt small { font-size: 13px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st .s-rows .amt { flex: none; font: 500 15px/1.3 var(--f-mono); letter-spacing: -0.01em; text-align: right; white-space: nowrap; }

@media (max-width: 760px) {
  .st .s-rows > * { flex-wrap: wrap; }
  .st .s-rows .txt { flex-basis: calc(100% - 120px); }
  .st .s-rows .s-btn { flex: 1 1 100%; }
  /* Un tableau .stack devient une pile de fiches : plus d'en-tetes, la premiere cellule en titre. */
  .st .s-table.stack { min-width: 0; }
  .st .s-table.stack thead { display: none; }
  .st .s-table.stack tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .st .s-table.stack tr:last-child { border-bottom: 0; }
  .st .s-table.stack td { height: auto; padding: 0; border: 0; }
  .st .s-table.stack td:first-child { flex: 1 1 100%; }
  .st .s-table.stack td.num { margin-left: auto; }
}
