/* Technician page (sub-project F v2, screens F0 to F5d of the mockup). Colours from tokens.css; the theme is the
   phone's (tech.js sets data-theme). Public folder: never reference app.css, it is not served outside Sewan. */
:root { --t-white: #FFFFFF; --t-halo: rgba(0, 102, 255, .25); --t-veil: rgba(0, 17, 27, .5); --t-danger: #D93036; }
/* WCAG AA (4.5:1) on this page: on a light phone the grey of the notes and the blue of the links are a shade darker
   than the shared tokens (4.17 and 4.38 on the page background); on a dark one the red under the white text of
   « Clôturer en échec » is a shade darker than --fail (3.91). */
:root[data-theme="light"] { --text-3: #626E74; --link: var(--brand-hover); --t-danger: var(--fail); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/20px var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button { font-family: inherit; }
a { color: var(--link); }
.mono { font-family: var(--font-mono); }

.t-app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.t-loading { padding: 40px 20px; color: var(--text-3); }
/* read by a screen reader only: the screen and the progress of the test (tech.js, say) */
.t-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.t-app > form { flex: 1; display: flex; flex-direction: column; }

/* ---- common frame: header, content, footer ---- */
.t-screen { flex: 1; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.t-head { background: var(--surface); border-bottom: 1px solid var(--border); padding: calc(12px + env(safe-area-inset-top)) 20px 12px; display: flex; flex-direction: column; gap: 2px; }
.t-head-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 12px; line-height: 16px; color: var(--text-3); }
.t-head-line > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the right part (step, day and count) keeps its width but wraps past 60 %: a narrow phone, or one whose text is
   enlarged (Android text scaling zooms the page), never scrolls sideways */
.t-head-line > span:last-child { flex-shrink: 0; max-width: 60%; text-align: right; }
/* 44 px to tap, the header line keeps its height */
.t-back { border: 0; background: none; padding: 14px 0; margin: -14px 0; flex-shrink: 0; white-space: nowrap; color: var(--link); font: 600 12px/16px var(--font); cursor: pointer; }
.t-title { margin: 0; font-size: 18px; line-height: 24px; font-weight: 600; }
.t-title:focus { outline: 0; }      /* focused by the page at each new screen (tech.js), never by a key: no ring */
.t-body { flex: 1; padding: 16px 20px; display: flex; flex-direction: column; gap: 16px; }
.t-body.t-list { gap: 10px; }
.t-body.t-help { gap: 12px; }
.t-foot { padding: 16px 20px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }

/* ---- buttons ---- */
.t-btn { width: 100%; height: 50px; border: 0; border-radius: var(--r-8); font: 600 16px/20px var(--font); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; text-align: center; }
.t-btn-primary { background: var(--brand); color: var(--t-white); }
.t-btn-secondary { background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); }
.t-btn:disabled { background: var(--skip); border: 0; color: var(--t-white); cursor: not-allowed; }
.t-btn:focus-visible, .t-back:focus-visible, .t-link:focus-visible, .t-visit:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.t-link { width: 100%; height: 44px; border: 0; background: transparent; color: var(--link); font: 600 15px/20px var(--font); cursor: pointer; }
.t-small { font-size: 13px; line-height: 18px; color: var(--text-3); }
.t-center { text-align: center; }
.t-lead { color: var(--text-2); }

/* ---- F0 sign-in ---- */
.t-sign { flex: 1; padding: calc(48px + env(safe-area-inset-top)) 24px 24px; display: flex; flex-direction: column; gap: 16px; }
.t-brand { width: 44px; height: 44px; border-radius: 10px; display: block; box-shadow: 0 0 0 1px var(--t-line, rgba(0,0,0,.08)); }
.t-hero { display: flex; flex-direction: column; gap: 6px; }
.t-hero-title { font-size: 26px; line-height: 32px; font-weight: 600; margin: 0; }
.t-field { display: flex; flex-direction: column; gap: 6px; }
.t-label { font-size: 13px; font-weight: 600; }
.t-input { width: 100%; height: 48px; border: 1px solid var(--border-strong); border-radius: var(--r-8); background: var(--surface); color: var(--text); padding: 0 14px; font: 16px var(--font); }
.t-input:focus { outline: 0; border: 2px solid var(--brand); padding: 0 13px; box-shadow: 0 0 0 3px var(--t-halo); }
/* the way in on F0: the codes, in one section */
.t-section { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.t-section-title { margin: 0; font-size: 16px; line-height: 22px; font-weight: 600; }
.t-section .t-input, .t-section .t-cell { background: var(--bg); }
.t-upper { text-transform: uppercase; letter-spacing: .08em; }

/* ---- banners, blocks, cards ---- */
.t-banner { border-radius: var(--r-8); padding: 10px 12px; font-size: 14px; line-height: 20px; font-weight: 500; display: flex; gap: 8px; align-items: center; }
.t-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.t-ok { background: var(--ok-bg); color: var(--ok-text); } .t-ok .t-dot { background: var(--ok); }
.t-fail { background: var(--fail-bg); color: var(--fail-text); } .t-fail .t-dot { background: var(--fail); }
.t-info { background: var(--run-bg); color: var(--run-text); } .t-info .t-dot { background: var(--run); }
.t-warn { background: var(--warn-bg); color: var(--warn-text); } .t-warn .t-dot { background: var(--warn); }
.t-block { border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.t-block-title { font-size: 17px; line-height: 22px; font-weight: 600; }
.t-block-text { font-size: 14px; line-height: 20px; }
.t-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.t-kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; line-height: 20px; margin: 0; }
.t-kv dt { color: var(--text-3); }
.t-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.t-kv a { text-decoration: none; display: inline-block; padding: 12px 0; margin: -12px 0; }    /* 44 px to tap */
.t-id { display: flex; flex-direction: column; gap: 2px; }
.t-big { font-size: 22px; line-height: 28px; font-weight: 600; }
.t-ref { font: 13px/18px var(--font-mono); color: var(--text-3); }

/* ---- F1 interventions of the codes ---- */
.t-visit { width: 100%; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.t-visit.t-next { border: 2px solid var(--brand); padding: 13px 15px; }
.t-visit.t-sent { opacity: .6; }
.t-visit-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.t-slot { font: 600 14px/20px var(--font-mono); }
.t-customer { font-weight: 600; }
.t-address { font-size: 14px; color: var(--text-3); }
.t-pill { height: 20px; padding: 0 8px; border-radius: var(--r-pill); display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; white-space: nowrap; }
.t-pill-next { background: var(--brand-soft); color: var(--brand-soft-text); }
.t-pill-todo { background: var(--surface-2); color: var(--text-2); }
.t-pill-run { background: var(--run-bg); color: var(--run-text); }
.t-pill-warn { background: var(--warn-bg); color: var(--warn-text); }
.t-pill-ok { background: var(--ok-bg); color: var(--ok-text); }

/* ---- F1b / F1c code ---- */
.t-code-field { display: flex; flex-direction: column; gap: 8px; }
.t-code { position: relative; }
.t-code-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; font-size: 16px; z-index: 1; cursor: text; }
.t-cells { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.t-cell { height: 52px; border: 1px solid var(--border-strong); border-radius: var(--r-8); background: var(--surface); display: grid; place-items: center; font: 500 22px/28px var(--font-mono); }
.t-code-input:focus + .t-cells .t-cell-active { border: 2px solid var(--brand); box-shadow: 0 0 0 3px var(--t-halo); }
.t-code-wrong .t-cell { border-color: var(--fail); }

/* ---- F1d resume ---- */
.t-steps { padding: 0; overflow: hidden; }
.t-step { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--surface-2); }
.t-step:last-child { border-bottom: 0; }
.t-mark { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; }
.t-step-done .t-mark { background: var(--ok); }
.t-step-now .t-mark { border: 3px solid var(--brand); }
.t-step-todo .t-mark { border: 2px solid var(--border-strong); }
.t-step-name { flex: 1; }
.t-step-now .t-step-name { font-weight: 600; }
.t-step-value { font-size: 13px; color: var(--text-3); }
.t-step-now .t-step-value { color: var(--brand-soft-text); font-weight: 600; }

/* ---- map card (F2, F2b) ---- */
.t-map-card { padding: 0; overflow: hidden; }
.t-map { height: 130px; background: var(--surface-2); }
.t-map.leaflet-container { background: var(--surface-2); font: 9px/12px var(--font); }
.t-map .leaflet-control-attribution { font-size: 9px; line-height: 12px; padding: 1px 4px; color: var(--text-2); background: color-mix(in srgb, var(--surface) 85%, transparent); }
.t-legend { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; font-size: 14px; line-height: 20px; }
.t-legend-row { display: flex; gap: 10px; align-items: center; }
.t-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.t-legend-site { background: var(--fail); } .t-legend-you { background: var(--brand); }
.t-legend-text { flex: 1; min-width: 0; }
.t-legend-text b { font-weight: 600; }
/* a long name or address breaks inside the card at 360 px instead of pushing it wider */
.t-big, .t-title, .t-customer, .t-address, .t-legend-text { overflow-wrap: anywhere; }
.t-muted { color: var(--text-3); }
/* site pin: a drop of 26 px; Leaflet positions the icon element with a transform, the drop is drawn by ::before */
.pin { position: relative; }
.pin::before { content: ""; position: absolute; inset: 0; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--fail); border: 2px solid var(--t-white); box-shadow: 0 2px 6px rgba(0, 17, 27, .35); }
.pin::after { content: ""; position: absolute; left: 9px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--t-white); }
/* SVG layers of Leaflet: these properties win over the presentation attributes Leaflet writes */
.map-line { stroke: var(--text); stroke-opacity: .7; fill: none; }
.map-accuracy { fill: var(--brand); fill-opacity: .18; stroke: var(--brand); stroke-opacity: .5; }
.map-phone { fill: var(--brand); fill-opacity: 1; stroke: var(--t-white); stroke-opacity: 1; }

/* ---- F2c location help ---- */
.t-os { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; }
.t-os-name { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.t-os-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.t-os-step { font-size: 14px; line-height: 20px; }

/* ---- buttons of the test screens ---- */
.t-btn-danger { background: var(--t-danger); color: var(--t-white); }
.t-danger-link { width: 100%; height: 44px; border: 0; background: transparent; color: var(--fail); font: 600 15px/20px var(--font); cursor: pointer; }
.t-danger-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---- F3 / F3b / F3c photos ---- */
.t-section { display: flex; flex-direction: column; gap: 4px; }
.t-section-title { font-weight: 600; }
.t-section-count { font-size: 14px; line-height: 20px; }
.t-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.t-shot { aspect-ratio: 3 / 4; border-radius: var(--r-8); margin: 0; position: relative; overflow: hidden; min-width: 0; }
.t-shot img { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--text-2); }
.t-shot-time { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px; color: var(--t-white); font: 11px/14px var(--font-mono); background: linear-gradient(transparent, var(--t-veil)); }
.t-take { border: 1.5px dashed var(--skip); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--link); font-size: 12px; line-height: 16px; font-weight: 600; text-align: center; padding: 4px; cursor: pointer; }
.t-take:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.t-take.t-sending { color: var(--text-3); cursor: progress; }
.t-empty { border: 1px solid var(--border); background: var(--surface-2); }
.t-queued { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 6px; text-align: center; border: 1px dashed var(--border); background: var(--surface-2); color: var(--text-3); font-size: 12px; }

/* ---- F4 test in progress ---- */
.t-progress { display: flex; flex-direction: column; gap: 8px; }
.t-progress-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; }
.t-progress-essai { font-weight: 600; }
.t-bar { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border: 0; border-radius: 3px; background: var(--border); overflow: hidden; display: block; }
.t-bar::-webkit-progress-bar { background: var(--border); border-radius: 3px; }
.t-bar::-webkit-progress-value { background: var(--brand); border-radius: 3px; }
.t-bar::-moz-progress-bar { background: var(--brand); border-radius: 3px; }
.t-fams { padding: 0; overflow: hidden; }
.t-fam { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--surface-2); }
.t-fam:last-child { border-bottom: 0; }
.t-fam-mark { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; }
.t-mark-ok { background: var(--ok); } .t-mark-warn { background: var(--warn); } .t-mark-fail { background: var(--fail); }
.t-mark-inc { background: var(--inc); } .t-mark-skip { background: var(--skip); }
.t-mark-run { border: 3px solid var(--brand); border-right-color: var(--brand-soft); }
.t-mark-todo { border: 1.5px solid var(--skip); }
.t-fam-name { flex: 1; }
.t-fam-state { font-size: 13px; line-height: 18px; font-weight: 600; }
.t-fam-running .t-fam-name { font-weight: 600; }
.t-fam-running .t-fam-state { color: var(--brand-soft-text); }
.t-fam-pending .t-fam-name, .t-fam-pending .t-fam-state { color: var(--text-3); font-weight: 400; }
.t-fam-ok .t-fam-state { color: var(--ok-text); } .t-fam-warn .t-fam-state { color: var(--warn-text); }
.t-fam-fail .t-fam-state { color: var(--fail-text); } .t-fam-inc .t-fam-state { color: var(--inc-text); }
.t-fam-skip .t-fam-state { color: var(--text-3); }

/* ---- F4b / F4c / F4d result ---- */
.t-verdict { border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.t-verdict-title { font-size: 22px; line-height: 28px; font-weight: 600; }
.t-verdict-sub { font-size: 14px; line-height: 20px; }
.t-verdict-ok { background: var(--ok-bg); color: var(--ok-text); }
.t-verdict-warn { background: var(--warn-bg); color: var(--warn-text); }
.t-verdict-fail { background: var(--fail-bg); color: var(--fail-text); }
.t-verdict-inc { background: var(--inc-bg); color: var(--inc-text); }
.t-lines { display: flex; flex-direction: column; gap: 4px; }
.t-support-ref { display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 20px; }
.t-support-ref .t-strong { font-weight: 600; overflow-wrap: anywhere; }
.t-support-ref .t-btn { margin-top: 6px; }
.t-caps { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.t-line { display: flex; flex-direction: column; gap: 4px; }
.t-line + .t-line { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--surface-2); }
.t-line-title { font-weight: 600; overflow-wrap: anywhere; }
.t-line-code { font-family: var(--font-mono); color: var(--text-3); }
.t-line-text { font-size: 14px; line-height: 20px; color: var(--text-2); }
.t-rates dd { font-family: var(--font-mono); font-weight: 500; }

/* ---- F5 / F5c departure, F5b / F5d end ---- */
.t-note { padding: 14px 16px; font-size: 14px; line-height: 20px; color: var(--text-2); }
.t-note b { color: var(--text); font-weight: 600; }
.t-banner.t-plain { font-weight: 400; }
.t-end .t-body { padding-top: calc(72px + env(safe-area-inset-top)); }
.t-end-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; }
.t-end-title { display: flex; flex-direction: column; gap: 4px; }
.t-end-heading { margin: 0; font-size: 24px; line-height: 30px; font-weight: 600; }
.t-recap .mono { font-weight: 500; }
.t-recap .t-strong { font-weight: 600; }

/* ---- F4e bottom sheet over the screen ---- */
.t-veil { position: fixed; inset: 0; z-index: 1000; background: var(--t-veil); display: flex; align-items: flex-end; justify-content: center; }
.t-sheet { width: 100%; max-width: 480px; max-height: 100%; overflow-y: auto; background: var(--surface); border-radius: var(--r-16) var(--r-16) 0 0; padding: 20px 20px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.t-sheet-title { margin: 0; font-size: 20px; line-height: 26px; font-weight: 600; }
.t-sheet-text { margin: 0; color: var(--text-2); font-size: 15px; line-height: 20px; }
.t-sheet-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }

/* ---- six steps, sending banner (2026-11-12) ---- */
.t-stepbar { display: flex; gap: 4px; margin-top: 8px; }
.t-seg { flex: 1; height: 4px; border-radius: 2px; background: var(--border); }
.t-seg-done { background: var(--brand); }
.t-seg-now { background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.t-send { display: flex; align-items: center; gap: 8px; padding: 8px 20px; font-size: 13px; line-height: 18px; font-weight: 600; }
.t-send-wait { background: var(--warn-bg); color: var(--warn-text); }
.t-send-ok { background: var(--ok-bg); color: var(--ok-text); } .t-send-ok .t-dot { background: var(--ok); }
.t-send-wait .t-dot { background: var(--warn); }
.t-slot-notice { padding: 12px 20px 0; }
.t-spin { width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; flex-shrink: 0; animation: t-turn 1s linear infinite; }
.t-spin-big { width: 24px; height: 24px; border-width: 3px; }
.t-preparing { margin-top: 8px; }
@keyframes t-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .t-spin { animation: none; } }
.t-end .t-stepbar { margin-top: 4px; }

/* ---- installation, photos, router wait, sending card ---- */
.t-card-title { margin: 0 0 8px; font-size: 15px; line-height: 20px; font-weight: 600; }
.t-todo-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 20px; }
.t-todo-list li::marker { font-weight: 600; color: var(--link); }
.t-list-plain { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 20px; }
.t-why { font-size: 14px; line-height: 20px; color: var(--text-2); background: var(--surface); border-left: 3px solid var(--brand); padding: 10px 12px; border-radius: 4px; }
.t-why b { color: var(--text); font-weight: 600; }
.t-shot-time { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.t-chip { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: var(--r-pill); font: 600 11px/14px var(--font); white-space: nowrap; }
.t-chip-ok { background: var(--ok-bg); color: var(--ok-text); }
.t-chip-wait { background: var(--warn-bg); color: var(--warn-text); }
.t-timer { font-size: 36px; line-height: 44px; font-weight: 600; text-align: center; }
.t-rows { display: flex; flex-direction: column; gap: 10px; }
.t-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; }
.t-row b { font-weight: 600; white-space: nowrap; }
.t-row .t-pill { gap: 6px; flex-shrink: 0; }
