/* DMG Transport — bleu foncé, blanc et or */
:root {
  --navy: #0B1F4B; --navy-2: #16337A; --navy-3: #2B437A;
  --gold: #C9A227; --gold-soft: #FBF6E6; --gold-ink: #7A5F0E;
  --ink: #0B1F4B; --ink-2: #33446B; --muted: #4A5B80;
  --line: #D5DCEA; --bg: #F4F6FB; --card: #FFFFFF; --chip: #EEF1F8;
  --danger: #B3261E; --danger-soft: #FDF3F2; --ok: #1E6B3F; --ok-soft: #E6F3EA;
  --radius: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); line-height: 1.4; }
a { color: var(--navy-2); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.hidden { display: none !important; }

.app { max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.topbar { background: var(--navy); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 50; }
.logo { width: 48px; height: 48px; border-radius: 12px; background: #fff; padding: 4px; object-fit: contain; flex-shrink: 0; border: 2px solid var(--gold); }
.brand { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.brand b { font-size: 17px; }
.brand small { color: #E8D69A; font-size: 12px; font-weight: 600; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--navy-3); background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; }
.main { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 14px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card.gold { border: 2px solid var(--gold); background: var(--gold-soft); }
.card.danger { border-color: #F0C9C6; background: var(--danger-soft); }
.card.dark { background: var(--navy); color: #fff; border: none; }
.card h2, .card h3 { margin: 0; }
h1 { font-size: 22px; margin: 4px 0; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.big { font-size: 26px; font-weight: 800; }
.price { font-weight: 800; white-space: nowrap; }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
input.input, select.input, textarea.input {
  width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  font-size: 16px; background: #fff; color: var(--ink);
}
textarea.input { min-height: 80px; resize: vertical; }
input.input:focus, select.input:focus, textarea.input:focus, .btn:focus-visible, .choice:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
.code-input { text-align: center; font-size: 28px !important; font-weight: 800; letter-spacing: 10px; }

.btn { min-height: 50px; border-radius: 14px; border: none; padding: 0 18px; font-size: 16px; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.primary { background: var(--navy); color: #fff; }
.btn.gold { background: var(--gold); color: var(--navy); }
.btn.ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.small { min-height: 44px; font-size: 14px; padding: 0 14px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; background: var(--chip); padding: 4px; border-radius: 14px; }
.segmented button { min-height: 44px; border: none; border-radius: 11px; background: transparent; font-weight: 700; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--navy); color: #fff; }

.choice { display: flex; align-items: center; gap: 12px; text-align: left; min-height: 60px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; width: 100%; }
.choice[aria-pressed="true"] { border: 2px solid var(--gold); background: var(--gold-soft); }
.choice .badge { width: 42px; height: 42px; border-radius: 10px; background: var(--chip); font-weight: 800; font-size: 13px; display: grid; place-items: center; flex-shrink: 0; }
.choice[aria-pressed="true"] .badge { background: var(--navy); color: var(--gold); }
.choice .txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.choice .txt b { font-size: 15px; }
.choice .txt span { font-size: 12px; color: var(--muted); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; white-space: nowrap; border-radius: 999px; background: var(--chip); font-size: 12px; font-weight: 700; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.pill.gold { background: var(--gold-soft); color: var(--gold-ink); }
.pill.dark { background: var(--navy); color: #fff; }

.notice { display: flex; gap: 10px; align-items: flex-start; background: var(--chip); border-radius: 12px; padding: 12px; font-size: 13px; color: var(--ink-2); }
.notice.warn { background: var(--gold-soft); }
.notice.bad { background: var(--danger-soft); color: var(--danger); }

.startcode { font-size: 38px; font-weight: 800; letter-spacing: 12px; text-align: center; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--navy); color: var(--gold); font-weight: 800; display: grid; place-items: center; object-fit: cover; flex-shrink: 0; }
.plate { background: var(--navy); color: #fff; font-weight: 800; font-size: 13px; padding: 6px 8px; border-radius: 8px; letter-spacing: .5px; white-space: nowrap; }
.stars { display: flex; gap: 4px; justify-content: center; }
.stars button { width: 52px; height: 52px; border: none; background: transparent; font-size: 38px; line-height: 1; color: #B8C2D9; cursor: pointer; }
.stars button[aria-pressed="true"] { color: var(--gold); }
.list { display: flex; flex-direction: column; }
.list > * { padding: 10px 0; border-top: 1px solid var(--line); }
.list > *:first-child { border-top: none; }
.suggestions { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.suggestions button { text-align: left; border: none; border-top: 1px solid var(--line); background: #fff; padding: 12px; min-height: 44px; cursor: pointer; font-size: 14px; }
.suggestions button:first-child { border-top: none; }
.ad { background: var(--chip); border-radius: 12px; padding: 10px 12px; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.ad b { color: var(--navy); }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700; z-index: 1000; max-width: 92vw; box-shadow: 0 6px 20px rgba(11,31,75,.25); }
.toast.bad { background: var(--danger); }
.overlay { position: fixed; inset: 0; background: rgba(11,31,75,.55); z-index: 900; display: grid; place-items: center; padding: 16px; }
.overlay .card { max-width: 440px; width: 100%; max-height: 90vh; overflow: auto; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }

/* Carte */
.map { position: relative; overflow: hidden; background: #E3E9F4; border-radius: var(--radius); touch-action: none; user-select: none; height: 260px; }
.map .tiles, .map .overlay-svg, .map .markers { position: absolute; inset: 0; }
.map .tiles img { position: absolute; width: 256px; height: 256px; max-width: none; }
.map .overlay-svg { pointer-events: none; }
.map .marker { position: absolute; transform: translate(-50%, -100%); pointer-events: none; }
.map .marker.center { transform: translate(-50%, -50%); }
.map .zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 5; }
.map .zoom button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 20px; font-weight: 800; cursor: pointer; }
.map .attrib { position: absolute; right: 4px; bottom: 2px; font-size: 10px; background: rgba(255,255,255,.8); padding: 1px 4px; border-radius: 4px; z-index: 5; }
.map .hint { position: absolute; left: 10px; top: 10px; background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700; z-index: 5; box-shadow: 0 1px 4px rgba(11,31,75,.15); }
.pin { width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.pin.a { background: var(--navy); }
.pin.b { background: var(--gold); }
.car { width: 30px; height: 30px; border-radius: 8px; background: var(--gold); border: 3px solid var(--navy); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.me { width: 18px; height: 18px; border-radius: 50%; background: #2563EB; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(37,99,235,.25); }

/* Espace admin (large écran) */
.admin-layout { display: flex; flex-wrap: wrap; min-height: 100vh; }
.admin-nav { flex: 1 1 220px; background: var(--navy); color: #fff; padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; }
.admin-nav button { min-height: 44px; text-align: left; padding: 0 14px; border-radius: 10px; border: none; background: transparent; color: #fff; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.admin-nav button[aria-current="page"] { background: var(--gold); color: var(--navy); font-weight: 800; }
.admin-main { flex: 999 1 560px; min-width: 0; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.kpi span { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi b { display: block; font-size: 26px; margin-top: 4px; }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { background: var(--chip); text-align: left; padding: 10px 12px; white-space: nowrap; }
td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; white-space: nowrap; }
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.docs figure { margin: 0; background: var(--chip); border-radius: 10px; overflow: hidden; }
.docs img { width: 100%; height: 120px; object-fit: cover; display: block; cursor: zoom-in; }
.docs figcaption { font-size: 12px; padding: 6px 8px; font-weight: 700; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-form > * { flex: 1 1 160px; }
body:has(.admin-layout) .overlay .card { max-width: 760px; }

/* Publicités DMG : carrousel */
.promo { position: relative; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 18px 16px 14px; display: flex; flex-direction: column; gap: 8px; min-height: 190px; }
.promo .tag { align-self: flex-start; background: var(--gold); color: var(--navy); font-weight: 800; font-size: 11px; letter-spacing: .5px; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; }
.promo .tag.partner { background: #fff; }
.promo h3 { margin: 0; font-size: 18px; line-height: 1.25; color: #fff; }
.promo p { margin: 0; font-size: 13.5px; color: #D6DDEF; line-height: 1.45; }
.promo .company { font-size: 12px; color: #E8D69A; font-weight: 700; }
.promo .actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.promo .actions a { min-height: 44px; padding: 0 14px; border-radius: 12px; font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; text-decoration: none; }
.promo .actions .call { background: var(--gold); color: var(--navy); }
.promo .actions .more { background: transparent; color: #fff; border: 1px solid #5B6E99; }
.promo .dots { display: flex; gap: 6px; justify-content: center; padding-top: 4px; }
.promo .dots button { width: 10px; height: 10px; min-width: 10px; padding: 0; border-radius: 50%; border: none; background: #5B6E99; cursor: pointer; }
.promo .dots button[aria-current="true"] { background: var(--gold); width: 22px; border-radius: 5px; }
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; border-radius: var(--radius); padding: 24px 18px; display: flex; flex-direction: column; gap: 12px; }
.hero h1 { color: #fff; font-size: 26px; line-height: 1.2; margin: 0; }
.hero p { color: #D6DDEF; margin: 0; }
.hero .gold-text { color: var(--gold); }
.feature { display: flex; gap: 12px; align-items: flex-start; }
.feature .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--gold-soft); color: var(--gold-ink); font-weight: 800; display: grid; place-items: center; flex-shrink: 0; }
.feature b { display: block; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 12px; color: var(--muted); }
.steps { counter-reset: s; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; }
.steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: var(--gold); font-weight: 800; display: grid; place-items: center; flex-shrink: 0; }

/* Accueil en images : choisir sans savoir lire */
.home-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.home-title h1 { font-size: 24px; margin: 0; }
.tiles { display: flex; flex-direction: column; gap: 12px; }
.tile { position: relative; border-radius: 18px; overflow: hidden; box-shadow: 0 2px 8px rgba(11,31,75,.12); }
.tile-main { width: 100%; min-height: 118px; display: flex; align-items: center; gap: 14px; padding: 12px 64px 12px 12px; border: none; cursor: pointer; text-align: left; text-decoration: none; color: inherit; background: transparent; }
.tile-main:focus-visible { outline: 4px solid var(--gold); outline-offset: -4px; }
.tile-main:active { transform: scale(.985); }
.tile-picto { width: 128px; flex-shrink: 0; display: block; background: #fff; border-radius: 14px; padding: 6px 8px; }
.tile-picto svg { display: block; width: 100%; height: auto; }
.tile-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile-txt b { font-size: 21px; line-height: 1.15; }
.tile-txt span { font-size: 13.5px; opacity: .85; }
.tile-taxi { background: var(--navy); color: #fff; }
.tile-moto { background: var(--gold); color: var(--navy); }
.tile-van { background: #fff; color: var(--navy); border: 2px solid var(--navy); }
.tile-van .tile-picto { background: #fff; }
.speak-btn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 2px solid currentColor; background: rgba(255,255,255,.15); color: inherit; display: grid; place-items: center; cursor: pointer; }
.tile-taxi .speak-btn { color: #fff; }
.home-title .speak-btn, .speak-inline { position: static; transform: none; color: var(--navy); background: #fff; }
.speak-btn .ico svg { width: 24px; height: 24px; display: block; }
.picto svg { display: block; width: 100%; height: auto; }

/* Choix du véhicule dans le formulaire */
.vehicle-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.vehicle-pick button { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font-weight: 700; font-size: 13px; min-height: 84px; }
.vehicle-pick button .picto { width: 72px; }
.vehicle-pick button[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold); }

/* Gammes et paiement en images */
.choice .svc-badge { width: 76px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.svc-badge .picto { width: 68px; }
.svc-stars { color: var(--gold); font-size: 14px; letter-spacing: 1px; display: inline-flex; align-items: center; gap: 3px; }
.svc-stars .snow { width: 14px; display: inline-block; }
.svc-stars .snow svg { display: block; width: 100%; }
.pay-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pay-pick button { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font-weight: 700; min-height: 92px; }
.pay-pick button .picto { height: 40px; width: auto; }
.pay-pick button .picto svg { height: 40px; width: auto; }
.pay-pick button[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold); }
.hero .tiles { margin-top: 4px; }
.hero .tile-taxi { border: 2px solid var(--gold); }
@media (max-width: 420px) {
  .tile-picto { width: 104px; }
  .tile-txt b { font-size: 19px; }
  .hero .tile-main { padding-right: 58px; gap: 10px; }
  .hero .tile-picto { width: 92px; }
}
.photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; border-radius: 8px; background: #fff; }
.tile-picto.photo { padding: 2px; }
