/* === SOS CONVOYAGE — design "marquage routier" ===
   Fond bitume, signal orange, tirets de ligne centrale comme fil conducteur.
   Les noms de classes et d'IDs sont ceux de l'ancienne version : le JS reste inchangé. */

:root {
  --bg: #0a0e17;
  --s1: #111826;
  --s2: #172033;
  --field: #0c1220;
  --card: #111826;
  --line: rgba(244, 241, 234, 0.1);
  --brd: rgba(244, 241, 234, 0.1);
  --line-2: rgba(244, 241, 234, 0.2);
  --txt: #f4f1ea;
  --mut: #9aa6ba;
  --p: #ff6a13;
  --p-ink: #1a0c00;
  --p-glow: rgba(255, 106, 19, 0.3);
  --bl: #5cc8ff;
  --gr: #34d399;
  --rd: #f87171;
  --display: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--txt);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection { background: var(--p); color: var(--p-ink); }
:focus-visible { outline: 2px solid var(--p); outline-offset: 2px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 300;
  background: var(--txt); color: var(--bg);
  padding: .6rem 1rem; border-radius: 8px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* === NAVIGATION === */
nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .7rem clamp(1rem, 3vw, 2rem);
  background: rgba(10, 14, 23, .9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
nav::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--p) 0 18px, transparent 18px 34px);
  opacity: .55; pointer-events: none;
}

.brand { display: grid; line-height: 1.15; flex: none; }
.brand > span {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--display); font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em;
}
.brand > span::before {
  content: ""; width: 26px; height: 26px; border-radius: 7px; flex: none;
  background: repeating-linear-gradient(0deg, var(--p-ink) 0 4px, transparent 4px 8px) center / 3px 100% no-repeat, var(--p);
}
.brand small { font-size: .74rem; padding-left: calc(26px + .6rem); }

.navs {
  display: flex; gap: .15rem; margin-left: auto;
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
}
.navs::-webkit-scrollbar { display: none; }

.nb {
  position: relative; flex: none; scroll-snap-align: start;
  background: none; color: var(--mut); border: 0; border-radius: 8px;
  padding: .6rem .85rem; font-size: .92rem; font-weight: 600; white-space: nowrap;
}
.nb:hover { color: var(--txt); background: rgba(244, 241, 234, .06); }
.nb.active { color: var(--txt); }
.nb.active::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .2rem;
  height: 2px; border-radius: 2px; background: var(--p);
}

/* === ONGLETS === */
main { max-width: 1160px; margin: 1.5rem auto 4rem; padding: 0 clamp(.8rem, 2vw, 1.25rem); }
.tc { display: none; }
.tc.active { display: block; animation: fade .25s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* === HERO (le seul moment animé de la page : la ligne centrale) === */
.hero-banner {
  position: relative; display: flex; align-items: flex-end;
  min-height: 360px; margin-bottom: 1.5rem;
  padding: clamp(1.4rem, 4vw, 3rem) clamp(1.4rem, 4vw, 3rem) 3rem;
  border-radius: 18px; overflow: hidden;
  background-color: #101a2e;
  background-size: cover; background-position: center;
  border: 1px solid var(--line-2);
}
.hero-banner::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 1.1rem; height: 3px;
  background: repeating-linear-gradient(90deg, rgba(244, 241, 234, .55) 0 28px, transparent 28px 56px);
  animation: road 2.4s linear infinite;
}
@keyframes road { to { background-position-x: 56px; } }

.hero-content { position: relative; max-width: 640px; }
.hero-banner h1 {
  font-family: var(--display); font-weight: 800; font-stretch: 100%;
  font-size: clamp(2rem, 5.2vw, 3.5rem); line-height: 1.03; letter-spacing: -.02em;
  margin-bottom: .8rem; text-wrap: balance;
}
.hero-banner p { color: #d3dae6; font-size: 1.05rem; max-width: 54ch; margin-bottom: 1rem; }

.hero-banner .kg { display: flex; flex-wrap: wrap; gap: .5rem 0; margin: 1.1rem 0 1.3rem !important; }
.hero-banner .kpi {
  text-align: left; background: none; border: 0; border-left: 2px solid var(--p); border-radius: 0;
  padding: 0 1.3rem 0 .9rem !important; box-shadow: none;
}
.hero-banner .kpi:first-child { margin-right: 0; }
.hero-banner .kpi b { font-size: 1.5rem; margin: 0; }

.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .3rem .85rem; margin-bottom: .9rem; border-radius: 999px;
  background: rgba(255, 106, 19, .14); border: 1px solid rgba(255, 106, 19, .5);
  color: #ffd2b0; font-size: .82rem; font-weight: 700;
}
.hero-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--p); flex: none; }

.section-banner {
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  min-height: 190px; margin-bottom: 1.3rem; padding: 1.6rem clamp(1.2rem, 3vw, 2rem);
  border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2);
  background-color: #101a2e; background-size: cover; background-position: center;
}
.section-banner h2 {
  font-size: clamp(1.5rem, 3.6vw, 2.25rem); line-height: 1.1; letter-spacing: -.015em;
  margin: .2rem 0 .4rem !important; text-wrap: balance;
}

/* === PARCOURS (suite réelle d'étapes) === */
.steps {
  list-style: none; counter-reset: s;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 1.4rem;
  margin: 0 0 1.8rem;
}
.steps li { counter-increment: s; padding-top: .85rem; border-top: 2px dashed rgba(255, 106, 19, .6); }
.steps li::before { content: counter(s); display: block; font: 800 1.5rem/1 var(--display); color: var(--p); margin-bottom: .4rem; }
.steps b { display: block; font-size: 1rem; }
.steps span { color: var(--mut); font-size: .9rem; }

/* === CARTES === */
.card, .sub {
  background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: clamp(1.1rem, 2.5vw, 1.5rem);
}
.card:hover { border-color: var(--line-2); }
.sub { background: var(--s2); border-radius: 12px; margin-top: 1rem; padding: 1.1rem; }

h2 { font-family: var(--display); font-weight: 700; font-size: 1.35rem; line-height: 1.2; letter-spacing: -.01em; margin-bottom: 1rem; color: var(--txt); }
h3 { font-family: var(--display); font-weight: 700; font-size: 1.08rem; margin-bottom: .75rem; color: var(--txt); }

.g2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1.25rem; align-items: start; }
.kg { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin: 1rem 0; }

.kpi { text-align: left; padding: 1rem 1.1rem; }
.kpi small { display: block; }
.kpi b { display: block; font: 800 1.7rem/1.15 var(--display); margin-top: .2rem; }
.k-solde { background: rgba(52, 211, 153, .08); border: 1px solid rgba(52, 211, 153, .4); border-left-width: 3px; }
.k-solde b { color: var(--gr); }

/* === FORMULAIRES === */
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: .8rem; margin-bottom: .7rem; }
label { display: block; font-size: .85rem; font-weight: 600; color: #c5cee0; margin-bottom: .3rem; }

input, select, textarea {
  width: 100%; min-height: 44px; padding: .65rem .85rem;
  font: inherit; font-size: 1rem; color: var(--txt);
  background: var(--field); border: 1px solid var(--line-2); border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #66718a; }
input:hover, select:hover, textarea:hover { border-color: rgba(244, 241, 234, .32); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--p); box-shadow: 0 0 0 3px rgba(255, 106, 19, .25); }
input[type="checkbox"] { width: 1.1rem; min-height: 0; accent-color: var(--p); }
input[type="file"] { padding: .5rem; font-size: .9rem; }
input[type="file"]::file-selector-button {
  margin-right: .7rem; padding: .4rem .8rem; border: 0; border-radius: 8px;
  background: rgba(244, 241, 234, .12); color: var(--txt); font: inherit; font-weight: 600; cursor: pointer;
}
input[type="date"] { color-scheme: dark; cursor: pointer; }
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; filter: invert(1); opacity: .85; }
select option { background: var(--s1); color: var(--txt); }

/* Récapitulatif du prix : le chiffre que le client cherche */
#fBook .sub.sh { border-left: 3px solid var(--p); }
#tot { font: 800 2rem/1 var(--display) !important; color: var(--p) !important; }

/* === BOUTONS === */
button {
  font: inherit; font-size: .92rem; font-weight: 700;
  min-height: 42px; padding: .55rem 1.1rem; border: 1px solid transparent; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s, filter .15s;
}
button:active:not(:disabled) { transform: scale(.98); }
button:disabled { opacity: .5; cursor: not-allowed; }

.bp { width: 100%; background: var(--p); color: var(--p-ink); }
.bp:hover:not(:disabled) { background: #ff7f33; }
.bb { background: rgba(92, 200, 255, .1); color: var(--bl); border-color: rgba(92, 200, 255, .4); }
.bb:hover:not(:disabled) { background: rgba(92, 200, 255, .2); }
.bw { background: rgba(52, 211, 153, .1); color: var(--gr); border-color: rgba(52, 211, 153, .4); }
.bw:hover:not(:disabled) { background: rgba(52, 211, 153, .2); }
.bs { background: rgba(244, 241, 234, .07); color: var(--txt); border-color: var(--line-2); }
.bs:hover:not(:disabled) { background: rgba(244, 241, 234, .14); }
.bd { background: rgba(248, 113, 113, .1); color: #fca5a5; border-color: rgba(248, 113, 113, .4); }
.bd:hover:not(:disabled) { background: rgba(248, 113, 113, .22); }

/* === LISTES === */
.stk { display: flex; flex-direction: column; gap: .7rem; }
.stk:empty::before { content: "Rien à afficher pour l'instant."; color: var(--mut); font-size: .9rem; }
.it {
  background: var(--s2); border: 1px solid var(--line); border-left: 3px solid var(--p);
  border-radius: 10px; padding: .9rem 1rem; transition: border-color .15s;
}
.it:hover { border-color: var(--line-2); border-left-color: var(--p); }
.it .acts { margin-top: .6rem; }

.sh { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.acts { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.g { color: var(--gr); }
.m { color: var(--mut); font-size: .85rem; }
.hide { display: none !important; }
.err { background: rgba(248, 113, 113, .12); border: 1px solid var(--rd); color: #fecaca; padding: .7rem .9rem; border-radius: 10px; font-size: .9rem; }
/* Photo obligatoire manquante dans l'état des lieux */
input[type="file"].manque { border-color: var(--rd); box-shadow: 0 0 0 2px rgba(248, 113, 113, .25); }
#fEdl button[type="submit"]:disabled,
#fEdl button[type="submit"][aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.pv-verrou { color: var(--gr); font-size: .8rem; font-weight: 600; }
/* === BOUTON RETOUR + FIL D'ARIANE === */
.fil { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .9rem; margin-bottom: 1rem; }
.fil-retour { min-height: 36px; padding: .3rem .8rem; font-size: .85rem; }
.fil ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .35rem; font-size: .85rem; color: var(--mut); }
.fil li + li::before { content: "›"; margin-right: .35rem; opacity: .6; }
.fil li[aria-current="page"] { color: var(--txt); font-weight: 600; }
.fil-lien {
  min-height: 0; padding: .15rem .1rem; background: none; border: 0; border-radius: 4px;
  color: var(--bl); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
}
.fil-lien:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) {
  .fil { gap: .4rem .6rem; margin-bottom: .8rem; }
  .fil ol { font-size: .8rem; }
  .fil-retour { min-height: 40px; }   /* zone de toucher confortable sur smartphone */
}
/* Impression : navigation, fil d'Ariane et boutons n'apparaissent jamais sur le papier */
@media print { .no-print { display: none !important; } }

/* Onglet réservé : indiqué sans emoji (atténué tant que l'accès n'est pas déverrouillé) */
.nb[aria-disabled="true"] { opacity: .6; }

/* === FLOTTE === */
.fleet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 1rem; margin: 0 0 1.8rem; }
.fleet-card {
  background: var(--s1); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  cursor: pointer; transition: border-color .2s;
}
.fleet-card:hover, .fleet-card:focus-visible { border-color: var(--p); }
.fleet-card img { width: 100%; height: 140px; object-fit: cover; display: block; background: var(--s2); transition: transform .4s ease; }
.fleet-card:hover img { transform: scale(1.04); }
.fleet-card { overflow: hidden; }
.fleet-info { padding: .8rem 1rem 1rem; }
.fleet-info b { display: block; font-size: 1rem; }
.fleet-info small { color: var(--mut); font-size: .85rem; }

/* === SIGNATURE === */
#sig {
  width: 100%; max-width: 420px; height: 130px; background: var(--field);
  border: 1px dashed var(--bl); border-radius: 12px; cursor: crosshair; touch-action: none;
}

/* === NOTIFICATION === */
#toast {
  position: fixed; inset-inline: 0; bottom: 1.2rem; margin: auto; z-index: 999;
  width: max-content; max-width: calc(100% - 2rem);
  background: var(--txt); color: var(--bg); padding: .75rem 1.2rem; border-radius: 10px;
  font-weight: 700; box-shadow: 0 12px 32px rgba(0, 0, 0, .55);
  animation: pop .25s ease both;
}
@keyframes pop { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }

/* === PIED DE PAGE === */
.site-footer {
  position: relative; margin-top: 4rem; padding: 2.5rem clamp(1rem, 3vw, 2rem) 1.5rem;
  background-color: #070a12; background-size: cover; background-position: center;
  color: var(--mut); font-size: .92rem; overflow: hidden;
}
.site-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: repeating-linear-gradient(90deg, var(--p) 0 28px, transparent 28px 56px);
  animation: road 2.4s linear infinite; opacity: .8;
}
.footer-badges, .footer-grid, .footer-bottom { max-width: 1160px; margin-inline: auto; position: relative; }
.footer-badges { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1rem; margin-bottom: 2.2rem; }
.f-badge {
  display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem;
  background: rgba(17, 24, 38, .85); border: 1px solid var(--line); border-radius: 12px;
}
.f-badge img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 1.6rem; margin-bottom: 1.6rem; }
.footer-col h4 { font: 700 1rem var(--display); color: var(--txt); margin-bottom: .7rem; }
.footer-links { display: flex; flex-direction: column; gap: .5rem; }
.footer-links a { color: #cbd5e1; text-decoration: none; }
.footer-links a:hover { color: var(--p); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem;
  padding-top: 1.1rem; border-top: 1px solid var(--line); font-size: .84rem;
}

/* === MODALE === */
.modal-bg {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 1rem; background: rgba(4, 7, 13, .82); backdrop-filter: blur(6px); animation: fade .2s ease both;
}
.modal-box {
  width: 100%; max-width: 680px; max-height: 82vh; overflow-y: auto; padding: 1.5rem;
  background: var(--s1); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .7);
}

/* === MOBILE === */
@media (max-width: 760px) {
  nav { flex-wrap: wrap; gap: .4rem; padding-bottom: .4rem; }
  .navs { margin-left: 0; width: 100%; }
  .hero-banner { min-height: 320px; }
  .hero-banner .kpi { padding-right: .9rem !important; }
  .fleet-card img { height: 115px; }
}

/* === MOUVEMENT RÉDUIT === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.email-contact-box {
  display: inline-flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0.5rem 0;
}

.email-copy-row {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.email-address {
  font-family: monospace;
  font-size: 0.92rem;
  user-select: all;
}

.btn-copy-email {
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  background: #22e57a;
  color: #050806;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.btn-copy-email:hover {
  opacity: 0.9;
}

.btn-copy-email.copied {
  background: #10b981;
  color: #ffffff;
}

/* =====================================================================
   DESIGN 2026 — couche d'harmonisation (automobile / logistique premium)
   Animations sur transform + opacity uniquement (60 fps), coupées si
   l'utilisateur demande un mouvement réduit (bloc en fin de fichier).
   ===================================================================== */
:root {
  --ease: cubic-bezier(.22, .8, .24, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .28);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, .4), 0 18px 40px rgba(0, 0, 0, .42);
  --r: 16px;
}

/* ----- Cartes : verre léger, élévation douce au survol ----- */
.card, .sub {
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(23, 32, 51, .78), rgba(17, 24, 38, .86));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-1);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .25s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: rgba(255, 106, 19, .35); }
.card:has(form):hover { transform: none; }   /* une carte qui contient un formulaire ne bouge pas */
.hero-badge { box-shadow: 0 0 0 1px rgba(255, 106, 19, .15), 0 4px 18px rgba(255, 106, 19, .12); }

/* ----- Champs : focus net et lisible ----- */
input, select, textarea { border-radius: 12px; transition: border-color .2s, box-shadow .2s, background .2s; }
input:focus, select:focus, textarea:focus { background: #0e1626; border-color: var(--p); box-shadow: 0 0 0 4px rgba(255, 106, 19, .18); }
.champ-invalide { border-color: var(--rd) !important; box-shadow: 0 0 0 3px rgba(248, 113, 113, .2) !important; }
/* Champ validé (SIRET, plaque) */
.champ-valide { border-color: var(--gr) !important; box-shadow: 0 0 0 3px rgba(52, 211, 153, .2) !important; }
small[id$="Info"] { display: block; min-height: 1.1em; margin-top: .25rem; }
small[id$="Info"].ok { color: var(--gr); font-weight: 600; }
small[id$="Info"].ko { color: var(--rd); }

/* ----- Boutons : relief, survol et clic fluides ----- */
button { transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .2s, border-color .2s, color .2s, filter .2s; }
button:hover:not(:disabled) { transform: translateY(-1px); }
button:active:not(:disabled) { transform: translateY(0) scale(.97); }
.bp { background: linear-gradient(180deg, #ff7a2b, #ff6a13); box-shadow: 0 6px 18px rgba(255, 106, 19, .32); }
.bp:hover:not(:disabled) { background: linear-gradient(180deg, #ff8a45, #ff741f); box-shadow: 0 10px 26px rgba(255, 106, 19, .42); }
.bb:hover:not(:disabled), .bw:hover:not(:disabled), .bs:hover:not(:disabled) { box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }

/* ----- Boutons photo de profil (sans emoji, épurés) ----- */
.btn-photo {
  min-height: 40px; padding: .5rem 1.15rem; border-radius: 999px;
  background: rgba(244, 241, 234, .06); color: var(--txt);
  border: 1px solid var(--line-2); font-weight: 600; letter-spacing: .01em;
}
.btn-photo:hover:not(:disabled) { background: rgba(244, 241, 234, .12); border-color: rgba(244, 241, 234, .4); }
.btn-photo-main { background: rgba(92, 200, 255, .12); color: var(--bl); border-color: rgba(92, 200, 255, .5); }
.btn-photo-main:hover:not(:disabled) { background: rgba(92, 200, 255, .22); border-color: var(--bl); box-shadow: 0 6px 18px rgba(92, 200, 255, .18); }

/* ----- Navigation : soulignement animé de l'onglet actif ----- */
.nb { transition: color .2s, background .2s, transform .2s var(--ease); }
.nb:hover { transform: translateY(-1px); }
.nb::after { content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .2rem; height: 2px; border-radius: 2px; background: var(--p); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nb.active::after { transform: scaleX(1); }

/* ----- Transition entre onglets : fondu + léger glissement ----- */
.tc.active { animation: tabIn .45s var(--ease-out) backwards; }   /* backwards : aucune transform résiduelle une fois affiché */
@keyframes tabIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ----- Apparition au défilement (classe posée par script.js) ----- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); will-change: opacity, transform; }
.reveal.visible { opacity: 1; transform: none; will-change: auto; }
.reveal[data-delai="1"] { transition-delay: .06s; }
.reveal[data-delai="2"] { transition-delay: .12s; }
.reveal[data-delai="3"] { transition-delay: .18s; }
/* .card a sa propre transition (survol) : on la recompose pour garder l'apparition ET l'élévation */
.card.reveal { transition: opacity .6s var(--ease-out), transform .35s var(--ease), box-shadow .35s var(--ease), border-color .25s; }
.card.reveal.visible:hover { transform: translateY(-2px); }
.card.reveal.visible:has(form):hover { transform: none; }

/* ----- Messages d'erreur / alerte animés ----- */
.err { box-shadow: 0 6px 20px rgba(248, 113, 113, .12); }
.err:not(.hide) { animation: errIn .35s var(--ease-out) both; }
.err-anim { animation: errShake .45s var(--ease) both !important; }
@keyframes errIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes errShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

/* ----- Notification (toast) ----- */
#toast { border-radius: 14px; animation: toastIn .4s var(--ease-out) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }

/* ----- Flotte : zoom subtil de la photo ----- */
.fleet-card { transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .25s; border-radius: var(--r); }
.fleet-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.fleet-card img { transition: transform .6s var(--ease); }
.fleet-card:hover img { transform: scale(1.07); }

/* ----- « Suivi des demandes » : 3 cartes avec photo ----- */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-bottom: 1.1rem; }
.svc-card {
  position: relative; overflow: hidden; border-radius: 14px; background: var(--s2);
  border: 1px solid var(--line); box-shadow: var(--shadow-1);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
}
.svc-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); border-color: rgba(255, 106, 19, .5); }
.svc-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(135deg, #0f172a, #1e293b); }
.svc-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(7, 11, 20, .85)); pointer-events: none; }
.svc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.svc-card:hover .svc-photo img { transform: scale(1.1); }
.svc-info { position: relative; padding: .65rem .8rem .8rem; margin-top: -2.4rem; z-index: 1; display: flex; flex-direction: column; gap: .1rem; }
.svc-info b { font-size: .98rem; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.svc-info small { color: #cbd5e1; font-size: .8rem; }
@media (max-width: 520px) { .svc-grid { grid-template-columns: 1fr; } .svc-photo { aspect-ratio: 16 / 9; } }

/* ----- Autocomplétion des villes ----- */
.auto-liste {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60;
  list-style: none; max-height: 260px; overflow-y: auto; padding: .3rem;
  background: rgba(14, 22, 38, .97); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-2);
  animation: errIn .2s var(--ease-out) both;
}
.auto-liste li { display: flex; flex-direction: column; padding: .5rem .65rem; border-radius: 8px; cursor: pointer; transition: background .15s; }
.auto-liste li b { font-size: .95rem; }
.auto-liste li small { color: var(--mut); font-size: .78rem; }
.auto-liste li:hover, .auto-liste li.actif { background: rgba(255, 106, 19, .16); }

/* ----- État des lieux : progression, groupes de photos, parties du PV ----- */
.pv-groupe { margin: 1rem 0 .4rem; padding-top: .7rem; border-top: 1px dashed var(--line-2); font: 700 .9rem var(--display); color: var(--txt); letter-spacing: .01em; }
.pv-progress { position: relative; height: 26px; margin: .6rem 0 .2rem; border-radius: 999px; background: rgba(244, 241, 234, .08); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.pv-progress-bar { position: absolute; inset: 0; background: linear-gradient(90deg, #ff6a13, #34d399); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.pv-progress span { position: relative; font: 700 .78rem var(--body); color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.pv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .5rem 0; padding: .55rem .7rem; border-radius: 10px; background: rgba(244, 241, 234, .05); }
.pv-parties span { display: flex; flex-direction: column; min-width: 0; }
.pv-parties b { font-size: .92rem; overflow-wrap: anywhere; }
@media (max-width: 480px) { .pv-parties { grid-template-columns: 1fr; } }

/* ----- Réservation : blocs « Adresse de départ » / « Adresse d'arrivée » (Ville, Code postal, Numéro & rue) ----- */
.adr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: .9rem; margin-bottom: .8rem; }
.adr-bloc {
  background: var(--s2); border: 1px solid var(--line); border-left: 3px solid var(--p);
  border-radius: 12px; padding: .85rem .95rem .95rem; min-width: 0;
}
.adr-tete { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .65rem; min-height: 34px; }
.adr-tete h3 { margin: 0; font-size: .98rem; letter-spacing: .01em; }
.btn-mini { min-height: 34px; padding: .25rem .7rem; font-size: .8rem; border-radius: 999px; white-space: nowrap; }
.adr-champs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(86px, 120px); gap: .6rem .7rem; }
.champ-adr { position: relative; min-width: 0; }
.champ-adr.c-rue { grid-column: 1 / -1; }
.champ-adr input { width: 100%; }
/* La colonne « Code postal » est étroite : sa liste de suggestions s'élargit vers la gauche */
.champ-adr.c-cp .auto-liste { left: auto; right: 0; width: 260px; max-width: 80vw; }
@media (max-width: 380px) { .adr-champs { grid-template-columns: 1fr; } .champ-adr.c-cp { grid-row: auto; } }

/* === BOURSE AUX MISSIONS : Centrage et alignement harmonieux des blocs de missions === */
#t-board {
  max-width: 860px;
  margin: 0 auto;
}

#t-board .section-banner {
  text-align: center;
  align-items: center;
}

#t-board .section-banner p {
  margin-inline: auto;
}

#boardLock {
  max-width: 620px;
  margin: 0 auto;
}

#boardContent .card {
  max-width: 760px;
  margin: 0 auto;
}

#lBoard {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}

#lBoard .it {
  text-align: center;
  padding: 1.25rem 1.4rem;
  background: var(--s2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--p);
  border-radius: 12px;
  transition: border-color .15s, transform .2s var(--ease);
}

#lBoard .it:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
}

#lBoard .it .sh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .6rem;
  width: 100%;
}

#lBoard .it > div:nth-child(2) {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--txt);
  margin: .4rem 0;
  letter-spacing: -.01em;
}

#lBoard .it .m {
  margin: .35rem 0 .8rem;
  font-size: .9rem;
}

#lBoard .it .acts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .6rem;
  margin-top: .8rem;
}

#lBoard .it .acts button {
  flex: 1 1 120px;
  max-width: 180px;
  justify-content: center;
}

/* === ESPACE CONVOYEUR : Centrage et alignement des missions disponibles (#lOpen) === */
#lOpen {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}

#lOpen .it {
  text-align: center;
  padding: 1.25rem 1.4rem;
  background: var(--s2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--p);
  border-radius: 12px;
  transition: border-color .15s, transform .2s var(--ease);
}

#lOpen .it:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
}

#lOpen .it b:first-child {
  display: inline-block;
  margin-bottom: .3rem;
  font-size: 1.05rem;
}

#lOpen .it .g {
  display: inline-block;
  font-weight: 700;
  margin-left: .4rem;
}

#lOpen .it > span, 
#lOpen .it br + span,
#lOpen .it {
  /* Style pour le texte trajet et distance généré dynamiquement */
}

#lOpen .it button {
  display: flex;
  margin: .8rem auto 0;
  width: 100%;
  max-width: 180px;
  justify-content: center;
}

/* ----- Mobile : cibles tactiles confortables ----- */
@media (max-width: 760px) {
  input, select, textarea { font-size: 16px; }   /* évite le zoom automatique d'iOS au focus */
  .reveal { transform: translateY(14px); }
}
@media (hover: none) { .card:hover, .svc-card:hover, .fleet-card:hover, button:hover:not(:disabled), .nb:hover { transform: none; } }

/* ----- Impression : fonds opaques, sans ombres ----- */
@media print { .card, .sub { background: #fff !important; box-shadow: none !important; backdrop-filter: none !important; } .reveal { opacity: 1 !important; transform: none !important; } }

/* ----- Mouvement réduit : tout est immédiat ----- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .tc.active, .err:not(.hide), #toast, .auto-liste, .err-anim { animation: none !important; }
  .pv-progress-bar, .nb::after { transition: none !important; }
}
