/* Hallmark · v2.0.0 · theme: custom (brand: SOCAR AG, spec 2026-11-06) · scope: app
   critique: une application de conducteur, pas un tableau de bord ; l'attestation est l'écran principal, chaque action tient en un pouce.
   answered: Impeccable « overused-font » : Montserrat est la police déclarée par la marque (brand spec), gardée pour titres et actions ; le texte courant est en Instrument Sans.
   SOCAR AG · application (maquette). Tokens : ../commun/tokens.css ; attestation : ../commun/attestation.css */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; background: var(--brume); }
body {
  overflow-x: clip; margin: 0; color: var(--nuit); background: var(--brume);
  font: 500 var(--t-s)/1.5 var(--police-texte); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, legend { margin: 0; font-family: var(--police); letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
svg:not(.qr) { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 10px; }
[hidden] { display: none !important; }
.visuel-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Sur ordinateur, l'application tient dans une colonne de téléphone, sans faux cadre. */
.app { position: relative; max-width: 430px; min-height: 100dvh; margin: 0 auto; background: var(--papier); display: flex; flex-direction: column; }
@media (min-width: 600px) { .app { border-inline: 1px solid var(--filet); } }

/* ---------- Barre du haut ---------- */
.barre {
  position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center;
  padding: calc(env(safe-area-inset-top) + 0.4rem) 0.75rem 0.4rem; background: var(--papier); border-bottom: 1px solid var(--filet);
}
.barre-titre { grid-column: 2; text-align: center; font-size: 1.0625rem; font-weight: 800; }
.barre-retour, .barre-appel {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 0; background: none; color: var(--bleu); cursor: pointer;
}
.barre-retour { grid-column: 1; grid-row: 1; }
.barre-appel { grid-column: 3; color: var(--rouge); }
.barre-retour:active, .barre-appel:active { background: var(--brume); }

.ecrans { flex: 1; }
.ecran { padding: 1.25rem 1.1rem calc(6.5rem + env(safe-area-inset-bottom)); display: grid; gap: 1.1rem; align-content: start; }
@media (prefers-reduced-motion: no-preference) { .ecran:not([hidden]) { animation: entre 0.28s var(--ease); } }
@keyframes entre { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 52px; padding: 0.75rem 1.3rem;
  border-radius: var(--r-bouton); border: 2px solid transparent; font: 700 var(--t-s)/1.2 var(--police);
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color 0.15s var(--ease), transform 0.1s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-plein { width: 100%; }
.btn-rouge { background: var(--rouge); color: var(--papier); }
.btn-rouge:hover { background: var(--rouge-fonce); }
.btn-bleu { background: var(--bleu); color: var(--papier); }
.btn-bleu:hover { background: var(--bleu-fonce); }
.btn-contour { border-color: var(--filet); color: var(--bleu); background: var(--papier); }
.btn-contour:hover { border-color: var(--bleu); }
.btn[disabled] { background: var(--filet); color: var(--texte-doux); cursor: not-allowed; }

/* ---------- Accueil ---------- */
/* Bandeau d'accueil : la rue de Bujumbura sous un voile nuit, comme l'ouverture du site (inspiration ICC). */
.une {
  display: grid; gap: 1.1rem; margin: -1.25rem -1.1rem 0; padding: 1.4rem 1.1rem 1.25rem;
  background: linear-gradient(180deg, var(--voile-fort), var(--voile-moyen)), url("../commun/ville-1200.webp") 30% 85% / cover var(--nuit);
}
.salut { font-size: 1.0625rem; color: var(--sur-nuit-texte); }
.salut b { color: var(--papier); font-family: var(--police); font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.carte-vehicule {
  display: grid; gap: 0.45rem; padding: 1.1rem 1.15rem; border-radius: var(--r-bloc); text-decoration: none;
  background: var(--bleu); color: var(--papier); box-shadow: var(--ombre-carte);
}
.carte-vehicule:active { transform: scale(0.99); }
.cv-tete { display: flex; justify-content: space-between; align-items: center; }
.cv-plaque { font-family: var(--police); font-weight: 800; letter-spacing: 0.08em; padding: 0.15rem 0.55rem; border-radius: 5px; background: var(--papier); color: var(--nuit); font-variant-numeric: tabular-nums; }
.cv-nom { font-family: var(--police); font-weight: 800; font-size: 1.1875rem; letter-spacing: -0.01em; margin-top: 0.3rem; }
.cv-echeance { color: var(--sur-bleu-texte); font-size: 0.9375rem; }
.cv-echeance b { color: var(--papier); }
.cv-lien { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.4rem; padding-top: 0.75rem; border-top: 1px solid var(--sur-bleu-filet); font-weight: 700; }
.pastille { font-size: 0.8125rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 999px; }
.pastille-ok { background: var(--vert-pale); color: var(--vert); }
.pastille-encours { background: var(--ambre-pale); color: var(--ambre); }

.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
.actions a {
  display: grid; gap: 0.6rem; align-content: start; min-height: 96px; padding: 0.95rem; border-radius: var(--r-bloc);
  background: var(--brume); color: var(--nuit); font: 700 var(--t-s)/1.3 var(--police); text-decoration: none;
  transition: background-color 0.15s var(--ease);
}
.actions a:hover { background: var(--brume-forte); }
.actions a:active { transform: scale(0.98); }
.actions svg { color: var(--bleu); width: 26px; height: 26px; }
/* Teintes de la mosaïque du site (inspiration MLK) */
.actions a:nth-child(1) { background: var(--bleu); color: var(--papier); }
.actions a:nth-child(1) svg { color: var(--papier); }
.actions a:nth-child(1):hover { background: var(--bleu-fonce); }
.actions a:nth-child(2) { background: var(--rouge-pale); }
.actions a:nth-child(2) svg { color: var(--rouge-fonce); }
.actions a:nth-child(3) { background: var(--bleu-tuile); }
.actions a:nth-child(4) { background: var(--nuit); color: var(--papier); }
.actions a:nth-child(4) svg { color: var(--papier); }

.titre-section { font-size: 1.125rem; font-weight: 800; margin-top: 0.6rem; }
.vide { display: grid; gap: 0.9rem; padding: 1.1rem; border: 1.5px dashed var(--filet); border-radius: var(--r-bloc); color: var(--texte-doux); }
.sinistre-carte { display: grid; gap: 0.35rem; padding: 1rem 1.1rem; border-radius: var(--r-bloc); background: var(--brume); color: var(--nuit); text-decoration: none; }
.sinistre-carte span:first-child { display: flex; justify-content: space-between; align-items: center; font-weight: 800; }
.sinistre-carte small { color: var(--texte-doux); font-size: 0.875rem; }
.note-demo { font-size: 0.8125rem; color: var(--texte-doux); text-align: center; margin-top: 0.5rem; }
.lien-sortir { padding: 0; border: 0; background: none; color: var(--bleu); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.carte-vehicule.expire { background: var(--rouge-fonce); }
.pastille-alerte { background: var(--rouge-pale); color: var(--rouge-fonce); }
.aide { font-size: 0.875rem; color: var(--texte-doux); }

/* ---------- Attestation dans l'application ---------- */
.att-app { box-shadow: var(--ombre-douce); border: 1px solid var(--filet); border-top: 6px solid var(--bleu); }
.att-app .qr { width: 84px; height: 84px; }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 1.4rem; }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 0.7rem; min-width: 0; }
legend { font-weight: 800; font-size: 1.0625rem; margin-bottom: 0.7rem; padding: 0; }
.choix { display: grid; gap: 0.55rem; }
.choix-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choix label { position: relative; display: block; cursor: pointer; }
.choix input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choix span {
  display: grid; gap: 0.15rem; min-height: 56px; align-content: center; padding: 0.8rem 1rem; border-radius: 12px;
  border: 2px solid var(--filet); font-weight: 700; transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.choix small { font-weight: 500; color: var(--texte-doux); font-size: 0.8125rem; }
.choix .prix { font-family: var(--police); font-variant-numeric: tabular-nums; font-size: 1.0625rem; color: var(--nuit); font-weight: 800; }
.choix-duree span { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.choix label:hover span { border-color: var(--filet-fort); }
.choix input:checked + span { border-color: var(--bleu); background: var(--bleu-pale); }
.choix input:focus-visible + span { box-shadow: var(--focus); }
.champ { display: grid; gap: 0.4rem; font-weight: 700; font-size: 0.9375rem; }
.champ input, .champ select, .champ textarea, .recherche input {
  font: 500 var(--t-m)/1.4 var(--police-texte); color: var(--nuit); background: var(--brume); width: 100%;
  border: 2px solid transparent; border-radius: 12px; padding: 0.8rem 0.9rem; min-height: 52px;
}
.champ input:focus-visible, .champ select:focus-visible, .champ textarea:focus-visible, .recherche input:focus-visible { background: var(--papier); box-shadow: var(--focus); }
::placeholder { color: var(--indice); }
.ajout-photo {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 88px; cursor: pointer;
  border: 2px dashed var(--filet-fort); border-radius: var(--r-bloc); color: var(--bleu); font-weight: 700; background: var(--fond-ajout);
}
.ajout-photo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ajout-photo:focus-within { box-shadow: var(--focus); }
.vignettes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.45rem; }
.vignettes:empty { display: none; }
.vignettes img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.erreur { color: var(--rouge-fonce); font-weight: 600; min-height: 1.2em; }
.ok { color: var(--vert); font-weight: 600; min-height: 1.2em; }

/* ---------- Confirmation et suivi ---------- */
.confirm { display: grid; justify-items: center; text-align: center; gap: 0.7rem; padding: 1.5rem 0 0.5rem; }
.confirm-rond { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--vert-pale); color: var(--vert); }
.confirm-rond svg { width: 36px; height: 36px; stroke-width: 2.4; }
.confirm h2 { font-size: 1.5rem; font-weight: 800; }
.confirm p { color: var(--texte-doux); max-width: 30ch; }
.dossier { padding: 1.1rem; border-radius: var(--r-bloc); background: var(--brume); display: grid; gap: 0.3rem; }
.dossier-num { font-size: 0.9375rem; color: var(--texte-doux); }
.dossier-num b { color: var(--nuit); font-family: var(--police); font-size: 1.25rem; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.frise { list-style: none; margin: 0.3rem 0 0.4rem; padding: 0; display: grid; }
.frise li { position: relative; padding: 0 0 1.4rem 2.2rem; display: grid; gap: 0.15rem; }
.frise li::before { content: ""; position: absolute; left: 0.45rem; top: 0.35rem; width: 0.9rem; height: 0.9rem; border-radius: 50%; border: 2.5px solid var(--filet); background: var(--papier); }
.frise li:not(:last-child)::after { content: ""; position: absolute; left: calc(0.9rem - 1px); top: 1.4rem; bottom: 0.1rem; width: 2px; background: var(--filet); }
.frise li.fait::before { background: var(--vert); border-color: var(--vert); }
.frise li.fait::after { background: var(--vert); }
.frise li.encours::before { border-color: var(--bleu); box-shadow: 0 0 0 4px var(--bleu-halo); }
.frise b { font-weight: 800; }
.frise span { color: var(--texte-doux); font-size: 0.9375rem; }
.frise li:not(.fait):not(.encours) b { color: var(--texte-doux); }

/* ---------- Agences ---------- */
.recherche { position: sticky; top: calc(env(safe-area-inset-top) + 61px); z-index: 5; background: var(--papier); padding: 0.3rem 0 0.6rem; margin-top: -0.3rem; }
.zone h2 { font-size: 1.375rem; font-weight: 800; margin: 1rem 0 0.3rem; }
.agence { display: grid; gap: 0.2rem; padding: 0.95rem 0; border-top: 1px solid var(--filet); }
.agence h3 { font-size: 1.0625rem; font-weight: 800; }
.agence p { color: var(--texte-doux); font-size: 0.875rem; }
.agence-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.55rem; }
.agence-actions .btn { min-height: 46px; padding: 0.55rem 0.8rem; font-size: 0.9375rem; }
.agence-actions .appel { background: var(--rouge); color: var(--papier); font-variant-numeric: tabular-nums; }
.vide-recherche { color: var(--texte-doux); padding: 1rem 0; }

/* ---------- Onglets ---------- */
.onglets {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 430px); z-index: 10;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom)); background: var(--papier); border-top: 1px solid var(--filet);
}
@media (min-width: 600px) { .onglets { border-inline: 1px solid var(--filet); } }
.onglets a {
  display: grid; justify-items: center; gap: 0.2rem; min-height: 52px; padding: 0.35rem 0; border-radius: 12px;
  font-size: 0.75rem; font-weight: 700; color: var(--texte-doux); text-decoration: none;
}
.onglets a[aria-current="page"] { color: var(--bleu); }
.onglets a[aria-current="page"] svg { stroke-width: 2.3; }

/* ---------- Mode police : QR en grand, fond blanc ---------- */
.police {
  position: fixed; inset: 0; z-index: 30; background: var(--papier); display: grid; place-content: center; justify-items: center;
  gap: 1.2rem; padding: 2rem 1.5rem; text-align: center;
}
.police-plaque { font-family: var(--police); font-weight: 800; font-size: 2rem; letter-spacing: 0.08em; border: 3px solid var(--nuit); border-radius: 8px; padding: 0.2rem 1rem; }
.police-qr svg, .police-qr .qr { width: min(70vw, 300px); height: auto; }
.police .btn { max-width: 320px; }

@media (prefers-reduced-motion: reduce) { .btn, .actions a, .choix span { transition: none; } }
