@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --t-bg: #0d1117;
  --t-surface: #161b22;
  --t-surface-2: #1c2128;
  --t-border: #30363d;
  --t-accent: #f59e0b;
  --t-accent-hover: #fbbf24;
  --t-text: #e6edf3;
  --t-muted: #7d8590;
  --t-success: #3fb950;
  --t-error: #f85149;

  --g-bg: #f1f5f9;
  --g-surface: #ffffff;
  --g-border: #e2e8f0;
  --g-accent: #f59e0b;
  --g-accent-dark: #d97706;
  --g-text: #0f172a;
  --g-muted: #64748b;
  --g-success: #16a34a;
  --g-error: #dc2626;
}

* { font-family: 'Outfit', system-ui, sans-serif; box-sizing: border-box; }
.mono { font-family: 'JetBrains Mono', monospace; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[x-cloak] { display: none !important; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pop {
  0%   { transform: scale(0.95); opacity: 0; }
  60%  { transform: scale(1.02); }
  100% { transform: scale(1); opacity: 1; }
}
.anim-fadeup { animation: fadeUp 0.22s ease both; }

/* ════════════════════════════════════════
   TERRAIN — dark industrial
   ════════════════════════════════════════ */

.terrain-page {
  min-height: 100dvh;
  background: var(--t-bg);
  color: var(--t-text);
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

/* Header */
.t-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--t-border);
  position: sticky;
  top: 0;
  background: rgba(13,17,23,0.92);
  backdrop-filter: blur(12px);
  z-index: 20;
}
.t-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--t-surface);
  border: 1px solid var(--t-border);
  color: var(--t-text);
  text-decoration: none;
  font-size: 18px;
  flex-shrink: 0;
  transition: background 0.12s;
}
.t-back:active { background: var(--t-surface-2); }
.t-header-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--t-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

/* Tabs */
.t-tabs {
  display: flex;
  gap: 10px;
  padding: 16px 20px 0;
}
.t-tab {
  flex: 1;
  height: 54px;
  border-radius: 14px;
  border: 2px solid var(--t-border);
  background: var(--t-surface);
  color: var(--t-muted);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Outfit', system-ui;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  -webkit-tap-highlight-color: transparent;
}
.t-tab.active {
  border-color: var(--t-accent);
  background: rgba(245,158,11,0.1);
  color: var(--t-accent);
}

/* Section */
.t-section { padding: 24px 20px 4px; }
.t-section + .t-section { padding-top: 8px; }
.t-section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--t-muted);
  margin-bottom: 14px;
}

/* Choice cards (2-col) */
.t-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
/* Choice cards (multi-col for materials) */
.t-choices-mat {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.t-choice {
  background: var(--t-surface);
  border: 2px solid var(--t-border);
  border-radius: 16px;
  padding: 18px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  position: relative;
}
.t-choice:has(input[type=radio]:checked) {
  border-color: var(--t-accent);
  background: rgba(245,158,11,0.1);
}
.t-choice-sm {
  background: var(--t-surface);
  border: 2px solid var(--t-border);
  border-radius: 12px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.t-choice-sm:has(input[type=radio]:checked) {
  border-color: var(--t-accent);
  background: rgba(245,158,11,0.1);
}
.t-choice-icon { font-size: 30px; line-height: 1; }
.t-choice-sm .t-choice-icon { font-size: 22px; }
.t-choice-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--t-text);
  text-align: center;
  line-height: 1.2;
}
.t-choice-sm .t-choice-name { font-size: 11px; }
.t-choice-unit {
  font-size: 11px;
  color: var(--t-muted);
  font-family: 'JetBrains Mono', monospace;
}
.t-choice:has(input:checked) .t-choice-name,
.t-choice-sm:has(input:checked) .t-choice-name { color: var(--t-accent); }

/* Qty reveal: shows when any radio in .t-choices / .t-choices-mat is checked */
.t-qty { display: none; }
.t-choices:has(input:checked) + .t-qty,
.t-choices-mat:has(input:checked) + .t-qty { display: block; animation: fadeUp 0.18s ease; }

/* ════════════════════════════════════════
   WIZARD AVANCEMENT — 3 étapes
   ════════════════════════════════════════ */

/* Conteneur global — remplit la hauteur sous header+tabs */
.t-wizard {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 144px);
}

/* Pastilles de progression */
.t-wiz-prog {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 0 4px;
}
.t-wiz-dot {
  height: 6px;
  width: 6px;
  border-radius: 3px;
  background: var(--t-border);
  transition: width 0.3s ease, background 0.3s ease;
}
.t-wiz-dot.on { background: var(--t-accent); width: 24px; }

/* Bandeau de l'étape (back + titre) */
.t-wiz-hd {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px 4px;
}
.t-wiz-back {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--t-surface);
  border: 1px solid var(--t-border);
  color: var(--t-text);
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s;
}
.t-wiz-back:active { background: var(--t-surface-2); }
.t-wiz-hd-title {
  font-size: 17px; font-weight: 700; color: var(--t-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── Étape 1 : Grille de types ── */
.t-wiz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 20px 24px;
}
.t-wiz-card {
  background: var(--t-surface);
  border: 2px solid var(--t-border);
  border-radius: 20px;
  padding: 22px 12px 18px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  text-align: center;
}
.t-wiz-card:active { transform: scale(0.96); }
.t-wiz-card:has(input:checked) {
  border-color: var(--t-accent);
  background: rgba(245,158,11,0.1);
}
.t-wiz-card-icon  { font-size: 36px; line-height: 1; }
.t-wiz-card-label { font-size: 14px; font-weight: 600; color: var(--t-text); line-height: 1.3; }
.t-wiz-card-unit  { font-size: 12px; color: var(--t-muted); font-family: 'JetBrains Mono', monospace; }
.t-wiz-card:has(input:checked) .t-wiz-card-label { color: var(--t-accent); }

/* ── Étape 2 : Dimensions ── */
.t-wiz-dims { padding: 4px 20px 0; flex: 1; }

.t-wiz-badge {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 0 20px;
  border-bottom: 1px solid var(--t-border);
  margin-bottom: 24px;
}
.t-wiz-badge-icon { font-size: 30px; }
.t-wiz-badge-name { font-size: 17px; font-weight: 700; color: var(--t-text); }

.t-wiz-field { margin-bottom: 18px; }
.t-wiz-field-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--t-muted);
  margin-bottom: 10px;
}
.t-wiz-field-unit {
  font-size: 11px; font-family: 'JetBrains Mono', monospace;
  color: var(--t-accent);
  background: rgba(245,158,11,0.12);
  border-radius: 4px; padding: 2px 7px;
}
.t-wiz-input {
  width: 100%;
  background: var(--t-surface);
  border: 2px solid var(--t-border);
  border-radius: 16px;
  padding: 18px 20px;
  font-size: 30px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--t-text);
  text-align: right;
  -moz-appearance: textfield;
  transition: border-color 0.15s;
}
.t-wiz-input::-webkit-inner-spin-button,
.t-wiz-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.t-wiz-input:focus { outline: none; border-color: var(--t-accent); }

/* Custom type fields */
.t-wiz-text-input {
  width: 100%;
  background: var(--t-surface);
  border: 2px solid var(--t-border);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 17px; font-family: inherit;
  color: var(--t-text);
  transition: border-color 0.15s;
  margin-bottom: 16px;
}
.t-wiz-text-input:focus { outline: none; border-color: var(--t-accent); }
.t-wiz-select {
  width: 100%;
  background: var(--t-surface);
  border: 2px solid var(--t-border);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 17px; font-family: inherit;
  color: var(--t-text);
  -webkit-appearance: none;
}

/* Barre basse sticky (résultat + bouton Suivant) */
.t-wiz-bar {
  position: sticky; bottom: 0;
  background: var(--t-bg);
  border-top: 1px solid var(--t-border);
  padding: 16px 20px max(20px, env(safe-area-inset-bottom));
  margin-top: auto;
}
.t-wiz-bar-result {
  display: flex; align-items: baseline; gap: 6px;
  margin-bottom: 14px;
}
.t-wiz-bar-val {
  font-size: 44px; font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--t-accent); line-height: 1;
}
.t-wiz-bar-unit { font-size: 20px; font-weight: 500; color: var(--t-accent); opacity: 0.8; }
.t-wiz-bar-conso { font-size: 12px; color: var(--t-muted); margin-top: 2px; margin-bottom: 14px; }

/* ── Étape 3 : Confirmation ── */
.t-wiz-confirm { padding: 8px 20px 0; flex: 1; display: flex; flex-direction: column; }

.t-wiz-summary {
  background: rgba(245,158,11,0.07);
  border: 2px solid rgba(245,158,11,0.25);
  border-radius: 22px;
  padding: 28px 20px 22px;
  text-align: center;
  margin-bottom: 20px;
}
.t-wiz-sum-icon  { font-size: 48px; line-height: 1; margin-bottom: 10px; }
.t-wiz-sum-type  { font-size: 14px; font-weight: 600; color: var(--t-muted); margin-bottom: 14px; }
.t-wiz-sum-val   { font-size: 56px; font-weight: 800; font-family: 'JetBrains Mono', monospace; color: var(--t-accent); line-height: 1; }
.t-wiz-sum-unit  { font-size: 24px; font-weight: 500; color: var(--t-accent); opacity: 0.8; margin-left: 4px; }
.t-wiz-sum-dims  { font-size: 13px; color: var(--t-muted); font-family: 'JetBrains Mono', monospace; margin-top: 8px; }

.t-wiz-conso     { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.t-wiz-conso-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--t-surface);
  border-radius: 14px;
}
.t-wiz-conso-ico   { font-size: 22px; }
.t-wiz-conso-lbl   { font-size: 14px; color: var(--t-muted); flex: 1; }
.t-wiz-conso-qty   { font-size: 17px; font-weight: 700; font-family: 'JetBrains Mono', monospace; color: var(--t-text); }

.t-wiz-note-lbl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--t-muted); margin-bottom: 10px; }
.t-wiz-note {
  width: 100%;
  background: var(--t-surface);
  border: 2px solid var(--t-border);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px; line-height: 1.5; font-family: inherit;
  color: var(--t-text); resize: none;
  transition: border-color 0.15s;
  margin-bottom: 20px;
}
.t-wiz-note:focus { outline: none; border-color: rgba(245,158,11,0.5); }

/* ── Étape 4 : Succès ── */
.t-wiz-success {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 28px;
  text-align: center;
  animation: fadeUp 0.25s ease;
}
.t-wiz-success-icon  { font-size: 64px; margin-bottom: 16px; }
.t-wiz-success-title { font-size: 22px; font-weight: 700; color: var(--t-text); margin-bottom: 8px; }
.t-wiz-success-sub   { font-size: 15px; color: var(--t-muted); margin-bottom: 32px; }
.t-wiz-success-new {
  width: 100%;
  padding: 18px;
  background: var(--t-surface);
  border: 2px solid var(--t-border);
  border-radius: 16px;
  color: var(--t-text);
  font-size: 16px; font-weight: 600; font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ── NOTE FIELD (stock/voice tabs) ── */
.t-note-area {
  width: 100%;
  background: var(--t-surface);
  border: 2px solid var(--t-border);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px; line-height: 1.5; font-family: inherit;
  color: var(--t-text); resize: none;
  transition: border-color 0.15s;
}
.t-note-area:focus { outline: none; border-color: rgba(245,158,11,0.5); }

/* Stock row (material + theoretical quantity) */
.t-stock-row {
  background: var(--t-surface);
  border: 2px solid var(--t-border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  overflow: hidden;
}
.t-stock-row:has(input[type=radio]:checked) {
  border-color: var(--t-accent);
  background: rgba(245,158,11,0.08);
}
.t-stock-row-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
}

/* Stepper */
.t-stepper {
  display: flex;
  align-items: stretch;
  background: var(--t-surface);
  border: 2px solid var(--t-border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  height: 72px;
}
.t-stepper-btn {
  width: 68px;
  background: none;
  border: none;
  color: var(--t-text);
  font-size: 26px;
  font-weight: 300;
  cursor: pointer;
  font-family: 'Outfit', system-ui;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.1s;
  flex-shrink: 0;
}
.t-stepper-btn:active { background: var(--t-surface-2); }
.t-stepper-input {
  flex: 1;
  background: none;
  border: none;
  border-left: 1px solid var(--t-border);
  border-right: 1px solid var(--t-border);
  color: var(--t-text);
  font-size: 28px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
  outline: none;
  padding: 0;
  min-width: 0;
  -moz-appearance: textfield;
}
.t-stepper-input::-webkit-outer-spin-button,
.t-stepper-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Submit */
.t-submit {
  width: 100%;
  height: 68px;
  background: var(--t-accent);
  border: none;
  border-radius: 18px;
  color: #0d1117;
  font-size: 17px;
  font-weight: 700;
  font-family: 'Outfit', system-ui;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  margin-bottom: 20px;
}
.t-submit:hover { background: var(--t-accent-hover); }
.t-submit:active { transform: scale(0.98); }

/* Feedback */
.t-feedback-ok {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(63,185,80,0.12);
  border: 1px solid rgba(63,185,80,0.25);
  border-radius: 12px;
  color: var(--t-success);
  font-size: 15px;
  font-weight: 600;
  animation: pop 0.25s ease;
}

/* Home chantier cards */
.t-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background: var(--t-surface);
  border: 1px solid var(--t-border);
  border-radius: 18px;
  text-decoration: none;
  color: var(--t-text);
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.t-card:active { background: var(--t-surface-2); transform: scale(0.99); }
.t-card-name { font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.t-card-addr { font-size: 13px; color: var(--t-muted); }
.t-card-arrow { color: var(--t-accent); font-size: 22px; flex-shrink: 0; margin-left: 12px; }

/* Empty state */
.t-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px;
  color: var(--t-muted);
  text-align: center;
  gap: 8px;
}
.t-empty-icon { font-size: 48px; }
.t-empty-text { font-size: 15px; font-weight: 500; }

/* ════════════════════════════════════════
   GÉRANT — light professional
   ════════════════════════════════════════ */

.g-layout { min-height: 100dvh; background: var(--g-bg); }

/* Nav */
.g-nav {
  background: #0f172a;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.g-logo { font-size: 21px; font-weight: 800; color: var(--g-accent); letter-spacing: -0.5px; text-decoration: none; }
.g-nav-links { display: flex; gap: 2px; }
.g-nav-link {
  padding: 7px 13px;
  border-radius: 8px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}
.g-nav-link:hover, .g-nav-link.active { background: rgba(255,255,255,0.08); color: #f0f4f8; }

/* Content */
.g-content { max-width: 920px; margin: 0 auto; padding: 32px 24px; }
@media (max-width: 640px) { .g-content { padding: 20px 16px; } }

/* Cards */
.g-card {
  background: var(--g-surface);
  border: 1px solid var(--g-border);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 18px;
}
.g-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.g-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--g-text);
}

/* Stat cards */
.g-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 24px; }
.g-stat {
  background: var(--g-surface);
  border: 1px solid var(--g-border);
  border-radius: 14px;
  padding: 18px 20px;
}
.g-stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--g-muted); margin-bottom: 6px; }
.g-stat-value { font-size: 30px; font-weight: 800; color: var(--g-text); font-family: 'JetBrains Mono', monospace; line-height: 1; }

/* Quick nav */
.g-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.g-quick-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--g-surface);
  border: 1px solid var(--g-border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--g-text);
  transition: all 0.15s;
}
.g-quick-item:hover { border-color: var(--g-accent); box-shadow: 0 0 0 3px rgba(245,158,11,0.08); }
.g-quick-icon { font-size: 26px; line-height: 1; flex-shrink: 0; }
.g-quick-label { font-size: 14px; font-weight: 600; }
.g-quick-sub { font-size: 12px; color: var(--g-muted); margin-top: 1px; }

/* Alert */
.g-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(220,38,38,0.05);
  border: 1px solid rgba(220,38,38,0.18);
  border-radius: 12px;
  color: var(--g-error);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 20px;
}
.g-alert-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  background: var(--g-error);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}

/* Upgrade banner */
.g-upgrade {
  padding: 20px 22px;
  background: linear-gradient(135deg, rgba(245,158,11,0.07), rgba(245,158,11,0.02));
  border: 1px solid rgba(245,158,11,0.22);
  border-radius: 14px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.g-upgrade-text { font-size: 14px; font-weight: 600; color: #92400e; }
.g-upgrade-sub { font-size: 13px; color: var(--g-muted); margin-top: 2px; }

/* Inputs */
.g-input, .g-select {
  height: 40px;
  border: 1px solid var(--g-border);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  font-family: 'Outfit', system-ui;
  color: var(--g-text);
  background: var(--g-surface);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.g-input:focus, .g-select:focus {
  border-color: var(--g-accent);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.12);
}
.g-select {
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.g-input-full { width: 100%; }

/* Buttons */
.g-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Outfit', system-ui;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.g-btn-primary { background: var(--g-accent); color: #0f172a; }
.g-btn-primary:hover { background: var(--g-accent-dark); }
.g-btn-ghost { background: var(--g-bg); color: var(--g-muted); border: 1px solid var(--g-border); }
.g-btn-ghost:hover { background: var(--g-border); color: var(--g-text); }

/* Form row */
.g-form-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }

/* List rows */
.g-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: var(--g-bg);
  border-radius: 8px;
  margin-bottom: 5px;
}
.g-row-label { font-size: 14px; color: var(--g-text); }
.g-row-value { font-size: 13px; font-weight: 600; font-family: 'JetBrains Mono', monospace; color: var(--g-text); }

/* Chantier list item */
.g-chantier {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  background: var(--g-surface);
  border: 1px solid var(--g-border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--g-text);
  transition: all 0.15s;
  margin-bottom: 8px;
}
.g-chantier:hover { border-color: var(--g-accent); box-shadow: 0 0 0 3px rgba(245,158,11,0.08); }
.g-chantier-name { font-size: 15px; font-weight: 600; }
.g-chantier-addr { font-size: 13px; color: var(--g-muted); margin-top: 2px; }
.g-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.g-badge-amber { background: rgba(245,158,11,0.1); color: #92400e; }
.g-badge-green { background: rgba(22,163,74,0.1); color: var(--g-success); }

/* Tags */
.g-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.18);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #92400e;
}

/* Reconciliation table */
.g-table { width: 100%; border-collapse: collapse; }
.g-table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--g-muted);
  padding: 0 10px 12px;
  text-align: left;
  border-bottom: 2px solid var(--g-border);
}
.g-table th:not(:first-child) { text-align: right; }
.g-table td {
  padding: 13px 10px;
  font-size: 13px;
  border-bottom: 1px solid var(--g-border);
}
.g-table td:not(:first-child) { text-align: right; font-family: 'JetBrains Mono', monospace; }
.g-table tr:last-child td { border-bottom: none; }
.g-table tr.sev-green { background: rgba(22,163,74,0.04); }
.g-table tr.sev-green .sev-val { color: var(--g-success); font-weight: 700; }
.g-table tr.sev-orange { background: rgba(234,88,12,0.05); }
.g-table tr.sev-orange .sev-val { color: #ea580c; font-weight: 700; }
.g-table tr.sev-red { background: rgba(220,38,38,0.05); }
.g-table tr.sev-red .sev-val { color: var(--g-error); font-weight: 700; }

/* Severity dot */
.sev-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
  flex-shrink: 0;
}
.sev-dot-green { background: var(--g-success); }
.sev-dot-orange { background: #ea580c; }
.sev-dot-red { background: var(--g-error); }

/* ════════════════════════════════════════
   LOGIN
   ════════════════════════════════════════ */
.login-wrap {
  min-height: 100dvh;
  background: var(--t-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--t-surface);
  border: 1px solid var(--t-border);
  border-radius: 22px;
  padding: 40px 32px;
}
.login-logo { font-size: 38px; font-weight: 800; color: var(--t-accent); letter-spacing: -1px; text-align: center; margin-bottom: 6px; }
.login-sub { font-size: 14px; color: var(--t-muted); text-align: center; margin-bottom: 32px; line-height: 1.5; }
.login-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--t-muted); margin-bottom: 8px; }
.login-input {
  width: 100%;
  height: 52px;
  background: var(--t-bg);
  border: 1px solid var(--t-border);
  border-radius: 12px;
  padding: 0 16px;
  font-size: 16px;
  font-family: 'Outfit', system-ui;
  color: var(--t-text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.login-input:focus { border-color: var(--t-accent); box-shadow: 0 0 0 3px rgba(245,158,11,0.15); }
.login-input::placeholder { color: var(--t-muted); }
.login-btn {
  width: 100%;
  height: 52px;
  background: var(--t-accent);
  border: none;
  border-radius: 12px;
  color: #0d1117;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Outfit', system-ui;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 20px;
}
.login-btn:hover { background: var(--t-accent-hover); }
.login-btn:active { transform: scale(0.99); }
.login-error {
  padding: 12px 14px;
  background: rgba(248,81,73,0.1);
  border: 1px solid rgba(248,81,73,0.25);
  border-radius: 10px;
  color: var(--t-error);
  font-size: 14px;
  margin-bottom: 20px;
}

/* ── Voice ── */
.t-voice-btn {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--t-accent);
  border: none;
  font-size: 40px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 0 0 0 rgba(245,158,11,0.4);
}
.t-voice-btn:active { transform: scale(0.95); }
.t-voice-btn.recording {
  background: #ef4444;
  animation: pulse-mic 1.2s ease-in-out infinite;
  box-shadow: 0 0 0 12px rgba(239,68,68,0.15);
}
@keyframes pulse-mic {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50%       { box-shadow: 0 0 0 20px rgba(239,68,68,0); }
}
