/* ═══════════════════════════════════════════
   SCAN360PRO V51 — Design System
═══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;900&family=DM+Mono:wght@400;500&display=swap');

:root {
  /* Dark theme */
  --bg:       #060a12;
  --surface:  #0d1424;
  --surface2: #131d30;
  --border:   rgba(255,255,255,.09);
  --border2:  rgba(255,255,255,.16);
  --txt:      #edf2fb;
  --muted:    #7a90aa;
  --cyan:     #2ee8c8;
  --blue:     #3b82f6;
  --violet:   #7c3aed;
  --green:    #22c55e;
  --red:      #ef4444;
  --amber:    #f59e0b;
  --radius:   16px;
  --radius-sm:10px;
  --font:     'DM Sans', system-ui, sans-serif;
  --header-h: 58px;
  --track-h:  62px;
  --safe-b:   env(safe-area-inset-bottom, 0px);
}

/* ── Light theme ────────────────────────── */
body.light {
  --bg:      #f0f4f9;
  --surface: #ffffff;
  --surface2:#e8ecf4;
  --border:  rgba(0,0,0,.08);
  --border2: rgba(0,0,0,.14);
  --txt:     #0d1424;
  --muted:   #5a6a82;
  --cyan:    #0891b2;
  --blue:    #2563eb;
  --violet:  #7c3aed;
  --green:   #16a34a;
  --red:     #dc2626;
  --amber:   #d97706;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--txt); min-height: 100dvh; overflow-x: hidden; transition: background .25s, color .25s; }
::-webkit-scrollbar { width: 3px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }

/* ── Header ─────────────────────────────── */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); z-index: 100;
  display: flex; align-items: center; justify-content: space-between; padding: 0 14px;
  background: var(--bg); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}
body.light .app-header { background: rgba(240,244,249,.95); }
.header-logo { display: flex; align-items: center; gap: 9px; }
.header-logo img { width: 32px; height: 32px; border-radius: 9px; }
.header-name b { display: block; font-size: 14px; font-weight: 800; color: var(--cyan); letter-spacing: -.02em; }
.header-name span { display: block; font-size: 10px; color: var(--muted); }
.header-nav { display: flex; gap: 4px; }
.hbtn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; font-size: 16px; transition: all .15s; font-family: var(--font); }
.hbtn:hover { color: var(--txt); border-color: var(--border2); }

/* ── Wizard track ───────────────────────── */
.wizard-track {
  position: fixed; top: var(--header-h); left: 0; right: 0; height: var(--track-h); z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 0 20px; gap: 0;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
body.light .wizard-track { background: rgba(240,244,249,.95); }
.wstep { display: flex; flex-direction: column; align-items: center; gap: 4px; border: none; background: none; color: var(--muted); cursor: pointer; padding: 4px 10px; border-radius: 10px; font-family: var(--font); }
.wstep.locked { pointer-events: none; opacity: .4; }
.wstep.active { color: var(--cyan); }
.wstep.done   { color: var(--green); pointer-events: auto; opacity: 1; }
.wstep-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid currentColor; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.wstep.active .wstep-dot { background: rgba(46,232,200,.12); }
.wstep.done .wstep-dot   { background: var(--green); border-color: var(--green); color: #fff; }
body.light .wstep.done .wstep-dot { color: #fff; }
.wstep-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.wstep-line { flex: 1; height: 1.5px; background: var(--border2); max-width: 50px; transition: background .3s; }
.wstep-line.done { background: var(--green); }

/* ── Main layout ────────────────────────── */
.app-main { padding-top: calc(var(--header-h) + var(--track-h)); padding-bottom: calc(90px + var(--safe-b)); min-height: 100dvh; }
.panel { display: none; max-width: 640px; margin: 0 auto; padding: 16px 14px 120px; }
.panel.active { display: block; animation: panelIn .25s ease both; }
.panel.hidden { display: none !important; }
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ── Camera zone ────────────────────────── */
.cam-zone {
  position: relative; width: 100%; border-radius: var(--radius);
  overflow: hidden; background: var(--surface2); border: 1px solid var(--border);
  margin-bottom: 10px;
  height: 120px; /* compact by default */
  transition: height .3s ease;
}
.cam-zone.cam-active { height: calc(100dvh - var(--header-h) - var(--track-h) - 80px); border-radius: var(--radius); }
.cam-zone video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-idle { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 13px; }
.cam-quality { position: absolute; bottom: 10px; left: 10px; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: rgba(0,0,0,.65); }
.cam-quality.good { color: var(--green); } .cam-quality.warn { color: var(--amber); } .cam-quality.bad { color: var(--red); }
/* Capture button INSIDE cam zone */
.cam-capture-overlay {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--cyan); border: 3px solid rgba(255,255,255,.4);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform .1s;
  box-shadow: 0 4px 20px rgba(46,232,200,.4);
}
.cam-capture-overlay:active { transform: translateX(-50%) scale(.93); }
.cam-stop-overlay {
  position: absolute; top: 10px; right: 10px;
  padding: 6px 12px; border-radius: 99px;
  background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.2);
  color: #fff; font-size: 12px; font-weight: 700; cursor: pointer;
  font-family: var(--font);
}
.capture-ring { width: 46px; height: 46px; border-radius: 50%; background: #fff; display: block; }

/* ── Cam controls ───────────────────────── */
.cam-controls { display: flex; gap: 8px; margin-bottom: 14px; }
.cam-ctrl, label.cam-ctrl, label.cam-import {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border2);
  background: var(--surface); color: var(--txt); font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: var(--font); transition: background .15s; min-height: 46px;
  -webkit-tap-highlight-color: transparent;
}
.cam-ctrl:active, label.cam-import:active { background: var(--surface2); }

/* ── Slots ──────────────────────────────── */
.slots-section { margin-bottom: 12px; }
.slots-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.section-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.slots-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
@media (min-width: 480px) { .slots-grid { grid-template-columns: repeat(6, 1fr); } }
.slot {
  position: relative; aspect-ratio: 1; border-radius: 10px;
  border: 1.5px dashed rgba(46,232,200,.2); background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; cursor: pointer; overflow: hidden; transition: border-color .15s;
}
body.light .slot { border-color: rgba(8,145,178,.2); background: #fff; }
.slot:hover, .slot:active { border-color: var(--cyan); }
.slot.filled { border-style: solid; border-color: var(--cyan); }
.slot.optional:not(.filled) { opacity: .6; }
.slot-preview { position: absolute; inset: 0; background-size: cover; background-position: center; }
.slot-label { font-size: 9px; font-weight: 700; color: var(--muted); text-align: center; position: relative; line-height: 1.2; padding: 0 2px; }
.slot.filled .slot-label { color: var(--cyan); }
.slot-check { position: absolute; top: 4px; right: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--cyan); color: #050d1a; font-size: 9px; font-weight: 900; display: none; align-items: center; justify-content: center; }
.slot.filled .slot-check { display: flex; }

.slot-hint-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -85%); color: var(--cyan); pointer-events: none; }
.slot.filled .slot-hint-icon { display: none; }
.slot-edit { position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 9px; background: #ffffff; color: #0f172a; border: 2px solid #06b6d4; box-shadow: 0 3px 10px rgba(0,0,0,.28); font-size: 15px; display: none; align-items: center; justify-content: center; cursor: pointer; z-index: 8; }
.slot.filled .slot-edit { display: flex; }

/* ── Thumbs ─────────────────────────────── */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 6px; max-height: 240px; overflow-y: auto; }
.thumb { position: relative; aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; background: var(--surface2); border: 1px solid var(--border); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-label { position: absolute; bottom: 0; left: 0; right: 0; padding: 3px 5px; font-size: 8px; font-weight: 700; text-transform: uppercase; background: rgba(0,0,0,.7); color: var(--amber); }
.thumb-remove { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--red); border: none; color: #fff; font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: var(--font); }

/* ── Panel CTA ──────────────────────────── */
.panel-cta { position: fixed; bottom: 0; left: 0; right: 0; padding: 10px 14px calc(10px + var(--safe-b)); background: var(--bg); border-top: 1px solid var(--border2); z-index: 80; display: flex; gap: 10px; align-items: center; box-shadow: 0 -4px 20px rgba(0,0,0,.12); }
.panel-cta .btn-primary { flex: 1; }
.panel-cta .btn-ghost   { flex-shrink: 0; }

/* ── Buttons ────────────────────────────── */
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 20px; border-radius: var(--radius-sm); border: none; background: linear-gradient(135deg, var(--cyan), #0ea5e9); color: #050d1a; font-size: 15px; font-weight: 700; cursor: pointer; font-family: var(--font); transition: opacity .2s; min-height: 50px; -webkit-tap-highlight-color: transparent; }
.btn-primary:disabled { opacity: .35; pointer-events: none; }
.btn-primary.btn-full { width: 100%; }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 12px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border2); background: var(--surface); color: var(--txt); font-size: 14px; font-weight: 600; cursor: pointer; font-family: var(--font); min-height: 48px; -webkit-tap-highlight-color: transparent; }
.btn-ghost.btn-sm { font-size: 13px; padding: 8px 13px; min-height: 38px; }
.btn-ghost.danger { color: var(--red); border-color: rgba(239,68,68,.3); }
.btn-analyze { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 20px; border-radius: var(--radius-sm); border: none; background: linear-gradient(135deg, var(--violet), var(--cyan)); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; font-family: var(--font); min-height: 50px; -webkit-tap-highlight-color: transparent; }

/* ── BLOC VENTE (Prix·Km·Garantie) ─────── */
.pro-quick-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.block-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.pro-trio { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trio-full { grid-column: 1 / -1; }
.trio-item label { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; }
.trio-input-wrap { position: relative; }
.trio-input-wrap input { width: 100%; padding: 10px 36px 10px 12px; background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius-sm); color: var(--cyan); font-size: 22px; font-weight: 800; font-family: var(--font); -webkit-appearance: none; }
.trio-input-wrap input:focus { outline: none; border-color: var(--cyan); }
.trio-unit { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-size: 14px; font-weight: 700; color: var(--muted); pointer-events: none; }

/* ── Garantie pills ─────────────────────── */
.guarantee-pills { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.guarantee-pills::-webkit-scrollbar { display: none; }
.gpill { flex-shrink: 0; padding: 9px 14px; border-radius: 99px; border: 1px solid var(--border2); background: var(--surface2); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--font); min-height: 40px; -webkit-tap-highlight-color: transparent; transition: all .12s; }
.gpill.active { background: rgba(46,232,200,.15); border-color: var(--cyan); color: var(--cyan); font-weight: 700; }
body.light .gpill.active { background: rgba(8,145,178,.12); }

/* ── Fiche véhicule (accordion) ─────────── */
.vehicle-sheet { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.sheet-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; cursor: pointer; user-select: none; }
.sheet-filled { font-size: 11px; color: var(--cyan); font-weight: 700; }
.sheet-chevron { transition: transform .25s; color: var(--muted); }
.sheet-chevron.open { transform: rotate(180deg); }
.sheet-body { display: none; padding: 0 14px 14px; }
.sheet-body.open { display: block; }

/* CG scan row */
.cg-scan-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.cg-scan-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.cg-scan-btns { display: flex; gap: 8px; }

/* RGPD toggle */
.rgpd-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(34,197,94,.06); border: 1px solid rgba(34,197,94,.2); margin-bottom: 10px; }
.rgpd-toggle-info { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--txt); flex: 1; line-height: 1.4; }
body.light .rgpd-toggle-row { background: rgba(22,163,74,.06); }

/* Toggle switch */
.toggle-switch { position: relative; width: 50px; height: 27px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: var(--border2); border-radius: 99px; cursor: pointer; transition: background .25s, box-shadow .25s; }
.toggle-slider:before { content: ''; position: absolute; width: 21px; height: 21px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .25s; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
/* v60.6 — Toggles cyan partout (au lieu de vert) pour cohérence visuelle */
input:checked + .toggle-slider { background: var(--cyan); box-shadow: 0 0 0 4px rgba(46,232,200,0.12); }
input:checked + .toggle-slider:before { transform: translateX(23px); }
/* État focus pour accessibilité */
input:focus-visible + .toggle-slider { outline: 2px solid var(--cyan); outline-offset: 2px; }
/* Toggle désactivé (disabled) — gris atténué */
input:disabled + .toggle-slider { opacity: 0.4; cursor: not-allowed; }

/* v61.1 — Checkboxes cyan partout (admin + app) */
input[type="checkbox"] {
  width: 16px; height: 16px; cursor: pointer;
  accent-color: var(--cyan);
  border-radius: 4px;
}
/* check-tile : zone cliquable propre avec checkbox cyan */
.check-tile {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; font-size: 13px; font-weight: 500;
  transition: border-color .15s, background .15s;
}
.check-tile:hover { border-color: var(--cyan); background: rgba(46,232,200,0.04); }
.check-tile input[type="checkbox"] { flex-shrink: 0; }
/* toggle-row : variante pour les features de forfait */
.toggle-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; font-size: 13px;
  transition: border-color .15s, background .15s;
}
.toggle-row:has(input:checked) { border-color: rgba(46,232,200,.4); background: rgba(46,232,200,.04); }

/* Sheet fields */
.sheet-fields { display: flex; flex-direction: column; gap: 1px; }
.sf-row { display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.sf-row:last-child { border-bottom: none; }
.sf-row label { font-size: 12px; font-weight: 600; color: var(--muted); }
.sf-row input, .sf-row select { background: transparent; border: none; padding: 4px 6px; font-size: 14px; font-weight: 600; color: var(--txt); font-family: var(--font); border-radius: 6px; min-height: 36px; -webkit-appearance: none; }
.sf-row input:focus, .sf-row select:focus { outline: none; background: var(--surface2); }
.sf-row select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a90aa' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 6px center; padding-right: 24px; background-color: transparent; }

/* CG canvas mini */
#cgCanvas { display: block; width: 100%; border-radius: 10px; border: 1px solid var(--border); touch-action: none; cursor: crosshair; margin-bottom: 8px; }
.ocr-result { padding: 12px; border-radius: var(--radius-sm); background: var(--surface2); border: 1px solid var(--green); font-size: 13px; margin-top: 8px; line-height: 1.6; }

/* ── Classify status ────────────────────── */
.classify-status { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.classify-status.running { color: var(--cyan); background: rgba(46,232,200,.1); }
.classify-status.done    { color: var(--green); background: rgba(34,197,94,.1); }
.classify-status.warn    { color: var(--muted); }

/* ── SCAN ANIMATION ─────────────────────── */
.loader { position: fixed; inset: 0; z-index: 500; background: var(--bg); display: flex; align-items: center; justify-content: center; flex-direction: column; }
.loader.hidden { display: none; }
.scan-anim { text-align: center; padding: 20px; }
.scan-brand-label { font-size: 22px; font-weight: 900; color: var(--cyan); letter-spacing: -.04em; margin-bottom: 22px; }
/* Ring de glow autour de la voiture */
.scan-ring-container {
  width: 150px; height: 150px; border-radius: 50%;
  margin: 0 auto 24px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  border: 1.5px solid rgba(46,232,200,.28);
  animation: ringPulse 2s ease-in-out infinite;
}
.scan-ring-container::before {
  content: ''; position: absolute; inset: -11px; border-radius: 50%;
  border: 1px solid rgba(46,232,200,.13);
  animation: ringPulse 2s ease-in-out infinite .65s;
}
.scan-ring-container::after {
  content: ''; position: absolute; inset: -24px; border-radius: 50%;
  border: 1px solid rgba(46,232,200,.05);
  animation: ringPulse 2s ease-in-out infinite 1.3s;
}
@keyframes ringPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46,232,200,.1); }
  50%       { box-shadow: 0 0 28px 8px rgba(46,232,200,.12); }
}
body.light .scan-ring-container { border-color: rgba(8,145,178,.28); }
body.light .scan-ring-container::before { border-color: rgba(8,145,178,.13); }
body.light .scan-ring-container::after  { border-color: rgba(8,145,178,.05); }
.scan-car { animation: carBob .8s ease-in-out infinite alternate; }
@keyframes carBob { from { transform: translateY(0); } to { transform: translateY(-6px); } }
.scan-line-wrap { width: 260px; height: 5px; background: var(--surface2); border-radius: 99px; overflow: hidden; margin: 0 auto 20px; }
.scan-line { height: 100%; width: 40%; background: linear-gradient(90deg, transparent, var(--cyan), transparent); border-radius: 99px; animation: scanMove 1.2s ease-in-out infinite; }
@keyframes scanMove { 0% { transform: translateX(-100%); } 100% { transform: translateX(280%); } }
.scan-text { font-size: 15px; font-weight: 600; color: var(--muted); margin-bottom: 20px; }
.scan-steps { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.sstep { font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--border2); background: var(--surface); color: var(--muted); transition: all .3s; }
.sstep.active { border-color: var(--cyan); color: var(--cyan); background: rgba(46,232,200,.1); box-shadow: 0 0 12px rgba(46,232,200,.15); }
.sstep.done   { border-color: var(--green); color: var(--green); background: rgba(34,197,94,.1); }

/* ── OCR Standalone card ─────────────────── */
.ocr-standalone { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.ocr-standalone-header { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: rgba(46,232,200,.04); border-bottom: 1px solid var(--border); }
body.light .ocr-standalone-header { background: rgba(8,145,178,.04); }
.ocr-standalone-header > span { font-size: 14px; font-weight: 700; flex: 1; }
.ocr-auto-badge { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: rgba(46,232,200,.12); color: var(--cyan); border: 1px solid rgba(46,232,200,.25); flex-shrink: 0; }
.ocr-standalone-body { padding: 12px 14px; }
.ocr-buttons-row { display: flex; gap: 8px; }
.ocr-btn { flex: 1; justify-content: center; }
.cg-actions { display: flex; gap: 6px; margin: 8px 0 4px; flex-wrap: wrap; }

/* ── Fiche modal sections ─────────────────── */
.fiche-sections { display: flex; flex-direction: column; gap: 16px; }
.fiche-section-title { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--cyan); margin-bottom: 10px; padding-bottom: 5px; border-bottom: 1px solid rgba(46,232,200,.15); }
body.light .fiche-section-title { border-bottom-color: rgba(8,145,178,.15); }
.field-span2 { grid-column: 1 / -1; }

/* Bouton "Voir la fiche" dans résultat */
.btn-fiche { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border-radius: var(--radius-sm); border: 1px solid rgba(46,232,200,.3); background: rgba(46,232,200,.07); color: var(--cyan); font-size: 14px; font-weight: 700; cursor: pointer; font-family: var(--font); min-height: 50px; -webkit-tap-highlight-color: transparent; transition: background .15s; }
.btn-fiche:active { background: rgba(46,232,200,.16); }
body.light .btn-fiche { background: rgba(8,145,178,.07); border-color: rgba(8,145,178,.3); }

/* ── RÉSULTAT ───────────────────────────── */
.result-empty { text-align: center; padding: 60px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.result-card { display: flex; flex-direction: column; gap: 12px; }

/* Prix de vente pro — en haut grand */
.result-price-hero { background: linear-gradient(135deg, var(--cyan), #0ea5e9); border-radius: var(--radius); padding: 20px; text-align: center; color: #050d1a; }
.result-price-hero .price-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.result-price-hero .price-val { font-size: 40px; font-weight: 900; letter-spacing: -.04em; line-height: 1; margin: 4px 0; }
.result-price-hero .price-guarantee { font-size: 13px; font-weight: 600; opacity: .8; }

/* Fiche véhicule résultat */
.result-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.result-section h3 { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 12px; }
.vehicle-id h2 { font-size: 20px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 3px; }
.vehicle-id .version { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.vehicle-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
@media (min-width: 480px) { .vehicle-meta { grid-template-columns: repeat(6, 1fr); } }
.meta-chip { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; background: var(--surface2); border-radius: 8px; text-align: center; }
.meta-chip em { font-size: 9px; color: var(--muted); font-style: normal; text-transform: uppercase; letter-spacing: .04em; }
.meta-chip strong { font-size: 12px; font-weight: 700; }

/* Photos résultat */
.result-photos { }
.photo-hero { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-sm); object-fit: cover; margin-bottom: 6px; border: 1px solid var(--border); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 5px; }
.photo-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }

/* Options */
.features-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 5px; margin-bottom: 12px; padding-bottom: 2px; scrollbar-width: none; }
.features-tabs::-webkit-scrollbar { display: none; }
/* Onglets : bords carrés (radius 5) avec couleur par catégorie */
.feat-tab { flex-shrink: 0; padding: 9px 14px; border-radius: 5px; border: 1.5px solid transparent; background: var(--surface2); color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; font-family: var(--font); min-height: 38px; -webkit-tap-highlight-color: transparent; transition: all .15s; white-space: nowrap; }
/* Couleurs par index (0..5) — appliquées via data-cat-idx */
.feat-tab[data-cat-idx="0"] { color: #ef4444; }
.feat-tab[data-cat-idx="1"] { color: #f59e0b; }
.feat-tab[data-cat-idx="2"] { color: #2ee8c8; }
.feat-tab[data-cat-idx="3"] { color: #3b82f6; }
.feat-tab[data-cat-idx="4"] { color: #7c3aed; }
.feat-tab[data-cat-idx="5"] { color: #16a34a; }
.feat-tab.active { font-weight: 800; color: #fff !important; }
.feat-tab[data-cat-idx="0"].active { background: #ef4444; border-color: #ef4444; box-shadow: 0 2px 8px rgba(239,68,68,.3); }
.feat-tab[data-cat-idx="1"].active { background: #f59e0b; border-color: #f59e0b; box-shadow: 0 2px 8px rgba(245,158,11,.3); }
.feat-tab[data-cat-idx="2"].active { background: #06b6a4; border-color: #06b6a4; box-shadow: 0 2px 8px rgba(46,232,200,.3); }
.feat-tab[data-cat-idx="3"].active { background: #3b82f6; border-color: #3b82f6; box-shadow: 0 2px 8px rgba(59,130,246,.3); }
.feat-tab[data-cat-idx="4"].active { background: #7c3aed; border-color: #7c3aed; box-shadow: 0 2px 8px rgba(124,58,237,.3); }
.feat-tab[data-cat-idx="5"].active { background: #16a34a; border-color: #16a34a; box-shadow: 0 2px 8px rgba(22,163,74,.3); }
.feat-category { display: none; flex-wrap: wrap; gap: 6px; }
.feat-category.active { display: flex; }
.add-options-hint { font-size: 11px; font-weight: 600; color: var(--muted); font-style: italic; margin-bottom: 8px; display: block; }
.option-chip { padding: 8px 13px; border-radius: 6px; border: 1px solid var(--border2); background: var(--surface2); font-size: 13px; color: var(--txt); cursor: pointer; font-family: var(--font); min-height: 38px; -webkit-tap-highlight-color: transparent; transition: all .12s; }
.option-chip.selected { background: rgba(46,232,200,.18); border-color: var(--cyan); font-weight: 700; color: var(--cyan); }
.option-chip.suggested { border-color: rgba(124,58,237,.35); }
body.light .option-chip.selected { background: rgba(8,145,178,.14); color: var(--cyan); }
.feat-sel-count { font-size: 12px; color: var(--cyan); font-weight: 700; margin-left: auto; flex-shrink: 0; }

/* Annonce — équipements avec icônes vertes */
.ad-equip-list { margin-top: 12px; padding: 12px; background: var(--surface2); border-radius: 8px; border: 1px solid var(--border); }
.ad-equip-title { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.ad-equip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 12px; }
@media (max-width: 380px) { .ad-equip-grid { grid-template-columns: 1fr; } }
.ad-equip-item { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--txt); line-height: 1.3; }
.ad-equip-check { flex-shrink: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 9px; font-weight: 900; }

/* CG rotate button */
.cg-rotate-controls { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }

/* Annonce */
.ad-text { white-space: pre-wrap; font-size: 13px; line-height: 1.7; color: var(--muted); }
body.light .ad-text { color: #374151; }

/* Actions */
.result-actions { display: grid; gap: 8px; }
.btn-publish { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px; border-radius: var(--radius-sm); border: none; background: linear-gradient(135deg, var(--violet), var(--blue)); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; font-family: var(--font); min-height: 52px; }
.btn-new { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px; border-radius: var(--radius-sm); border: 1px solid rgba(46,232,200,.3); background: rgba(46,232,200,.07); color: var(--cyan); font-size: 14px; font-weight: 700; cursor: pointer; font-family: var(--font); }

/* Encart Vision Scan360Pro */
.vision-card { border: 1px solid rgba(124,58,237,.3); border-radius: var(--radius); overflow: hidden; }
.vision-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: rgba(124,58,237,.08); border-bottom: 1px solid rgba(124,58,237,.2); }
.vision-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--violet); }
.pro-badge { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: rgba(124,58,237,.15); color: var(--violet); border: 1px solid rgba(124,58,237,.3); }
.vision-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }

/* Jauge */
.jauge-wrap { height: 10px; background: var(--surface2); border-radius: 99px; overflow: hidden; margin: 8px 0 4px; }
.jauge-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--cyan), var(--green)); transition: width .8s ease; }
.jauge-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.vision-item-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }

/* Damage item */
.damage-item { display: flex; gap: 10px; padding: 10px; background: var(--surface2); border-radius: 10px; margin-bottom: 6px; border-left: 3px solid var(--red); }
.damage-sev { font-size: 11px; font-weight: 700; color: var(--red); margin-bottom: 2px; }
.damage-txt strong { font-size: 13px; font-weight: 600; display: block; }
.damage-txt span { font-size: 12px; color: var(--muted); }

/* Lien admin */
.admin-link-banner { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); font-size: 13px; color: var(--muted); text-decoration: none; margin-bottom: 8px; }
.admin-link-banner:hover { color: var(--cyan); border-color: var(--cyan); }

/* ── Drawer ──────────────────────────────── */
.backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .25s; }
.backdrop.show { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 90vw); z-index: 210; background: var(--surface); border-left: 1px solid var(--border); transform: translateX(100%); transition: transform .28s ease; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 18px; font-weight: 700; }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px; }
.history-item { display: flex; align-items: center; gap: 10px; padding: 11px; border-radius: var(--radius-sm); background: var(--surface2); border: 1px solid var(--border); margin-bottom: 8px; }
.history-icon { width: 34px; height: 34px; border-radius: 9px; background: rgba(46,232,200,.1); display: grid; place-items: center; font-size: 16px; flex-shrink: 0; }
.history-info strong { display: block; font-size: 13px; font-weight: 700; }
.history-info span   { font-size: 11px; color: var(--muted); }
.history-price { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--cyan); }

/* ── Modal ───────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
.modal { position: fixed; inset: 0; z-index: 310; display: flex; align-items: flex-end; justify-content: center; }
.modal-card { width: 100%; max-width: 600px; max-height: 88dvh; background: var(--surface); border-radius: var(--radius) var(--radius) 0 0; border: 1px solid var(--border); display: flex; flex-direction: column; animation: slideUp .25s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.modal-head h2 { font-size: 17px; font-weight: 700; }
.modal-body { flex: 1; overflow-y: auto; padding: 14px 18px; }
.modal-body .mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-wrap { display: flex; flex-direction: column; gap: 5px; }
.field-wrap label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.field-wrap input, .field-wrap select { width: 100%; padding: 10px 12px; background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius-sm); color: var(--txt); font-size: 15px; font-family: var(--font); min-height: 46px; -webkit-appearance: none; }
.field-wrap input:focus, .field-wrap select:focus { outline: none; border-color: var(--cyan); }
.field-wrap select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a90aa' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.modal-foot { display: flex; gap: 10px; padding: 12px 18px calc(12px + var(--safe-b)); border-top: 1px solid var(--border); flex-shrink: 0; }
.modal-foot .btn-primary { flex: 1; }

/* Role buttons */
.role-btn { display: block; width: 100%; padding: 13px 16px; margin-bottom: 8px; border-radius: var(--radius-sm); border: 1px solid var(--border2); background: var(--surface2); color: var(--txt); font-size: 14px; font-weight: 600; cursor: pointer; font-family: var(--font); text-align: left; -webkit-tap-highlight-color: transparent; }
.role-btn.active { border-color: var(--cyan); color: var(--cyan); background: rgba(46,232,200,.08); }
.role-btn.danger { color: var(--red); border-color: rgba(239,68,68,.3); }

/* ── Toasts ──────────────────────────────── */
#toasts { position: fixed; top: calc(var(--header-h) + var(--track-h) + 10px); left: 50%; transform: translateX(-50%); z-index: 600; display: flex; flex-direction: column; gap: 6px; pointer-events: none; width: min(340px, 90vw); }
.toast { padding: 11px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; animation: toastIn .22s ease; text-align: center; }
.toast.ok   { background: rgba(34,197,94,.15);  border: 1px solid rgba(34,197,94,.4);  color: var(--green); }
.toast.err  { background: rgba(239,68,68,.15);  border: 1px solid rgba(239,68,68,.4);  color: var(--red); }
.toast.info { background: rgba(59,130,246,.15); border: 1px solid rgba(59,130,246,.4); color: var(--blue); }
body.light .toast.ok   { background: rgba(22,163,74,.1);  color: #15803d; }
body.light .toast.err  { background: rgba(220,38,38,.1);  color: #b91c1c; }
body.light .toast.info { background: rgba(37,99,235,.1);  color: #1d4ed8; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ── Responsive extras ───────────────────── */
@media (max-width: 380px) {
  .wstep-label { font-size: 8px; }
  .wstep-dot   { width: 24px; height: 24px; font-size: 10px; }
  .wstep-line  { max-width: 16px; }
  .pro-trio    { grid-template-columns: 1fr; }
  .modal-body .mini-grid { grid-template-columns: 1fr; }
}
@media (min-width: 640px) {
  .modal-card { align-self: center; border-radius: var(--radius); }
}
* { -webkit-overflow-scrolling: touch; -webkit-tap-highlight-color: transparent; }


/* ── .hidden universel (fix bouton capture qui restait visible) ── */
.hidden { display: none !important; }

/* ───────────────────────────────────────────────────────────
   Bandeau contextuel 1001 Véhicules (token de lancement)
   ─────────────────────────────────────────────────────────── */
#vhc1001Banner {
  margin: 0 0 14px 0;
}
.vhc1001-badge,
.vhc1001-success {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm, 10px);
  background: linear-gradient(135deg, rgba(46,232,200,.10), rgba(124,58,237,.08));
  border: 1px solid rgba(46,232,200,.28);
  color: var(--txt);
  font-size: 13px;
  line-height: 1.35;
}
.vhc1001-badge svg { color: var(--cyan, #2ee8c8); flex: 0 0 auto; }
.vhc1001-badge strong,
.vhc1001-success-msg strong {
  display: block;
  font-weight: 700;
  font-size: 13px;
  color: var(--txt);
}
.vhc1001-badge span,
.vhc1001-success-msg span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.vhc1001-success {
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(34,197,94,.10), rgba(46,232,200,.08));
  border-color: rgba(34,197,94,.32);
}
.vhc1001-success-msg { flex: 1 1 200px; min-width: 0; }
.vhc1001-success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.vhc-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--txt);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: transform .12s ease, border-color .12s ease;
}
.vhc-link:hover { transform: translateY(-1px); border-color: var(--cyan, #2ee8c8); }
.vhc-link-primary {
  background: var(--cyan, #2ee8c8);
  border-color: var(--cyan, #2ee8c8);
  color: #062018;
}
body.light .vhc-link-primary { color: #04222b; }

@media (max-width: 480px) {
  .vhc1001-badge, .vhc1001-success { flex-direction: column; align-items: flex-start; }
  .vhc1001-success-actions { width: 100%; }
  .vhc-link { flex: 1 1 auto; justify-content: center; }
}

/* ───────────────────────────────────────────────────────────
   v55.4 — Progression upload photos vers 1001 Véhicules
   ─────────────────────────────────────────────────────────── */
.vhc1001-progress {
  padding: 14px 16px;
  border-radius: var(--radius-sm, 10px);
  background: linear-gradient(135deg, rgba(46,232,200,.08), rgba(124,58,237,.06));
  border: 1px solid rgba(46,232,200,.28);
  color: var(--txt);
  font-size: 13px;
}
.vhc1001-progress-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 13px;
}
.vhc1001-progress-count {
  font-family: var(--mono, 'DM Mono', monospace);
  font-weight: 700;
  color: var(--cyan, #2ee8c8);
  font-size: 13px;
}
.vhc1001-progress-bar {
  height: 6px;
  background: rgba(255,255,255,.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
body.light .vhc1001-progress-bar { background: rgba(0,0,0,.08); }
.vhc1001-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan, #2ee8c8) 0%, #7c3aed 100%);
  transition: width .3s ease;
  border-radius: 3px;
}
.vhc1001-progress-msg {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}
/* V55.2 annonce visible + phrases rapides */
.ad-editor-section{display:block!important;}
.ad-head-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.ad-textarea{display:block;width:100%;min-height:280px;resize:vertical;border:1px solid var(--border);border-radius:14px;background:var(--surface2);color:var(--txt);font:inherit;font-size:14px;line-height:1.65;padding:16px;white-space:pre-wrap;box-shadow:inset 0 1px 0 rgba(255,255,255,.04)}
body.light .ad-textarea{background:#fff;color:#1f2937}
.ad-actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}.quick-phrases-panel{margin:12px 0;padding:14px;border:1px solid var(--border);border-radius:14px;background:var(--surface2)}
.quick-phrases-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:10px}.quick-phrases-head span{font-size:12px;color:var(--muted)}
.quick-cat{margin:10px 0}.quick-cat h4{font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:8px}.quick-cat>div{display:flex;gap:8px;flex-wrap:wrap}
.quick-phrase-btn{border:1px solid var(--border);background:var(--surface);color:var(--txt);padding:8px 10px;border-radius:999px;font-size:12px;text-align:left;cursor:pointer}.quick-phrase-btn:hover{border-color:var(--cyan)}
.ad-equip-group{margin:12px 0;padding:12px;border-radius:12px;background:rgba(40,120,255,.05);border:1px solid var(--border)}
.ad-equip-group .ad-equip-title{margin-bottom:8px;color:var(--txt)}

/* V55.4 — annonce visible, phrases rapides responsive, options restaurées */
.adUxGrid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr);gap:18px;align-items:start}
.adEditorWrap textarea,.adEditorWrap [contenteditable="true"],
#adText,#adEditor,textarea.announcementEditor,textarea.adText{
  width:100%;
  min-height:240px;
  max-height:none;
  resize:vertical;
  overflow:hidden;
  line-height:1.55;
}
.adUxGrid .quickPhrases,.adUxGrid [class*="phrase"],.adUxGrid .phrasesBox{
  position:sticky;
  top:92px;
}
@media(max-width:900px){
  .adUxGrid{display:flex;flex-direction:column}
  .adUxGrid .quickPhrases,.adUxGrid [class*="phrase"],.adUxGrid .phrasesBox{position:static;order:-1;width:100%}
  .adEditorWrap{width:100%}
}
.modifyFichaBtn + .modifyFichaBtn{display:none!important}
.scanSlot .scanPicto,.slotIcon,.pictoHidden{display:none!important}

/* ───────────────────────────────────────────────────────────
   v56 — Reclassement par clic sur miniatures non classées
   ─────────────────────────────────────────────────────────── */
.thumb-clickable {
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.thumb-clickable:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(46,232,200,.25);
}
.thumb-clickable .thumb-label {
  background: linear-gradient(135deg, var(--cyan, #2ee8c8), #7c3aed);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .03em;
}

.reclass-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 998;
  animation: reclass-fade-in .15s ease;
}

.reclass-menu {
  z-index: 999;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  padding: 14px;
  min-width: 260px;
  max-width: 360px;
  animation: reclass-fade-in .18s ease;
}
body.light .reclass-menu {
  background: #fff;
}

.reclass-menu-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
  padding: 0 4px;
}

.reclass-menu-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reclass-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  background: var(--surface2);
  color: var(--txt);
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all .15s ease;
}
.reclass-option:hover {
  border-color: var(--cyan, #2ee8c8);
  background: rgba(46,232,200,.08);
  transform: translateX(2px);
}
.reclass-option.occupied {
  opacity: .85;
}
.reclass-option.occupied:hover {
  background: rgba(245,158,11,.1);
  border-color: #f59e0b;
}

.reclass-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.reclass-label {
  flex: 1;
  font-weight: 600;
}

.reclass-replace {
  font-size: 10px;
  background: #f59e0b;
  color: #000;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: .04em;
}

.reclass-cancel {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
}
.reclass-cancel:hover {
  background: var(--surface2);
  color: var(--txt);
}

/* Sur mobile : le menu est en bas avec un peu de marge */
@media (max-width: 640px) {
  .reclass-menu {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  .reclass-option {
    padding: 14px 14px;
    font-size: 15px;
  }
}

@keyframes reclass-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ───────────────────────────────────────────────────────────
   v56 — Layout annonce + phrases rapides responsive
   ─────────────────────────────────────────────────────────── */

.ad-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.ad-head-row h3 { margin: 0; }
.ad-tip {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

/* Layout 2 colonnes desktop, empilé sur mobile */
.ad-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .ad-layout {
    grid-template-columns: 1fr;
  }
}

/* Textarea principale annonce — vraiment lisible et responsive */
.ad-editor-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.ad-textarea {
  width: 100%;
  min-height: 280px;
  max-height: 600px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface2);
  color: var(--txt);
  font: inherit;
  font-size: 14px;
  line-height: 1.65;
  padding: 16px;
  box-sizing: border-box;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  transition: border-color .2s ease;
}
body.light .ad-textarea {
  background: #fff;
  color: #1f2937;
}
.ad-textarea:focus {
  outline: none;
  border-color: var(--cyan, #2ee8c8);
  box-shadow: 0 0 0 3px rgba(46,232,200,.15);
}
@media (max-width: 640px) {
  .ad-textarea {
    min-height: 220px;
    font-size: 14px;
    padding: 14px;
  }
}

.ad-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Panneau Quick Phrases en sticky desktop */
.quick-phrases-panel {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface2);
  box-sizing: border-box;
  min-width: 0;
  max-height: 580px;
  overflow-y: auto;
}
@media (min-width: 901px) {
  .quick-phrases-panel {
    position: sticky;
    top: 76px;
  }
}
body.light .quick-phrases-panel {
  background: #fafafa;
}

.quick-phrases-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.quick-phrases-head strong {
  font-size: 13px;
  font-weight: 700;
}
.quick-phrases-head span {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
}

.quick-cat { margin-bottom: 14px; }
.quick-cat:last-child { margin-bottom: 0; }
.quick-cat h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 0 0 8px;
  font-weight: 700;
}
.quick-cat > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-phrase-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--txt);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
  transition: all .15s ease;
  line-height: 1.4;
  font-family: inherit;
}
.quick-phrase-btn:hover {
  border-color: var(--cyan, #2ee8c8);
  background: rgba(46,232,200,.08);
  transform: translateX(3px);
}
.quick-phrase-btn:active {
  transform: scale(.98);
}
body.light .quick-phrase-btn { background: #fff; }

/* ───────────────────────────────────────────────────────────
   v57 — Badge "non classée" discret en coin
   La photo reste TOTALEMENT visible.
   ─────────────────────────────────────────────────────────── */
.thumb-badge-classify {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0, 0, 0, .65);
  color: #fff;
  font-size: 14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  animation: badge-pulse 2s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.1); }
}
/* Plus de label opaque par-dessus la photo, on enlève l'ancien style */
.thumb-clickable .thumb-label { display: none !important; }

/* Au survol : un voile semi-transparent indique la cliquabilité */
.thumb-clickable {
  position: relative;
  overflow: hidden;
}
.thumb-clickable::after {
  content: "Classer";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(46,232,200,.95), rgba(46,232,200,.7));
  color: #002;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 0;
  text-align: center;
  transform: translateY(100%);
  transition: transform .2s ease;
}
.thumb-clickable:hover::after,
.thumb-clickable:active::after {
  transform: translateY(0);
}
/* Sur mobile/tactile, on affiche en permanence le bandeau "Classer" en bas */
@media (hover: none) {
  .thumb-clickable::after {
    transform: translateY(0);
    background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,.4));
    color: #fff;
  }
}

/* ───────────────────────────────────────────────────────────
   v57 — Modale masquage plaque d'immatriculation
   ─────────────────────────────────────────────────────────── */
.plate-mask-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  animation: plate-fade-in .2s ease;
}
@keyframes plate-fade-in { from { opacity: 0; } to { opacity: 1; } }

.plate-mask-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(0,0,0,.5);
  color: #fff;
  flex-shrink: 0;
  padding-top: max(12px, env(safe-area-inset-top));
}
.plate-mask-header .btn-ghost {
  background: rgba(255,255,255,.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 16px;
  cursor: pointer;
  width: auto;
}
.plate-mask-title {
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .02em;
}
.plate-mask-validate {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  width: auto;
}
.plate-mask-validate:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(34,197,94,.4); }

.plate-mask-canvas-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#plateBaseImg {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.plate-rect {
  position: absolute;
  background: #ffffff;
  border: 2px solid #d4d4d4;
  border-radius: 6px;
  cursor: grab;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.plate-rect:active { cursor: grabbing; }

.plate-rect-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4%;
}
.plate-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.plate-name-text {
  font-weight: 700;
  color: #1f2937;
  font-size: clamp(10px, 3vw, 18px);
  letter-spacing: .03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.plate-handle {
  position: absolute;
  width: 22px; height: 22px;
  background: #2ee8c8;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: nwse-resize;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  touch-action: none;
}
.plate-handle-tl { top: -11px; left: -11px; cursor: nwse-resize; }
.plate-handle-tr { top: -11px; right: -11px; cursor: nesw-resize; }
.plate-handle-bl { bottom: -11px; left: -11px; cursor: nesw-resize; }
.plate-handle-br { bottom: -11px; right: -11px; cursor: nwse-resize; }

.plate-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  font-size: 14px;
  background: rgba(0,0,0,.5);
  z-index: 5;
}
.plate-spinner {
  width: 24px; height: 24px;
  border: 3px solid rgba(255,255,255,.2);
  border-top-color: #2ee8c8;
  border-radius: 50%;
  animation: plate-spin .8s linear infinite;
}
@keyframes plate-spin { to { transform: rotate(360deg); } }

.plate-mask-footer {
  padding: 14px 16px;
  background: rgba(0,0,0,.5);
  color: rgba(255,255,255,.7);
  font-size: 12px;
  text-align: center;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
}
.plate-tip {
  font-style: italic;
}

/* Bouton 🔒 sur les miniatures (non classées + slots) */
.thumb-mask-btn,
.slot-mask-btn {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0,0,0,.7);
  color: #fff;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  z-index: 4;
  transition: transform .15s ease;
}
.thumb-mask-btn:hover,
.slot-mask-btn:hover {
  background: #2ee8c8;
  color: #000;
  transform: scale(1.1);
}

/* Badge "plaque masquée" — cadenas en bas à gauche, crayon visible en bas à droite */
.thumb-badge-masked,
.slot-badge-masked {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: #22c55e;
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
  z-index: 3;
}

/* ───────────────────────────────────────────────────────────
   v57 — Bouton Publier sticky en bas
   ─────────────────────────────────────────────────────────── */
.btn-publish-sticky {
  position: sticky;
  bottom: 12px;
  left: 0; right: 0;
  margin-top: 18px;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(124,58,237,.35);
  border-radius: 14px;
}
@media (max-width: 640px) {
  .btn-publish-sticky {
    position: sticky;
    bottom: max(12px, env(safe-area-inset-bottom));
  }
}

/* ───────────────────────────────────────────────────────────
   v57.1 — Refonte miniatures non classées
   Plus de badge punaise.
   La photo entière est cliquable + voile cyan au survol.
   Bouton masquer plaque mieux visible avec icône SVG.
   ─────────────────────────────────────────────────────────── */
.thumb-badge-classify { display: none !important; } /* on retire */

/* On retire aussi le bandeau "Classer" en bas qu'on avait introduit (trop)  */
.thumb-clickable::after { display: none !important; }

.thumb-clickable {
  position: relative;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

/* Petit voile cyan transparent au survol pour montrer cliquable, sans empêcher de voir la photo */
.thumb-clickable::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(46,232,200,.0), rgba(46,232,200,.0));
  transition: background .2s ease;
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}
.thumb-clickable:hover::before {
  background: linear-gradient(135deg, rgba(46,232,200,.18), rgba(124,58,237,.12));
}

/* Bordure cyan en pointillés pour les non classées (signal visuel discret mais clair) */
.thumb-clickable {
  border: 2px dashed rgba(46,232,200,.55);
}
.thumb-clickable:hover {
  border-color: var(--cyan, #2ee8c8);
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(46,232,200,.35);
}

/* Bouton "Masquer la plaque" — bien visible, icône cadenas SVG, libellé sur desktop */
.thumb-mask-btn {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(255,255,255,.95);
  color: #0891b2;
  border: 2px solid #0891b2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  transition: all .15s ease;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.thumb-mask-btn:hover {
  background: var(--cyan, #2ee8c8);
  color: #000;
  transform: scale(1.12);
  border-color: var(--cyan, #2ee8c8);
}
.thumb-mask-btn svg { display: block; }

/* Bouton supprimer — gardé en haut droite, distinct visuellement (rouge) */
.thumb-remove {
  background: rgba(239,68,68,.95) !important;
  color: #fff !important;
  z-index: 4;
}

/* Mini-guide d'usage discret au-dessus des miniatures */
.unclassified-hint {
  font-size: 12px;
  color: var(--muted);
  background: rgba(46,232,200,.06);
  border: 1px solid rgba(46,232,200,.2);
  border-radius: 10px;
  padding: 8px 12px;
  margin: 8px 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  line-height: 1.4;
}
.unclassified-hint strong { color: var(--txt); font-weight: 700; }
.hint-icon-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #0891b2;
  color: #0891b2;
  vertical-align: middle;
}
body.light .unclassified-hint {
  background: rgba(8,145,178,.06);
  border-color: rgba(8,145,178,.25);
}

/* ───────────────────────────────────────────────────────────
   v57.1 — Mode Express : 2 étapes au lieu de 3
   ─────────────────────────────────────────────────────────── */
/* Le bloc Vente dans panel-result est caché par défaut en mode Détaillé */
.express-only { display: none; }
body.mode-express .express-only { display: block; }

/* En mode express on cache l'étape "Infos" dans le tracker */
/* v59 — Mode Express : 2 étapes Photos → Résultat */
body.mode-express #panel-result {
  display: flex !important;
  flex-direction: column;
}
body.mode-express #panel-result.hidden { display: none !important; }

/* On affiche ws-result en mode Express, on cache ws-card */
body.mode-express #ws-card,
body.mode-express #line-1 { display: none !important; }

/* Le bloc Vente Express est affiché DANS panel-result en mode Express */
body.mode-express #expressVenteBlock { display: block !important; }
body:not(.mode-express) #expressVenteBlock { display: none !important; }

/* Position du bloc Vente : haut (par défaut) ou bas */
body.mode-express.vente-bottom #expressVenteBlock { order: 99; }
body.mode-express.vente-bottom #resultContent { order: 1; }

/* Bloc Vente sticky en haut */
#expressVenteBlock {
  position: sticky;
  top: 70px;
  z-index: 50;
  background: var(--surface);
  border: 2px solid var(--cyan, #2ee8c8);
  box-shadow: 0 4px 20px rgba(46,232,200,.15);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
body.light #expressVenteBlock {
  background: rgba(255,255,255,.95);
  border-color: #0891b2;
  box-shadow: 0 4px 20px rgba(8,145,178,.18);
}

/* L'ancien doublon en panel-card est caché */
body.mode-express #panel-card > .pro-quick-block { display: none; }

.ad-textarea{min-height:260px;overflow:hidden;resize:none;line-height:1.55}
.ad-layout{align-items:start}
.quick-phrases-panel{order:-1}
.visible-pro-note{display:inline-flex;align-items:center;gap:4px;margin-left:8px;padding:3px 8px;border-radius:999px;background:rgba(6,182,212,.12);border:1px solid rgba(6,182,212,.28);font-size:11px;font-weight:700;color:var(--cyan)}
.market-position{margin-top:12px;padding:12px;border:1px solid var(--border);border-radius:14px;background:var(--surface2);display:grid;gap:8px}
.market-position strong{display:block;font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
.market-position span{font-weight:800}.market-position.low span{color:var(--green)}.market-position.ok span{color:var(--cyan)}.market-position.high span{color:var(--amber)}
.market-mini-gauge{position:relative;height:8px;border-radius:999px;background:linear-gradient(90deg,rgba(34,197,94,.65),rgba(6,182,212,.65),rgba(245,158,11,.65))}
.market-mini-gauge i{position:absolute;top:50%;width:16px;height:16px;border-radius:999px;background:#fff;border:3px solid var(--cyan);transform:translate(-50%,-50%);box-shadow:0 2px 10px rgba(0,0,0,.25)}
.recall-card{margin:12px 0;padding:12px;border:1px solid rgba(245,158,11,.32);border-radius:14px;background:rgba(245,158,11,.08);display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.recall-card strong{display:block}.recall-card span{display:block;color:var(--muted);font-size:12px;margin-top:3px}
@media(max-width:760px){.ad-layout{display:flex;flex-direction:column}.quick-phrases-panel,.ad-editor-wrap{width:100%}.visible-pro-note{margin-left:0;margin-top:6px}.vision-title{display:flex;flex-direction:column;align-items:flex-start}.recall-card{align-items:flex-start}}
body.mode-express #ws-card{display:flex!important}
body.mode-express #line-1{display:block!important}
body.mode-express #ws-result,body.mode-express #line-2{display:none!important}


/* v57.3.2 — badge visible pour confirmer le mode réellement appliqué côté utilisateur */
.scan-flow-badge{max-width:720px;margin:0 auto 12px;padding:9px 14px;border-radius:999px;align-items:center;justify-content:center;text-align:center;background:linear-gradient(135deg,rgba(46,232,200,.18),rgba(59,130,246,.14));border:1px solid rgba(46,232,200,.45);color:var(--cyan);font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.04em}
body.mode-express .wizard-track{grid-template-columns:auto 64px auto!important;max-width:460px}
body.mode-express #ws-card .wstep-dot{background:rgba(46,232,200,.14)}
@media(max-width:760px){.scan-flow-badge{margin:0 12px 10px;border-radius:14px;font-size:11px}.wizard-track{padding-inline:12px}}

/* ───────────────────────────────────────────────────────────
   v58 — Hint IA masquage automatique
   ─────────────────────────────────────────────────────────── */
.ai-mask-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin: 16px 0;
  background: linear-gradient(135deg, rgba(46,232,200,.08), rgba(124,58,237,.06));
  border: 1px solid rgba(46,232,200,.28);
  border-radius: 12px;
  position: relative;
}
.ai-mask-hint-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(46,232,200,.15);
  border-radius: 50%;
  font-size: 18px;
}
.ai-mask-hint-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.5;
  color: var(--txt);
}
.ai-mask-hint-text strong {
  color: var(--cyan, #2ee8c8);
  font-weight: 700;
}
body.light .ai-mask-hint-text strong { color: #0891b2; }
.ai-mask-hint-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ai-mask-hint-close:hover { background: rgba(255,255,255,.1); color: var(--txt); }
body.light .ai-mask-hint-close:hover { background: rgba(0,0,0,.06); }
@media (max-width: 640px) {
  .ai-mask-hint { padding: 10px; gap: 8px; }
  .ai-mask-hint-text { font-size: 12.5px; }
  .ai-mask-hint-icon { width: 32px; height: 32px; font-size: 16px; }
}

/* ───────────────────────────────────────────────────────────
   v58 — Badge "masqué" sur les slots remplis
   ─────────────────────────────────────────────────────────── */
.slot.masked::after {
  content: "🔒";
  position: absolute;
  bottom: 6px;
  left: 6px;
  width: 24px;
  height: 24px;
  background: #22c55e;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  z-index: 3;
}

/* Spinner de masquage automatique sur photo en cours */
.auto-mask-status {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0,0,0,.78);
  color: #fff;
  font-size: 10.5px;
  padding: 4px 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 5;
  animation: amask-pulse 1.4s ease-in-out infinite;
}
.amask-spinner {
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255,255,255,.25);
  border-top-color: #2ee8c8;
  border-radius: 50%;
  animation: amask-spin .8s linear infinite;
}
@keyframes amask-spin { to { transform: rotate(360deg); } }
@keyframes amask-pulse { 0%,100% { opacity: 1 } 50% { opacity: .85 } }
.auto-mask-skipped-advertising {
  background: rgba(245,158,11,.95);
  color: #1f2937;
}

/* ───────────────────────────────────────────────────────────
   v58 — Menu slot enrichi (modale)
   ─────────────────────────────────────────────────────────── */
.slot-edit-section {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.slot-edit-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.slot-edit-h4 {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin: 0 0 10px;
  font-weight: 700;
}
.slot-edit-hint {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  background: rgba(46,232,200,.06);
  border-radius: 10px;
  padding: 10px 12px;
}
.slot-edit-hint strong { color: var(--txt); font-weight: 700; }

.slot-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  background: var(--surface2);
  color: var(--txt);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all .15s ease;
  margin-bottom: 6px;
  font-family: inherit;
}
.slot-action-btn:last-child { margin-bottom: 0; }
.slot-action-btn:hover {
  transform: translateX(2px);
}
.slot-action-btn span:first-child {
  font-size: 16px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.slot-action-btn.primary {
  background: linear-gradient(135deg, rgba(46,232,200,.15), rgba(46,232,200,.05));
  border-color: rgba(46,232,200,.35);
  color: var(--cyan, #2ee8c8);
}
.slot-action-btn.primary:hover {
  background: var(--cyan, #2ee8c8);
  color: #000;
  border-color: var(--cyan, #2ee8c8);
}
body.light .slot-action-btn.primary { color: #0891b2; }
body.light .slot-action-btn.primary:hover { background: #0891b2; color: #fff; }
.slot-action-btn.warning {
  background: rgba(245,158,11,.1);
  border-color: rgba(245,158,11,.35);
  color: #f59e0b;
}
.slot-action-btn.warning:hover {
  background: #f59e0b;
  color: #000;
  border-color: #f59e0b;
}
.slot-action-btn.danger {
  background: rgba(239,68,68,.1);
  border-color: rgba(239,68,68,.35);
  color: #ef4444;
}
.slot-action-btn.danger:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
@media (max-width: 480px) {
  .role-grid { grid-template-columns: 1fr; }
}
.role-grid .role-btn {
  width: 100%;
  margin: 0;
}

/* ───────────────────────────────────────────────────────────
   v58 — Responsive annonce SEO (textarea + phrases rapides)
   ─────────────────────────────────────────────────────────── */
.ad-layout, .adUxGrid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 18px;
  align-items: start;
  max-width: 100%;
  box-sizing: border-box;
}
@media (max-width: 1024px) {
  .ad-layout, .adUxGrid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
}

.ad-editor-wrap, .adEditorWrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.ad-textarea, #adText {
  width: 100% !important;
  min-height: 280px !important;
  max-height: 700px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface2);
  color: var(--txt);
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  padding: 14px;
  box-sizing: border-box;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  transition: border-color .2s ease, box-shadow .2s ease;
  max-width: 100%;
}
body.light .ad-textarea, body.light #adText {
  background: #fff;
  color: #1f2937;
}
.ad-textarea:focus, #adText:focus {
  outline: none;
  border-color: var(--cyan, #2ee8c8);
  box-shadow: 0 0 0 3px rgba(46,232,200,.18);
}
@media (max-width: 640px) {
  .ad-textarea, #adText {
    min-height: 240px !important;
    font-size: 14px;
    padding: 12px;
  }
}

.ad-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
}
.ad-actions button {
  flex: 0 1 auto;
  white-space: nowrap;
}

.quick-phrases-panel {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface2);
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  max-height: 600px;
  overflow-y: auto;
}
@media (min-width: 1025px) {
  .quick-phrases-panel {
    position: sticky;
    top: 80px;
  }
}
@media (max-width: 1024px) {
  .quick-phrases-panel {
    order: -1;  /* phrases au-dessus du textarea sur mobile */
    max-height: 280px;
  }
}
body.light .quick-phrases-panel { background: #fafafa; }

.quick-cat { margin-bottom: 12px; }
.quick-cat:last-child { margin-bottom: 0; }
.quick-cat h4 {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 0 0 6px;
  font-weight: 700;
}
.quick-cat > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.quick-phrase-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--txt);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: all .15s ease;
  font-family: inherit;
  word-break: break-word;
  white-space: normal;
  width: 100%;
  box-sizing: border-box;
}
.quick-phrase-btn:hover {
  border-color: var(--cyan, #2ee8c8);
  background: rgba(46,232,200,.08);
  transform: translateX(2px);
}
body.light .quick-phrase-btn { background: #fff; }

/* Bloc annonce SEO global : pas de débordement horizontal */
.result-section, .ad-editor-section {
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* ───────────────────────────────────────────────────────────
   v59 — Phase C : Annonce améliorée
   ─────────────────────────────────────────────────────────── */

/* Textarea auto-grow */
.ad-textarea.ad-textarea-grow {
  min-height: 280px;
  resize: none;
  overflow: hidden;
  transition: height .15s ease;
}

/* Wrapper textarea pour positionner le bouton plein écran */
.ad-textarea-wrap {
  position: relative;
}

/* Bouton plein écran en coin de la textarea */
.ad-fullscreen-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,.4);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: .6;
  transition: all .2s ease;
  z-index: 2;
}
.ad-fullscreen-btn:hover {
  opacity: 1;
  background: var(--cyan, #2ee8c8);
  color: #000;
  transform: scale(1.1);
}
body.light .ad-fullscreen-btn { background: rgba(255,255,255,.7); color: #333; }
body.light .ad-fullscreen-btn:hover { background: #0891b2; color: #fff; }

/* ─── Modale plein écran ─── */
.ad-fullscreen-modal {
  position: fixed; inset: 0;
  background: var(--bg, #0a0e1a);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  animation: ad-fs-in .2s ease;
}
body.light .ad-fullscreen-modal { background: #f8fafc; }
@keyframes ad-fs-in {
  from { opacity: 0; transform: scale(.97); }
  to { opacity: 1; transform: scale(1); }
}

.ad-fs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface, #1a1f2e);
  border-bottom: 1px solid var(--border);
  padding-top: max(14px, env(safe-area-inset-top));
}
body.light .ad-fs-header { background: #fff; }

.ad-fs-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--txt);
}

.ad-fs-actions {
  display: flex;
  gap: 8px;
}
.ad-fs-actions .btn-sm {
  padding: 8px 14px !important;
  font-size: 13px !important;
}

.ad-fs-body {
  flex: 1;
  padding: 16px;
  overflow: hidden;
  display: flex;
}

.ad-fs-textarea {
  width: 100%;
  height: 100%;
  background: var(--surface2);
  color: var(--txt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  font: inherit;
  font-size: 15px;
  line-height: 1.7;
  resize: none;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
  box-sizing: border-box;
}
body.light .ad-fs-textarea {
  background: #fff;
  color: #1f2937;
}
.ad-fs-textarea:focus {
  border-color: var(--cyan, #2ee8c8);
  box-shadow: 0 0 0 3px rgba(46,232,200,.15);
}

.ad-fs-footer {
  padding: 12px 18px;
  background: var(--surface, #1a1f2e);
  border-top: 1px solid var(--border);
  text-align: center;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}
body.light .ad-fs-footer { background: #fff; }
.ad-fs-hint {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

/* ─── Long-press menu phrases ─── */
.lp-phrase-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 10010;
  animation: lp-fade .15s ease;
}
@keyframes lp-fade { from { opacity: 0; } to { opacity: 1; } }

.lp-phrase-menu {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10011;
  background: var(--surface, #1a1f2e);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  width: min(420px, calc(100vw - 24px));
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  animation: lp-scale .2s ease;
}
@keyframes lp-scale {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.92); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
body.light .lp-phrase-menu { background: #fff; }

.lp-phrase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.lp-phrase-header strong { font-size: 14px; color: var(--txt); }
.lp-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.lp-close:hover { background: var(--surface2); color: var(--txt); }

.lp-phrase-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 16px;
}

.lp-phrase-cat { margin-bottom: 14px; }
.lp-phrase-cat:last-child { margin-bottom: 0; }
.lp-phrase-cat h5 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 0 0 8px;
  font-weight: 700;
}
.lp-phrase-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lp-phrase-btn {
  text-align: left;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--txt);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
  transition: all .15s ease;
  font-family: inherit;
  word-break: break-word;
}
.lp-phrase-btn:hover {
  border-color: var(--cyan, #2ee8c8);
  background: rgba(46,232,200,.08);
  transform: translateX(2px);
}
body.light .lp-phrase-btn { background: #f9fafb; }

/* ─── Encart OCR repliable (mode Express) ─── */
.ocr-collapse-block {
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface2);
  overflow: hidden;
}
body:not(.mode-express) .ocr-collapse-block { display: none !important; }

.ocr-collapse-toggle {
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: none;
  color: var(--txt);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.ocr-collapse-toggle:hover { background: rgba(46,232,200,.05); }

.ocr-toggle-icon {
  width: 36px;
  height: 36px;
  background: rgba(46,232,200,.15);
  color: var(--cyan, #2ee8c8);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
body.light .ocr-toggle-icon { color: #0891b2; }

.ocr-toggle-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ocr-toggle-text strong { font-size: 14px; font-weight: 700; }
.ocr-toggle-text small { font-size: 11.5px; color: var(--muted); }

.ocr-toggle-chevron {
  font-size: 12px;
  color: var(--muted);
  transition: transform .25s ease;
}
.ocr-collapse-toggle.open .ocr-toggle-chevron { transform: rotate(180deg); }

.ocr-collapse-body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 14px;
}
.ocr-collapse-hint {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.5;
}

.ocr-express-status {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.ocr-express-status.running { background: rgba(46,232,200,.06); border-color: rgba(46,232,200,.3); }
.ocr-express-status.ok { background: rgba(34,197,94,.06); border-color: rgba(34,197,94,.3); }
.ocr-express-status.err { background: rgba(239,68,68,.06); border-color: rgba(239,68,68,.3); }

.cg-mini-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(46,232,200,.25);
  border-top-color: #2ee8c8;
  border-radius: 50%;
  animation: amask-spin .8s linear infinite;
  flex-shrink: 0;
}

/* ───────────────────────────────────────────────────────────
   v59 — Phase D : VIN + rappels constructeur
   ─────────────────────────────────────────────────────────── */

.recall-card-v59 {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recall-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.recall-head strong { font-size: 13px; color: var(--txt); }
.recall-head small {
  font-size: 11px;
  color: #2ee8c8;
  background: rgba(46,232,200,.12);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
}
body.light .recall-head small { color: #0891b2; background: rgba(8,145,178,.12); }

.vin-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vin-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 700;
}
.vin-value-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
}
body.light .vin-value-wrap { background: #fff; }

.vin-value {
  flex: 1;
  font-family: 'SF Mono', 'Roboto Mono', Consolas, monospace;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--txt);
  user-select: all;
  cursor: text;
  word-break: break-all;
}

.vin-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: var(--cyan, #2ee8c8);
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .15s ease;
  font-family: inherit;
}
.vin-copy-btn:hover {
  background: #1ad4b8;
  transform: scale(1.05);
}
body.light .vin-copy-btn { background: #0891b2; color: #fff; }
body.light .vin-copy-btn:hover { background: #0e7490; }

.vin-missing,
.recall-no-url {
  font-size: 12.5px;
  color: var(--muted);
  font-style: italic;
  margin: 0;
  line-height: 1.5;
}

.recall-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: all .2s ease;
  box-shadow: 0 4px 12px rgba(245,158,11,.25);
}
.recall-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(245,158,11,.4);
}
.recall-action-btn svg { flex-shrink: 0; }
.recall-action-btn small {
  font-size: 10.5px;
  font-weight: 600;
  opacity: .85;
  margin-left: auto;
  letter-spacing: .02em;
}

@media (max-width: 480px) {
  .vin-value { font-size: 12px; }
  .recall-action-btn { font-size: 12.5px; padding: 10px 12px; }
  .recall-action-btn small { display: block; margin-left: 0; margin-top: 2px; }
}


/* v59.2 — annonce desktop lisible + phrases rapides configurables */
.result-card{max-width:min(1280px, calc(100vw - 32px)); margin-left:auto; margin-right:auto;}
.ad-editor-section{overflow:visible;}
.ad-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px;align-items:start;width:100%;}
.ad-layout-side .quick-phrases-panel{order:2;position:sticky;top:12px;max-height:72vh;overflow:auto;}
.ad-layout-side .ad-editor-wrap{order:1;min-width:0;}
.ad-layout-top{display:flex;flex-direction:column;}
.ad-layout-top .quick-phrases-panel{order:1;width:100%;max-height:none;}
.ad-layout-top .ad-editor-wrap{order:2;width:100%;}
.ad-textarea-wrap,.ad-editor-wrap{width:100%;min-width:0;}
.ad-textarea{width:100%;min-height:420px;resize:vertical;line-height:1.55;border-radius:18px;box-sizing:border-box;}
.ad-format-toolbar{display:flex;gap:6px;margin:0 0 8px;align-items:center;}
.ad-format-toolbar button{border:1px solid var(--border);border-radius:10px;background:var(--surface2);color:var(--txt);padding:7px 11px;cursor:pointer;font-size:14px;}
.ad-format-toolbar button:hover{border-color:var(--cyan)}
.ad-regenerate-main{box-shadow:0 8px 22px rgba(6,182,212,.22)}
.quick-phrase-btn,.lp-phrase-btn{display:inline-flex;align-items:center;gap:7px;}
.phrase-btn-icon{display:inline-grid;place-items:center;min-width:18px;font-size:15px;}
.lp-phrase-menu{max-width:min(720px,calc(100vw - 24px));width:720px;}
.ad-fullscreen-modal{z-index:9999;}
.ad-fs-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
.ad-fs-textarea{font-size:16px;line-height:1.6;}
@media(max-width:900px){.ad-layout,.ad-layout-side{display:flex;flex-direction:column}.quick-phrases-panel{width:100%;position:static!important;max-height:none!important}.ad-textarea{min-height:340px}.result-card{max-width:100%;}}

/* v59.3 — Annonce : aucune colonne de phrases rapides, pleine largeur sur ordinateur/tablette/mobile */
.ad-editor-section .ad-layout,
.ad-editor-section .ad-layout-hidden,
.ad-editor-section .ad-layout-side,
.ad-editor-section .ad-layout-top{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  grid-template-columns:1fr !important;
}
.ad-editor-section .quick-phrases-panel{
  display:none !important;
}
.ad-editor-section .ad-editor-wrap,
.ad-editor-section .ad-textarea-wrap{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
}
.ad-editor-section .ad-textarea,
#adText{
  display:block !important;
  width:100% !important;
  min-width:100% !important;
  max-width:100% !important;
  min-height:520px;
  box-sizing:border-box !important;
  white-space:pre-wrap !important;
  overflow-wrap:normal !important;
  word-break:normal !important;
  writing-mode:horizontal-tb !important;
  resize:vertical;
}
.ad-longpress-info{
  margin:10px 0 14px;
  padding:12px 14px;
  border:1px solid rgba(8,145,178,.25);
  background:rgba(6,182,212,.08);
  border-radius:14px;
  color:var(--txt);
  font-size:14px;
  line-height:1.45;
  font-weight:600;
}
body.light .ad-longpress-info{
  background:#ecfeff;
  border-color:#a5f3fc;
  color:#164e63;
}
.ad-format-toolbar button,
.ad-fs-actions button{
  min-width:40px;
}
.ad-fullscreen-modal .ad-fs-actions{
  position:sticky;
  top:0;
  z-index:10001;
}
.ad-fullscreen-modal .btn-primary,
.ad-fullscreen-modal .btn-ghost{
  white-space:nowrap;
}
.ad-fs-textarea{
  writing-mode:horizontal-tb !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
  white-space:pre-wrap !important;
}
@media(max-width:900px){
  .ad-editor-section .ad-textarea,#adText{min-height:420px;}
}

/* v59.6 — éditeur annonce riche : gras/souligné visibles directement */
.ad-rich-editor,
#adText[contenteditable="true"],
#adFullscreenText[contenteditable="true"]{
  white-space:pre-wrap;
  word-break:normal;
  overflow-wrap:break-word;
  outline:none;
  cursor:text;
  user-select:text;
}
.ad-rich-editor:empty::before{
  content:attr(data-placeholder);
  opacity:.55;
  pointer-events:none;
}
.ad-rich-editor strong{font-weight:800;}
.ad-rich-editor u{text-decoration:underline; text-underline-offset:3px;}

/* v59.7 — Relecture plein écran avant publication */
.publish-review-modal{position:fixed;inset:0;z-index:99999;background:rgba(2,6,23,.72);backdrop-filter:blur(6px);display:flex;align-items:center;justify-content:center;padding:18px}.publish-review-card{width:min(980px,100%);max-height:94vh;background:var(--card,#fff);color:var(--text,#0f172a);border-radius:22px;box-shadow:0 24px 80px rgba(0,0,0,.35);display:flex;flex-direction:column;overflow:hidden}.publish-review-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid rgba(148,163,184,.25);font-size:18px}.publish-review-body{padding:18px;overflow:auto}.publish-review-body h2{margin:0 0 14px;font-size:22px}.publish-review-text{white-space:pre-wrap;word-break:normal;overflow-wrap:break-word;background:rgba(148,163,184,.10);border:1px solid rgba(148,163,184,.25);border-radius:16px;padding:16px;min-height:45vh;font-family:inherit;font-size:15px;line-height:1.55}.publish-terms-box{display:flex;gap:10px;align-items:flex-start;margin-top:14px;padding:14px;border-radius:14px;background:rgba(0,166,200,.09);border:1px solid rgba(0,166,200,.25);font-size:14px;line-height:1.45}.publish-terms-box input{margin-top:3px;transform:scale(1.15)}.publish-review-actions{display:flex;gap:10px;justify-content:flex-end;padding:14px 18px;border-top:1px solid rgba(148,163,184,.25);background:rgba(148,163,184,.06)}@media(max-width:640px){.publish-review-modal{padding:0}.publish-review-card{height:100vh;max-height:none;border-radius:0}.publish-review-actions{flex-direction:column-reverse}.publish-review-actions button{width:100%}.publish-review-text{min-height:52vh}}

/* ═══════════════════════════════════════════════════════════════
   v60.6 — Splash Screen (Variante B - Immersif)
   ═══════════════════════════════════════════════════════════════ */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: var(--bg, #0a0e1a);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: splashFadeOut 0.4s ease 1.6s forwards;
}
body.light .splash-screen { background: #f8fafc; }

.splash-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(124,58,237,0.18) 0%, transparent 70%);
  animation: splashBgPulse 1.8s ease-in-out;
}
body.light .splash-bg {
  background: radial-gradient(circle at center, rgba(46,232,200,0.18) 0%, transparent 70%);
}

.splash-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.splash-car-container {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-car-icon {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, #2ee8c8, #7c3aed);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: splashPulseCar 1.8s ease-in-out forwards;
  box-shadow: 0 0 40px rgba(46,232,200,0.4);
  z-index: 2;
}

.splash-laser {
  position: absolute;
  background: linear-gradient(90deg, transparent, #2ee8c8, transparent);
  opacity: 0;
}
.splash-laser-h {
  width: 200px;
  height: 2px;
  top: 50%;
  left: 0;
  animation: splashLaserH 1.6s ease-in-out forwards;
}
.splash-laser-v {
  width: 2px;
  height: 200px;
  top: 0;
  left: 50%;
  background: linear-gradient(180deg, transparent, #7c3aed, transparent);
  animation: splashLaserV 1.6s ease-in-out 0.2s forwards;
}

.splash-particle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2ee8c8;
  box-shadow: 0 0 10px #2ee8c8;
  opacity: 0;
}
.splash-p1 { top: 20%; left: 20%; animation: splashParticle 1.6s ease-out 0.1s forwards; }
.splash-p2 { top: 30%; right: 15%; animation: splashParticle 1.6s ease-out 0.3s forwards; }
.splash-p3 { bottom: 25%; left: 25%; animation: splashParticle 1.6s ease-out 0.5s forwards; }
.splash-p4 { bottom: 15%; right: 25%; animation: splashParticle 1.6s ease-out 0.7s forwards; }
.splash-p5 { top: 50%; left: 8%; animation: splashParticle 1.6s ease-out 0.2s forwards; }
.splash-p6 { top: 50%; right: 8%; animation: splashParticle 1.6s ease-out 0.6s forwards; }

.splash-brand {
  margin-top: 28px;
  text-align: center;
  opacity: 0;
  animation: splashBrandIn 1.4s ease-out 0.8s forwards;
}
.splash-brand h1 {
  font-size: 30px;
  font-weight: 900;
  background: linear-gradient(135deg, #2ee8c8, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  letter-spacing: -0.5px;
}
.splash-brand p {
  color: var(--muted, #64748b);
  font-size: 11px;
  margin-top: 6px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
}

.splash-skip {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--muted, #94a3b8);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: inherit;
  transition: opacity 0.2s;
  z-index: 3;
}
body.light .splash-skip {
  background: rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.1);
  color: #6b7280;
}
.splash-skip:hover { opacity: 0.7; }

/* Animations splash */
@keyframes splashFadeOut {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}
@keyframes splashBgPulse {
  0% { opacity: 0; transform: scale(0.6); }
  50% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0.6; transform: scale(1); }
}
@keyframes splashPulseCar {
  0% { transform: scale(0.3); opacity: 0; }
  30% { transform: scale(1); opacity: 1; }
  75% { transform: scale(1); opacity: 1; }
  85% { transform: scale(1.12); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes splashLaserH {
  0% { opacity: 0; transform: translateY(-100px); }
  35% { opacity: 1; transform: translateY(-60px); }
  55% { opacity: 1; transform: translateY(60px); }
  75% { opacity: 0; transform: translateY(100px); }
  100% { opacity: 0; }
}
@keyframes splashLaserV {
  0% { opacity: 0; transform: translateX(-100px); }
  35% { opacity: 1; transform: translateX(-60px); }
  55% { opacity: 1; transform: translateX(60px); }
  75% { opacity: 0; transform: translateX(100px); }
  100% { opacity: 0; }
}
@keyframes splashParticle {
  0% { opacity: 0; transform: scale(0); }
  35% { opacity: 1; transform: scale(1.5); }
  60% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.5); }
}
@keyframes splashBrandIn {
  0% { opacity: 0; transform: translateY(15px); }
  60% { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Accessibilité : respecte prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .splash-screen,
  .splash-bg,
  .splash-car-icon,
  .splash-laser,
  .splash-particle,
  .splash-brand {
    animation-duration: 0.3s !important;
  }
}


/* ═══════════════════════════════════════════════════════════════
   v60.7 — Bloc Diffusion sur sites externes
   ═══════════════════════════════════════════════════════════════ */
.diffusion-section {
  background: linear-gradient(135deg, rgba(46,232,200,0.05), rgba(124,58,237,0.05));
  border: 1px solid rgba(46,232,200,0.2);
  border-radius: 16px;
  padding: 18px;
  margin: 16px 0;
}
body.light .diffusion-section {
  background: linear-gradient(135deg, rgba(46,232,200,0.07), rgba(124,58,237,0.05));
}
.diffusion-section h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
}
.diffusion-intro {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12.5px;
}
.diffusion-loading {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.diffusion-site {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
body.light .diffusion-site { background: #fff; }
.diffusion-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.diffusion-site-name {
  font-size: 14px;
  font-weight: 800;
}
.diffusion-site-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.btn-diffusion {
  flex: 1;
  min-width: 140px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--txt);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
body.light .btn-diffusion { background: #f9fafb; }
.btn-diffusion:hover {
  border-color: var(--cyan);
  background: rgba(46,232,200,0.08);
  transform: translateY(-1px);
}
.btn-diffusion.btn-copy:hover {
  border-color: #7c3aed;
  background: rgba(124,58,237,0.08);
}
.btn-diffusion.btn-redirect {
  background: linear-gradient(135deg, #2ee8c8, #7c3aed);
  color: #000;
  border: none;
}
.btn-diffusion.btn-redirect:hover {
  filter: brightness(1.1);
}
.btn-diffusion.btn-xml {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  border: none;
  width: 100%;
}
.btn-diffusion.btn-xml:hover {
  filter: brightness(1.1);
}
.diffusion-xml {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.diffusion-xml-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}
.diffusion-xml-header strong { font-size: 14px; }
.diffusion-xml-header small { color: var(--muted); font-size: 11.5px; }
.diffusion-prefs-link {
  margin-top: 14px;
  text-align: center;
}
.diffusion-prefs-link a { color: var(--cyan); text-decoration: none; font-weight: 600; }
@media (max-width: 480px) {
  .btn-diffusion { min-width: 100%; flex: 1 1 100%; }
}

/* ══ v61.7 — RESPONSIVE Pro (tablette 481-900px) ══ */
@media(min-width:481px) and (max-width:900px){
  .result-section{padding:14px}
  .equip-tabs{flex-wrap:wrap;gap:4px}
  .vehicle-meta{grid-template-columns:repeat(3,1fr)}
  .cam-controls{flex-wrap:wrap;gap:6px}
  .cam-ctrl{flex:1;min-width:100px}
  .slots-grid{grid-template-columns:repeat(4,1fr)}
  .price-hero-val{font-size:36px}
}
/* ══ Résultat panel — widgets ══ */
.result-widget{transition:opacity .2s,max-height .3s}
.result-widget.hidden-widget{display:none}
.widget-toggle-bar{
  display:flex;align-items:center;justify-content:space-between;
  padding:10px 16px;
  background:var(--surface2);border:1px solid var(--border);
  border-radius:var(--radius-sm);margin-bottom:8px;
  cursor:pointer;gap:10px;font-size:13px;font-weight:600;
}
.widget-toggle-bar:hover{border-color:var(--cyan)}
.widget-toggle-bar .wt-icon{font-size:16px}
.widget-toggle-bar .wt-chevron{
  transition:transform .2s;color:var(--muted);margin-left:auto;
  flex-shrink:0;
}
.widget-toggle-bar.collapsed .wt-chevron{transform:rotate(-90deg)}

/* ══ v62.1.2 — Panel résultat fond blanc (mode clair par défaut) ══ */
.result-card {
  background: #fff;
  color: #0f172a;
}
.result-section {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a;
}
.result-section h3 { color: #475569 !important; }
/* En mode sombre → remettre les couleurs sombres */
body:not(.light) .result-card { background: var(--surface); color: var(--txt); }
body:not(.light) .result-section { background: var(--surface) !important; border-color: var(--border) !important; color: var(--txt); }
body:not(.light) .result-section h3 { color: var(--muted) !important; }

/* ── Annonce scrollable ── */
#adText {
  min-height: 200px !important;
  max-height: 400px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  resize: vertical;
}
.ad-textarea-wrap { position: relative; }
