/* BagGo — feuille mobile d'abord.
   Les media queries n'ajoutent que ce que les grands écrans permettent en plus. */

:root {
  --sol: #eef1ee; --surface: #fff; --surface-2: #f6f8f5; --encre: #171a17; --doux: #5f675d;
  --trait: #dbe1d9; --accent: #0d6b5e; --accent-doux: #e2efec; --accent-encre: #085147;
  --alerte: #a3271c; --alerte-doux: #fbeae8; --or: #b57d10; --or-doux: #fbf1dc;
  --info: #285d86; --info-doux: #e7f0f7;
  --rayon: 12px; --rayon-s: 8px;
  --ombre: 0 1px 2px rgba(23, 26, 23, .06), 0 10px 24px -18px rgba(23, 26, 23, .3);
  /* L'en-tête a sa propre couleur, et non celle du texte : `--encre` s'inverse
     en mode sombre, ce qui donnait un bandeau presque blanc sous un logo blanc.
     La barre de marque reste sombre dans les deux thèmes. */
  --entete-fond: #171a17; --entete-texte: #ffffff; --entete-trait: transparent;
  --entete-h: 48px; --onglets-h: 60px;
  /* Les marges de sécurité passent par des variables : un test peut alors les
     simuler, ce qu'aucun navigateur de bureau ne fait — c'est ainsi qu'un
     en-tête écrasé sous la barre d'état d'un iPhone devient reproductible. */
  --marge-haut: env(safe-area-inset-top, 0px);
  --marge-bas: env(safe-area-inset-bottom, 0px);
  --police: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sol: #111410; --surface: #191d18; --surface-2: #20251f; --encre: #e9ece7; --doux: #98a193;
    --trait: #2c332b; --accent: #5cbfad; --accent-doux: #16302a; --accent-encre: #8ad6c7;
    --alerte: #e88a7d; --alerte-doux: #33201d; --or: #dda94f; --or-doux: #2f2513;
    --info: #8dbde3; --info-doux: #1b2833;
    --ombre: 0 1px 2px rgba(0, 0, 0, .5), 0 10px 24px -18px rgba(0, 0, 0, .8);
    /* Un cran au-dessus du fond de page, sinon la barre s'y dissoudrait. */
    --entete-fond: #1d231c; --entete-trait: #2c332b;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--sol);
  color: var(--encre);
  font-family: var(--police);
  font-size: 16px;
  line-height: 1.55;
  padding-bottom: calc(var(--onglets-h) + var(--marge-bas));
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-encre); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- En-tête ---------- */
/*
 * La hauteur **inclut** la marge haute.
 *
 * Avec `box-sizing: border-box`, une hauteur fixe plus un padding haut revient
 * à retrancher ce padding du contenu. Installée sur un iPhone, l'application
 * s'étend sous la barre d'état : la marge y vaut une cinquantaine de pixels, et
 * l'en-tête se retrouvait écrasé à presque rien. Dans un onglet de navigateur
 * la marge vaut zéro, ce qui rendait le défaut invisible partout ailleurs.
 */
.entete {
  position: sticky; top: 0; z-index: 20;
  /*
   * Sur mobile, le logo est **centré**. Depuis que l'en-tête ne porte plus que
   * la marque, un élément unique collé à gauche laissait une barre à moitié
   * vide, l'air d'avoir perdu quelque chose. Centré, c'est une barre de titre
   * assumée — la convention des applications natives.
   *
   * Le centrage vient de `justify-content`, pas d'un positionnement absolu :
   * le logo est le seul enfant dans le flux (les liens et l'identité ne
   * s'affichent qu'à partir de la tablette), donc il tombe pile au milieu. Le
   * badge de vérification, lui, est sorti du flux : que l'utilisateur soit GP
   * ou non, le logo ne bouge pas d'un pixel.
   */
  display: flex; align-items: center; justify-content: center; gap: 12px;
  height: calc(var(--entete-h) + var(--marge-haut));
  padding: var(--marge-haut) 16px 0;
  background: var(--entete-fond); color: var(--entete-texte);
  border-bottom: 1px solid var(--entete-trait);
}
.entete__logo { font-size: 19px; font-weight: 700; letter-spacing: -.4px; color: var(--entete-texte); }
.entete__logo span { color: #5ec5b3; }
/*
 * Sur mobile, l'en-tête ne porte que la marque.
 *
 * Le nom du compte et la déconnexion vivaient ici, alors que la barre du bas a
 * déjà un onglet « Compte » : la même information deux fois, dans la bande la
 * plus étroite de l'écran. La déconnexion se trouve désormais dans « Mon
 * compte », là où on la cherche sur un téléphone.
 */
.entete__moi { display: none; }
.entete__etat {
  position: absolute; right: 16px; top: var(--marge-haut);
  height: var(--entete-h); display: flex; align-items: center;
}
.entete__liens { display: none; }

/* Une action pleine largeur : sur un téléphone, la cible vaut le geste. */
.bouton--large { display: block; width: 100%; text-align: center; }

/*
 * Bandeau « du nouveau », posé par le pouls quand une notification arrive sans
 * que la page n'ait bougé. Au-dessus de la barre d'onglets, jamais dessous :
 * il doit rester lisible et cliquable, pas se glisser sous le pouce.
 */
.bandeau-direct {
  position: fixed; z-index: 40;
  left: 12px; right: 12px;
  bottom: calc(var(--onglets-h) + var(--marge-bas) + 12px);
  /* Les couleurs de la barre de marque, jamais `--encre` : c'est la couleur du
     texte, elle s'inverse en mode sombre et donnerait du blanc sur blanc. */
  background: var(--entete-fond); color: var(--entete-texte); text-decoration: none;
  border-radius: var(--rayon); padding: 12px 16px;
  font-size: 15px; font-weight: 600; box-shadow: var(--ombre);
  display: flex; align-items: center; gap: 8px;
  animation: bandeau-entre .25s ease-out;
}
.bandeau-direct:hover { text-decoration: none; }
@keyframes bandeau-entre { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bandeau-direct { animation: none; } }
@media (min-width: 768px) {
  .bandeau-direct { left: auto; right: 24px; bottom: 24px; max-width: 380px; }
}

/* ---------- Barre d'onglets (mobile) ---------- */
.onglets {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-around;
  background: var(--surface); border-top: 1px solid var(--trait);
  padding-bottom: var(--marge-bas);
}
.onglets a {
  flex: 1; min-height: var(--onglets-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; color: var(--doux); text-decoration: none; position: relative;
}
.onglets a[aria-current="page"] { color: var(--accent-encre); font-weight: 600; }
.onglets svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.onglets .pastille {
  position: absolute; top: 8px; left: 50%; margin-left: 4px;
  background: var(--alerte); color: #fff; border-radius: 10px;
  min-width: 17px; padding: 0 5px; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center;
}

/* ---------- Contenu ---------- */
.contenu { padding: 18px 16px 28px; max-width: 100%; }
/*
 * Une échelle, pas une liste de tailles.
 *
 * Tout était à peu près du même poids : un titre à 24 px, des sous-titres à
 * 18, des cartes toutes identiques — l'œil n'avait nulle part où se poser, et
 * c'est ce qu'on ressent comme « monotone ». Les écarts sont donc creusés : le
 * titre domine franchement, les intertitres se détachent du corps, et le
 * secondaire assume d'être secondaire.
 */
h1 { font-size: 29px; line-height: 1.14; letter-spacing: -.6px; font-weight: 700; margin: 0 0 6px; text-wrap: balance; }
h2 { font-size: 19px; line-height: 1.25; letter-spacing: -.25px; margin: 32px 0 12px; text-wrap: balance; }
h3 { font-size: 16px; letter-spacing: -.1px; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.sous { color: var(--doux); font-size: 16px; margin: 0 0 20px; max-width: 46ch; text-wrap: pretty; }
.petit { font-size: 13px; color: var(--doux); }
/* Le chiffre qui compte sur un écran : on le lit avant de lire la phrase. */
.chiffre { font-size: 26px; font-weight: 700; letter-spacing: -.5px; line-height: 1; font-variant-numeric: tabular-nums; }
.mention { font-size: 12.5px; color: var(--doux); }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--doux); }

.pile { display: grid; gap: 14px; }
.duo { display: grid; gap: 14px; }
.trio { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }

.carte {
  background: var(--surface); border: 1px solid var(--trait);
  border-radius: var(--rayon); padding: 16px; margin-bottom: 14px;
}
/* La carte qui porte l'action du moment : une seule par écran, et elle se voit. */
.carte--vedette {
  border-color: var(--accent); box-shadow: var(--ombre);
  background: linear-gradient(var(--accent-doux), var(--surface) 70%);
}
.carte > :last-child { margin-bottom: 0; }
.carte--accent { border-left: 3px solid var(--accent); }
.entete-ligne { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }

/* ---------- Formulaires : cibles tactiles confortables ---------- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--doux); margin: 12px 0 5px; }
input, select, textarea {
  width: 100%; min-height: 46px; padding: 11px 13px;
  border: 1px solid var(--trait); border-radius: var(--rayon-s);
  font: inherit; font-size: 16px;          /* 16px : empêche le zoom automatique sur iOS */
  background: var(--surface); color: var(--encre);
}
textarea { min-height: 96px; }
input[type="checkbox"] { width: 22px; min-height: 22px; height: 22px; accent-color: var(--accent); }
.case { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.case label { margin: 0; font-size: 15px; color: var(--encre); font-weight: 400; }

/* ---------- États vides ---------- */
/* Le vide est souvent le premier écran que quelqu'un voit : il doit orienter. */
.vide {
  border: 1px dashed var(--trait); border-radius: var(--rayon);
  padding: 28px 20px; text-align: center; background: var(--surface-2);
}
.vide__titre { font-weight: 600; font-size: 16px; margin: 0 0 6px; }
.vide .petit { max-width: 38ch; margin: 0 auto; }
.vide .bouton { width: auto; margin-top: 16px; }

button, .bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 18px;
  background: var(--accent); color: #fff; border: 0; border-radius: var(--rayon-s);
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none;
  width: 100%; margin-top: 12px;
}
.bouton:hover { text-decoration: none; }
button.secondaire, .bouton.secondaire { background: var(--surface); color: var(--encre); border: 1px solid var(--trait); }
button.danger, .bouton.danger { background: var(--alerte); }
button.compact, .bouton.compact { min-height: 40px; padding: 8px 14px; font-size: 14px; width: auto; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions form { flex: 1 1 auto; margin: 0; }
.actions button { margin-top: 0; }

/* ---------- Retours ---------- */
.alerte, .succes, .note {
  padding: 12px 14px; border-radius: var(--rayon-s); margin-bottom: 14px; font-size: 14.5px;
}
.alerte { background: var(--alerte-doux); border: 1px solid var(--alerte); color: var(--alerte); }
.succes { background: var(--accent-doux); border: 1px solid var(--accent); color: var(--accent-encre); }
.note { background: var(--or-doux); border: 1px solid var(--or); color: var(--or); }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--trait); color: var(--doux); white-space: nowrap;
}
.badge--ok { background: var(--accent-doux); color: var(--accent-encre); }
.badge--attente { background: var(--or-doux); color: var(--or); }
.badge--ko { background: var(--alerte-doux); color: var(--alerte); }
.badge--info { background: var(--info-doux); color: var(--info); }

.etoiles { color: var(--or); letter-spacing: 1px; }
.etoiles--grand { font-size: 20px; }

progress.jauge { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border: 0; margin: 8px 0; }
progress.jauge::-webkit-progress-bar { background: var(--trait); border-radius: 4px; }
progress.jauge::-webkit-progress-value { background: var(--accent); border-radius: 4px; }
progress.jauge::-moz-progress-bar { background: var(--accent); border-radius: 4px; }

/* ---------- Étapes de trajet ---------- */
.etape { border-left: 3px solid var(--trait); padding: 4px 0 4px 12px; margin: 12px 0; }
.etape--encours { border-color: var(--or); }
.etape--arrivee { border-color: var(--accent); }
.etape__titre { font-weight: 600; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Listes de définitions (remplacent les tableaux sur mobile) ---------- */
.defs { display: grid; gap: 10px; margin: 0; }
.defs > div { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--trait); }
.defs > div:last-child { border-bottom: 0; padding-bottom: 0; }
.defs dt { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--doux); }
.defs dd { margin: 0; }

.defilement { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--trait); vertical-align: top; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--doux); white-space: nowrap; }
.journal { font-family: var(--mono); font-size: 12px; min-width: 640px; }

/* ---------- Résultats de recherche ---------- */
/* ---------- Recherche ---------- */
.recherche { background: var(--surface); border: 1px solid var(--trait);
  border-radius: var(--rayon); padding: 14px 16px 16px; margin-bottom: 22px; }
/* Deux colonnes dès qu'il y a la place ; empilées sur les écrans les plus
   étroits, où deux champs côte à côte débordaient. */
.recherche__villes { display: grid; grid-template-columns: 1fr; gap: 4px 12px; }
@media (min-width: 360px) { .recherche__villes { grid-template-columns: 1fr 1fr; } }
.recherche__villes label { margin-top: 0; }
.recherche__plus { margin-top: 10px; }
.recherche__plus > summary { font-size: 14px; color: var(--accent-encre); font-weight: 600; }
.recherche button { margin-top: 14px; }

/* ---------- Une offre de voyage ---------- */
/* L'ordre suit les questions qu'on se pose : où, quand, qui, combien. */
/*
 * `min-width: 0` sur les enfants : sans lui, une grille refuse de rétrécir en
 * dessous du contenu le plus large, et un nom insécable élargit toute la carte
 * — sur un écran de 320 px, la page débordait latéralement.
 */
.offre { display: grid; gap: 6px; }
.offre > *, .offre__gp > *, .offre__pied > * { min-width: 0; }
.offre__trajet {
  font-size: 20px; font-weight: 700; letter-spacing: -.35px; line-height: 1.2;
  color: var(--encre); text-decoration: none; text-wrap: balance; overflow-wrap: anywhere;
}
.offre__trajet:hover { text-decoration: underline; }
.offre__quand { margin: 0; font-size: 15px; font-weight: 600; color: var(--accent-encre); }
.offre__titre { margin: 0; }
.offre__gp { margin-top: 8px; }
.offre__reput { margin-bottom: 4px; }
.offre__pied {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid var(--trait); padding-top: 12px; margin-top: 4px;
}
.offre__place { text-align: right; }
.offre__place b { display: block; font-size: 16px; }
.prix { font-size: 20px; font-weight: 700; }
.prix span { font-size: 13px; font-weight: 400; color: var(--doux); }

/* ---------- Réputation ---------- */
.reput { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.reput__note { font-weight: 700; font-size: 15px; }
.reput--vide { color: var(--doux); }

.resume-avis { display: grid; gap: 14px; }
.resume-avis__chiffre { display: flex; align-items: baseline; gap: 10px; }
.resume-avis__chiffre b { font-size: 40px; line-height: 1; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.distribution { display: grid; gap: 6px; }
.distribution__ligne { display: grid; grid-template-columns: 42px 1fr 34px; align-items: center; gap: 8px; font-size: 13px; }
.distribution__ligne .compte { text-align: right; color: var(--doux); font-variant-numeric: tabular-nums; }
.distribution progress { margin: 0; height: 10px; }

.filtres { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.puce {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px;
  border: 1px solid var(--trait); border-radius: 999px; background: var(--surface);
  color: var(--encre); font-size: 14px; text-decoration: none; white-space: nowrap;
}
.puce[aria-pressed="true"], .puce--active { background: var(--accent-doux); border-color: var(--accent); color: var(--accent-encre); font-weight: 600; }
.puce:hover { text-decoration: none; }

.avis { display: grid; gap: 6px; }
.avis__entete { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- QR ---------- */
.qr { display: grid; justify-items: center; gap: 12px; text-align: center; }
.qr img { width: min(260px, 72vw); height: auto; border: 1px solid var(--trait); border-radius: var(--rayon); background: #fff; }
.jeton { font-family: var(--mono); font-size: 11px; word-break: break-all; background: var(--surface-2); padding: 10px; border-radius: var(--rayon-s); color: var(--doux); width: 100%; }
.cadre-camera {
  position: relative; width: 100%; aspect-ratio: 1 / 1; max-width: 100%; overflow: hidden;
  background: #14170f; color: #8f8a82; border-radius: var(--rayon);
  display: grid; place-items: center; text-align: center; font-size: 14px;
}
.cadre-camera video { width: 100%; height: 100%; object-fit: cover; display: none; }
.cadre-camera[data-actif] video { display: block; }
.cadre-camera[data-actif] .cadre-camera__aide { display: none; }
.cadre-camera__aide { padding: 16px; }
/* Mire de cadrage : un carré au centre, là où l'oeil place naturellement le
   code. Réservée au scan — on ne cadre pas un colis dans une mire à QR. */
.cadre-camera[data-actif]:not([data-cadre-photo])::after {
  content: ""; position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  width: 64%; aspect-ratio: 1; border: 3px solid rgba(255, 255, 255, .9); border-radius: 16px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45);
}
@media (min-width: 720px) { .cadre-camera { aspect-ratio: 4 / 3; } }

/* ---------- Indicateurs ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--trait); border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden; }
.kpi { background: var(--surface); padding: 14px; text-align: center; }
.kpi b { display: block; font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12px; color: var(--doux); }

/* ---------- Notifications / PWA ---------- */
.push-etat { font-size: 14px; color: var(--doux); margin-top: 10px; }
.push-etat[data-ton="ok"] { color: var(--accent-encre); }
.push-etat[data-ton="ko"] { color: var(--alerte); }
[hidden] { display: none !important; }

.valeur-alerte { color: var(--alerte); font-weight: 600; }

.photos { display: grid; gap: 14px; margin: 12px 0; }
@media (min-width: 560px) { .photos { grid-template-columns: 1fr 1fr; } }
.photo { margin: 0; background: var(--surface-2); border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden; }
.photo img { width: 100%; display: block; aspect-ratio: 4 / 3; object-fit: cover; }
.photo__effacee { aspect-ratio: 4 / 3; display: grid; place-items: center; text-align: center; color: var(--doux); font-size: 14px; }
.photo figcaption { padding: 10px 12px; font-size: 14px; }
.code-photo { display: inline-block; font-family: var(--mono); font-size: 13px; background: var(--surface);
  border: 1px solid var(--trait); border-radius: 6px; padding: 3px 8px; margin: 6px 0; letter-spacing: .5px; }

/* ---------- Frise du colis ---------- */
.colis__tete { margin-bottom: 18px; }
.frise { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.frise__pas { display: grid; grid-template-columns: 20px 1fr; gap: 12px; padding-bottom: 16px; position: relative; }
.frise__pas:last-child { padding-bottom: 0; }
/* Le trait qui relie : il s'arrête au dernier pas, sinon il pend dans le vide. */
.frise__pas:not(:last-child)::before {
  content: ""; position: absolute; left: 9px; top: 18px; bottom: 0; width: 2px; background: var(--trait);
}
.frise__pas--faite:not(:last-child)::before { background: var(--accent); }
.frise__puce {
  width: 20px; height: 20px; border-radius: 50%; margin-top: 1px;
  border: 2px solid var(--trait); background: var(--surface); z-index: 1;
}
.frise__pas--faite .frise__puce { border-color: var(--accent); background: var(--accent); }
.frise__pas--courante .frise__puce { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-doux); }
.frise__texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.frise__pas--avenir .frise__texte b { color: var(--doux); font-weight: 500; }
.frise__pas--courante .frise__texte b { color: var(--accent-encre); }
.frise--arretee { padding: 4px 0; }
.frise__arret { margin: 0; font-weight: 600; color: var(--alerte); }

/* ---------- Rendez-vous de dépôt ---------- */
/* Le créneau convenu doit se lire d'un coup d'oeil, depuis un trottoir, à une
   main : c'est la seule information de l'écran dont on a besoin dehors. */
.rdv__accord {
  border-left: 3px solid var(--accent); background: var(--accent-doux);
  border-radius: var(--rayon-s); padding: 10px 12px; margin: 10px 0;
}
.rdv__accord[data-statut="refuse"],
.rdv__accord[data-statut="remplace"],
.rdv__accord[data-statut="annule"] {
  border-left-color: var(--trait); background: var(--surface-2); opacity: .72;
}
.rdv__quand {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 17px; margin-bottom: 2px;
}
.rdv__quand b { min-width: 0; }

/* Dans la liste des réservations d'un voyage : une ligne détachée du reste,
   sinon elle se lit comme la suite du bloc de contact qui la précède. */
.rdv__ligne { border-top: 1px solid var(--trait); padding-top: 10px; margin-top: 0; }

/* ---------- L'action du moment ---------- */
/*
 * Collante plutôt que fixe : elle reste sous les yeux pendant qu'on fait
 * défiler, mais occupe sa place dans le flux — une barre fixe recouvrirait la
 * fin de la page, qu'il faudrait alors compenser par une marge devinée.
 */
.action {
  position: sticky; z-index: 25;
  bottom: calc(var(--onglets-h) + var(--marge-bas) + 10px);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--accent);
  border-radius: var(--rayon); padding: 14px 16px; margin: 22px 0 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 14px 30px -20px rgba(0,0,0,.45);
}
.action--attente, .action--fini { border-color: var(--trait); box-shadow: none; }
.action__texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 200px; }
.action .bouton { width: auto; margin: 0; flex: none; }
@media (min-width: 768px) { .action { bottom: 16px; } }

/* ---------- Fiche d'un voyage ---------- */
.voyage__tete { margin-bottom: 18px; }
.voyage__quand { margin: 0 0 8px; font-size: 17px; font-weight: 600; color: var(--accent-encre); }
.voyage__tete .sous { margin-bottom: 10px; }
.voyage__reput { margin: 12px 0; }
.voyage__prix {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid var(--trait); padding-top: 12px;
}
.voyage__place { text-align: right; }
.voyage__place b { display: block; font-size: 16px; }
.bouton.secondaire { margin-top: 8px; }

/* ---------- Identité d'un GP ---------- */
/* Le badge passe à la ligne plutôt que d'élargir la carte : sur 320 px, une
   pastille, un nom et « Identité vérifiée » ne tiennent pas sur une rangée. */
.identite { display: flex; align-items: center; gap: 8px 10px; min-width: 0; flex-wrap: wrap; }
.identite__lien { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; max-width: 100%; }
.identite__lien:hover .identite__nom { text-decoration: underline; }
.identite__pastille {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700; letter-spacing: .3px;
}
.identite--grand .identite__pastille { width: 52px; height: 52px; font-size: 18px; }
.identite__texte { display: flex; flex-direction: column; min-width: 0; }
.identite__nom { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identite--grand .identite__nom { font-size: 18px; letter-spacing: -.2px; }
.identite__dessous { font-size: 13px; color: var(--doux); }
/* Six teintes stables : assez pour distinguer deux voisins dans une liste. */
.identite__pastille--0 { background: #d8ece7; color: #0c5a4e; }
.identite__pastille--1 { background: #e6e6f5; color: #3b3b7a; }
.identite__pastille--2 { background: #fae3d7; color: #8a4216; }
.identite__pastille--3 { background: #dfeaf7; color: #1d4f7c; }
.identite__pastille--4 { background: #f6e4ef; color: #7c2a57; }
.identite__pastille--5 { background: #e9eddb; color: #4d5c1c; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .identite__pastille--0 { background: #11332c; color: #7fd4c3; }
  :root:not([data-theme="light"]) .identite__pastille--1 { background: #22223f; color: #a9a9e8; }
  :root:not([data-theme="light"]) .identite__pastille--2 { background: #38220f; color: #e2a87c; }
  :root:not([data-theme="light"]) .identite__pastille--3 { background: #152b3d; color: #93c2e8; }
  :root:not([data-theme="light"]) .identite__pastille--4 { background: #351b2b; color: #e3a0c6; }
  :root:not([data-theme="light"]) .identite__pastille--5 { background: #2a2f14; color: #c3d184; }
}

/* ---------- Prise de photo ---------- */
.etiquette { font-weight: 600; margin: 0 0 8px; }
.prise { margin-bottom: 12px; }
.prise .cadre-camera { position: relative; }
.prise__apercu { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.prise canvas { display: none; }
.prise .actions { margin-top: 10px; }
/* Le champ de fichier n'est qu'un repli : discret, mais jamais introuvable. */
.repli { margin-top: 10px; }
.repli summary { font-size: 14px; color: var(--doux); font-weight: 500; }
.repli input[type=file] { margin-top: 8px; }

.formulaire-photo { border-top: 1px solid var(--trait); padding-top: 12px; margin-top: 12px; }
.formulaire-photo + .formulaire-photo { margin-top: 8px; }

.piece { display: block; width: 100%; max-width: 320px; border-radius: var(--rayon-s); border: 1px solid var(--trait); margin: 10px 0; }

details { margin-top: 4px; }
details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--accent-encre); }
details[open] summary { margin-bottom: 6px; }
blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--trait); color: var(--doux); }

.pied { color: var(--doux); font-size: 12.5px; margin-top: 40px; border-top: 1px solid var(--trait); padding-top: 14px; }
.pied p { margin: 0 0 8px; }
.pied nav { display: flex; flex-wrap: wrap; gap: 14px; }
.pied a { color: var(--doux); }

/* ---------- Tablette et bureau ---------- */
@media (min-width: 720px) {
  body { padding-bottom: 0; }
  .onglets { display: none; }
  /* À partir de la tablette, la barre se remplit : le logo reprend sa place à
     gauche, la navigation occupe le centre, l'identité la droite. */
  .entete { height: calc(60px + var(--marge-haut)); padding: var(--marge-haut) 24px 0;
    gap: 20px; justify-content: flex-start; }
  .entete__moi { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: #cfcac2; }
  .entete__moi a { color: #cfcac2; }
  .entete__etat { position: static; height: auto; margin-left: auto; }
  .entete__liens { display: flex; gap: 18px; flex-wrap: wrap; }
  .entete__liens a { color: #cfcac2; font-size: 14px; position: relative; }
  .entete__liens a[aria-current="page"] { color: #fff; font-weight: 600; }
  .entete__liens .pastille { background: var(--alerte); color: #fff; border-radius: 10px; padding: 1px 6px; font-size: 11px; font-weight: 700; margin-left: 4px; }
  .contenu { max-width: 1040px; margin: 0 auto; padding: 28px 24px 60px; }
  h1 { font-size: 30px; }
  .duo { grid-template-columns: 1fr 1fr; }
  .carte { padding: 18px 20px; }
  button, .bouton { width: auto; }
  .defs { grid-template-columns: 1fr 1fr; gap: 14px 24px; }
  .kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .journal { min-width: 0; }
  .offre__pied { flex-wrap: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
