/* Sharlinks · composants v3. Dépend de tokens.css. Règles d'usage : docs/v3/DESIGN.md */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* `hidden` l'emporte toujours sur le display d'un composant (ex. .btn). */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  font: 400 var(--fs-md)/1.45 var(--font-text);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--accent); color: var(--on-accent); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: max(var(--gutter), var(--safe-left)) max(var(--gutter), var(--safe-right)); }
.d { font-family: var(--font-display); font-weight: 900; letter-spacing: var(--track-display); line-height: .9; }
h1.d { font-size: var(--fs-h1); }
h2.d { font-size: var(--fs-h2); }
.title { font-family: var(--font-display); font-weight: 900; letter-spacing: var(--track-title); line-height: 1.05; font-size: var(--fs-h3); }
.lead { font-size: var(--fs-lg); line-height: 1.42; color: var(--muted); max-width: 30em; }
.lead b { color: var(--text); font-weight: 800; }
.hand { font-family: var(--font-hand); font-weight: 400; letter-spacing: 0; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Souligné et cercle au marqueur */
.mark {
  white-space: nowrap;
  padding-inline: .02em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 24' preserveAspectRatio='none'%3E%3Cpath d='M5 15C70 8 150 6 295 11' stroke='%23FFE600' stroke-width='11' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") no-repeat left bottom -.08em / 100% .32em;
}
.circled {
  padding: .1em .35em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 80' preserveAspectRatio='none'%3E%3Cpath d='M112 8C60 4 10 16 8 40c-2 26 60 34 108 32 50-2 80-14 76-34C188 16 140 6 84 12' stroke='%23FFE600' stroke-width='5' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

/* ---------- En-tête et logo ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 72px; padding-top: var(--safe-top); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 23px; letter-spacing: -.045em; text-decoration: none; }
.logo::before { content: ""; width: 26px; height: 26px; border-radius: 8px; background: var(--yellow); border: 2.5px solid var(--black); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--tap); padding: 0 18px; border-radius: var(--r-pill);
  font-weight: 800; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; text-decoration: none;
  transition: transform var(--dur-press) var(--ease-out), box-shadow var(--dur-press) var(--ease-out), background-color var(--dur-fast);
}
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-dark { background: var(--strong); color: var(--on-strong); min-height: 48px; padding: 0 22px; font-weight: 900; font-size: 16px; }
.btn-ghost { border: 2px solid var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sso { width: 100%; min-height: 52px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--surface); font-size: 16px; }
.btn-sso:hover { border-color: var(--text); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }

/* Le CTA principal : un seul par écran */
.btn-primary {
  width: 100%; min-height: 64px; padding: 0 28px; gap: 14px; border-radius: var(--r-lg);
  background: var(--yellow); color: var(--black); border: 3px solid var(--black); box-shadow: var(--shadow-hard);
  font-family: var(--font-display); font-weight: 900; font-size: 24px; letter-spacing: -.045em;
}
.btn-primary:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--black); }
.btn-primary:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--black); }
@media (min-width: 1024px) { .btn-primary { width: auto; min-height: 76px; font-size: 29px; } }
:root[data-theme="dark"] .btn-primary:hover, :root[data-theme="dark"] .btn-primary:active { box-shadow: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary:is(:hover, :active) { box-shadow: none; } }

.btn .tag { background: var(--black); color: var(--yellow); font: 800 14px/1.1 var(--font-text); letter-spacing: -.01em; padding: 5px 11px; border-radius: var(--r-pill); }
.btn:is([disabled], [aria-disabled="true"]) { opacity: .45; pointer-events: none; }
.btn[aria-busy="true"] { pointer-events: none; color: transparent; position: relative; }
.btn[aria-busy="true"]::after {
  content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid currentColor; border-color: var(--black) var(--black) transparent; animation: spin .7s linear infinite;
}
.btn-dark[aria-busy="true"]::after { border-color: var(--on-strong) var(--on-strong) transparent; }
@keyframes spin { to { transform: rotate(1turn); } }

/* ---------- Chips, pastilles, badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 13px;
  border-radius: var(--r-pill); background: var(--surface-2); font-weight: 700; font-size: 14px; white-space: nowrap;
}
.chip svg { width: 14px; height: 14px; flex: none; }
button.chip { min-height: var(--tap); }
.chip[aria-pressed="true"] { background: var(--strong); color: var(--on-strong); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 4px rgb(31 191 91 / .22); flex: none; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--yellow); color: var(--black); font-weight: 900; font-size: 13.5px; letter-spacing: -.01em; white-space: nowrap; line-height: 1.15;
}
.badge svg { width: 14px; height: 14px; }
.badge-ink { background: var(--strong); color: var(--on-strong); }
.badge-sponsored { background: transparent; color: var(--text); border: 1.5px solid currentColor; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; }
.badge-demo { background: transparent; color: var(--muted); border: 1.5px dashed currentColor; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; }
.badge-ok { background: var(--success-bg); color: var(--success); }
.badge-wait { background: var(--highlight); color: var(--text); }
.badge-no { background: var(--danger-bg); color: var(--danger); }

.avatar {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: var(--yellow); color: var(--black); font-weight: 900; font-size: 12px; letter-spacing: -.02em;
}
.avatar-me { background: var(--black); color: var(--yellow); border: 2px solid var(--yellow); }
.avatars { display: flex; }
.avatars .avatar { border: 2.5px solid var(--bg); margin-left: -9px; }
.avatars .avatar:first-child { margin-left: 0; }

/* ---------- Cartes ---------- */
.card { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-xl); padding: var(--s-4); }
.card-soft { background: var(--surface-2); border-color: transparent; }
.card-ink { background: var(--inverse); color: var(--on-inverse); border-color: transparent; }
.card-ink .muted { color: var(--gray-400); }
.card-float { box-shadow: var(--shadow-float); }
a.card { text-decoration: none; color: inherit; transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast); }
a.card:hover { border-color: var(--text); }
a.card:active { transform: scale(.99); }

.app-icon {
  --size: 56px;
  display: grid; place-items: center; flex: none; width: var(--size); height: var(--size); overflow: hidden;
  border-radius: calc(var(--size) * .26); background: var(--yellow); border: 2.5px solid var(--black);
  font-weight: 900; font-size: calc(var(--size) * .17); letter-spacing: -.04em; color: var(--black);
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }

/* Carte app (catalogue) */
.app-card { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 14px; align-items: center; align-content: start; }
.app-card h3 { font: 900 20px/1.05 var(--font-display); letter-spacing: var(--track-title); }
.app-card p { grid-column: 1 / -1; color: var(--muted); font-size: 15px; line-height: 1.35; }
.app-card .chips { grid-column: 1 / -1; }
.app-card .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 3px; font-size: 13px; color: var(--muted); }
.app-card .chip { min-height: 28px; padding: 0 10px; font-size: 13px; }

/* Carte campagne (espace créateur) */
.camp-card { display: grid; gap: var(--s-3); }
.camp-card header { display: flex; align-items: center; gap: var(--s-3); }
.camp-card h3 { font: 900 19px/1.1 var(--font-display); letter-spacing: var(--track-title); }
.camp-card header p { font-size: 13.5px; color: var(--muted); }
.camp-card header .badge { margin-left: auto; }
.camp-card .stats { display: grid; grid-template-columns: repeat(3, 1fr); font-size: 13px; color: var(--muted); }
.camp-card .stats b { display: block; font: 900 20px/1.1 var(--font-display); letter-spacing: -.03em; color: var(--text); }

/* Lien perso */
.link-box {
  display: flex; align-items: center; gap: var(--s-3); min-height: 64px; padding: 8px 8px 8px 18px;
  border: 2.5px dashed var(--text); border-radius: var(--r-lg); background: var(--highlight);
}
.link-box output { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 900; font-size: 19px; letter-spacing: -.02em; }
.link-box .btn { background: var(--strong); color: var(--on-strong); min-height: 46px; border-radius: var(--r-md); font-weight: 900; }
.link-box .btn.is-done { background: var(--success); color: var(--white); }

/* Rangée de partage */
.share { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s-2); text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.share a, .share button { display: grid; justify-items: center; gap: 6px; text-decoration: none; color: inherit; }
.share i {
  display: grid; place-items: center; width: 100%; max-width: 56px; aspect-ratio: 1; border-radius: var(--r-md);
  background: var(--surface-3); color: var(--text); transition: transform var(--dur-press) var(--ease-out);
}
.share i svg { width: 24px; height: 24px; }
.share :active > i { transform: scale(.92); }

/* ---------- Chiffres ---------- */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }
.kpi { border-radius: var(--r-lg); padding: 12px; background: var(--inverse); color: var(--on-inverse); }
.kpi > b { display: block; white-space: nowrap; font: 900 clamp(20px, 5.6vw, 26px)/1 var(--font-display); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.kpi > span { display: block; margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--gray-400); }
.kpi.is-key b { color: var(--yellow); }
.kpi .delta { color: var(--live); }

.progress { display: grid; gap: 6px; font-weight: 800; font-size: 14px; }
.progress > div { display: flex; justify-content: space-between; gap: var(--s-2); }
.progress .track { width: 100%; height: 10px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.progress .track > i { display: block; height: 100%; width: var(--value); background: var(--yellow); border-right: 3px solid var(--text); border-radius: var(--r-pill) 0 0 var(--r-pill); transition: width var(--dur-base) var(--ease-out); }

/* ---------- Graphiques ---------- */
.bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s-2); align-items: end; }
.bars > div { display: grid; gap: var(--s-2); text-align: center; }
.bars i {
  height: var(--h); display: flex; justify-content: center; padding-top: 10px; font-style: normal;
  border-radius: 13px 13px 6px 6px; background: var(--surface-3); font: 900 22px/1 var(--font-display); letter-spacing: -.05em;
}
.bars .is-top i { background: var(--yellow); color: var(--black); border: 2.5px solid var(--black); }
.bars small { font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.25; }
@media (min-width: 1024px) { .bars { gap: var(--s-4); } .bars i { font-size: 34px; } .bars small { font-size: 14px; } }

.linechart { width: 100%; height: auto; overflow: visible; }
.linechart .grid { stroke: var(--line); stroke-width: 1; }
.linechart .area { fill: var(--yellow); opacity: .35; }
.linechart .line { fill: none; stroke: var(--text); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.linechart .last { fill: var(--yellow); stroke: var(--text); stroke-width: 2.5; }
.linechart text { fill: var(--muted); font-size: 11px; font-weight: 700; }

/* ---------- Classement ---------- */
.rank { list-style: none; }
.rank li { display: grid; grid-template-columns: 26px auto 1fr auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-weight: 800; font-size: 15px; }
.rank li:first-child { border-top: 0; }
.rank .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.rank .is-me { background: var(--highlight); margin-inline: calc(var(--s-4) * -1); padding-inline: var(--s-4); border-radius: var(--r-md); border-top-color: transparent; }

.podium { display: grid; grid-template-columns: 1fr 1.1fr 1fr; align-items: end; gap: 6px; text-align: center; }
.podium > div { display: grid; justify-items: center; gap: 6px; font-weight: 800; font-size: 13px; }
.podium .step { width: 100%; display: grid; place-items: center; border-radius: var(--r-md) var(--r-md) 0 0; background: var(--surface-3); font: 900 28px/1 var(--font-display); }
.podium > div:nth-child(1) .step { height: 64px; }
.podium > div:nth-child(2) .step { height: 92px; background: var(--strong); color: var(--on-strong); box-shadow: inset 0 4px 0 var(--yellow); }
.podium > div:nth-child(3) .step { height: 46px; }

/* ---------- Tableau de données (cartes empilées sous 640 px) ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1.5px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table .num, .table th.num { text-align: right; }
.table tbody tr:hover { background: var(--surface-2); }
@media (max-width: 639px) {
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { padding: 12px 14px; margin-bottom: var(--s-2); border: 1.5px solid var(--line); border-radius: var(--r-lg); }
  .table tbody tr:hover { background: none; }
  .table td { display: flex; justify-content: space-between; gap: var(--s-3); padding: 5px 0; border: 0; text-align: right; }
  .table td::before { content: attr(data-label); font-weight: 700; color: var(--muted); text-align: left; }
  .table td:first-child { padding-bottom: 8px; font-weight: 800; font-size: 16px; }
  .table td:first-child::before { content: none; }
}

/* ---------- Onglets (contrôle segmenté) ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); overflow-x: auto; scrollbar-width: none; }
.tabs [role="tab"] { flex: 1 0 auto; min-height: 40px; padding: 0 16px; border-radius: var(--r-pill); font-weight: 800; font-size: 14px; color: var(--muted); transition: background-color var(--dur-fast), color var(--dur-fast); }
.tabs [aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 0 var(--line), 0 2px 8px -4px rgb(11 11 12 / .3); }

/* ---------- Formulaires ---------- */
.field { display: grid; gap: 6px; align-content: start; }
.field > label, .field legend { font-weight: 800; font-size: 14px; }
.field .hint { font-size: 13px; color: var(--muted); }
.field .error { font-size: 13px; font-weight: 700; color: var(--danger); }
.input {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: var(--surface); font-size: 16px;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
textarea.input { min-height: 96px; resize: vertical; }
select.input {
  appearance: none; padding-right: 44px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2376767D' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 20px;
}
.input::placeholder { color: var(--gray-500); }
.input:hover { border-color: var(--gray-400); }
.input:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 4px rgb(255 230 0 / .55); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input-row { display: flex; gap: var(--s-2); align-items: center; padding: 6px 6px 6px 14px; border: 2px dashed var(--accent); border-radius: var(--r-lg); }
.input-row .input { border: 0; min-height: 42px; padding: 0; background: none; box-shadow: none; color: inherit; min-width: 0; }
.input-row .btn { background: var(--yellow); color: var(--black); font-weight: 900; border-radius: var(--r-md); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 600; cursor: pointer; }
.check input { appearance: none; flex: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--text); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--yellow); border-color: var(--black); }
.check input:checked::after { content: ""; width: 12px; height: 7px; border: solid var(--black); border-width: 0 0 3px 3px; transform: translateY(-2px) rotate(-45deg); }

/* Uploader d'images */
.uploader {
  position: relative; display: grid; justify-items: center; gap: 6px; padding: var(--s-6) var(--s-4); text-align: center;
  border: 2px dashed var(--gray-300); border-radius: var(--r-lg); background: var(--surface-2); color: var(--muted); font-size: 14px;
  transition: border-color var(--dur-fast), background-color var(--dur-fast);
}
.uploader b { color: var(--text); font-size: 16px; }
.uploader svg { width: 28px; height: 28px; color: var(--text); }
.uploader input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.uploader:hover, .uploader.is-over { border-color: var(--text); background: var(--highlight); }
.uploader:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: var(--s-2); list-style: none; }
.thumbs li { position: relative; aspect-ratio: 9 / 16; border-radius: var(--r-md); overflow: hidden; background: var(--surface-3); border: 1.5px solid var(--line); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs button { position: absolute; top: 5px; right: 5px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--black); color: var(--white); }
.thumbs button svg { width: 16px; height: 16px; }

/* ---------- États ---------- */
.empty { display: grid; justify-items: center; gap: var(--s-2); padding: var(--s-8) var(--s-4); text-align: center; border-radius: var(--r-xl); background: var(--surface-2); }
.empty > svg { width: 40px; height: 40px; margin-bottom: 4px; }
.empty p { color: var(--muted); max-width: 26em; }
.empty .btn { margin-top: var(--s-2); }

.skeleton { display: block; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* ---------- Bottom sheet (dialog natif) ---------- */
.sheet {
  position: fixed; inset: auto 0 0; margin: 0; width: 100%; max-width: none; max-height: 92dvh; overflow: auto;
  padding: 28px var(--gutter) calc(var(--s-6) + var(--safe-bottom)); border: 0; border-radius: 28px 28px 0 0;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-sheet); z-index: var(--z-sheet);
}
.sheet::before { content: ""; position: absolute; top: 10px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--gray-300); }
.sheet::backdrop { background: rgb(11 11 12 / .55); }
.sheet[open] { animation: sheet-in var(--dur-base) var(--ease-out); }
.sheet[open]::backdrop { animation: fade-in var(--dur-base) var(--ease-out); }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes fade-in { from { opacity: 0; } }
@media (min-width: 640px) {
  .sheet { inset: 0; margin: auto; max-width: 440px; height: fit-content; border-radius: var(--r-xl); padding-bottom: var(--s-6); }
  .sheet::before { content: none; }
  .sheet[open] { animation: pop-in var(--dur-base) var(--ease-out); }
  @keyframes pop-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
}

/* ---------- Toast ---------- */
.toasts { position: fixed; z-index: var(--z-toast); left: 50%; bottom: calc(104px + var(--safe-bottom)); transform: translateX(-50%); display: grid; gap: var(--s-2); width: min(92vw, 380px); pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r-md);
  background: var(--black); color: var(--white); font-weight: 700; font-size: 15px; box-shadow: var(--shadow-float);
  animation: toast-in var(--dur-base) var(--ease-pop);
}
:root[data-theme="dark"] .toast { background: var(--white); color: var(--black); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast { background: var(--white); color: var(--black); } }
.toast svg { width: 20px; height: 20px; flex: none; color: var(--yellow); }
:root[data-theme="dark"] .toast svg { color: var(--success); }
.toast.is-error svg { color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }

/* ---------- Barre CTA collante (mobile) ---------- */
.sticky-cta {
  position: fixed; inset: auto 0 0; z-index: var(--z-sticky);
  padding: 14px var(--gutter) calc(14px + var(--safe-bottom));
  /* Solid colour: iOS Safari tints its bottom toolbar from the fixed bar's
     background, and would otherwise pick the yellow button. The fade lives
     above, in ::before. */
  background: var(--bg);
  transform: translateY(110%); transition: transform var(--dur-base) var(--ease-out);
}
.sticky-cta::before {
  content: ""; position: absolute; inset: -28px 0 100%; pointer-events: none;
  background: linear-gradient(to top, var(--bg), transparent);
}
.sticky-cta.is-on { transform: none; }
.sticky-cta .btn-primary { min-height: 60px; font-size: 22px; }
@media (min-width: 1024px) { .sticky-cta { display: none; } }

/* ---------- Navigation app : barre en bas sur mobile, sidebar sur desktop ---------- */
.appnav {
  position: fixed; inset: auto 0 0; z-index: var(--z-nav);
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 6px calc(6px + var(--safe-bottom));
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.appnav a { display: grid; justify-items: center; gap: 2px; min-height: 52px; padding-top: 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-decoration: none; border-radius: var(--r-md); }
.appnav svg { width: 24px; height: 24px; }
.appnav [aria-current="page"] { color: var(--text); }
.appnav [aria-current="page"] svg { background: var(--yellow); color: var(--black); border-radius: 9px; box-shadow: 0 0 0 4px var(--yellow); }
.appnav .logo { display: none; }
.app-main { padding-bottom: calc(96px + var(--safe-bottom)); }
@media (min-width: 1024px) {
  .appnav { inset: 0 auto 0 0; width: 240px; display: flex; flex-direction: column; gap: 4px; padding: 24px 16px; border-top: 0; border-right: 1px solid var(--line); background: var(--bg); backdrop-filter: none; }
  .appnav .logo { display: inline-flex; margin: 0 0 24px 10px; }
  .appnav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; font-size: 15px; }
  .appnav a:hover { background: var(--surface-2); color: var(--text); }
  .appnav [aria-current="page"] { background: var(--surface-2); }
  .appnav [aria-current="page"] svg { box-shadow: 0 0 0 3px var(--yellow); }
  .app-main { padding: 0 0 0 240px; }
}

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; font-weight: 800; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; font-weight: 700; color: var(--muted); transition: transform var(--dur-fast) var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { padding-bottom: 16px; color: var(--muted); font-size: 15px; max-width: 44em; }

/* ---------- Illustrations ---------- */
.char { width: 100%; height: auto; filter: var(--char-halo); }
.i { display: inline-block; vertical-align: -.2em; width: 24px; height: 24px; flex: none; }
.eyebrow .i { width: 16px; height: 16px; }
