/* =========================================================
   Flex Ride — feuille de style PWA (mobile d'abord)
   Identité : bleu marine et orange du logo Flex Ride
   (les noms de variables « asphalte » et « marquage » sont conservés
    pour ne pas toucher aux règles existantes)
   ========================================================= */
:root {
  --asphalte: #012C5D;      /* bleu marine Flex Ride */
  --asphalte-2: #0A4A8F;
  --marquage: #F58A07;      /* orange Flex Ride */
  --marquage-fonce: #DD6C00;
  --vert-marque: #4A9A1C;
  --fond: #F3F5F9;
  --surface: #FFFFFF;
  --texte: #0E1E33;
  --texte-doux: #56657A;
  --bordure: #D6DCE6;
  --vert: #1E8A5A;
  --rouge: #C2362B;
  --bleu: #2D6A9F;
  --rayon: 10px;
  --police: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nav-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #0B1525;
    --surface: #13213A;
    --texte: #ECF0F6;
    --texte-doux: #A6B3C6;
    --bordure: #2A3B58;
    --vert: #4CC08A;
    --rouge: #F07468;
    --bleu: #7DB3E3;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--police);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--texte);
  background: var(--fond);
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
}
body.sans-nav { padding-bottom: 0; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--marquage); outline-offset: 2px; }
h1, h2 { line-height: 1.2; margin: 0 0 .75rem; }

/* ---------- Marque : bande de marquage au sol ---------- */
.marque {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em;
  text-decoration: none; margin: 0;
}
.marque-bande {
  width: 26px; height: 6px; border-radius: 1px;
  background: repeating-linear-gradient(90deg, var(--marquage) 0 9px, transparent 9px 13px);
}
.marque-grande { font-size: 1.6rem; }
.marque-grande .marque-bande { width: 40px; height: 8px; }

/* ---------- En-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(.75rem + env(safe-area-inset-top, 0px)) 1rem .75rem;
  background: var(--asphalte); color: #fff;
}
.entete form { margin: 0; }
.entete-lien {
  background: none; border: 0; color: #C9D0D5; font: inherit; font-size: .9rem;
  padding: .4rem 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}

.contenu { max-width: 640px; margin: 0 auto; padding: 1.25rem 1rem 2rem; }
.sans-nav .contenu { padding: 0; max-width: none; }
.titre-page { font-size: 1.5rem; font-weight: 800; }
.titre-section { font-size: 1.1rem; font-weight: 700; margin-top: 2rem; }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 1.25rem; width: 100%;
  border: 2px solid transparent; border-radius: var(--rayon);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.bouton-plein { background: var(--marquage); color: var(--asphalte); }
.bouton-plein:hover { background: var(--marquage-fonce); }
.bouton-clair { background: var(--asphalte); color: #fff; border-color: rgba(255,255,255,.4); }
.bouton-petit { width: auto; min-height: 40px; font-size: .95rem; }
.bouton-installer {
  margin-top: 1rem; background: transparent; color: var(--marquage);
  border: 2px dashed var(--marquage);
}
.lien-discret { color: #C9D0D5; font-size: .95rem; text-align: center; padding: .5rem; background: var(--asphalte); }

/* ---------- Page d'accueil publique : la route ---------- */
.accueil {
  position: relative; min-height: 100dvh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(2rem + env(safe-area-inset-top, 0px)) 1.5rem calc(2rem + env(safe-area-inset-bottom, 0px));
  background: var(--asphalte); color: #fff;
}
.route {
  position: absolute; top: 0; bottom: 0; right: 18%; width: 10px;
  background: repeating-linear-gradient(180deg, var(--marquage) 0 56px, transparent 56px 96px);
  opacity: .9; animation: defiler 1.6s linear infinite;
}
@keyframes defiler { to { background-position: 0 96px; } }
@media (prefers-reduced-motion: reduce) { .route { animation: none; } }
.accueil-texte { position: relative; max-width: 30ch; }
.accueil h1 { font-size: clamp(1.9rem, 7vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; margin-top: 3rem; }
.accueil-sous { color: #C9D0D5; font-size: 1.05rem; }
.accueil-actions { position: relative; display: grid; gap: .75rem; max-width: 420px; }

/* ---------- Authentification ---------- */
.auth { max-width: 440px; margin: 0 auto; padding: calc(1.5rem + env(safe-area-inset-top, 0px)) 1.25rem 3rem; }
.auth h1 { font-size: 1.75rem; font-weight: 800; margin-top: 2rem; }
.auth-bas { text-align: center; color: var(--texte-doux); margin-top: 1.5rem; }
.auth-bas a { color: var(--texte); font-weight: 700; }

/* ---------- Formulaires ---------- */
.formulaire { display: grid; gap: 1rem; }
.champ { display: grid; gap: .35rem; }
.champ > span:first-child { font-weight: 600; font-size: .95rem; }
.champ small { font-weight: 400; color: var(--texte-doux); }
input[type="text"], input:not([type]), input[type="tel"], input[type="email"],
input[type="password"], input[type="datetime-local"], select, textarea {
  width: 100%; min-height: 48px; padding: .6rem .8rem;
  font: inherit; font-size: 16px; /* évite le zoom iOS */
  color: var(--texte); background: var(--surface);
  border: 1.5px solid var(--bordure); border-radius: var(--rayon);
}
input:focus { border-color: var(--asphalte-2); outline: 3px solid var(--marquage); outline-offset: 0; }
input[aria-invalid="true"] { border-color: var(--rouge); }
.champ-tel { display: flex; }
.champ-tel .indicatif {
  display: grid; place-items: center; padding: 0 .75rem; font-weight: 600;
  background: var(--asphalte); color: #fff; border-radius: var(--rayon) 0 0 var(--rayon);
}
.champ-tel input { border-radius: 0 var(--rayon) var(--rayon) 0; }
.champ-erreur { color: var(--rouge); font-size: .9rem; }
.aide { color: var(--texte-doux); font-size: .85rem; }
.ligne-2 { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 380px) { .ligne-2 { grid-template-columns: 1fr; } }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: .95rem; margin-bottom: .5rem; }
.case { display: flex; gap: .6rem; align-items: flex-start; }
.case input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--asphalte); }

.choix-role { display: grid; gap: .6rem; }
.choix { position: relative; display: block; cursor: pointer; }
.choix input { position: absolute; opacity: 0; }
.choix > span {
  display: grid; gap: .1rem; padding: .85rem 1rem;
  border: 1.5px solid var(--bordure); border-radius: var(--rayon); background: var(--surface);
}
.choix small { color: var(--texte-doux); }
.choix input:checked + span { border-color: var(--asphalte); box-shadow: inset 6px 0 0 var(--marquage); }
.choix input:focus-visible + span { outline: 3px solid var(--marquage); }
.segment { display: flex; gap: 1.25rem; }
.segment label { display: flex; gap: .4rem; align-items: center; }
.bloc-loueur { display: grid; gap: 1rem; padding: 1rem; border-radius: var(--rayon); background: var(--surface); border: 1.5px dashed var(--bordure); }
[hidden] { display: none !important; }

/* ---------- Messages ---------- */
.alerte { padding: .8rem 1rem; border-radius: var(--rayon); margin-bottom: 1rem; border-left: 5px solid; background: var(--surface); }
.alerte-succes { border-color: var(--vert); }
.alerte-erreur { border-color: var(--rouge); }
.alerte-info { border-color: var(--bleu); }
.alerte-lien { display: block; text-decoration: none; font-weight: 600; }
.encart { padding: 1rem; border-radius: var(--rayon); background: var(--surface); margin-bottom: 1.25rem; }
.encart p { margin: 0 0 .5rem; }
.encart-action { border: 2px solid var(--marquage); }

/* ---------- Tableaux de bord ---------- */
.chiffres { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 0 0 1rem; }
.chiffres > div { background: var(--surface); border-radius: var(--rayon); padding: 1rem; }
.chiffres > div:first-child { grid-column: 1 / -1; background: var(--asphalte); color: #fff; }
.chiffres dt { font-size: .9rem; color: var(--texte-doux); }
.chiffres > div:first-child dt { color: #C9D0D5; }
.chiffres dd { margin: .2rem 0 0; font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.chiffres > div:first-child dd { font-size: 2rem; color: var(--marquage); }
.chiffres small { font-size: .9rem; font-weight: 600; }

.recherche { display: grid; gap: 1rem; background: var(--surface); padding: 1rem; border-radius: var(--rayon); }
.categories { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.categories a {
  display: block; padding: .55rem .95rem; border-radius: 999px; text-decoration: none;
  background: var(--surface); border: 1.5px solid var(--bordure); font-weight: 600;
}
.liste-taches { list-style: none; padding: 0; margin: 0; background: var(--surface); border-radius: var(--rayon); }
.liste-taches li + li { border-top: 1px solid var(--bordure); }
.liste-taches a { display: flex; justify-content: space-between; align-items: center; padding: 1rem; text-decoration: none; font-weight: 600; }
.pastille { min-width: 2rem; text-align: center; padding: .1rem .55rem; border-radius: 999px; background: var(--marquage); color: var(--asphalte); font-weight: 800; }
.vide { text-align: center; padding: 2.5rem 1rem; display: grid; gap: .75rem; justify-items: center; }
.vide .bouton { width: auto; }

/* ---------- Barre d'onglets ---------- */
.onglets {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--asphalte);
}
.onglet {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
  color: #A9B3BA; text-decoration: none; font-size: .75rem; font-weight: 600; position: relative;
}
.onglet svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.onglet.actif { color: #fff; }
.onglet.actif::before {
  content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px;
  background: repeating-linear-gradient(90deg, var(--marquage) 0 8px, transparent 8px 12px);
}

.hors-ligne {
  position: fixed; left: 1rem; right: 1rem; bottom: calc(var(--nav-h) + 1rem + env(safe-area-inset-bottom, 0px));
  z-index: 40; padding: .75rem 1rem; border-radius: var(--rayon);
  background: var(--rouge); color: #fff; font-weight: 600; text-align: center;
}
.sans-nav .hors-ligne { bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); }

/* =========================================================
   Étape 3 — Espace loueur et flotte
   ========================================================= */
.retour { display: inline-block; margin-bottom: .75rem; color: var(--texte-doux); text-decoration: none; font-weight: 600; }
.titre-ligne { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.titre-ligne .titre-page { margin: 0; }
.titre-page small { font-weight: 500; color: var(--texte-doux); font-size: .7em; }
.aide-page { color: var(--texte-doux); margin-top: -.25rem; }
.bouton-contour { background: transparent; color: var(--texte); border-color: var(--bordure); }
.bouton-danger { background: transparent; color: var(--rouge); border-color: transparent; text-decoration: underline; text-underline-offset: 3px; }
.bouton:disabled { opacity: .45; cursor: not-allowed; }
.majuscules { text-transform: uppercase; }
textarea { resize: vertical; }
.groupe { display: grid; gap: 1rem; padding: 1rem; background: var(--surface); border-radius: var(--rayon); }
.groupe legend { float: left; width: 100%; font-size: 1.05rem; font-weight: 700; margin: 0; }
.case-centree { align-self: end; min-height: 48px; align-items: center; }

/* Badges de statut */
.badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.badge-ok { background: color-mix(in srgb, var(--vert) 16%, transparent); color: var(--vert); }
.badge-attente { background: color-mix(in srgb, var(--marquage) 24%, transparent); color: var(--texte); }
.badge-ko { background: color-mix(in srgb, var(--rouge) 14%, transparent); color: var(--rouge); }
.badge-neutre { background: color-mix(in srgb, var(--texte-doux) 16%, transparent); color: var(--texte-doux); }

/* Plaque d'immatriculation */
.plaque {
  display: inline-block; padding: .05rem .45rem; border: 1.5px solid var(--texte); border-radius: 4px;
  font-weight: 700; font-size: .85rem; letter-spacing: .04em; background: var(--surface); width: fit-content;
}

/* Liste des véhicules */
.liste-vehicules { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.carte-vehicule { display: flex; gap: .9rem; padding: .75rem; background: var(--surface); border-radius: var(--rayon); text-decoration: none; }
.carte-photo {
  flex: 0 0 104px; height: 84px; border-radius: 8px; overflow: hidden;
  display: grid; place-items: center; background: var(--fond); color: var(--texte-doux);
}
.carte-photo img { width: 100%; height: 100%; object-fit: cover; }
.carte-photo svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.carte-texte { display: grid; gap: .25rem; align-content: start; }
.carte-texte small { font-weight: 500; color: var(--texte-doux); }

/* Fiche véhicule */
.fiche-entete { margin-bottom: 1rem; }
.fiche-photo { margin: 0 -1rem 1rem; aspect-ratio: 16 / 10; background: var(--asphalte); overflow: hidden; }
.fiche-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fiche-sans-photo { display: grid; place-items: center; height: 100%; color: var(--marquage); font-weight: 700; border: 2px dashed var(--marquage); }
.fiche-meta { display: flex; gap: .5rem; align-items: center; margin: 0; }
.etapes { list-style: none; padding: 0; margin: .5rem 0 1rem; display: grid; gap: .5rem; }
.etapes li { display: flex; gap: .6rem; align-items: center; }
.etapes li::before {
  content: ""; flex: 0 0 20px; height: 20px; border-radius: 50%; border: 2px solid var(--bordure);
}
.etapes li.fait::before { border-color: var(--vert); background: var(--vert) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 100%; }
.etapes small { color: var(--texte-doux); }
.menu-fiche { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: 1rem 0; }
.menu-fiche a {
  display: grid; justify-items: center; gap: .3rem; padding: .8rem .25rem; text-align: center;
  background: var(--surface); border-radius: var(--rayon); text-decoration: none; font-size: .85rem; font-weight: 600;
}
.menu-fiche small { color: var(--texte-doux); font-weight: 500; }
.menu-fiche svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.caracteristiques { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--bordure); border-radius: var(--rayon); overflow: hidden; margin: 0; }
.caracteristiques > div { background: var(--surface); padding: .7rem .9rem; }
.caracteristiques dt { font-size: .85rem; color: var(--texte-doux); }
.caracteristiques dd { margin: 0; font-weight: 700; }
.actions-bas { display: grid; gap: .5rem; margin-top: 2rem; }
.ligne-info { display: grid; }
.ligne-info small { color: var(--texte-doux); }
.liste-taches li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.liste-taches li > .ligne-info { padding: .85rem 1rem; }
.liste-taches li form { padding-right: 1rem; }
.lien-action { background: none; border: 0; padding: .4rem; font: inherit; font-weight: 700; color: var(--rouge); cursor: pointer; }

/* Envoi de photos */
.zone-envoi { display: grid; gap: .75rem; margin-bottom: 1.25rem; }
.depot {
  position: relative; display: grid; justify-items: center; gap: .3rem; padding: 1.5rem 1rem; text-align: center;
  border: 2px dashed var(--marquage); border-radius: var(--rayon); background: var(--surface); cursor: pointer;
}
.depot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.depot:focus-within { outline: 3px solid var(--marquage); outline-offset: 2px; }
.depot svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.depot span { font-weight: 700; }
.depot small { color: var(--texte-doux); }
.galerie { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.galerie li { position: relative; background: var(--surface); border-radius: var(--rayon); overflow: hidden; }
.galerie li.principale { grid-column: 1 / -1; }
.galerie img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.galerie-badge { position: absolute; top: .5rem; left: .5rem; background: var(--surface); }
.galerie-actions { display: flex; justify-content: space-between; gap: .25rem; padding: .25rem .4rem; }
.galerie-actions button { background: none; border: 0; padding: .45rem .3rem; font: inherit; font-size: .85rem; font-weight: 600; color: var(--texte); cursor: pointer; }
.galerie-actions .danger { color: var(--rouge); margin-left: auto; }

/* Documents */
.doc-bloc { background: var(--surface); border-radius: var(--rayon); padding: 1rem; margin-bottom: .75rem; }
.doc-tete { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.doc-tete h2 { font-size: 1.05rem; margin: 0; }
.doc-info { color: var(--texte-doux); font-size: .9rem; margin: .5rem 0 0; }
.doc-bloc details { margin-top: .75rem; }
.doc-bloc summary, .summary-titre { cursor: pointer; font-weight: 700; padding: .25rem 0; }
.doc-form { margin-top: .75rem; }
input[type="file"] { font: inherit; font-size: .95rem; }

/* Calendrier */
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.cal-nav h2 { margin: 0; font-size: 1.15rem; }
.cal-nav a { display: grid; place-items: center; width: 44px; height: 44px; font-size: 1.6rem; text-decoration: none; border-radius: 50%; background: var(--surface); }
.calendrier { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-entete { text-align: center; font-size: .8rem; font-weight: 700; color: var(--texte-doux); padding: .25rem 0; }
.cal-jour {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px;
  font-weight: 600; font-variant-numeric: tabular-nums; background: var(--surface);
}
.cal-reserve { background: var(--asphalte); color: var(--marquage); }
.cal-bloque {
  color: var(--texte-doux);
  background: repeating-linear-gradient(135deg, var(--surface) 0 5px, color-mix(in srgb, var(--texte-doux) 22%, var(--surface)) 5px 8px);
}
.cal-aujourdhui { box-shadow: inset 0 0 0 2px var(--marquage); }
.cal-passe { opacity: .45; }
.cal-legende { list-style: none; display: flex; gap: 1rem; padding: 0; margin: .75rem 0 1.25rem; font-size: .9rem; color: var(--texte-doux); }
.cal-legende li { display: flex; align-items: center; gap: .4rem; }
.cal-pastille { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--bordure); }
.caracteristiques > div:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* =========================================================
   Étape 4 — Back-office de validation
   ========================================================= */
.entete-droite { display: flex; align-items: center; gap: .9rem; }
.cloche { position: relative; display: grid; place-items: center; width: 40px; height: 40px; color: #fff; }
.cloche svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cloche-nb {
  position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: var(--marquage); color: var(--asphalte); font-size: .7rem; font-weight: 800; display: grid; place-items: center;
}
.sous-onglets { display: flex; gap: .4rem; margin-bottom: 1rem; overflow-x: auto; }
.sous-onglets a {
  display: flex; align-items: center; gap: .4rem; padding: .5rem .85rem; border-radius: 999px; white-space: nowrap;
  background: var(--surface); text-decoration: none; font-weight: 700; border: 1.5px solid var(--bordure);
}
.sous-onglets a.actif { background: var(--asphalte); color: #fff; border-color: var(--asphalte); }
.ligne-lien { display: flex; justify-content: space-between; align-items: center; gap: .75rem; width: 100%; padding: .85rem 1rem; text-decoration: none; }
.ligne-lien .ligne-info { padding: 0; }
.lien-bloc { display: flex; justify-content: space-between; align-items: center; gap: .75rem; text-decoration: none; }
.texte-ko { color: var(--rouge); }
.bouton-ok { background: var(--vert); color: #fff; }
.bouton-ko { background: var(--rouge); color: #fff; }
.adoc { background: var(--surface); border-radius: var(--rayon); padding: 1rem; margin-bottom: .75rem; }
.adoc h3 { font-size: 1rem; margin: 0; }
.adoc-titulaire { margin: .15rem 0 0; color: var(--texte-doux); font-size: .9rem; }
.adoc-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.adoc-actions form { margin: 0; }
.refus { margin-top: .75rem; }
.refus summary { cursor: pointer; font-weight: 700; color: var(--rouge); padding: .25rem 0; }
.refus .formulaire { margin-top: .75rem; }
.decision { margin-top: 1.5rem; display: grid; gap: .5rem; }
.decision .titre-section { margin-top: 0; }
.defilant { display: flex; gap: .5rem; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -1rem 1rem; padding: 0 1rem; }
.defilant a { flex: 0 0 85%; scroll-snap-align: center; }
.defilant img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--rayon); display: block; }
.liste-notifs { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.notif { display: grid; gap: .2rem; padding: .9rem 1rem; background: var(--surface); border-radius: var(--rayon); text-decoration: none; }
.notif small { color: var(--texte-doux); }
.nouvelle .notif { box-shadow: inset 5px 0 0 var(--marquage); }
.liste-taches li > a { flex: 1; }

/* =========================================================
   Étape 5 — Parcours client
   ========================================================= */
.recherche-compacte { margin-bottom: 1rem; }
.resultats-tete { margin-top: .5rem; }
.resultats-tete .titre-section { margin: 0; }
.tri { display: flex; gap: .25rem; }
.tri a { padding: .3rem .6rem; border-radius: 999px; font-size: .85rem; font-weight: 700; text-decoration: none; color: var(--texte-doux); }
.tri a.actif { background: var(--asphalte); color: #fff; }
.resultats { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.resultat { display: block; background: var(--surface); border-radius: var(--rayon); overflow: hidden; text-decoration: none; }
.resultat-photo { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--asphalte); }
.resultat-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.resultat-cat { position: absolute; left: .6rem; top: .6rem; padding: .15rem .55rem; border-radius: 999px; background: var(--asphalte); color: #fff; font-size: .8rem; font-weight: 700; }
.resultat-corps { display: grid; gap: .25rem; padding: .85rem 1rem 1rem; }
.resultat-titre small { color: var(--texte-doux); }
.resultat-specs { color: var(--texte-doux); font-size: .9rem; }
.resultat-prix { display: flex; align-items: baseline; gap: .35rem; flex-wrap: wrap; margin-top: .2rem; }
.resultat-prix strong { font-size: 1.15rem; }
.resultat-prix small { color: var(--texte-doux); }
.note { margin-left: auto; font-weight: 700; }
.note small { color: var(--texte-doux); font-weight: 500; }
.defilant-fiche img { flex: 0 0 92%; scroll-snap-align: center; width: 92%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--rayon); }
.atouts { list-style: none; padding: 0; margin: .75rem 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.atouts li { padding: .35rem .7rem; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--bordure); font-size: .9rem; font-weight: 600; }
.reservation-boite { border: 2px solid var(--asphalte); }
.reservation-boite .titre-section { margin-top: 0; }
.detail-prix { margin: 1rem 0; display: grid; gap: .5rem; }
.detail-prix > div { display: flex; justify-content: space-between; gap: 1rem; }
.detail-prix dt small { display: block; color: var(--texte-doux); }
.detail-prix dd { margin: 0; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.detail-total { border-top: 2px dashed var(--bordure); padding-top: .6rem; font-size: 1.1rem; }
.detail-total dd { font-weight: 800; }
.periodes { margin: 0; padding-left: 1.2rem; color: var(--texte-doux); }
.actions-ligne { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .75rem 0; }

/* Billet de réservation */
.billet { background: var(--asphalte); color: #fff; border-radius: 14px; padding: 1rem; margin-bottom: 1.25rem; position: relative; overflow: hidden; }
.billet .titre-page { margin: .75rem 0; }
.billet .titre-page small { color: #A9B3BA; }
.billet-tete { display: flex; justify-content: space-between; align-items: center; }
.billet-ref { font-weight: 800; letter-spacing: .06em; color: var(--marquage); }
.billet .badge { background: rgba(255,255,255,.12); color: #fff; }
.billet-photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; margin-top: .75rem; display: block; }
.billet-dates { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .75rem; padding-top: .75rem; border-top: 2px dashed rgba(255,255,255,.18); }
.billet-dates div { display: grid; }
.billet-dates div:last-child { text-align: right; }
.billet-dates small { color: #A9B3BA; }
.billet-dates strong { font-size: 1.05rem; }
.billet-dates span { color: var(--marquage); font-weight: 700; }
.billet-fleche { width: 44px; height: 6px; background: repeating-linear-gradient(90deg, var(--marquage) 0 8px, transparent 8px 12px); }

/* Paiement */
.montant-geant { font-size: 2rem; font-weight: 800; margin: .25rem 0; font-variant-numeric: tabular-nums; }
.operateurs { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.operateurs legend { grid-column: 1 / -1; }
.operateur { position: relative; cursor: pointer; }
.operateur input { position: absolute; opacity: 0; }
.operateur span { display: grid; place-items: center; min-height: 56px; border-radius: var(--rayon); border: 2px solid var(--bordure); background: var(--surface); font-weight: 800; }
.operateur input:checked + span { border-color: var(--asphalte); box-shadow: inset 0 -5px 0 var(--op, var(--marquage)); }
.operateur input:focus-visible + span { outline: 3px solid var(--marquage); }
.op-orange { --op: #FF7900; } .op-mtn { --op: #FFCB05; } .op-moov { --op: #0066B3; } .op-wave { --op: #1DC8F2; }
.resa-loueur { gap: .1rem; }
.ligne-2 > * { min-width: 0; }
.ligne-2:has(input[type="datetime-local"]) { grid-template-columns: 1fr; }
input[type="datetime-local"] { min-width: 0; }

/* =========================================================
   Engagement du locataire (remplace la caution)
   ========================================================= */
.etapes-paiement { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; counter-reset: etape; }
.etapes-paiement li { counter-increment: etape; padding: .55rem .75rem; border-radius: var(--rayon); background: var(--surface); color: var(--texte-doux); font-weight: 700; border-bottom: 4px solid var(--bordure); }
.etapes-paiement li::before { content: counter(etape) ". "; }
.etapes-paiement li.en-cours { color: var(--texte); border-color: var(--marquage); }
.etapes-paiement li.fait { color: var(--vert); border-color: var(--vert); }
.resume-engagement { margin: .5rem 0 1rem; padding-left: 1.1rem; display: grid; gap: .35rem; }
.texte-complet { margin-bottom: 1rem; }
.texte-complet summary { cursor: pointer; font-weight: 700; padding: .25rem 0; }
.texte-engagement { background: var(--surface); border-radius: var(--rayon); padding: 1rem; font-size: .92rem; line-height: 1.6; max-height: 60vh; overflow-y: auto; border: 1px solid var(--bordure); }
.texte-complet .texte-engagement { margin-top: .5rem; }
.champ-signature { font-family: "Segoe Script", "Brush Script MT", cursive; font-size: 1.25rem !important; }
.signe-ok { padding: .75rem 1rem; border-radius: var(--rayon); background: color-mix(in srgb, var(--vert) 12%, var(--surface)); font-weight: 600; }
.signature-bloc { margin-bottom: 1rem; }
.empreinte { font-family: ui-monospace, monospace; font-size: .85rem; }
.encart > .titre-section:first-child { margin-top: 0; }


/* =========================================================
   Identité Flex Ride : logo et en-tête clair
   ========================================================= */
.entete { background: #FFFFFF; color: var(--asphalte); box-shadow: 0 1px 0 #E3E8F0, 0 2px 10px rgba(1, 44, 93, .06); padding-top: calc(.4rem + env(safe-area-inset-top, 0px)); padding-bottom: .4rem; }
.logo-entete { display: block; line-height: 0; }
.logo-entete img { height: 46px; width: auto; }
.entete-lien { color: #012C5D; }
.cloche { color: #012C5D; }
.cloche-nb { color: #fff; background: var(--marquage-fonce); }

/* Page d'accueil publique : fond clair, logo complet */
.accueil { background: #FFFFFF; color: var(--asphalte); }
.accueil::after {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -30%; height: 60%; z-index: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(245, 138, 7, .16), transparent 60%),
              radial-gradient(ellipse at 10% 100%, rgba(1, 44, 93, .14), transparent 55%);
  pointer-events: none;
}
.accueil-texte { max-width: 34ch; z-index: 1; }
.logo-accueil { display: block; width: min(300px, 80vw); height: auto; margin: 0 auto 1.5rem; }
.accueil h1 { margin-top: 0; color: var(--asphalte); }
.accueil-sous { color: #56657A; }
.accueil-actions { z-index: 1; }
.bouton-clair { background: #FFFFFF; color: var(--asphalte); border-color: var(--asphalte); }
.lien-discret { color: var(--asphalte-2); background: transparent; }
.bouton-installer { color: var(--marquage-fonce); border-color: var(--marquage); background: transparent; }
@media (prefers-color-scheme: dark) {
  .accueil { background: #FFFFFF; } /* le logo est conçu pour fond clair */
}

/* Pages de connexion et d'inscription */
.logo-auth { display: inline-block; line-height: 0; }
.logo-auth img { height: 72px; width: auto; }
.auth h1 { margin-top: 1.25rem; }
@media (prefers-color-scheme: dark) {
  .logo-auth { background: #FFFFFF; padding: .5rem .75rem; border-radius: 12px; }
}

/* Boutons principaux : orange de la marque, texte marine (contraste AA) */
.bouton-plein { color: #012C5D; }
.onglet.actif::before { background: var(--marquage); }
.actions-ligne { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
