:root {
  /* Palette dérivée du logo : l'éclair va du cyan (départ) au lime (arrivée). */
  --bg: #07080B;
  --surface: #0F1218;
  --surface-2: #161A22;
  --surface-3: #222734;
  --border: #232936;
  --border-soft: #1C212B;
  --text: #E9EDF2;
  --muted: #878FA0;
  --muted-2: #666E7E;
  --volt: #22E0D0;          /* cyan de marque */
  --surge: #A3E635;         /* lime de marque */
  --accent: #22E0D0;
  --accent-hi: #48ECD8;
  --accent-2: #A3E635;
  --on-accent: #04201C;     /* encre sombre posée sur les fonds vifs */
  /* L'axe de l'éclair : 115°, toujours le même sens que le logo. */
  --grad: linear-gradient(115deg, #22E0D0, #A3E635);
  --grad-bright: linear-gradient(115deg, #22E0D0, #A3E635);
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", SFMono-Regular, Consolas, monospace;
  --radius: 14px;
  --ring: 0 0 0 3px rgba(34, 224, 208, .30);
  --glow: 0 6px 22px rgba(34, 224, 208, .26);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .28);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, .40);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .50);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "Inter", sans-serif;
  background:
    radial-gradient(900px 520px at 88% -14%, rgba(34, 224, 208, .13), transparent 62%),
    radial-gradient(720px 440px at 6% 2%, rgba(163, 230, 53, .06), transparent 58%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Sélection de texte */
::selection { background: rgba(34, 224, 208, .35); color: #fff; }

/* Barre de défilement discrète */
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 20px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: #333846; background-clip: padding-box; }

/* Accessibilité clavier : anneau de focus net */
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(7, 8, 11, .82);
  backdrop-filter: blur(10px);
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; letter-spacing: .5px; }
.brand strong { color: var(--accent); }
.logo { color: var(--accent-2); font-size: 22px; }

.tabs { display: flex; gap: 6px; }
.tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  transition: .15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); background: var(--surface-2); border-color: var(--border); }

/* Layout */
.layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  padding: 24px 28px;
  max-width: 1400px;
  margin: 0 auto;
}

.controls {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  height: fit-content;
  position: sticky;
  top: 90px;
  z-index: 5;   /* passe au-dessus de la galerie pour que les bulles d'aide restent visibles */
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > span { font-size: 13px; color: var(--muted); }
.field em { color: #6b7080; font-style: normal; }

textarea, input, select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s var(--ease), box-shadow .2s var(--ease), background .15s;
}
textarea:hover, input:hover, select:hover { border-color: #3a3f4d; }
textarea:focus, input:focus, select:focus {
  border-color: var(--accent); box-shadow: var(--ring); background: var(--surface);
}
textarea::placeholder, input::placeholder { color: var(--muted-2); }
textarea { resize: vertical; }
select { cursor: pointer; }

.row { display: grid; grid-template-columns: 1fr 100px; gap: 12px; }

.model-info {
  font-size: 12px;
  color: var(--muted);
  margin: -8px 0 16px;
  line-height: 1.5;
  min-height: 16px;
}
.model-info b { color: var(--accent-2); }

.preview { display: flex; gap: 10px; align-items: flex-start; margin: -8px 0 16px; }
.preview-img {
  width: 68px; height: 68px; border-radius: 8px; object-fit: cover;
  border: 1px solid var(--border); background: var(--surface-2); flex-shrink: 0;
}
.preview .model-info { margin: 0; }

.enhance {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 13px;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  margin: -6px 0 16px;
  transition: .15s;
}
.enhance:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.enhance:disabled { opacity: .6; cursor: default; }

.opts { display: flex; flex-wrap: wrap; gap: 14px; margin: -6px 0 16px; }
.opts .chk { font-size: 12px; }

.prompt-actions { display: flex; gap: 8px; margin: -6px 0 12px; }
.prompt-actions .enhance { margin: 0; flex: 1; }

/* Recettes : démarrage express (#3) */
.recipes-wrap { margin: -4px 0 14px; }
.recipes-label { font-size: 11px; color: var(--muted); display: block; margin-bottom: 8px; }
.recipes { display: flex; flex-wrap: wrap; gap: 6px; }
.recipe {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  font-size: 12px; padding: 6px 10px; border-radius: 20px; cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease), transform .1s var(--ease);
}
.recipe span { font-size: 13px; }
.recipe:hover { border-color: var(--accent); background: rgba(34, 224, 208, .1); }
.recipe:active { transform: scale(.95); }

.search {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 6px 10px; font-size: 13px; width: 150px;
}
.search:focus { border-color: var(--accent); outline: none; }

.viewer-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; justify-content: center; }
.viewer-actions button {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 8px 14px; border-radius: 9px; cursor: pointer; font-size: 13px; transition: .15s;
}
.viewer-actions button:hover { border-color: var(--accent); color: #fff; }
.viewer-actions button:disabled { opacity: .6; cursor: default; }

.generate {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: var(--grad);
  border: none;
  color: var(--on-accent);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .2px;
  padding: 13px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: var(--glow);
  transition: transform .12s var(--ease), box-shadow .2s var(--ease), opacity .15s;
}
/* Reflet qui balaye le bouton au survol */
.generate::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.28) 50%, transparent 80%);
  transform: translateX(-120%); transition: transform .6s var(--ease);
}
.generate:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(34, 224, 208, .5); }
.generate:hover::after { transform: translateX(120%); }
.generate:active { transform: translateY(0) scale(.985); box-shadow: var(--glow); }
.generate:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }
.generate:disabled::after { display: none; }

.status { font-size: 13px; color: var(--muted); margin-top: 12px; min-height: 18px; }
.status.error { color: #ff8080; }

/* Barre de progression de génération (#6) */
.genbar {
  height: 6px; border-radius: 6px; background: var(--surface-2);
  overflow: hidden; margin: 12px 0 -2px; border: 1px solid var(--border);
}
.genbar-fill {
  height: 100%; width: 0; border-radius: 6px;
  background: var(--grad-bright); background-size: 200% 100%;
  animation: bar-flow 1.6s linear infinite;
}
.genbar.err .genbar-fill { background: #ff8080; animation: none; }
@keyframes bar-flow { to { background-position: 200% 0; } }

.segmented {
  display: flex; gap: 4px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 10px; padding: 4px; margin-bottom: 16px;
}
.seg {
  flex: 1; background: transparent; border: none; color: var(--muted);
  padding: 8px; border-radius: 7px; cursor: pointer; font-size: 13px; transition: .18s var(--ease);
}
.seg:hover { color: var(--text); }
.seg:active { transform: scale(.97); }
.seg.active { background: var(--grad); color: var(--on-accent); box-shadow: 0 3px 12px rgba(34, 224, 208, .35); }

input[type="file"] { padding: 8px; font-size: 13px; }
.upload-preview {
  margin-top: 10px; width: 100%; border-radius: 10px;
  border: 1px solid var(--border); max-height: 200px; object-fit: contain; background: var(--surface-2);
}

.soon { text-align: center; color: var(--muted); padding: 10px; }
.soon h3 { color: var(--text); }
.soon ul { text-align: left; font-size: 13px; line-height: 1.7; }

/* Gallery */
.gallery-wrap { min-width: 0; }
.gallery-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.gallery-head h2 { margin: 0; font-size: 18px; }
.gallery-tools { display: flex; align-items: center; gap: 10px; }
.gallery-tools select {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 6px 10px; font-size: 13px;
}
.chk { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.chk input { accent-color: var(--accent); }
.fps-tag { font-size: 11px; font-weight: 600; color: var(--on-accent); background: var(--surge);
  padding: 1px 6px; border-radius: 999px; letter-spacing: .02em; }
.qchip.free-chip { border-color: var(--volt); color: var(--volt); }
.ghost {
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  padding: 6px 14px; border-radius: 8px; cursor: pointer; font-size: 13px;
  transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease), transform .1s var(--ease);
}
.ghost:hover { color: var(--text); border-color: var(--accent); background: rgba(34, 224, 208, .08); }
.ghost:active { transform: scale(.96); }

.gallery {
  column-width: 200px;   /* masonry : colonnes de largeur égale, hauteurs libres */
  column-gap: 14px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  break-inside: avoid;   /* une carte ne se coupe jamais entre deux colonnes */
  margin-bottom: 14px;
  transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 14px 34px rgba(34, 224, 208, .22); }
.card img,
.card video { width: 100%; height: auto; display: block; background: var(--surface-2); cursor: pointer; transition: transform .3s var(--ease); }
.card:hover img, .card:hover video { transform: scale(1.05); }
.card .cap { padding: 8px 10px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.actions {
  position: absolute; top: 8px; right: 8px; display: flex; gap: 5px;
  opacity: 0; transform: translateY(-4px); transition: opacity .18s var(--ease), transform .18s var(--ease); z-index: 2;
}
.act {
  width: 28px; height: 28px; border-radius: 8px; border: none; cursor: pointer;
  background: rgba(0,0,0,.6); color: #fff; font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center; backdrop-filter: blur(6px);
  transition: background .15s var(--ease), transform .12s var(--ease);
}
.card:hover .actions { opacity: 1; transform: translateY(0); }
.act:hover { background: rgba(0,0,0,.9); transform: scale(1.12); }
.act:active { transform: scale(.92); }
.act.fav.on { color: #ffd54a; }
.act.del:hover { background: #c0392b; }

.viewer-edit { display: flex; gap: 8px; align-items: center; margin-top: 16px; width: min(700px, 90vw); flex-wrap: wrap; }
.viewer-edit input {
  flex: 1; min-width: 200px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; padding: 10px 12px; font-size: 14px;
}
.viewer-edit button {
  background: linear-gradient(120deg, var(--accent), #A3E635); border: none; color: var(--on-accent);
  padding: 10px 18px; border-radius: 10px; cursor: pointer; font-weight: 600;
}
.viewer-edit button:disabled { opacity: .5; }
.edit-status { font-size: 13px; color: var(--muted); width: 100%; }

.media-wrap { position: relative; }
.badge {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,.65); color: #fff; font-size: 11px;
  padding: 2px 8px; border-radius: 20px; pointer-events: none;
}

.hint {
  font-size: 12px; color: var(--muted); line-height: 1.5;
  margin-top: 14px; padding: 10px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface-2);
}

.empty { color: var(--muted); font-size: 14px; padding: 40px 0; text-align: center; }

/* Skeleton pendant génération */
.skeleton {
  aspect-ratio: 1;
  border-radius: 12px;
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* Viewer */
.viewer {
  position: fixed; inset: 0; background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  z-index: 50; padding: 30px;
}
.viewer img,
.viewer-media video { max-width: 90vw; max-height: 80vh; border-radius: 10px; display: block; }

/* Comparateur avant / après (#5) */
.ba { position: relative; display: inline-block; line-height: 0; border-radius: 10px; overflow: hidden; user-select: none; }
.ba img { display: block; max-width: 90vw; max-height: 80vh; width: auto; height: auto; }
.ba-top { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px;
  background: #fff; box-shadow: 0 0 10px rgba(0, 0, 0, .6); transform: translateX(-1px); pointer-events: none; }
.ba-line::after {
  content: "⟷"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .5);
}
.ba-lab {
  position: absolute; top: 12px; font-size: 11px; font-weight: 600; letter-spacing: .3px;
  padding: 4px 10px; border-radius: 20px; background: rgba(0, 0, 0, .6); color: #fff;
  pointer-events: none; backdrop-filter: blur(4px);
}
.ba-lab-b { left: 12px; } .ba-lab-a { right: 12px; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  -webkit-appearance: none; appearance: none; background: transparent; cursor: ew-resize; }
.ba-range:focus-visible { outline: none; box-shadow: none; }
.ba-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 44px; height: 100vh; background: transparent; cursor: ew-resize; }
.ba-range::-moz-range-thumb { width: 44px; height: 100vh; background: transparent; border: none; cursor: ew-resize; }
.ba-range::-moz-range-track { background: transparent; }
.viewer-meta { color: var(--muted); font-size: 13px; margin-top: 14px; max-width: 700px; text-align: center; }
.viewer-close {
  position: absolute; top: 20px; right: 26px; background: transparent;
  border: none; color: white; font-size: 26px; cursor: pointer;
}

.hidden { display: none !important; }

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .controls { position: static; }
}

/* ===== Refonte : sections, quota, bulles d'aide, aperçus ===== */

/* Topbar : autorise le retour à la ligne du quota sur petit écran */
.topbar { flex-wrap: wrap; gap: 12px; }

/* Indicateur de quota (chips) */
.quota { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.qchip {
  font-size: 11px; padding: 4px 9px; border-radius: 20px;
  background: var(--surface-2); border: 1px solid var(--border);
  cursor: help; white-space: nowrap;
}

/* Sections numérotées du panneau de contrôle */
.section-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent-2); font-weight: 700;
  margin: 20px 0 12px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.section-label:first-child { margin-top: 0; }

/* Description "pourquoi choisir" du modèle (texte, sans image) */
.model-desc {
  font-size: 12.5px; color: var(--text); opacity: .9;
  margin: -4px 0 16px; line-height: 1.5;
  background: var(--surface-2); border-radius: 8px; padding: 9px 11px;
  border-left: 3px solid var(--accent); min-height: 18px;
}

/* Aperçu de style : grande vignette + description */
.style-preview { display: flex; gap: 12px; align-items: center; margin: -4px 0 16px; }
.style-img {
  width: 96px; height: 96px; border-radius: 10px; object-fit: cover;
  border: 1px solid var(--border); background: var(--surface-2); flex-shrink: 0;
}
.style-desc { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.5; }

/* Petite icône d'aide */
.tip {
  cursor: help; font-size: 11px; opacity: .6;
  margin-left: 3px; user-select: none;
}
.tip:hover { opacity: 1; }

/* Système de bulles (tooltip) partagé */
.tip, .qchip { position: relative; }
/* Au survol, on hisse l'élément (et donc sa bulle) au-dessus de tout le reste */
.tip:hover, .qchip:hover { z-index: 9999; }
.tip:hover::after, .qchip:hover::after {
  content: attr(data-tip);
  position: absolute;
  top: 150%; left: 0;
  z-index: 9999;
  width: max-content; max-width: 250px;
  background: #0b0c10; color: var(--text);
  border: 1px solid var(--accent);
  padding: 9px 11px; border-radius: 9px;
  font-size: 12px; line-height: 1.45; font-weight: 400; text-transform: none;
  letter-spacing: normal; white-space: normal; text-align: left;
  box-shadow: 0 10px 28px rgba(0,0,0,.55);
  pointer-events: none;
}
/* Les chips de quota sont à droite : bulle alignée à droite */
.qchip:hover::after { left: auto; right: 0; }

/* Vignette de style : cliquable pour agrandir */
.style-img { cursor: zoom-in; }

/* ===== Mode Simple / Expert ===== */
.mode-switch { margin-bottom: 18px; }
.panel.simple .expert-only { display: none; }
.panel.expert .simple-note { display: none; }
.simple-note {
  font-size: 12px; color: var(--accent-2);
  background: var(--surface-2); border-radius: 8px;
  padding: 10px 12px; margin: -2px 0 16px; line-height: 1.45;
  border-left: 3px solid var(--accent-2);
}
.simple-note b { color: var(--text); }

/* ===== Bouton Variations ×4 ===== */
.gen-row { display: flex; gap: 8px; }
.gen-row .generate { flex: 1; }
.generate.alt {
  flex: 0 0 auto; width: auto; padding: 13px 16px;
  background: var(--surface-2); border: 1px solid var(--accent);
  color: var(--accent); font-size: 14px; position: relative;
}
.generate.alt:hover { background: var(--accent); color: var(--on-accent); }

/* ===== Comptes / authentification ===== */
.auth-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(900px 500px at 50% -10%, #08201E 0%, var(--bg) 60%);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.auth-box {
  width: 100%; max-width: 380px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.auth-sub { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 18px; }

.account { display: flex; align-items: center; gap: 8px; }
.acct-mail {
  font-size: 12px; color: var(--muted);
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ===== Fenêtre Tarifs ===== */
.plans-box {
  width: 100%; max-width: 720px; max-height: 90vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.plans-title { text-align: center; margin: 0 0 4px; }
.plans-sub { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 20px; }

/* Bascule Mensuel / Annuel */
.billing-toggle {
  display: inline-flex; gap: 4px; margin: 0 auto 20px; padding: 4px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  position: relative; left: 50%; transform: translateX(-50%);
}
.bt {
  background: transparent; border: none; color: var(--muted); cursor: pointer;
  font-size: 13px; padding: 8px 18px; border-radius: 9px; transition: .18s var(--ease);
  display: inline-flex; align-items: center; gap: 7px;
}
.bt:hover { color: var(--text); }
.bt.active { background: var(--grad); color: var(--on-accent); box-shadow: 0 3px 12px rgba(34, 224, 208, .35); }
.bt-save {
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 20px;
  background: rgba(163, 230, 53, .18); color: var(--accent-2);
}
.bt.active .bt-save { background: rgba(255, 255, 255, .22); color: #fff; }

.plan-year { font-size: 11.5px; color: var(--muted); margin: 2px 0 4px; }
.plan-year s { opacity: .7; }

/* Mini-FAQ dans la fenêtre tarifs */
.plans-faq { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
.plans-faq details {
  border: 1px solid var(--border); border-radius: 10px; padding: 2px 14px;
  margin-bottom: 8px; background: var(--surface-2);
}
.plans-faq summary {
  cursor: pointer; padding: 11px 0; font-size: 13.5px; font-weight: 600;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.plans-faq summary::after { content: "+"; color: var(--accent); font-size: 18px; }
.plans-faq details[open] summary::after { content: "−"; }
.plans-faq details p { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.55; }

.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.plan-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 14px; text-align: center; position: relative;
}
.plan-card.featured {
  border-color: var(--accent); background: linear-gradient(180deg, rgba(34,224,208,.10), var(--surface-2));
  box-shadow: 0 0 0 1px var(--accent), 0 10px 34px rgba(34, 224, 208, .22);
  transform: translateY(-4px);
}
.plan-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
}
.plan-name { font-size: 15px; color: var(--muted); margin-bottom: 6px; }
.plan-price { font-size: 26px; font-weight: 700; }
.plan-price span { font-size: 13px; color: var(--muted); font-weight: 400; }
.plan-credits { color: var(--accent-2); font-size: 13px; margin: 6px 0; }
.plan-equiv { font-size: 12px; color: var(--text); line-height: 1.35; margin: 2px 0 8px; }
.plan-equiv b { color: var(--accent-2); font-weight: 700; }
.plan-equiv span { color: var(--muted); }
.plan-equiv em { display: block; font-style: normal; font-size: 10.5px; color: var(--muted-2); margin-top: 1px; }
.plan-blurb { font-size: 12px; color: var(--muted); line-height: 1.4; min-height: 48px; }
.faq-costs { width: 100%; border-collapse: collapse; margin: 8px 0 2px; font-size: 13px; }
.faq-costs td { padding: 5px 2px; border-bottom: 1px solid var(--border); }
.faq-costs td:last-child { text-align: right; color: var(--accent-2); white-space: nowrap; font-weight: 600; }
.faq-costs tr:last-child td { border-bottom: none; }
.plan-choose { margin-top: 10px; padding: 10px; font-size: 14px; }

.custom-plan {
  border: 1px dashed var(--border); border-radius: 12px; padding: 18px;
  background: rgba(34,224,208,.05);
}
.custom-plan h3 { margin: 0 0 4px; }
.custom-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.custom-rows label {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px; color: var(--muted);
}
.custom-rows input { width: 90px; }
.custom-result {
  display: flex; align-items: center; justify-content: space-between;
  margin: 16px 0; padding: 12px 14px; background: var(--surface-2);
  border-radius: 10px;
}
.custom-result strong { font-size: 22px; color: var(--accent); }

@media (max-width: 560px) {
  .plans-grid { grid-template-columns: 1fr; }
  .custom-rows { grid-template-columns: 1fr; }
}

/* ===== Accès libre : bouton connexion + curseur sur-mesure ===== */
.auth-box { position: relative; }
.ghost.primary {
  background: var(--grad); color: var(--on-accent); border-color: transparent; font-weight: 600;
}
.ghost.primary:hover { color: var(--on-accent); opacity: .92; }

.cp-slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px;
  border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border);
  padding: 0; margin: 6px 0 4px; cursor: pointer;
}
.cp-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px;
  border-radius: 50%; background: var(--accent); border: 2px solid #fff; cursor: pointer;
}
.cp-slider::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent);
  border: 2px solid #fff; cursor: pointer;
}
.cp-equiv { font-size: 12px; color: var(--muted); margin: 0 0 10px; }

/* ===== Logo + topbar-right ===== */
.brand { cursor: pointer; }
.logo-svg { display: block; border-radius: 10px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }

/* ===== Barre de navigation ===== */
.navbar {
  display: flex; gap: 6px; padding: 8px 28px; overflow: visible;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 8, 11, .72); position: sticky; top: 65px; z-index: 9;
  scrollbar-width: thin; flex-wrap: wrap;
}
/* Menus déroulants (Image / Vidéo / Audio & Avatar) */
.navgroup { position: relative; flex: 0 0 auto; }
.navgroup-btn {
  display: inline-flex; align-items: center; gap: 7px; background: transparent;
  border: 1px solid transparent; color: var(--muted); padding: 8px 14px;
  border-radius: 9px; cursor: pointer; font-size: 14px; white-space: nowrap;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.navgroup-btn:hover { color: var(--text); background: var(--surface-2); }
.navgroup .caret { font-size: 10px; opacity: .7; transition: transform .15s var(--ease); }
.navgroup.open .caret { transform: rotate(180deg); }
.navgroup.active > .navgroup-btn { color: #fff; background: var(--grad); border-color: transparent; box-shadow: var(--glow); }
.navmenu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 195px;
  display: none; flex-direction: column; gap: 2px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 16px 36px rgba(0, 0, 0, .45); z-index: 50;
}
.navgroup.open .navmenu { display: flex; }
.navmenu .navtab { width: 100%; justify-content: flex-start; }
.navtab {
  flex: 0 0 auto; background: transparent; border: 1px solid transparent;
  color: var(--muted); padding: 8px 14px; border-radius: 9px; cursor: pointer;
  font-size: 14px; white-space: nowrap; transition: color .15s var(--ease), background .15s var(--ease), transform .1s var(--ease);
}
.navtab:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }
.navtab:active:not(:disabled) { transform: scale(.96); }
.navtab.active { color: #fff; background: var(--grad); border-color: transparent; box-shadow: var(--glow); }
.navtab.soon { opacity: .45; cursor: not-allowed; font-size: 13px; }

/* ===== Page d'accueil ===== */
.home { max-width: 1100px; margin: 0 auto; padding: 40px 28px 60px; }
.hero { text-align: center; padding: 30px 0 40px; }
.hero-badge {
  display: inline-block; font-size: 13px; color: var(--accent-2);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 20px; margin-bottom: 20px;
}
.hero h1 { font-size: 44px; line-height: 1.12; margin: 0 0 16px; letter-spacing: -.5px; font-weight: 800; }
.hero h1 span {
  background: linear-gradient(120deg, var(--accent), var(--accent-2), var(--accent-hi), var(--accent));
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: hue-slide 6s linear infinite;
}
@keyframes hue-slide { to { background-position: 220% center; } }
.hero-sub { color: var(--muted); font-size: 16px; max-width: 620px; margin: 0 auto 28px; line-height: 1.6; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-cta .generate { width: auto; padding: 14px 24px; }

.home-h2 { text-align: center; font-size: 24px; margin: 30px 0 24px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.feature-card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
/* Voile dégradé qui s'illumine au survol */
.feature-card::before {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(400px 200px at 50% -20%, rgba(34, 224, 208, .16), transparent 70%);
  transition: opacity .25s var(--ease); pointer-events: none;
}
.feature-card:not(.soon):hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: var(--shadow-md); }
.feature-card:not(.soon):hover::before { opacity: 1; }
.feature-card.soon { opacity: .6; cursor: default; }
.fc-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; font-size: 26px; margin-bottom: 14px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(34, 224, 208, .22), rgba(163, 230, 53, .14));
  border: 1px solid var(--border);
}
.feature-card h3 { margin: 0 0 8px; font-size: 17px; }
.feature-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.feature-card p b { color: var(--accent-2); }

.home-cta-block {
  text-align: center; margin-top: 44px; padding: 36px 20px;
  background: linear-gradient(120deg, rgba(34,224,208,.12), rgba(163,230,53,.10));
  border: 1px solid var(--border); border-radius: var(--radius);
}
.home-cta-block h2 { margin: 0 0 6px; }
.home-cta-block p { color: var(--muted); margin: 0 0 18px; }
.home-cta-block .generate { width: auto; padding: 13px 26px; }

@media (max-width: 640px) {
  .hero h1 { font-size: 30px; }
  .navbar { top: 60px; }
}

/* ===== Pied de page ===== */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 40px; }
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 26px 28px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px; justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.footer-brand strong { color: var(--accent); }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { color: var(--muted); font-size: 13px; cursor: pointer; transition: color .15s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--muted); font-size: 12px; width: 100%; text-align: center; padding-top: 6px; border-top: 1px solid var(--border); }

/* ===== Pages légales ===== */
.legal { max-width: 780px; margin: 0 auto; padding: 40px 28px 20px; }
.legal h1 { font-size: 28px; margin: 0 0 16px; }
.legal h3 { font-size: 16px; margin: 24px 0 6px; color: var(--accent-2); }
.legal p { color: var(--text); opacity: .9; line-height: 1.7; font-size: 14px; margin: 0 0 8px; }
.legal-note {
  background: rgba(255,180,80,.1); border: 1px solid rgba(255,180,80,.35);
  color: #ffcf8f !important; border-radius: 10px; padding: 10px 14px; font-size: 13px !important;
}

/* ===== Galerie d'inspiration + Remixer (accueil) ===== */
.showcase { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.insp-card {
  position: relative; margin: 0; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.insp-card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; transition: transform .35s var(--ease); }
.insp-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 14px 34px rgba(34, 224, 208, .22); }
.insp-card:hover img { transform: scale(1.06); }
/* Bandeau bas : tag + bouton Remixer, révélé au survol */
.insp-card figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 22px 12px 12px;
  background: linear-gradient(to top, rgba(8, 9, 12, .92), transparent);
}
.insp-tag { font-size: 12px; color: var(--text); font-weight: 600; }
.insp-remix {
  background: var(--grad); color: var(--on-accent); border: none; cursor: pointer;
  font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 20px;
  box-shadow: 0 3px 12px rgba(34, 224, 208, .4); opacity: 0; transform: translateY(6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), box-shadow .15s var(--ease);
}
.insp-card:hover .insp-remix, .insp-card:focus-within .insp-remix { opacity: 1; transform: translateY(0); }
.insp-remix:hover { box-shadow: 0 5px 18px rgba(34, 224, 208, .6); }
.insp-remix:active { transform: scale(.94); }
/* Sur écran tactile (pas de survol), on montre toujours le bouton */
@media (hover: none) { .insp-remix { opacity: 1; transform: none; } }
.showcase-note { text-align: center; color: var(--muted); font-size: 13px; margin: 14px 0 0; }
.showcase-note b { color: var(--accent-2); }

/* ===== FAQ ===== */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px 16px; margin-bottom: 10px;
}
.faq summary {
  cursor: pointer; padding: 14px 0; font-size: 15px; font-weight: 600;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq summary::after { content: "+"; color: var(--accent); font-size: 20px; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ===== Coût en crédits ===== */
.cost-hint { font-size: 12px; color: var(--muted); margin: 8px 0 0; text-align: center; }

/* ===== Retouches mobiles ===== */
@media (max-width: 640px) {
  .topbar { padding: 12px 16px; }
  .navbar { padding: 8px 16px; }
  .layout { padding: 16px; gap: 16px; }
  .home { padding: 24px 16px 40px; }
  .hero { padding: 16px 0 24px; }
  .hero-sub { font-size: 15px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .generate { width: 100%; }
  .footer-inner { padding: 20px 16px; }
  .acct-mail { display: none; }   /* gagne de la place sur petit écran */
}

/* ===== Notifications (toasts) ===== */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast {
  position: relative; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 12px 16px 12px 18px; border-radius: 10px; font-size: 14px; max-width: 320px;
  box-shadow: var(--shadow-md); opacity: 0; transform: translateX(24px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.toast.show { opacity: 1; transform: translateX(0); }
.toast.success { border-color: rgba(76, 175, 125, .5); }
.toast.success::before { background: #4caf7d; }
.toast.error { border-color: rgba(255, 128, 128, .5); }
.toast.error::before { background: #ff8080; }

/* ===== Page Mon compte ===== */
.acct-chip { cursor: pointer; }
.acct-mail { cursor: pointer; }
.account-page { max-width: 760px; margin: 0 auto; padding: 40px 28px; }
.account-page h1 { margin: 0 0 20px; }
.account-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.account-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.account-card.highlight { border-color: var(--accent); }
.ac-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.ac-value { font-size: 16px; word-break: break-word; }
.ac-value.big { font-size: 32px; font-weight: 700; color: var(--accent); }
.account-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.account-actions .generate { width: auto; padding: 12px 20px; }
.ac-hist-title { font-size: 16px; color: var(--accent-2); margin: 0 0 12px; }
.ac-history { display: flex; flex-direction: column; gap: 6px; }
.ac-ev { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.ac-ev b.neg { color: #ff9090; }
.ac-ev b.pos { color: #6fdca0; }

/* ===== Presets de format ===== */
.format-presets { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 12px; }
.format-presets button {
  flex: 1; min-width: 80px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); font-size: 12px; padding: 7px 6px; border-radius: 8px; cursor: pointer; transition: .15s var(--ease);
}
.format-presets button:hover { color: var(--text); border-color: var(--accent); background: rgba(34, 224, 208, .08); }
.format-presets button:active { transform: scale(.96); }
.format-presets button.active { background: var(--grad); color: var(--on-accent); border-color: transparent; box-shadow: 0 3px 12px rgba(34, 224, 208, .3); }

/* ===== Bibliothèque de prompts ===== */
.lib-list { max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.lib-cat { font-size: 13px; color: var(--accent-2); font-weight: 600; margin: 12px 0 4px; }
.lib-item {
  text-align: left; background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 11px 13px; border-radius: 9px; cursor: pointer; font-size: 13px; line-height: 1.4; transition: .15s;
}
.lib-item:hover { border-color: var(--accent); background: rgba(34,224,208,.1); }

/* ===== Audio (voix) dans la galerie / visionneuse ===== */
.audio-card {
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 16px; background: linear-gradient(135deg, rgba(34,224,208,.18), rgba(163,230,53,.12));
}
.audio-emoji { font-size: 42px; cursor: pointer; }
.audio-card audio { width: 100%; }
.viewer-audio { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 40px; }
.viewer-audio .audio-emoji { font-size: 72px; }
.viewer-audio audio { width: 320px; max-width: 80vw; }

/* ============================================================
   FINITIONS — micro-interactions, apparitions, cohérence
   ============================================================ */

/* Apparition douce des vues et de la galerie */
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
#studio-view:not(.hidden), #home-view:not(.hidden),
.legal-view:not(.hidden), .account-page { animation: fade-up .35s var(--ease) both; }
.card, .skeleton { animation: fade-up .3s var(--ease) both; }

/* Marque cliquable : léger effet au survol */
.brand { transition: transform .12s var(--ease); }
.brand:hover { transform: translateY(-1px); }
.brand:active { transform: scale(.97); }
.footer-brand strong, .brand strong { text-shadow: 0 0 20px rgba(34, 224, 208, .35); }

/* Badge d'accueil : point lumineux qui pulse */
.hero-badge { position: relative; padding-left: 26px; }
.hero-badge::before {
  content: ""; position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2);
  box-shadow: 0 0 0 0 rgba(163, 230, 53, .6); animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(163, 230, 53, .55); }
  70% { box-shadow: 0 0 0 8px rgba(163, 230, 53, 0); }
  100% { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0); }
}

/* Cases à cocher plus grandes et à l'accent */
.chk input, input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* Boutons de la visionneuse et actions de compte : retour au clic */
.viewer-actions button, .viewer-edit button, .plan-choose, .enhance, .lib-item, .generate.alt {
  transition: all .15s var(--ease);
}
.viewer-actions button:active, .viewer-edit button:active, .plan-choose:active,
.enhance:active, .lib-item:active { transform: scale(.97); }
.lib-item:hover { transform: translateX(2px); }

/* Bouton fermer de la visionneuse : rotation au survol */
.viewer-close { transition: transform .2s var(--ease), color .15s; }
.viewer-close:hover { transform: rotate(90deg); color: var(--accent-2); }

/* Puce de quota : réagit au survol */
.qchip { transition: border-color .15s var(--ease), background .15s var(--ease); }
.qchip:hover { border-color: var(--accent); background: var(--surface-3); }

/* Chip de compte (crédits en topbar) */
.acct-chip {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px;
  padding: 5px 12px; font-size: 13px; transition: border-color .15s var(--ease), transform .1s var(--ease);
}
.acct-chip:hover { border-color: var(--accent); }
.acct-chip:active { transform: scale(.96); }

/* Barre de progression indéterminée sous un bouton en cours */
.generate:disabled { position: relative; }

/* Titres de section : petite pastille d'accent devant */
.section-label { display: flex; align-items: center; gap: 8px; }
.section-label::before {
  content: ""; width: 12px; height: 2px; border-radius: 2px;
  background: var(--grad-bright); flex: 0 0 auto;
}

/* Respect de la préférence système « réduire les animations » */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}

/* ============================================================
   IDENTITÉ DE MARQUE — logo, icônes, voix typographique
   ============================================================ */

/* --- Logo --------------------------------------------------- */
.logo-img { display: block; height: 34px; width: auto; }
.brand { font-weight: 600; letter-spacing: -.2px; }
.brand strong { color: var(--accent); font-weight: 800; }
.footer-brand strong { color: var(--accent); }
.brand strong, .footer-brand strong { text-shadow: 0 0 22px rgba(34, 224, 208, .3); }

/* --- Jeu d'icônes ------------------------------------------- */
.ico {
  width: 1.15em; height: 1.15em; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.ico-xs { width: 13px; height: 13px; stroke-width: 1.8; }

/* Tout ce qui porte une icône s'aligne proprement */
.navtab, .generate, .enhance, .recipe, .insp-remix,
.viewer-actions button, .act, .bt, .tip, .plan-choose {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.navtab { gap: 7px; }
.recipe { gap: 6px; }
.generate { gap: 9px; }
.act .ico { width: 15px; height: 15px; }
.tip { color: var(--muted-2); }
.tip:hover { color: var(--accent); }

/* --- Voix « tableau de bord » : mono, majuscules, traqué ----- */
.section-label, .recipes-label, .ac-label, .cap, .badge, .qchip, .cost-hint {
  font-family: var(--mono);
}
.section-label {
  font-size: 10.5px; letter-spacing: .12em; color: var(--accent-2);
}
.recipes-label { text-transform: uppercase; letter-spacing: .1em; font-size: 10px; }
.cap { letter-spacing: .01em; }

/* --- Onglets : traînée d'éclair au lieu d'une pastille pleine  */
.navtab.active {
  color: var(--text); background: transparent; border-color: transparent;
  box-shadow: none; position: relative;
}
.navtab.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 1px;
  height: 2px; border-radius: 2px; background: var(--grad);
  box-shadow: 0 0 12px rgba(34, 224, 208, .55);
}
.navtab.active .ico { color: var(--accent); }

/* --- Cartes fonctionnalités : icône en pastille sobre -------- */
.fc-icon {
  width: 46px; height: 46px; border-radius: 13px; font-size: 0;
  background: rgba(34, 224, 208, .09);
  border: 1px solid rgba(34, 224, 208, .22);
  color: var(--accent);
}
.fc-icon .ico { width: 22px; height: 22px; }

/* --- Retrait d'accessoires : le dégradé suffit --------------- */
.generate::after { display: none; }             /* plus de reflet balayant */
.hero h1 span { animation: none; background-size: 100% auto; }
.viewer-actions button:hover { border-color: var(--accent); color: var(--accent); }

/* --- Puce de crédits : chiffre en mono ----------------------- */
.acct-chip { font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; }

/* ============================================================
   PAGE MON COMPTE (enrichie) + ÉTATS VIDES
   ============================================================ */

/* Jauge de crédits */
.ac-gauge {
  height: 7px; border-radius: 6px; background: var(--surface-3);
  overflow: hidden; margin: 12px 0 8px;
}
.ac-gauge-fill { height: 100%; width: 0; border-radius: 6px; background: var(--grad); transition: width .6s var(--ease); }
.ac-gauge-note { font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: .02em; }

/* Statistiques de création */
.ac-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 26px; }
.ac-stat {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
}
.ac-stat .ico { width: 19px; height: 19px; color: var(--accent); }
.ac-stat b { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.ac-stat span { font-family: var(--mono); font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .09em; }

/* En-tête de section avec action à droite */
.ac-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ac-section-head .ac-hist-title { margin: 0; }

/* Vignettes des créations récentes */
.ac-recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin-bottom: 26px; }
.ac-thumb {
  padding: 0; border: 1px solid var(--border); background: var(--surface-2);
  border-radius: 11px; overflow: hidden; cursor: pointer; aspect-ratio: 1;
  transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.ac-thumb img, .ac-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ac-thumb:hover { border-color: var(--accent); transform: translateY(-2px); }
.ac-thumb-audio { display: flex; align-items: center; justify-content: center; color: var(--accent); }
.ac-thumb-audio .ico { width: 26px; height: 26px; }

.ac-ev b { font-family: var(--mono); }
.account-actions { margin-top: 8px; }

/* --- États vides : une invitation à agir --------------------- */
.empty-state {
  grid-column: 1 / -1; text-align: center;
  padding: 52px 24px; border: 1px dashed var(--border);
  border-radius: var(--radius); background: rgba(255, 255, 255, .012);
}
.empty-ico {
  width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 17px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(34, 224, 208, .08); border: 1px solid rgba(34, 224, 208, .2);
  color: var(--accent);
}
.empty-ico .ico { width: 26px; height: 26px; }
.empty-state h3 { margin: 0 0 7px; font-size: 17px; letter-spacing: -.01em; }
.empty-state p { margin: 0 auto 20px; font-size: 13.5px; color: var(--muted); max-width: 380px; line-height: 1.6; }
.empty-state .generate { width: auto; padding: 11px 20px; font-size: 14px; }

/* ============================================================
   ÉCRAN DE CONNEXION — marque à gauche, formulaire à droite
   ============================================================ */
#auth-overlay .auth-box {
  max-width: 860px; padding: 0; overflow: hidden;
  display: grid; grid-template-columns: 1.05fr 1fr;
  background: var(--surface); box-shadow: var(--shadow-lg);
}

/* Volet marque */
.auth-aside {
  padding: 38px 34px; display: flex; flex-direction: column; gap: 22px;
  background:
    radial-gradient(520px 300px at 0% 0%, rgba(34, 224, 208, .13), transparent 65%),
    radial-gradient(460px 280px at 100% 100%, rgba(163, 230, 53, .09), transparent 60%),
    var(--surface-2);
  border-right: 1px solid var(--border);
}
.auth-brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 600; }
.auth-brand strong { color: var(--accent); font-weight: 800; }
.auth-pitch {
  margin: 0; font-size: 27px; line-height: 1.18; font-weight: 800; letter-spacing: -.6px;
}
.auth-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 15px; }
.auth-points li { display: flex; gap: 11px; align-items: flex-start; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.auth-points .ico { width: 17px; height: 17px; color: var(--accent); margin-top: 2px; }
.auth-foot {
  margin: auto 0 0; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2);
}

/* Volet formulaire */
.auth-form { padding: 38px 34px; display: flex; flex-direction: column; }
.auth-title { margin: 0 0 4px; font-size: 24px; font-weight: 800; letter-spacing: -.4px; }
#auth-overlay .auth-sub { text-align: left; margin: 0 0 20px; }
.auth-legal { font-size: 11.5px; color: var(--muted-2); line-height: 1.45; margin: 2px 0 10px; }
.auth-tos { font-size: 11.5px; color: var(--muted-2); line-height: 1.5; margin: 14px 0 0; text-align: center; }
.auth-tos a { color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.auth-tos a:hover { color: var(--accent); }
#auth-overlay .viewer-close { top: 14px; right: 16px; z-index: 2; }

@media (max-width: 720px) {
  #auth-overlay .auth-box { grid-template-columns: 1fr; max-width: 420px; }
  .auth-aside { display: none; }          /* sur mobile, on va droit au formulaire */
  .auth-form { padding: 32px 24px; }
}

/* ============================================================
   FILTRES PAR TYPE (galerie)
   ============================================================ */
.type-filters { display: flex; gap: 5px; flex-wrap: wrap; }
.tf {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  font-size: 12.5px; padding: 6px 12px; border-radius: 20px; cursor: pointer;
  transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease), transform .1s var(--ease);
}
.tf .ico { width: 14px; height: 14px; }
.tf:hover { color: var(--text); border-color: var(--accent); }
.tf:active { transform: scale(.95); }
.tf.active {
  color: var(--accent); border-color: var(--accent);
  background: rgba(34, 224, 208, .1);
}
.gallery-head { align-items: flex-start; }
@media (max-width: 640px) { .type-filters { order: 3; width: 100%; } }

/* ============================================================
   BARRE UNIQUE (marque + navigation + compte sur une ligne)
   ============================================================ */
.topbar {
  gap: 18px; padding: 10px 22px; flex-wrap: nowrap;
}
.topbar .brand { flex: 0 0 auto; font-size: 18px; }
.topbar .logo-img { height: 30px; }
.navbar {
  position: static; border: none; background: none; padding: 0;
  flex: 1 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden;
  display: flex; gap: 2px; justify-content: center;
  -ms-overflow-style: none;
}
.navbar::-webkit-scrollbar { height: 0; }
.navtab { padding: 8px 11px; font-size: 13.5px; }
.navtab.active::after { left: 11px; right: 11px; bottom: -2px; }
.topbar-right { flex: 0 0 auto; }

/* La marque « Fasty » reprend le dégradé exact du logo */
.brand strong, .footer-brand strong, .auth-brand strong {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  text-shadow: none;
}

@media (max-width: 1100px) {
  .navbar { justify-content: flex-start; }
  .navtab { padding: 8px 9px; font-size: 13px; }
  .acct-mail { display: none; }
}
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
  .navbar { order: 3; width: 100%; justify-content: flex-start; }
}

/* ============================================================
   GALERIE — plus dense, et on voit ce qui vient d'être généré
   ============================================================ */
.gallery { column-width: 180px; column-gap: 12px; }   /* masonry, un peu plus dense */

/* Création de cette session : liseré de marque + pastille */
.card.is-new {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 10px 26px rgba(34, 224, 208, .22);
}
.new-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: var(--grad); color: var(--on-accent);
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 20px; pointer-events: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .45);
}

/* La barre unique est plus basse qu'avant : on recale le panneau collant */
.controls { top: 74px; }

/* Tarifs sorti de la nav : rattaché à la zone connexion, légèrement détaché */
.navtab-pricing { margin-right: 4px; padding: 8px 12px; }
.navtab-pricing.active { color: var(--accent); }
.navtab-pricing.active::after { display: none; }   /* pas de traînée hors nav */

/* ============================================================
   BOUTON « CONTINUER AVEC GOOGLE »
   Fond clair + logo officiel : c'est la présentation attendue par
   les règles de marque Google, et celle que les gens reconnaissent.
   ============================================================ */
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 11px;
  width: 100%; margin-bottom: 14px; padding: 11px 14px;
  background: #fff; color: #1f1f1f; text-decoration: none;
  border: 1px solid #dadce0; border-radius: 12px;
  font-size: 14.5px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background .15s var(--ease), box-shadow .15s var(--ease), transform .1s var(--ease);
}
.google-btn:hover { background: #f5f6f7; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.google-btn:active { transform: scale(.985); }
.g-logo { width: 18px; height: 18px; flex: 0 0 auto; }

/* Séparateur « ou par email » */
.auth-or {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 16px; color: var(--muted-2);
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: .12em;
}
.auth-or::before, .auth-or::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}

/* ============================================================
   PROFIL : nom affiché dans la barre + formulaire d'infos
   ============================================================ */
/* Bouton compte (avatar + nom) dans la barre — remplace l'email */
.acct-user {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--border); color: var(--text);
  padding: 4px 10px 4px 4px; border-radius: 22px; cursor: pointer;
  font-size: 13.5px; max-width: 190px;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.acct-user:hover { border-color: var(--accent); background: rgba(34, 224, 208, .07); }
.acct-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad); color: var(--on-accent);
  font-weight: 800; font-size: 13px;
}
.acct-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Deux champs côte à côte */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }

/* Champ date : cohérent avec le thème sombre */
input[type="date"] { color-scheme: dark; }

/* Formulaire « Mes informations » */
.ac-profile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px; margin-bottom: 26px;
}
.ac-profile .field { margin-bottom: 14px; }
.ac-profile-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-top: 4px;
}
.ac-email-ro { font-size: 13px; color: var(--muted); }
.ac-email-ro b { color: var(--text); font-weight: 600; }
.ac-profile-foot .generate { width: auto; padding: 11px 20px; }
.ac-profile .status { margin-top: 10px; }

/* ============================================================
   HERO EN 2 COLONNES + DÉMO EN ACTION + TUILES FACTUELLES
   ============================================================ */
.hero-split {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 44px;
  align-items: center; text-align: left; padding: 26px 0 34px;
}
.hero-left .hero-badge { margin-bottom: 18px; }
.hero-split h1 { font-size: 40px; line-height: 1.12; }
.hero-split .hero-sub { margin: 0 0 24px; }
.hero-split .hero-cta { justify-content: flex-start; }

.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 20px 0 0; padding: 0; }
.hero-trust li { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.hero-trust .ico { width: 15px; height: 15px; color: var(--accent); }

/* Carte démo */
.hero-demo { perspective: 1000px; }
.hd-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.hd-bar {
  display: flex; align-items: center; gap: 6px; padding: 11px 14px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.hd-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); }
.hd-title { margin-left: 8px; font-family: var(--mono); font-size: 10.5px; color: var(--muted-2); letter-spacing: .06em; }
.hd-prompt {
  display: flex; align-items: center; gap: 8px; padding: 13px 14px;
  font-size: 13px; color: var(--text); border-bottom: 1px solid var(--border); min-height: 46px;
}
.hd-plabel { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; color: var(--accent-2);
  border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; flex: 0 0 auto; }
.hd-caret { width: 2px; height: 15px; background: var(--accent); animation: hd-blink 1s steps(1) infinite; }
@keyframes hd-blink { 50% { opacity: 0; } }
.hd-canvas { position: relative; aspect-ratio: 3/2; background: var(--surface-2); }
.hd-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.04); transition: opacity .55s var(--ease), transform .7s var(--ease);
}
.hd-img.show { opacity: 1; transform: scale(1); }
.hd-badge {
  position: absolute; bottom: 10px; right: 10px; z-index: 2;
  background: var(--grad); color: var(--on-accent); font-family: var(--mono);
  font-size: 10px; font-weight: 700; letter-spacing: .06em; padding: 4px 9px; border-radius: 20px;
  opacity: 0; transform: translateY(6px); transition: opacity .3s var(--ease), transform .3s var(--ease);
  box-shadow: 0 3px 12px rgba(0,0,0,.4);
}
.hd-badge.show { opacity: 1; transform: translateY(0); }

/* Tuiles factuelles (pas de faux chiffres : que du vrai) */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 6px 0 20px; }
.stat-tile {
  text-align: center; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 12px;
}
.stat-tile b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.stat-tile span { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

@media (max-width: 880px) {
  .hero-split { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .hero-split .hero-cta, .hero-trust { justify-content: center; }
  .hero-demo { max-width: 460px; margin: 0 auto; width: 100%; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .hero-split h1 { font-size: 30px; }
  .stat-tile b { font-size: 15px; }
}

/* Argument volume sur les cartes de tarifs (pousse à monter en gamme) */
.plan-value {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .02em;
  color: var(--muted); margin: 2px 0 8px;
}
.plan-value b { color: var(--accent-2); font-weight: 700; }

/* Voix off sur vidéo */
.vo-block { margin: -4px 0 14px; }
.vo-block .chk { font-size: 13px; }
.vo-block .chk .ico { width: 15px; height: 15px; color: var(--accent); }
.vo-fields { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
