/* C4slide web : charte C4App v6 « refonte néon » (design/refonte_neon.md du dépôt c4app-charte, 28 nov. 2026).
   Fond néon identique à toutes les apps (js/neon.js), bulles de verre très transparentes, police système.
   Anton et Inter servent seulement aux textes posés sur les slides. */
@font-face { font-family: "C4 Anton"; src: url("../fonts/Anton-Regular.ttf") format("truetype"); font-display: block; }
@font-face { font-family: "C4 Inter"; src: url("../fonts/Inter-Bold.ttf") format("truetype"); font-weight: 100 900; font-display: block; }

:root {
  --bleu-marque: #0131CA; --creme: #FDF7E7; --corail: #FE6F59; --nuit: #0D1230;
  --neon: #4D7BFF; --neon-pale: #8FA8FF; --nuit-profonde: #02040F;
  --texte: #FDF7E7; --texte-2: rgba(253, 247, 231, 0.8); --trait: rgba(255, 255, 255, 0.16); --rouge: #FF7A6B;
  /* Verre de la charte v6 §2 (couche par couche) : 1. voile nuit #0D1230, dont l'opacité dépend de l'élément
     (bulle 15 %, ronds 35-40 %, bulle d'outils 50 %…), 2. verre clair (Liquid Glass « clear » : à peine de flou),
     3. liseré blanc. Pas d'ombre portée, sauf la lueur néon d'un élément actif. */
  --voile: 0.15;
  --verre: rgba(13, 18, 48, var(--voile));
  --verre-flou: blur(1.5px) saturate(1.6);
  --verre-aretes: inset 0 0 0 0.5px rgba(255, 255, 255, 0.2), inset 1px 1px 0 rgba(255, 255, 255, 0.22);
  --lisere: rgba(255, 255, 255, 0.2);
  --champ: rgba(255, 255, 255, 0.07);
  --rayon: 22px; --marge: 16px;
  --police: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --police-ronde: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
  --ressort: cubic-bezier(0.32, 0.72, 0, 1); --duree: 0.35s;
  --focus-y: 42vh;
  color-scheme: dark;
  accent-color: var(--neon);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--nuit-profonde); color: var(--texte); font: 16px/1.45 var(--police); min-height: 100vh; min-height: 100dvh;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
#neon, #lens { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }
a { color: var(--neon-pale); }
h1, h2 { text-wrap: balance; }
h1 { font: 800 26px/1.15 var(--police-ronde); margin: 4px 0 4px; }
h2 { font-size: 16px; font-weight: 700; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
p { text-wrap: pretty; }
.sub { color: var(--texte-2); font-size: 15px; margin: 0 0 14px; }
.hint { color: var(--texte-2); font-size: 13px; }
.error { color: var(--rouge); font-weight: 600; }
.loading { color: var(--texte-2); text-align: center; padding: 40px 0; }

/* MARK: verre (neonGlass) : on voit les lignes et le logo derrière */
.glass, .card, .round, .credit-badge, .tabs, dialog, #toast, .help-bubble, .choices label, .tile.add, .slide .tools button,
input[type=file]::file-selector-button, .login-sheet .card {
  background: rgba(13, 18, 48, var(--voile)); -webkit-backdrop-filter: var(--verre-flou); backdrop-filter: var(--verre-flou);
  box-shadow: var(--verre-aretes); }
@media (prefers-reduced-transparency: reduce) {
  .glass, .card, .round, .credit-badge, .tabs, dialog, #toast { background: rgba(13, 18, 48, 0.92); }
}

/* MARK: haut des pages : retour et maison à gauche (ronds en verre), crédits à droite. Pas de titre (charte v6 §4). */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) var(--marge) 10px; pointer-events: none; }
.top > * { pointer-events: auto; }
/* Fondu sous les boutons du haut : le contenu qui défile passe dessous sans se mélanger aux boutons. */
.top::before { content: ""; position: absolute; inset: 0 0 -18px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 4, 15, .85), rgba(2, 4, 15, .55) 60%, rgba(2, 4, 15, 0)); }
body.home .top::before { display: none; }
.top .spacer { flex: 1; pointer-events: none; }
.round { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--creme); text-decoration: none;
  font-size: 24px; font-weight: 600; line-height: 1; flex: none; }
.round svg { width: 20px; height: 20px; }
.credit-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 5px 5px 10px; color: var(--creme);
  text-decoration: none; font-weight: 800; font-size: 15px; min-height: 44px; font-variant-numeric: tabular-nums; }
.credit-badge .dyn { width: 22px; height: 22px; }
.lvl { background: var(--corail); color: #fff; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 3px 8px; }

/* MARK: barre d'onglets en verre (cachée sur l'accueil : sa colonne de boutons la remplace, charte v6 « À trancher » 2) */
.tabs { position: fixed; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 6; display: flex;
  justify-content: space-around; padding: 6px; border-radius: 26px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.tabs a { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px; text-decoration: none;
  color: var(--texte-2); font-size: 11px; font-weight: 600; border-radius: 20px; min-height: 44px; justify-content: center; }
.tabs a svg { width: 23px; height: 23px; }
.tabs a.active { color: var(--creme); background: rgba(1, 49, 202, 0.55); box-shadow: inset 0 0 0 1px rgba(77, 123, 255, .7); }
body.home .tabs { display: none; }
main { max-width: 640px; margin: 0 auto; padding: calc(max(10px, env(safe-area-inset-top)) + 62px) var(--marge) calc(110px + env(safe-area-inset-bottom)); }
#install { max-width: 640px; margin: 0 auto; padding: calc(max(10px, env(safe-area-inset-top)) + 62px) var(--marge) 0; }
#install:not([hidden]) + main { padding-top: 14px; }
@media (min-width: 900px) {
  .tabs { left: 50%; right: auto; transform: translateX(-50%); width: 520px; }
}

/* MARK: bulles, champs */
.card { border-radius: var(--rayon); padding: 14px; margin: 0 0 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1 1 auto; }
label.field { display: block; font-weight: 600; font-size: 14px; margin: 0 0 12px; }
label.field > span { display: block; margin-bottom: 6px; }
label.row.field { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 10px; }
label.row.field > span { display: inline; margin: 0; font-weight: 500; }
label.row.field input[type=checkbox] { width: 20px; height: 20px; margin: 1px 0 0; flex: none; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--creme); background: var(--champ); border: 0;
  box-shadow: inset 0 0 0 0.5px var(--trait); border-radius: 14px; padding: 12px; }
::placeholder { color: rgba(253, 247, 231, 0.4); }
select option { background: var(--nuit); }
textarea { min-height: 96px; resize: vertical; }
:focus-visible { outline: 3px solid var(--corail); outline-offset: 2px; }

/* MARK: boutons. Corail + mèche = payant, coût dans le bouton ; étape gratuite = crème, texte bleu marque (v6 §7). */
button, .button { font: inherit; font-weight: 700; border: 0; border-radius: 18px; padding: 13px 20px; cursor: pointer; min-height: 44px;
  background: var(--creme); color: var(--nuit); text-decoration: none; display: inline-flex; align-items: center;
  justify-content: center; gap: 8px; transition: transform .15s var(--ressort), opacity .2s; touch-action: manipulation; }
button:active:not(:disabled), .button:active { transform: scale(0.98); }
button.secondary, .button.secondary { background: rgba(13, 18, 48, var(--voile)); color: var(--creme); box-shadow: var(--verre-aretes);
  -webkit-backdrop-filter: var(--verre-flou); backdrop-filter: var(--verre-flou); }
button.ghost { background: none; color: var(--neon-pale); padding: 6px 4px; }
button.fire, button.free { width: 100%; padding: 15px; font-size: 17px; margin: 4px 0 8px; border-radius: 26px; }
button.fire { background: var(--corail); color: #fff; box-shadow: 0 6px 24px rgba(254, 111, 89, .35); }
button:disabled { opacity: .4; cursor: default; }
.cost { display: inline-flex; align-items: center; gap: 3px; background: rgba(255, 255, 255, .25); border-radius: 999px;
  padding: 2px 9px 2px 8px; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.cost .dyn { width: 18px; height: 18px; }
button.free .cost { background: rgba(1, 49, 202, .12); }
.danger { color: var(--rouge) !important; }

/* MARK: aide derrière « i » : les textes d'aide sortent des bulles (v6 §4) */
.info { width: 24px; height: 24px; min-height: 0; padding: 0; border-radius: 50%; background: none; color: var(--texte-2);
  box-shadow: inset 0 0 0 1.3px currentColor; font: italic 700 13px/1 Georgia, serif; flex: none; }
.help-bubble { position: absolute; z-index: 30; max-width: min(320px, calc(100vw - 32px)); padding: 12px 14px; border-radius: 16px;
  font-size: 14px; color: var(--creme); }

/* MARK: dépôt d'images, pastilles */
.drop { display: grid; place-items: center; text-align: center; gap: 4px; border: 1.5px dashed rgba(143, 168, 255, .55);
  border-radius: 18px; padding: 24px 16px; cursor: pointer; background: rgba(77, 123, 255, .06); }
.drop strong { color: var(--creme); }
.drop.over { border-color: var(--neon); background: rgba(77, 123, 255, .16); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.thumbs:empty { display: none; }
.thumbs figure { margin: 0; position: relative; }
.thumbs img { width: 72px; height: 128px; object-fit: cover; border-radius: 12px; display: block; }
.thumbs button { position: absolute; top: -8px; right: -8px; padding: 0; width: 26px; height: 26px; min-height: 0; font-size: 14px;
  border-radius: 50%; background: var(--nuit); color: var(--creme); box-shadow: inset 0 0 0 1px var(--trait); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices label { color: var(--texte-2);
  border-radius: 999px; padding: 9px 14px; cursor: pointer; font-weight: 700; font-size: 14px; }
.choices input:checked + label { background: var(--bleu-marque); color: var(--creme); box-shadow: inset 0 0 0 1px var(--neon), 0 0 14px rgba(77, 123, 255, .45); }
.choices input:focus-visible + label { outline: 3px solid var(--corail); outline-offset: 2px; }

/* MARK: mèche = jauge de génération (piste D recommandée) */
.fuse { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; margin: 12px 0 6px; }
.fuse > div { height: 100%; background: linear-gradient(90deg, var(--corail), #ffb020); transition: width .6s var(--ressort); }

/* MARK: anneau d'attente : indicateur de chargement de toute la suite (crème vers bleu néon, centré sur le logo, v6 §5) */
.wait { min-height: 40dvh; }
.ring { position: fixed; left: 50%; top: var(--focus-y); width: 230px; height: 230px; margin: -115px 0 0 -115px; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(253, 247, 231, 0) 0deg, var(--creme) 40deg, var(--neon) 260deg, rgba(77, 123, 255, 0) 330deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  filter: drop-shadow(0 0 8px rgba(77, 123, 255, .8)); animation: tourne 1.4s linear infinite; z-index: 0; pointer-events: none; }
.ring.small { position: static; display: inline-block; width: 22px; height: 22px; margin: 0; vertical-align: middle;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); }
@keyframes tourne { to { transform: rotate(360deg); } }
.wait .message { position: fixed; left: var(--marge); right: var(--marge); top: calc(var(--focus-y) + 150px); max-width: 520px; margin: 0 auto;
  text-align: center; z-index: 1; padding: 14px 16px; border-radius: var(--rayon); font-weight: 700; }

/* MARK: slides */
.slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.slide { position: relative; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: rgba(255, 255, 255, .05);
  box-shadow: inset 0 0 0 0.5px var(--lisere); }
.slide img, .slide canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide .pending { position: absolute; inset: 0; display: grid; place-items: center; color: var(--texte-2); font-size: 14px; }
.slide .tools { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.slide .tools button { padding: 5px 10px; min-height: 32px; font-size: 13px; border-radius: 999px; color: var(--creme);
}
.slide .tools .cost { font-size: 12px; padding: 1px 6px; }
.slide .tools .cost .dyn { width: 14px; height: 14px; }

/* MARK: recadreur */
.crop { position: relative; max-width: 320px; margin: 0 auto 12px; touch-action: none; user-select: none; overflow: hidden; border-radius: 14px; }
.crop img { width: 100%; display: block; border-radius: 14px; }
.crop .frame { position: absolute; border: 3px solid var(--corail); border-radius: 6px; box-shadow: 0 0 0 9999px rgba(2, 4, 15, .55); cursor: move; }
.crop .handle { position: absolute; right: -3px; bottom: -3px; width: 24px; height: 24px; border-radius: 50%; background: var(--corail); cursor: nwse-resize; }

/* MARK: listes */
.list { display: grid; gap: 10px; }
.list .item { padding: 10px 14px; border-radius: var(--rayon); }
.item { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; padding: 10px 0; }

.item img, .item .ph { width: 54px; height: 72px; object-fit: cover; border-radius: 10px; background: rgba(255, 255, 255, .06); flex: none; }
.item strong { display: block; }
.item::after { content: "›"; margin-left: auto; color: var(--texte-2); font-size: 22px; }

.copy-field { position: relative; }
.copy-field button { position: absolute; right: 8px; top: 34px; padding: 6px 12px; min-height: 0; font-size: 13px; border-radius: 999px; }

#toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); color: var(--creme);
  background: rgba(13, 18, 48, .9); padding: 12px 18px; border-radius: 999px; font-weight: 600; z-index: 40; max-width: calc(100% - 32px); }

dialog { border: 0; border-radius: 24px; padding: 20px; max-width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 24px);
  overflow: auto; color: var(--creme); background: rgba(13, 18, 48, .88); }
dialog::backdrop { background: rgba(2, 4, 15, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.avatar-img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: rgba(255, 255, 255, .06); flex: none; }
.avatar-row { flex-wrap: nowrap; }
.avatar-row button { padding: 8px 14px; font-size: 14px; white-space: nowrap; border-radius: 999px; }
.editor { width: min(560px, calc(100% - 24px)); }
.editor-stage { margin: 12px auto 4px; max-width: 340px; }
.editor-stage canvas { width: 100%; height: auto; border-radius: 12px; touch-action: none; cursor: grab; display: block; }
@media (max-width: 520px) { .editor-stage { max-width: 240px; } }
input[type=file] { font: inherit; font-size: 14px; color: var(--texte-2); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 8px 14px; margin-right: 10px;
  background: rgba(255, 255, 255, .08); color: var(--creme); box-shadow: inset 0 0 0 0.5px var(--lisere); cursor: pointer; }

/* MARK: accueil (v6 §3) : logo au centre (dessiné dans le fond), nom dessous, colonne de boutons à gauche */
body.home main { padding: 0; max-width: none; }
.home-name { position: fixed; left: 0; right: 0; top: calc(var(--focus-y) + 122px); text-align: center; pointer-events: none; }
/* Le C de la charte fait 150 × 196 : nom et accroche sous le logo, jamais dessus (Gerald 29/11). */
.home-name h1 { font: 800 34px/1 var(--police-ronde); margin: 0; letter-spacing: .01em; text-shadow: 0 0 18px rgba(77, 123, 255, .6); }
.home-name p { margin: 8px 0 0; font-weight: 600; font-size: 15px; color: var(--texte-2); }
.home-actions { position: fixed; left: var(--marge); right: var(--marge); bottom: max(20px, env(safe-area-inset-bottom)); display: grid; gap: 10px;
  max-width: 440px; margin: 0 auto; }
.home-actions button { width: 100%; padding: 15px; font-size: 17px; border-radius: 26px; }
.login-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; max-height: 88dvh; overflow: auto;
  padding: 16px var(--marge) max(16px, env(safe-area-inset-bottom)); }
.login-sheet .card { max-width: 480px; margin: 0 auto; }
.login-sheet .close { float: right; }

.column { position: fixed; left: var(--marge); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column;
  gap: 12px; z-index: 4; }
.column hr { width: 28px; border: 0; border-top: 1px solid var(--trait); margin: 2px 12px; }
.pill { display: flex; align-items: center; gap: 12px; height: 52px; min-width: 52px; max-width: 52px; padding: 0 14px; border-radius: 26px;
  color: var(--creme); text-decoration: none; overflow: hidden; white-space: nowrap; transition: max-width var(--duree) var(--ressort), background .2s; }
.pill svg { width: 24px; height: 24px; flex: none; }
.pill .label { opacity: 0; transition: opacity .2s; }
.pill .label b { display: block; font-size: 15px; }
.pill .label small { display: block; font-size: 12px; color: var(--texte-2); }
.pill.open { max-width: 320px; background: rgba(1, 49, 202, .55); box-shadow: inset 0 0 0 1px var(--neon), 0 0 18px rgba(77, 123, 255, .5); }
.pill.open .label { opacity: 1; }
.pill.pro { box-shadow: inset 0 0 0 1.5px var(--corail); }
.pill.pro svg { color: var(--corail); }
.pill.current { background: rgba(1, 49, 202, .55); box-shadow: inset 0 0 0 1px var(--neon), 0 0 14px rgba(77, 123, 255, .45); }
.pill.pro.open { box-shadow: inset 0 0 0 1.5px var(--corail), 0 0 18px rgba(254, 111, 89, .45); }

/* MARK: Mon compte */
.balance-card { display: grid; gap: 6px; }
.balance { display: flex; align-items: center; gap: 10px; }
.balance b { font: 700 34px/1 var(--police-ronde); color: var(--corail); font-variant-numeric: tabular-nums; }
.balance .dyn { width: 34px; height: 34px; }
.balance span { font-weight: 600; }
.settings { padding: 2px 14px; }
.settings a, .settings button { display: flex; width: 100%; align-items: center; gap: 12px; padding: 13px 0; background: none; color: var(--creme);
  font-weight: 600; font-size: 16px; border-radius: 0; text-decoration: none; justify-content: flex-start; box-shadow: none; }
.settings > * + * { border-top: 0.5px solid var(--trait); }
.settings svg { width: 22px; height: 22px; color: var(--neon-pale); flex: none; }
.settings a::after { content: "›"; margin-left: auto; color: var(--texte-2); font-size: 22px; font-weight: 400; }

/* MARK: guide « Installe C4slide » (js/install.js) */
.install-card { margin: 0; }
.install-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.install-head img { width: 48px; height: 48px; border-radius: 11px; flex: none; }
.install-head h2 { margin: 2px 0 2px; font-size: 17px; }
.install-head .hint { margin: 0; }
.install-steps { margin: 6px 0 10px; padding-left: 22px; display: grid; gap: 8px; }
.install-ico { width: 20px; height: 20px; vertical-align: -4px; color: var(--neon-pale); }
.install-card .row { justify-content: flex-end; }
body.home #install { position: fixed; left: 0; right: 0; top: 0; z-index: 7; padding-top: max(12px, env(safe-area-inset-top)); }

html.installed, html.installed body { overscroll-behavior: none; }
@media (display-mode: standalone) { html, body { overscroll-behavior: none; } }

@media (prefers-reduced-motion: no-preference) {
  main > * { animation: arrive var(--duree) var(--ressort); }
  @keyframes arrive { from { opacity: 0; transform: translateY(6px); } }
}
/* Réduire les animations : l'anneau s'arrête (une roue montre que le travail avance, v6 §5), rien ne glisse. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* MARK: esprit C4Cut (Gerald, 28 nov.) : page de choix, tuiles, options en bas, bouton principal flottant */
/* Page de choix (charte v6 §4) : deux cartes verticales par-dessus le logo, centrées ; une fois choisi, compactes en haut. */
.choice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 420px; margin: 0 auto;
  min-height: calc(100dvh - 200px); align-content: center; transition: min-height var(--duree) var(--ressort); }
.choice-card { flex-direction: column; gap: 8px; height: 240px; border-radius: 24px; color: var(--creme); font-weight: 700;
  padding: 16px 10px; text-align: center; }
.choice-card svg { width: 36px; height: 36px; }
.choice-card b { font-size: 20px; }
.choice-card small { font-size: 13px; font-weight: 600; color: var(--texte-2); }
.choice-cards.chosen { min-height: 0; margin-bottom: 12px; }
.chosen .choice-card { height: 74px; flex-direction: row; gap: 10px; }
.chosen .choice-card small { display: none; }
.chosen .choice-card svg { width: 26px; height: 26px; }
.choice-card.on { background: rgba(1, 49, 202, .7); box-shadow: inset 0 0 0 1px var(--neon), 0 0 22px rgba(77, 123, 255, .5); }
.chosen .choice-card:not(.on) { opacity: .55; }
@media (max-width: 340px) { .choice-cards:not(.chosen) { grid-template-columns: 1fr; } .choice-card { height: 140px; } }

.tag { font-size: 12px; font-weight: 600; color: var(--creme); opacity: .9; }
.label { font-weight: 700; font-size: 14px; margin: 12px 0 8px; }
.summary { margin: 0; font-weight: 600; font-size: 14px; }
label.field.inline { display: flex; align-items: center; gap: 12px; margin: 0; }
label.field.inline span { margin: 0; }
label.field.inline select { width: auto; min-width: 80px; }
.card.over { box-shadow: inset 0 0 0 1.5px var(--neon); }

/* Tuiles : vignettes numérotées + « + » (comme « Tes clips » de C4Cut) */
.tiles, .tiles-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tiles-list:empty { display: none; }
.tile { position: relative; width: 72px; height: 96px; margin: 0; border-radius: 12px; overflow: hidden; flex: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .num { position: absolute; left: 5px; top: 4px; font-size: 12px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.tile button { position: absolute; top: 4px; right: 4px; padding: 0; width: 24px; height: 24px; min-height: 0; font-size: 14px;
  border-radius: 50%; background: rgba(13, 18, 48, .7); color: var(--creme); }
.tile.add { display: grid; place-content: center; justify-items: center; gap: 2px; cursor: pointer; color: var(--neon-pale);
  outline: 1.5px dashed rgba(143, 168, 255, .55); outline-offset: -6px; }
.tile.add span { font-size: 28px; line-height: 1; }
.tile.add small { font-size: 12px; font-weight: 700; }

/* Bouton principal flottant au-dessus de la barre d'onglets (comme « Monter la vidéo » de C4Cut) */
.dock { position: sticky; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 3; margin-top: 14px; }
.dock button { width: 100%; margin: 0; box-shadow: 0 8px 28px rgba(2, 4, 15, .6); }
.dock button.fire { box-shadow: 0 8px 28px rgba(254, 111, 89, .4); }
.dock.row { display: flex; gap: 10px; flex-wrap: nowrap; }
.dock.row button { flex: 1; padding: 14px 10px; border-radius: 26px; }
.dock svg { width: 20px; height: 20px; }

/* Résultat (charte v6 §6) : slides en grand qu'on fait glisser, outils dans une bulle flottante sur le bord droit */
.stage { position: relative; }
.strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--marge); scrollbar-width: none;
  margin: 0 calc(-1 * var(--marge)); padding: 0 var(--marge); }
.strip::-webkit-scrollbar { display: none; }
.strip .slide { flex: 0 0 min(76%, 380px); scroll-snap-align: start; }
.toolbubble { position: absolute; left: calc(min(76%, 380px) - 76px); top: 50%; transform: translateY(-50%); display: grid; gap: 6px; padding: 8px 6px;
  border-radius: 28px; z-index: 2; }
.toolbubble button { flex-direction: column; gap: 2px; width: 62px; min-height: 0; padding: 8px 2px; border-radius: 20px; background: none;
  color: var(--creme); font-size: 11px; font-weight: 700; }
.toolbubble button svg { width: 24px; height: 24px; }
.toolbubble button:active { background: rgba(1, 49, 202, .6); }
.toolbubble .cost { font-size: 11px; padding: 1px 6px; }
.toolbubble .cost .dyn { width: 13px; height: 13px; }
.dots { display: flex; justify-content: center; gap: 6px; margin: 10px 0 12px; }
.dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(253, 247, 231, .3); }
.dots span.on { background: var(--creme); width: 16px; border-radius: 3px; }
.dock button:disabled { opacity: 1; background: rgba(13, 18, 48, var(--voile)); -webkit-backdrop-filter: var(--verre-flou); backdrop-filter: var(--verre-flou);
  color: rgba(253, 247, 231, .6); box-shadow: var(--verre-aretes); }
.dock button:disabled .cost { background: rgba(255, 255, 255, .08); }
.wait .ready { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.wait .ready img { width: 54px; height: 72px; object-fit: cover; border-radius: 8px; box-shadow: inset 0 0 0 0.5px var(--lisere); }

/* Barre d'onglets : le contenu défile dessous, un peu plus de flou pour que les libellés restent lisibles. */
.tabs { -webkit-backdrop-filter: blur(8px) saturate(1.6); backdrop-filter: blur(8px) saturate(1.6); }

/* MARK: charte v6 §2, l'effet verre par élément (c4app-charte 18b0a6b) */
/* Bulle d'une page de travail : voile 15 %, rectangle 24 pt, marge 14 pt. */
.card { --voile: 0.15; border-radius: 24px; padding: 14px; }
/* Ronds (retour, maison, colonne de l'accueil) : voile 35-40 %. Pastille des crédits, onglets, pastilles de réglage : idem. */
.round, .pill, .credit-badge, .tabs, .choices label, .tile.add, button.secondary, .button.secondary,
input[type=file]::file-selector-button, .slide .tools button { --voile: 0.38; }
/* Cartes de choix : voile 12 % ; choisie : bleu marque à 55 % et liseré #8FA8FF à 75 %, lueur néon. */
.choice-card { --voile: 0.12; border-radius: 26px; }
.choice-card.on { background: rgba(1, 49, 202, 0.55); box-shadow: inset 0 0 0 1px rgba(143, 168, 255, 0.75), 0 0 12px rgba(77, 123, 255, 0.5); }
/* Bulle d'outils (éditeur) : voile 50 %, capsule. */
.toolbubble { --voile: 0.5; border-radius: 999px; }
/* Feuilles (dialogues, connexion, aide, message) : fond de la suite à 78 %, matériau très fin, reflet blanc 28 % sur le bord haut, coins 32 pt. */
dialog, .login-sheet .card, .help-bubble, #toast {
  background: rgba(6, 11, 44, 0.78); -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 0 0 0.5px rgba(255, 255, 255, 0.2); }
dialog, .login-sheet .card { border-radius: 32px; }
/* Champs : blanc à 7 %, pas de voile. */
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], select, textarea {
  background: var(--champ); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.16); }
/* Bouton crème (action gratuite) : texte nuit, lueur néon pâle (NeonPrimaryButtonStyle). Corail : action payante. */
button:not(.secondary):not(.ghost):not(.info):not(.round):not(.fire):not(:disabled), .button:not(.secondary) {
  box-shadow: 0 0 10px rgba(143, 168, 255, 0.45); }
button.fire { box-shadow: 0 0 12px rgba(254, 111, 89, 0.45); }
.dock button:disabled { --voile: 0.38; box-shadow: var(--verre-aretes); }
/* Bouton désactivé du bas, bulle de verre ; textes secondaires crème à 60-80 %, accent néon pâle. */
.choices input:checked + label { box-shadow: inset 0 0 0 1px rgba(143, 168, 255, 0.75), 0 0 10px rgba(77, 123, 255, 0.5); }
.toolbubble button, .tabs a, .pill { box-shadow: none; }
.pill.glass, .round, .credit-badge, .tabs { box-shadow: var(--verre-aretes); }
.pill.pro { box-shadow: inset 0 0 0 1.5px var(--corail); }
/* Liens dans le texte : crème souligné (charte v6 : texte crème sur le verre). */
.card a:not(.button) { color: var(--creme); text-decoration: underline; text-underline-offset: 2px; }
/* Pages pleines (Mon compte, Mes carrousels) : cartes CardStyle de la charte, voile 20 % + matériau très fin à 50 % + liseré 16 %. */
body.page-pleine .card { --voile: 0.2; -webkit-backdrop-filter: blur(6px) saturate(1.4); backdrop-filter: blur(6px) saturate(1.4); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.16); }

/* Champ fichier : texte natif masqué (« Choose File » sur un navigateur en anglais), libellé de l'app à la place. */
.file-pick { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.file-pick .hint { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
label.field { position: relative; }

/* Liquid Glass : la réfraction est dessinée par js/neon.js sous la bulle (toile #lens) ; pas de flou par-dessus. */
:root.liquid-glass :is(.card, .choice-card, .round, .credit-badge, .pill.glass, .tile.add):not(:is(.tabs, .dock, .toolbubble, dialog, .login-sheet, .help-bubble, .slide) *) {
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
body.page-pleine .card { --lens-dim: 0.45; }
/* Bouton du bas désactivé : verre dense (comme les feuilles), pour que son libellé reste lisible au-dessus du contenu. */
.dock button:disabled { background: rgba(6, 11, 44, 0.82); -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4);
  color: rgba(253, 247, 231, 0.75); }
/* Bonhomme (Mon compte) : rond fermé ; ouvert, il montre les crédits à sa gauche. */
.credit-badge { padding: 0; min-width: 44px; justify-content: center; gap: 0; }
.credit-badge > svg { width: 20px; height: 20px; flex: none; margin: 0 12px; }
.credit-badge .amount { display: none; align-items: center; gap: 6px; padding-left: 6px; }
.credit-badge.open .amount { display: inline-flex; }
.credit-badge.open { padding-left: 4px; box-shadow: var(--verre-aretes), 0 0 10px rgba(77, 123, 255, .5); }
/* Plus de barre d'onglets (Gerald 29/11) : le bouton flottant descend en bas de l'écran. */
.tabs { display: none !important; }
main { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.dock { bottom: calc(14px + env(safe-area-inset-bottom)); }
/* Boutons secondaires du bas (TikTok…) : verre dense aussi, le contenu défile dessous. */
.dock button.secondary, .dock .button.secondary { background: rgba(6, 11, 44, 0.82); -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4); }
