/* ============================================================
   FFGR Field — Design System (sombre + or, luxe discret)
   Réutilise les tokens Gen3 : #050505 / #D4AF37 / glass-card
   Fonts : Cormorant Garamond (titres) + Inter (UI)
   ============================================================ */

:root {
  /* Couleurs marque */
  --black: #050505;
  --black-2: #0b0b0c;
  --panel: #121214;
  --gold: #d4af37;
  --gold-light: #f2d06b;
  --gold-dark: #b38728;
  --gold-soft: rgba(212, 175, 55, 0.72); /* or patiné : l'eyebrow chuchote */
  --cream: #f3f4f6;
  --muted: #9ca3af;
  --muted-2: #8b93a1; /* remonté pour contraste AA (onglets/labels todo) */
  --gold-gradient: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
  --glass-bg: rgba(20, 20, 20, 0.6);
  --glass-border: rgba(212, 175, 55, 0.15);
  --line: rgba(255, 255, 255, 0.07);

  /* Élévation : 3 niveaux de surface (profondeur sans ajouter d'or) */
  --surface-1: rgba(22, 22, 24, 0.62); /* cartes courantes */
  --surface-2: rgba(30, 30, 33, 0.74); /* cartes mises en avant */
  --hairline-top: inset 0 1px 0 rgba(255, 255, 255, 0.05); /* liseré de lumière haut de carte */

  /* Statuts */
  --ok: #5db37e;
  --warn: #e0b341;
  --info: #6ea8d8;
  --danger: #d9776b;

  /* Espacement / radius */
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.8);
  --tap: 48px;
  --section-gap: 32px; /* le luxe respire ENTRE les groupes */

  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* Réactivité tactile : supprime le délai 300ms + double-tap-zoom parasite */
a, button, [data-act], .tab, .card.tap, .vote, .chip, .check, .swatch, .toggle, .photo-slot, .seg-control button, .status-action, .consent, .role-pill { touch-action: manipulation; }

/* Focus clavier visible (WCAG 2.4.7) — signature or discrète */
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; border-radius: inherit; }
:focus:not(:focus-visible) { outline: none; }

body {
  margin: 0;
  background: var(--black);
  color: var(--cream);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100svh;
}
/* Fond atmosphérique composité GPU (pas de background-attachment:fixed = 60fps au scroll) :
   noir profond + lueur or diffuse en haut + vignette basse. L'or ressort comme une lueur. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(90% 55% at 50% -18%, rgba(212, 175, 55, 0.07), transparent 60%),
    radial-gradient(120% 80% at 50% 118%, rgba(0, 0, 0, 0.55), transparent 55%),
    linear-gradient(180deg, #070706 0%, #040404 55%, #020202 100%);
}

h1, h2, h3, .display { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; letter-spacing: -0.01em; }

.gold-text {
  background: var(--gold-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.glass {
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  box-shadow: var(--hairline-top), 0 1px 0 rgba(0, 0, 0, 0.35);
}
/* Carte mise en avant : surface plus claire + ombre portée = elle avance vers l'oeil */
.card.raised, .kpi.hero { background: var(--surface-2); box-shadow: var(--hairline-top), var(--shadow); }

/* ============================================================
   App shell
   ============================================================ */
#app { max-width: 520px; margin: 0 auto; min-height: 100svh; position: relative; padding-bottom: calc(86px + var(--safe-bottom)); }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: calc(14px + var(--safe-top)) 18px 14px;
  background: linear-gradient(180deg, rgba(5,5,5,0.96) 60%, rgba(5,5,5,0));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.topbar .brand { display: flex; align-items: center; gap: 10px; }
/* Monogramme "gravé" : or en trait fin sur fond sombre (signature de maison, pas pastille app-store) */
.topbar .logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--gold);
  display: grid; place-items: center; color: var(--gold-light);
  font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 21px;
  box-shadow: var(--hairline-top), 0 4px 14px -8px rgba(212,175,55,0.5);
}
.topbar .brand b { font-weight: 600; font-size: 14px; letter-spacing: 2px; }
.topbar .brand small { display: block; color: var(--muted); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; }
.topbar .spacer { flex: 1; }
.topbar .role-pill {
  font-size: 11px; color: var(--gold-light); border: 1px solid var(--glass-border);
  padding: 6px 11px; border-radius: 999px; background: rgba(212,175,55,0.06);
  text-transform: uppercase; letter-spacing: 1px; cursor: pointer; white-space: nowrap;
}

.screen { padding: 6px 18px 24px; animation: fade 0.35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.eyebrow { color: var(--gold-soft); font-size: 11px; letter-spacing: 3px; text-transform: uppercase; }
.screen-title { font-size: clamp(30px, 9vw, 40px); line-height: 1.05; letter-spacing: -0.02em; font-weight: 500; margin: 6px 0 2px; }
.screen-sub { color: var(--muted); font-size: 13px; margin: 0 0 18px; }

/* ============================================================
   Cards & lists
   ============================================================ */
.card { padding: 16px; margin-bottom: 14px; }
.card.tap { cursor: pointer; transition: transform 0.15s, border-color 0.2s; }
.card.tap:active { transform: scale(0.985); border-color: rgba(212,175,55,0.4); }

.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 4px; }
.muted { color: var(--muted); }
.tiny { font-size: 11.5px; }
.sm { font-size: 13px; }
.mt { margin-top: 12px; } .mt-lg { margin-top: var(--section-gap); }

.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.kpi { padding: 16px; }
.kpi .n { font-family: 'Cormorant Garamond', serif; font-size: 34px; line-height: 1; letter-spacing: -0.01em; }
.kpi .l { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; margin-top: 6px; }

.svc-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(212,175,55,0.08); border: 1px solid var(--glass-border); font-size: 20px; flex-shrink: 0; }
.svc-ico svg { width: 20px; height: 20px; stroke: var(--gold); opacity: 0.9; }

/* Badges / chips */
.badge { font-size: 10.5px; padding: 4px 9px; border-radius: 999px; letter-spacing: 0.5px; font-weight: 600;
  border: 1px solid var(--line); white-space: nowrap; }
.badge.gold { color: #1a1407; background: var(--gold-gradient); border: none; }
.badge.neutral { color: var(--cream); border-color: var(--line); background: rgba(255,255,255,0.04); }
.badge.ok { color: var(--ok); border-color: rgba(93,179,126,0.4); background: rgba(93,179,126,0.08); }
.badge.warn { color: var(--warn); border-color: rgba(224,179,65,0.4); background: rgba(224,179,65,0.08); }
.badge.info { color: var(--info); border-color: rgba(110,168,216,0.4); background: rgba(110,168,216,0.08); }
.badge.danger { color: var(--danger); border-color: rgba(217,119,107,0.4); background: rgba(217,119,107,0.08); }
.badge.muted { color: var(--muted); }

.divider { height: 1px; background: var(--line); margin: 14px 0; border: none; }

/* ============================================================
   Buttons
   ============================================================ */
.btn { font: inherit; cursor: pointer; border-radius: var(--r-sm); border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.03); color: var(--cream); padding: 13px 16px; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap);
  transition: transform 0.12s, border-color 0.2s, background 0.2s; width: 100%; }
.btn:active { transform: scale(0.97); }
.btn.gold { background: var(--gold-gradient); color: #1a1407; border: none; font-weight: 700; letter-spacing: 0.3px;
  box-shadow: 0 10px 26px -12px rgba(212,175,55,0.7); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 40px; padding: 9px 13px; font-size: 13px; width: auto; }
.btn.danger { color: var(--danger); border-color: rgba(217,119,107,0.4); }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn-row { display: flex; gap: 10px; }

/* Giant status action (terrain) — or ciselé (highlight interne) plutôt qu'aplat massif */
.status-action {
  width: 100%; min-height: 96px; border-radius: var(--r-lg); border: none; cursor: pointer;
  background: var(--gold-gradient); color: #1a1407; font-family: 'Cormorant Garamond', serif;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 14px 34px -18px rgba(212,175,55,0.7);
  transition: transform 0.12s;
}
.status-action:active { transform: scale(0.97); }
.status-action .big { font-size: 25px; font-weight: 700; letter-spacing: -0.01em; }
.status-action .hint { font-size: 12px; font-family: 'Inter', sans-serif; opacity: 0.72; letter-spacing: 0.5px; }
.status-action.done { background: rgba(93,179,126,0.12); color: var(--ok); box-shadow: none; border: 1px solid rgba(93,179,126,0.4); }
.status-action.locked { background: rgba(255,255,255,0.03); color: var(--muted); box-shadow: none; border: 1px solid var(--line); cursor: not-allowed; }
.status-action.locked .big { font-size: 20px; }

/* Timeline (mission statuses) */
.timeline { list-style: none; padding: 0; margin: 6px 0; }
.timeline li { display: flex; gap: 12px; padding: 8px 0; align-items: flex-start; }
.timeline .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted-2); margin-top: 3px; flex-shrink: 0; }
.timeline li.done .dot { background: var(--gold); border-color: var(--gold); }
.timeline li.current .dot { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212,175,55,0.18); animation: dotpop 0.45s cubic-bezier(.2,1.6,.4,1); }
@keyframes dotpop { 0% { transform: scale(0.4); opacity: 0.4; } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.timeline .t-label { font-size: 14px; }
.timeline li.todo .t-label { color: var(--muted-2); }
.timeline .t-time { font-size: 11px; color: var(--muted); }

/* Checklist */
.check { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.check:last-child { border-bottom: none; }
.check .box { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--muted-2); flex-shrink: 0;
  display: grid; place-items: center; transition: all 0.2s; }
.check.on .box { background: var(--gold); border-color: var(--gold); color: #1a1407; }
.check .box svg { width: 14px; height: 14px; opacity: 0; }
.check.on .box svg { opacity: 1; }
.check .label { font-size: 14px; } .check.on .label { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--gold-dark); }
.check .req { font-size: 9.5px; color: var(--danger); border: 1px solid rgba(217,119,107,0.4); padding: 2px 6px; border-radius: 6px; margin-inline-start: auto; }

/* Photo upload grid */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photo-slot { aspect-ratio: 1; border-radius: var(--r-sm); border: 1.5px dashed var(--glass-border);
  display: grid; place-items: center; position: relative; overflow: hidden; cursor: pointer; background: rgba(255,255,255,0.02); }
.photo-slot .plus { color: var(--muted); font-size: 22px; }
.photo-slot .pl { position: absolute; bottom: 6px; inset-inline: 6px; font-size: 10px; color: var(--muted); text-align: center; line-height: 1.15; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot.filled { border-style: solid; border-color: rgba(212,175,55,0.4); }
.photo-slot .req-dot { position: absolute; top: 6px; inset-inline-end: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.photo-slot.filled .req-dot { background: var(--ok); }

/* Pipeline (kanban-ish, horizontal scroll) */
.pipe { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
.pipe::-webkit-scrollbar { height: 0; }
.pipe-col { min-width: 230px; scroll-snap-align: start; }
.pipe-col h4 { font-family: 'Inter', sans-serif; font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--gold); margin: 0 0 10px; display: flex; justify-content: space-between; }
.pipe-card { padding: 13px; margin-bottom: 10px; cursor: pointer; }

/* Assistant chat */
.chat { display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }
.bubble { padding: 12px 14px; border-radius: 14px; max-width: 86%; font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.bubble.ai { align-self: flex-start; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-start-start-radius: 4px; }
.bubble.me { align-self: flex-end; background: var(--gold-gradient); color: #1a1407; border-start-end-radius: 4px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.chip { font-size: 12px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--glass-border);
  background: rgba(212,175,55,0.05); color: var(--gold-light); cursor: pointer; }
.composer { position: sticky; bottom: calc(86px + var(--safe-bottom)); display: flex; gap: 8px; padding-top: 10px;
  background: linear-gradient(0deg, var(--black) 70%, transparent); }
.composer input { flex: 1; }

/* Inputs */
input, textarea, select { font: inherit; width: 100%; background: rgba(255,255,255,0.03); color: var(--cream);
  border: 1px solid var(--glass-border); border-radius: var(--r-sm); padding: 12px 14px; min-height: var(--tap); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,0.12); }
label.field { display: block; margin-bottom: 12px; }
label.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.5px; }
textarea { min-height: 90px; resize: vertical; }

/* Map placeholder */
.map { height: 200px; border-radius: var(--r); position: relative; overflow: hidden; border: 1px solid var(--glass-border);
  background:
    linear-gradient(rgba(212,175,55,0.05) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(212,175,55,0.05) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(80% 80% at 30% 40%, #15130c, #060606); }
.map .pin { position: absolute; transform: translate(-50%, -100%); font-size: 22px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.6)); }
.map .pin small { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); background: var(--black); color: var(--gold-light);
  font-size: 9px; padding: 2px 6px; border-radius: 6px; white-space: nowrap; border: 1px solid var(--glass-border); }
.map .lbl { position: absolute; bottom: 10px; inset-inline-start: 12px; font-size: 10px; color: var(--muted); letter-spacing: 1px; }

/* Notices */
.notice { font-size: 12.5px; line-height: 1.5; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); }
.notice.rgpd { border-color: rgba(110,168,216,0.3); background: rgba(110,168,216,0.06); color: #bcd6ee; }
.notice.gold { border-color: var(--glass-border); background: rgba(212,175,55,0.06); color: var(--gold-light); }
.notice.warn { border-color: rgba(224,179,65,0.35); background: rgba(224,179,65,0.07); color: #ecd79b; }

/* ============================================================
   Bottom navigation
   ============================================================ */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px; z-index: 50;
  display: flex; justify-content: space-around; padding: 8px 6px calc(8px + var(--safe-bottom));
  background: rgba(8,8,9,0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tab { flex: 1; background: none; border: none; color: var(--muted-2); cursor: pointer; padding: 6px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; letter-spacing: 0.3px; min-height: var(--tap); }
.tab svg { width: 22px; height: 22px; }
.tab.active { color: var(--gold); }
.tab.active svg { filter: drop-shadow(0 0 6px rgba(212,175,55,0.5)); }

/* Sheet / modal */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 60; display: none; animation: fade 0.2s; }
.sheet-backdrop.open { display: block; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-width: 520px; margin: 0 auto;
  background: var(--panel); border-radius: var(--r-lg) var(--r-lg) 0 0; border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 20px 18px calc(24px + var(--safe-bottom)); transform: translateY(100%); transition: transform 0.3s ease; max-height: 86svh; overflow-y: auto; }
.sheet.open { transform: none; }
.sheet .grip { width: 40px; height: 4px; border-radius: 4px; background: var(--muted-2); margin: 0 auto 16px; }

/* Toast */
.toast { position: fixed; bottom: calc(100px + var(--safe-bottom)); left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--panel); border: 1px solid var(--glass-border); color: var(--cream); padding: 12px 18px; border-radius: 999px;
  font-size: 13px; z-index: 80; opacity: 0; transition: all 0.3s; box-shadow: var(--shadow); pointer-events: none; max-width: 90%; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* Toast de réussite : célèbre le geste (sans confetti, réservés aux idées) */
.toast.success { border-color: var(--gold); background: linear-gradient(135deg, rgba(212,175,55,0.16), var(--panel)); color: var(--gold-light); }

.fiche { border: 1px solid var(--glass-border); border-radius: var(--r); padding: 16px; background: rgba(255,255,255,0.02); }
.fiche .line { display: flex; justify-content: space-between; gap: 18px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.fiche .line span:last-child { text-align: end; }
.fiche .line:last-child { border-bottom: none; }
.fiche .line .k { color: var(--muted); }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .ico { font-size: 40px; opacity: 0.4; margin-bottom: 10px; }

/* Suivi terrain (agent) */
.seg-bar { display: flex; gap: 4px; }
.seg { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.seg.on { background: var(--gold); }
.comm-preview { font-size: 12.5px; color: var(--muted); background: rgba(255,255,255,0.02); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.card.alert { border-color: rgba(224,179,65,0.5); }

/* ============================================================
   Studio d'idées — co-création (beau, fluide, ludique)
   ============================================================ */
.seg-control { display: flex; gap: 6px; background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border); border-radius: 12px; padding: 4px; }
.seg-control button { flex: 1; border: none; background: transparent; color: var(--muted); font: inherit; font-size: 13px; padding: 10px 6px; border-radius: 9px; cursor: pointer; transition: all 0.25s cubic-bezier(.4,0,.2,1); }
.seg-control button.on { color: #1a1407; background: var(--gold-gradient); font-weight: 700; box-shadow: 0 6px 16px -8px rgba(212,175,55,0.7); }

/* Composer futuriste avec bord dégradé animé */
.idea-composer { position: relative; border-radius: var(--r); padding: 16px; background: var(--surface-1); }
.idea-composer::before { content: ''; position: absolute; inset: 0; border-radius: var(--r); padding: 1px;
  background: linear-gradient(120deg, rgba(212,175,55,0.5), rgba(242,208,107,0.1), rgba(212,175,55,0.5));
  background-size: 200% 200%; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; animation: borderflow 6s linear infinite; pointer-events: none; }
@keyframes borderflow { to { background-position: 200% 0; } }

/* Bouton futuriste (shimmer) */
.btn.futur { position: relative; overflow: hidden; background: var(--gold-gradient); color: #1a1407; border: none; font-weight: 700; letter-spacing: 0.4px; }
.btn.futur::after { content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255,255,255,0.7), transparent); transform: skewX(-18deg); animation: shimmer 3.4s ease-in-out infinite; }
@keyframes shimmer { 0%,60% { left: -120%; } 100% { left: 160%; } }

/* Carte idée */
.idea { padding: 15px; margin-bottom: 12px; transition: transform 0.15s, border-color 0.2s; }
.idea:active { transform: scale(0.99); }
.idea .head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.idea h4 { font-family: 'Inter', sans-serif; font-size: 15px; margin: 0; flex: 1; }
.idea .desc { font-size: 13px; color: #cfd2d8; line-height: 1.5; }
.idea .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.idea .author { font-size: 11px; color: var(--muted); }

.type-chip { font-size: 16px; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(212,175,55,0.08); border: 1px solid var(--glass-border); flex-shrink: 0; }

/* Upvote ludique */
.vote { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--glass-border); background: rgba(255,255,255,0.03); color: var(--cream); border-radius: 999px; padding: 7px 13px; cursor: pointer; font-size: 13px; transition: transform 0.12s, border-color 0.2s, background 0.2s; min-height: 38px; }
.vote:active { transform: scale(0.9); }
.vote.voted { border-color: var(--gold); background: rgba(212,175,55,0.12); color: var(--gold-light); }
.vote .hrt { transition: transform 0.3s cubic-bezier(.2,1.6,.4,1); }
.vote.voted .hrt { transform: scale(1.25); }

/* Badges de statut idée */
.st { font-size: 10.5px; padding: 4px 9px; border-radius: 999px; font-weight: 600; letter-spacing: 0.3px; white-space: nowrap; }
.st.nouveau { color: var(--muted); border: 1px solid var(--line); }
.st.approuve { color: var(--info); border: 1px solid rgba(110,168,216,0.4); background: rgba(110,168,216,0.08); }
.st.encours { color: var(--warn); border: 1px solid rgba(224,179,65,0.4); background: rgba(224,179,65,0.08); }
.st.refuse { color: var(--danger); border: 1px solid rgba(217,119,107,0.4); background: rgba(217,119,107,0.08); }
.st.livre { color: #1a1407; background: var(--gold-gradient); border: none; box-shadow: 0 0 14px -2px rgba(212,175,55,0.6); }

/* Personnalisation — pastilles d'accent */
.swatches { display: flex; gap: 12px; }
.swatch { width: 42px; height: 42px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform 0.15s, border-color 0.2s; }
.swatch:active { transform: scale(0.9); }
.swatch.on { border-color: #fff; }
.toggle { width: 50px; height: 30px; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid var(--glass-border); position: relative; cursor: pointer; transition: background 0.25s; }
.toggle .knob { position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); transition: all 0.25s cubic-bezier(.4,0,.2,1); }
.toggle.on { background: rgba(212,175,55,0.25); }
.toggle.on .knob { inset-inline-start: 23px; background: var(--gold); }

/* Confetti dorés à la soumission */
.celebrate { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.celebrate i { position: absolute; top: -12px; width: 8px; height: 8px; border-radius: 1px; opacity: 0; animation: fall 1.5s ease-in forwards; }
@keyframes fall { 0% { transform: translateY(-10px) rotate(0); opacity: 1; } 100% { transform: translateY(105vh) rotate(540deg); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .idea-composer::before, .btn.futur::after, .celebrate i, .timeline li.current .dot, .screen { animation: none; }
}

/* Ma voix FFGR */
.voice-rec { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.rec-btn { width: 64px; height: 64px; border-radius: 50%; border: none; cursor: pointer; background: var(--gold-gradient); color: #1a1407; display: grid; place-items: center; font-size: 24px; box-shadow: 0 8px 22px -10px rgba(212,175,55,.7); transition: transform .12s; flex-shrink: 0; }
.rec-btn:active { transform: scale(.94); }
.rec-btn:disabled { opacity: .4; pointer-events: none; }
.rec-btn.recording { background: rgba(217,119,107,.18); color: var(--danger); box-shadow: none; animation: recpulse 1.2s ease-in-out infinite; }
@keyframes recpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(217,119,107,.5); } 50% { box-shadow: 0 0 0 12px rgba(217,119,107,0); } }
.rec-meta { flex: 1; font-size: 13px; color: #cfd2d8; }
.consent { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 12.5px; color: #cfd2d8; line-height: 1.45; }
.consent .box { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--muted-2); flex-shrink: 0; display: grid; place-items: center; transition: all .2s; margin-top: 1px; }
.consent.on .box { background: var(--gold); border-color: var(--gold); color: #1a1407; }
.consent .box svg { width: 13px; height: 13px; opacity: 0; }
.consent.on .box svg { opacity: 1; }
#rec-playback audio { width: 100%; margin-top: 12px; }
.no-anim .rec-btn.recording, .no-anim .timeline li.current .dot, .no-anim .screen { animation: none; }

/* ---- Verrou de mise à jour obligatoire ---- */
.update-gate{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:28px;
  background:radial-gradient(120% 120% at 50% 0%,#0d0d0d 0%,#050505 60%,#000 100%);
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.update-gate .ug-card{max-width:340px;width:100%;text-align:center;animation:ug-in .5s cubic-bezier(.2,.8,.2,1) both}
.update-gate .ug-logo{width:84px;height:84px;margin:0 auto 22px;border-radius:24px;display:flex;align-items:center;justify-content:center;
  font-family:Georgia,'Cormorant Garamond',serif;font-weight:600;font-size:46px;color:var(--gold-light);
  background:var(--surface-2);border:1px solid var(--gold);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 16px 48px rgba(191,149,63,.28)}
.update-gate .ug-title{font-family:Georgia,'Cormorant Garamond',serif;font-size:26px;color:#F3F4F6;margin-bottom:10px;letter-spacing:-0.01em}
.update-gate .ug-msg{color:#9CA3AF;font-size:15px;line-height:1.5;margin-bottom:26px}
.update-gate .ug-btn{width:100%}
@keyframes ug-in{from{opacity:0;transform:translateY(14px) scale(.97)}to{opacity:1;transform:none}}

/* ---- Écran de login OTP (actif quand FLAGS.auth=true) ---- */
.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:28px}
.login-card{max-width:340px;width:100%;text-align:center}
.login-card .ug-logo{margin:0 auto 18px}
.login-title{font-family:Georgia,'Cormorant Garamond',serif;font-size:30px;color:#F3F4F6;letter-spacing:-0.01em}
.login-sub{font-size:13px;margin:4px 0 22px;letter-spacing:.18em;text-transform:uppercase}
.lg-input{width:100%;box-sizing:border-box;background:#0f0f0f;border:1px solid #2a2a2a;border-radius:14px;
  color:#F3F4F6;font-size:16px;padding:14px 16px;margin-bottom:12px;text-align:center;letter-spacing:.04em}
.lg-input:focus{outline:none;border-color:#BF953F;box-shadow:0 0 0 3px rgba(212,175,55,0.14)}
.lg-btn{width:100%;margin-bottom:10px}
#lg-code{font-size:24px;letter-spacing:.5em;font-weight:600}
