/* Driver app (templates/driver-app.php), 2026-11-25 — preview « Espace livreur ». */
body.as-driver-page:has(.as-dapp) .as-bottom-nav { display: none !important; }
body.as-driver-page:has(.as-dapp) { padding-bottom: 0 !important; }
body.as-driver-page:has(.as-dapp) .as-footer { display: none; }
.as-dapp { max-width: 560px; margin: 0 auto; padding-bottom: calc(84px + env(safe-area-inset-bottom)); color: #14332A; }
.as-dapp h2 { margin: 0 0 10px; font-size: 16px; }
.as-dapp h3 { margin: 16px 0 8px; font-size: 14px; }

/* Header: who + availability */
.as-dapp__top { margin: 0 -20px; padding: 14px 20px 10px; background: radial-gradient(300px 160px at 100% 0%, rgba(239,170,31,.18), transparent 70%), linear-gradient(180deg, #1a4034, #14332A); color: #fff; border-radius: 0 0 22px 22px; }
@media (min-width: 600px) { .as-dapp__top { margin: 0; border-radius: 22px; } }
.as-dapp__who { display: flex; align-items: center; gap: 10px; }
.as-dapp__who small { display: block; font-size: 13px; color: #b9d6c8; }
.as-dapp__who b { display: block; font: 700 18px "Space Grotesk", Inter, sans-serif; }
.as-dapp__badge { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 20px; background: rgba(239,170,31,.18); color: #f6c04a; font-size: 12px; font-weight: 700; white-space: nowrap; }
.as-dapp__badge svg { width: 14px; height: 14px; }
.as-dapp__avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; overflow: hidden; background: #E3EFE7; color: #2F7A52; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #EFAA1F; }
.as-dapp__avatar img { width: 100%; height: 100%; object-fit: cover; }
.as-dapp__avatar.is-big { width: 76px; height: 76px; font-size: 24px; border-width: 3px; }
.as-dapp__switch { margin-top: 14px; padding: 12px 14px !important; border-radius: 16px !important; background: rgba(255,255,255,.08) !important; }
.as-dapp__switch.is-on { background: rgba(47,122,82,.35) !important; }
.as-dapp__switch b { font-size: 17px !important; }
.as-dapp__switch small { color: #cfe3d8; font-size: 12.5px !important; }
.as-dapp__pos { margin: 6px 2px 0 !important; color: #b9d6c8 !important; font-size: 12.5px !important; }
.as-dapp__pos.is-error { color: #ffd2c4 !important; }

.as-dapp__msg { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; }
.as-dapp__msg.is-ok { background: #E3EFE7; color: #1F5C3D; }
.as-dapp__msg.is-err { background: #fdecea; color: #8a2a1e; }

.as-dapp__body { padding-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.as-dapp__title { margin: 4px 0 0; font: 700 22px "Space Grotesk", Inter, sans-serif; }
.as-dapp__card { background: #fff; border-radius: 16px; padding: 14px; box-shadow: 0 4px 14px rgba(20,51,42,.05); scroll-margin-top: 16px; }
.as-dapp__help { margin: 0 0 12px; font-size: 13px; color: #5A6B64; line-height: 1.45; }
.as-dapp__row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.as-dapp__count { color: #2F7A52; font-size: 14px; }

/* Home */
.as-dapp__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.as-dapp__stats > div { background: #fff; border-radius: 14px; padding: 12px 10px; }
.as-dapp__stats small { display: block; font-size: 11.5px; color: #5A6B64; }
.as-dapp__stats b { display: block; font: 700 22px "Space Grotesk", Inter, sans-serif; line-height: 1.2; }
.as-dapp__bar { height: 8px; border-radius: 4px; background: #ECE6DC; margin: 4px 0 12px; overflow: hidden; }
.as-dapp__bar span { display: block; height: 100%; background: linear-gradient(90deg, #2F7A52, #EFAA1F); }
.as-dapp__check { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.as-dapp__check li { display: flex; align-items: center; gap: 10px; }
.as-dapp__check li > span:nth-child(2) { flex: 1; }
.as-dapp__check a { font-weight: 700; font-size: 13px; color: #14332A; }
.as-dapp__tick { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid #EFAA1F; box-sizing: border-box; }
.as-dapp__check li.is-done .as-dapp__tick { border: 0; background: #2F7A52 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center/14px no-repeat; }
.as-dapp__note { border-radius: 16px; padding: 14px; background: #FDF4E1; border: 1px solid #F5D995; }
.as-dapp__note h2 { font-size: 15px; margin-bottom: 6px; }
.as-dapp__note p { margin: 0; font-size: 13.5px; line-height: 1.45; color: #46564F; }

/* Deliveries */
.as-dapp__empty { display: flex; gap: 12px; align-items: center; color: #46564F; font-size: 14px; }
.as-dapp__empty svg { flex: none; color: #2F7A52; }
.as-dapp__empty p { margin: 0; }
.as-dapp__steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; font-size: 13.5px; line-height: 1.4; }
.as-dapp__steps li { counter-increment: s; display: flex; gap: 10px; }
.as-dapp__steps li::before { content: counter(s); width: 24px; height: 24px; flex: none; border-radius: 50%; background: #14332A; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* Earnings */
.as-dapp__earn { border-radius: 18px; padding: 16px; color: #fff; background: linear-gradient(160deg, #1a4034, #14332A); }
.as-dapp__earn > small { display: block; font-size: 13px; color: #b9d6c8; }
.as-dapp__earn > b { display: block; font: 700 36px "Space Grotesk", Inter, sans-serif; line-height: 1.15; }
.as-dapp__earn > b span { font-size: 17px; color: #f6c04a; }
.as-dapp__earn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.as-dapp__earn-grid > div { padding: 10px; border-radius: 12px; background: rgba(255,255,255,.08); }
.as-dapp__earn-grid small { display: block; font-size: 11.5px; color: #b9d6c8; }

/* Forms */
.as-dapp__form { display: grid; gap: 10px; margin: 0; }
.as-dapp__field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.as-dapp__field input { box-sizing: border-box; width: 100%; height: 48px; padding: 0 14px; border: 1px solid #E6DDCF; border-radius: 12px; background: #F6F1EA; font: 16px Inter, system-ui, sans-serif; color: #14332A; }
.as-dapp__field input:focus { outline: 0; border-color: #EFAA1F; box-shadow: 0 0 0 3px rgba(239,170,31,.25); background: #fff; }
.as-dapp__field.is-inline { grid-template-columns: auto 1fr; align-items: center; }
.as-dapp__grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.as-dapp__choices { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.as-dapp__choices--2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.as-dapp__choice { position: relative; cursor: pointer; }
.as-dapp__choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.as-dapp__choice span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; border: 1px solid #E6DDCF; border-radius: 22px; background: #fff; font-weight: 600; font-size: 14px; }
.as-dapp__choices--2 .as-dapp__choice span { border-radius: 12px; min-height: 52px; }
.as-dapp__choice.is-small span { min-height: 38px; font-size: 13px; padding: 0 12px; }
.as-dapp__choice input:checked + span { border: 2px solid #2F7A52; background: #EEF6F1; font-weight: 700; }
.as-dapp__choice input:focus-visible + span { outline: 3px solid #EFAA1F; outline-offset: 2px; }
.as-dapp__days { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.as-dapp__days label { position: relative; }
.as-dapp__days input { position: absolute; opacity: 0; }
.as-dapp__days span { display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 10px; background: #ECE6DC; color: #5A6B64; font-size: 12px; font-weight: 700; cursor: pointer; }
.as-dapp__days input:checked + span { background: #14332A; color: #fff; }
.as-dapp__days input:focus-visible + span { outline: 3px solid #EFAA1F; }
.as-dapp__zones summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid #E6DDCF; border-radius: 12px; font-weight: 600; font-size: 14px; }
.as-dapp__zones summary::-webkit-details-marker { display: none; }
.as-dapp__zones summary::after { content: "Modifier"; align-self: flex-start; font-size: 13px; color: #8A5A00; font-weight: 700; }
.as-dapp__zones[open] summary::after { content: "Fermer"; }
.as-dapp__zones[open] .as-dapp__choices { margin-top: 10px; max-height: 280px; overflow-y: auto; padding: 2px; }
.as-dapp__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.as-dapp__chips em { font-style: normal; padding: 6px 10px; border-radius: 14px; background: #EEF6F1; font-size: 13px; }
.as-dapp__save { width: 100%; min-height: 48px; border-radius: 12px; margin-top: 4px; justify-content: center; }
.as-dapp__upload { display: inline-flex; position: relative; cursor: pointer; }
.as-dapp__upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.as-dapp__upload span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1.5px dashed #EFAA1F; border-radius: 12px; color: #8A5A00; font-weight: 700; font-size: 13.5px; }
.as-dapp__upload input:focus-visible + span { outline: 3px solid #EFAA1F; }

/* Profile */
.as-dapp__me { display: flex; gap: 14px; align-items: center; }
.as-dapp__me b { display: block; font: 700 20px "Space Grotesk", Inter, sans-serif; }
.as-dapp__me > div > small { display: block; color: #5A6B64; font-size: 13px; margin-bottom: 8px; }
.as-dapp__me .as-dapp__help { margin: 6px 0 0; }
.as-dapp__docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.as-dapp__docs li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: 12px; background: #F6F1EA; font-size: 14px; }
.as-dapp__docs li > span { flex: 1; min-width: 140px; }
.as-dapp__docs li small { display: block; font-size: 12px; color: #5A6B64; }
.as-dapp__docs li > b { font-size: 12px; }
.as-dapp__docs li > form { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.as-dapp__docs .is-ok { color: #2F7A52; }
.as-dapp__docs .is-todo { color: #8A5A00; }
.as-dapp__docs .is-warn { color: #a3341f; }
.as-dapp__links { padding: 4px 14px; }
.as-dapp__setting { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #ECE6DC; color: #14332A; text-decoration: none; }
.as-dapp__setting:last-child { border-bottom: 0; }
.as-dapp__setting > span { flex: 1; font-size: 14px; }
.as-dapp__setting small { display: block; font-size: 12.5px; color: #5A6B64; }
.as-dapp__setting.is-out b { color: #9A3B2E; }
.as-dapp__alerts { min-height: 40px; padding: 0 14px; border-radius: 10px; background: #EFAA1F; color: #14332A; font-weight: 700; border: 0; }
.as-dapp__alerts[disabled] { background: #E3EFE7; color: #1F5C3D; }

/* Driver bottom bar */
.as-dapp__nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #fff; border-top: 1px solid #ECE6DC; padding-bottom: env(safe-area-inset-bottom); view-transition-name: as-tabbar; }
.as-dapp__nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 62px; justify-content: center; color: #5A6B64; font-size: 12px; text-decoration: none; }
.as-dapp__nav a[aria-current="page"] { color: #B7791F; font-weight: 700; }
.as-dapp__nav svg { width: 22px; height: 22px; }
.as-dapp .as-drv__keep { margin-top: 4px; }

/* Fixes after the first check as a driver (2026-11-25). */
.as-dapp .as-dapp__card h2, .as-dapp .as-dapp__note h2 { margin-top: 0 !important; }
.as-dapp .as-dapp__card > :first-child { margin-top: 0; }
.as-dapp__nav a, .as-dapp__nav a:hover, .as-dapp__nav a:visited { text-decoration: none !important; }
.as-dapp__check a { text-decoration: none !important; padding: 6px 0; }
.as-dapp fieldset { background: none !important; border: 0 !important; padding: 0 !important; margin: 0; min-width: 0; }

/* Driver's current job (Driver_Jobs). */
.as-job { background: #fff; border-radius: 16px; padding: 14px; box-shadow: 0 6px 18px rgba(20,51,42,.08); display: grid; gap: 10px; border: 2px solid #EFAA1F; }
.as-job[data-status="accepted"], .as-job[data-status="picked"] { border-color: #2F7A52; }
.as-job__top { display: flex; justify-content: space-between; align-items: center; }
.as-job__tag { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 12px; background: #FDF4E1; color: #8A5A00; }
.as-job__tag.is-accepted, .as-job__tag.is-picked { background: #E3EFE7; color: #1F5C3D; }
.as-job__price { font: 700 22px "Space Grotesk", Inter, sans-serif; }
.as-job__route { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.as-job__route li { position: relative; padding-left: 22px; }
.as-job__route li::before { content: ""; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #2F7A52; }
.as-job__route li.is-drop::before { border-radius: 3px; background: #EFAA1F; }
.as-job__route li.is-done { opacity: .55; }
.as-job__route small { display: block; font-size: 12.5px; color: #5A6B64; }
.as-job__meta { margin: 0; font-size: 12.5px; color: #5A6B64; }
.as-job__timer { margin: 0; font-size: 14px; } .as-job__timer b { font: 700 20px "Space Grotesk", Inter, sans-serif; color: #8A5A00; }
.as-job__btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.as-job__btns .as-btn, .as-job__dir, .as-job__code .as-btn { min-height: 50px; border-radius: 12px; justify-content: center; width: 100%; }
.as-job__no { background: #fff !important; border: 1px solid #E6DDCF !important; color: #14332A !important; }
.as-job__dir { background: #fff !important; border: 1px solid #E6DDCF !important; color: #14332A !important; text-decoration: none !important; display: inline-flex; align-items: center; }
.as-job__code { display: grid; gap: 8px; margin: 0; }
.as-job__code label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.as-job__code input { height: 52px; border: 1px solid #E6DDCF; border-radius: 12px; background: #F6F1EA; text-align: center; font: 700 24px "Space Grotesk", Inter, sans-serif; letter-spacing: .3em; }
.as-job__err { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fdecea; color: #8a2a1e; font-weight: 600; font-size: 14px; }
.as-job-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.as-job-hist li { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 12px; background: #F6F1EA; font-size: 14px; }
.as-job-hist small { display: block; font-size: 12px; color: #5A6B64; }
.as-job-hist b.is-delivered { color: #2F7A52; }
.as-job__hint { margin: 0; font-size: 12.5px; color: #5A6B64; line-height: 1.4; }
.as-dapp__me form + form { margin-top: 6px; }
.as-dapp__remove { border: 0; background: none; padding: 6px 0; color: #9A3B2E; font: 600 13px Inter, sans-serif; cursor: pointer; text-decoration: underline; }
