/* KamerTrip — feuille de style unique, sans bibliothèque, pensée pour la 3G. */
:root {
  --vert: #0d6b3d;
  --vert-fonce: #084a2a;
  --vert-pale: #e6f2eb;
  --jaune: #f4b400;
  --jaune-pale: #fff6d6;
  --rouge: #c62828;
  --rouge-pale: #fdecea;
  --encre: #1c2421;
  --gris: #5f6b66;
  --ligne: #dfe5e2;
  --fond: #f6f8f7;
  --carte: #ffffff;
  --rayon: 12px;
  --ombre: 0 1px 2px rgba(0, 0, 0, .06), 0 2px 8px rgba(0, 0, 0, .04);
}
@media (prefers-color-scheme: dark) {
  :root {
    --vert: #3fb878; --vert-fonce: #2f9a62; --vert-pale: #12291d;
    --jaune: #f4c542; --jaune-pale: #2c2612; --rouge: #ef6c6c; --rouge-pale: #2d1515;
    --encre: #e8eeeb; --gris: #9aa7a1; --ligne: #2b3531; --fond: #111614; --carte: #182019;
    --ombre: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--encre); background: var(--fond); }
a { color: var(--vert); }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75em; }
small, .discret { color: var(--gris); font-size: .875rem; }

/* En-tête */
.entete { background: var(--vert-fonce); color: #fff; }
.entete .contenu { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.logo { display: block; line-height: 0; text-decoration: none; }
.logo img { display: block; height: 146px; width: auto; border-radius: 10px; }
@media (max-width: 520px) { .logo img { height: auto; width: 62vw; } }
.entete nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: .9rem; }
.entete nav a, .entete nav button { color: #fff; text-decoration: none; opacity: .92; background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.entete nav a:hover { opacity: 1; text-decoration: underline; }
.contenu { max-width: 960px; margin: 0 auto; padding: 0 16px; }
main.contenu { padding-top: 20px; padding-bottom: 48px; }
.pied { color: var(--gris); font-size: .8rem; text-align: center; padding: 24px 16px 40px; }

/* Cartes */
.carte { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 16px; box-shadow: var(--ombre); margin-bottom: 14px; }
.carte.accent { border-color: var(--vert); border-width: 2px; }
.grille { display: grid; gap: 12px; }
@media (min-width: 640px) { .grille-2 { grid-template-columns: 1fr 1fr; } .grille-3 { grid-template-columns: repeat(3, 1fr); } .grille-4 { grid-template-columns: repeat(4, 1fr); } }

/* Formulaires */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--ligne); border-radius: 8px; background: var(--carte); color: var(--encre); min-height: 44px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--vert); outline-offset: 1px; border-color: var(--vert); }
.champ { margin-bottom: 12px; }
.aide { font-size: .8rem; color: var(--gris); margin-top: 3px; font-weight: 400; }
.rangee { display: flex; gap: 10px; flex-wrap: wrap; }
.rangee > * { flex: 1 1 140px; }
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 10px 18px; border-radius: 10px; border: 0; background: var(--vert); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.bouton:hover { background: var(--vert-fonce); }
.bouton.large { width: 100%; }
.bouton.secondaire { background: transparent; color: var(--vert); border: 1.5px solid var(--vert); }
.bouton.danger { background: var(--rouge); }
.bouton.petit { min-height: 36px; padding: 6px 12px; font-size: .875rem; }
.bouton[disabled] { opacity: .5; cursor: not-allowed; }
.choix-operateur { display: flex; gap: 10px; }
.choix-operateur label { flex: 1; border: 1.5px solid var(--ligne); border-radius: 10px; padding: 12px; text-align: center; cursor: pointer; font-weight: 700; }
.choix-operateur input { width: auto; min-height: 0; margin-right: 6px; }
.choix-operateur label:has(input:checked) { border-color: var(--vert); background: var(--vert-pale); }

/* Messages */
.message { padding: 12px 14px; border-radius: 10px; margin-bottom: 12px; background: var(--vert-pale); border: 1px solid var(--vert); }
.message.error, .message.erreur { background: var(--rouge-pale); border-color: var(--rouge); }
.message.warning, .message.info { background: var(--jaune-pale); border-color: var(--jaune); }

/* Recherche */
.heros { background: linear-gradient(160deg, var(--vert-fonce), var(--vert)); color: #fff; padding: 28px 0 70px; }
.heros h1 { font-size: 1.7rem; }
.heros p { opacity: .9; }
.recherche { margin-top: -56px; }
.inverser { align-self: end; flex: 0 0 auto !important; }
.liens-rapides { display: flex; gap: 8px; flex-wrap: wrap; }
.puce { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--vert-pale); color: var(--vert-fonce); text-decoration: none; font-size: .875rem; font-weight: 600; border: 0; cursor: pointer; font-family: inherit; }
.puce.active { background: var(--vert); color: #fff; }
@media (prefers-color-scheme: dark) { .puce { color: var(--encre); } }

/* Résultats */
.offre { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.offre .heure { font-size: 1.6rem; font-weight: 800; }
.offre .prix { font-size: 1.25rem; font-weight: 800; text-align: right; }
.offre .compagnie { font-weight: 700; }
.etiquette { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--fond); border: 1px solid var(--ligne); color: var(--gris); vertical-align: middle; }
.etiquette.vip { background: var(--jaune-pale); border-color: var(--jaune); color: var(--encre); }
.etiquette.ok { background: var(--vert-pale); border-color: var(--vert); color: var(--vert-fonce); }
.etiquette.alerte { background: var(--rouge-pale); border-color: var(--rouge); color: var(--rouge); }
@media (prefers-color-scheme: dark) { .etiquette.ok { color: var(--encre); } }
.navigation-jours { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 8px; }
.filtres { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }

/* Plan du bus */
.bus { display: inline-block; padding: 14px 12px; border: 2px solid var(--ligne); border-radius: 28px 28px 12px 12px; background: var(--carte); }
.bus .avant { text-align: right; font-size: .75rem; color: var(--gris); margin-bottom: 8px; }
.rangee-bus { display: flex; gap: 6px; margin-bottom: 6px; }
.siege, .couloir { width: 40px; height: 40px; flex: 0 0 40px; }
.siege { border-radius: 8px 8px 12px 12px; border: 1.5px solid var(--vert); background: var(--carte); color: var(--encre); font-weight: 700; font-size: .85rem; cursor: pointer; padding: 0; }
.siege.occupe { background: var(--ligne); border-color: var(--ligne); color: var(--gris); cursor: not-allowed; text-decoration: line-through; }
.siege.choisi { background: var(--vert); color: #fff; }
.legende { display: flex; gap: 14px; font-size: .8rem; color: var(--gris); margin: 8px 0; flex-wrap: wrap; }
.legende i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 4px; border: 1.5px solid var(--vert); }
.legende i.o { background: var(--ligne); border-color: var(--ligne); }
.legende i.c { background: var(--vert); }
.disposition-choix { display: grid; gap: 16px; }
@media (min-width: 820px) { .disposition-choix { grid-template-columns: auto 1fr; align-items: start; } .disposition-choix .colle { position: sticky; top: 12px; } }
.passager { border-left: 4px solid var(--vert); }
/* Aller-retour : les deux plans côte à côte (ou l'un sous l'autre sur téléphone), sans colonne fixe. */
.plans { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-start; }
.disposition-choix.aller-retour { grid-template-columns: 1fr; }
.disposition-choix.aller-retour .colle { position: static; }
.passager h3 { display: flex; justify-content: space-between; }

/* Récapitulatif des prix */
.recap { width: 100%; border-collapse: collapse; }
.recap td { padding: 6px 0; }
.recap td:last-child { text-align: right; white-space: nowrap; }
.recap tr.total td { border-top: 1px solid var(--ligne); font-weight: 800; font-size: 1.1rem; padding-top: 10px; }

/* Billet */
.billet { border: 2px dashed var(--vert); border-radius: var(--rayon); padding: 16px; background: var(--carte); margin-bottom: 14px; }
.billet .qr { width: 220px; max-width: 70vw; margin: 8px auto; display: block; background: #fff; padding: 6px; border-radius: 8px; }
.billet .qr svg { width: 100%; height: auto; display: block; }
.code-resa { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.6rem; letter-spacing: .15em; font-weight: 800; }
.statut { font-weight: 700; }
.statut-valide { color: var(--vert); }
.statut-annule, .statut-expire, .statut-absent { color: var(--rouge); }

/* Attente du paiement */
.attente { text-align: center; padding: 28px 16px; }
.roue { width: 48px; height: 48px; border: 5px solid var(--vert-pale); border-top-color: var(--vert); border-radius: 50%; margin: 0 auto 16px; animation: tourne 1s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .roue { animation: none; } }

/* Tableaux du personnel */
.tableau { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tableau th, .tableau td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--ligne); vertical-align: top; }
.tableau th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--gris); }
.tableau td.nombre, .tableau th.nombre { text-align: right; white-space: nowrap; }
.defile { overflow-x: auto; }
.chiffre { font-size: 1.6rem; font-weight: 800; }
.barre { height: 8px; background: var(--ligne); border-radius: 4px; overflow: hidden; min-width: 80px; }
.barre > span { display: block; height: 100%; background: var(--vert); }

/* Écran de scan */
.resultat-scan { border-radius: var(--rayon); padding: 18px; text-align: center; font-size: 1.1rem; font-weight: 700; margin: 12px 0; min-height: 90px; }
.resultat-scan.valide { background: var(--vert); color: #fff; }
.resultat-scan.erreur { background: var(--rouge); color: #fff; }
.resultat-scan.attention { background: var(--jaune); color: #1c2421; }
.resultat-scan.neutre { background: var(--carte); border: 1px solid var(--ligne); }
#lecteur { width: 100%; max-width: 420px; margin: 0 auto; border-radius: var(--rayon); overflow: hidden; }
#lecteur.actif { background: #000; min-height: 200px; }
.reseau { font-size: .8rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.reseau.en-ligne { background: var(--vert-pale); color: var(--vert-fonce); }
.reseau.hors-ligne { background: var(--rouge-pale); color: var(--rouge); }

/* Téléphone simulé (démo) */
.telephone { max-width: 340px; margin: 0 auto; border: 10px solid #222; border-radius: 34px; padding: 22px 18px; background: #f2f2f2; color: #111; }
.telephone .ecran-op { background: #fff; border-radius: 12px; padding: 16px; }
.telephone .op-om { color: #ff7900; }
.telephone .op-momo { color: #c29b00; }
.bandeau-demo { background: var(--jaune); color: #1c2421; text-align: center; font-size: .8rem; font-weight: 700; padding: 4px 8px; }

/* Impression (billets, manifestes, affiches) */
@media print {
  .entete, .pied, .non-imprime, .bandeau-demo { display: none !important; }
  body { background: #fff; color: #000; }
  .carte, .billet { box-shadow: none; break-inside: avoid; }
  main.contenu { padding: 0; max-width: none; }
}
.affiche { text-align: center; max-width: 640px; margin: 0 auto; }
.affiche .qr-grand { width: 380px; max-width: 80vw; margin: 0 auto; background: #fff; padding: 10px; }
.affiche .qr-grand svg { width: 100%; height: auto; }
.cache { display: none !important; }

/* Partage du lien de suivi */
.partage { display: flex; flex-wrap: wrap; gap: 8px; }
.partage .bouton { flex: 1 1 180px; }
.bouton.whatsapp { background: #1f8f4e; }
.bouton.whatsapp:hover { background: #17733e; }
.bloc-suivi { border-left: 4px solid var(--vert); }
/* Icône de bus sur les cartes */
.icone-bus { background: none; border: 0; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
/* Nom de la compagnie / de l'agence en tête de l'espace du personnel */
.identite { display: flex; align-items: center; gap: 14px; min-width: 0; }
.nom-espace { display: flex; flex-direction: column; justify-content: center; padding-left: 14px; border-left: 2px solid rgba(255,255,255,.35);
  color: var(--jaune); font-weight: 800; font-size: 1.35rem; line-height: 1.15; }
.nom-espace small { color: #fff; font-weight: 600; font-size: .9rem; opacity: .9; }
@media (max-width: 480px) { .nom-espace { font-size: 1.1rem; padding-left: 10px; } .identite { gap: 10px; } }
/* Résultats : compagnie, classe et agence dans un bandeau de couleur en tête de chaque départ */
.offre { overflow: hidden; }
.offre-entete { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
  margin: -16px -16px 6px; padding: 10px 16px; background: var(--vert-fonce); color: #fff; }
.offre-compagnie { font-weight: 800; font-size: 1.05rem; }
.offre-classe { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.18); }
.offre-agence { margin-left: auto; font-size: .875rem; opacity: .92; }
.offre-vip .offre-entete { background: linear-gradient(90deg, var(--vert-fonce), #5a4500); }
.offre-vip .offre-classe { background: var(--jaune); color: #1c2421; }
@media (max-width: 480px) { .offre-agence { margin-left: 0; flex-basis: 100%; } }
@media (prefers-color-scheme: dark) { .offre-entete { background: #0d3a24; } }
/* Page d'accueil : étapes, bandeau compagnies, questions */
.bloc-landing { margin: 28px 0 8px; }
.etapes { list-style: none; counter-reset: etape; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 640px) { .etapes { grid-template-columns: repeat(4, 1fr); } }
.etapes li { counter-increment: etape; background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.etapes li::before { content: counter(etape); width: 32px; height: 32px; border-radius: 50%; background: var(--jaune); color: #1c2421; font-weight: 800; display: grid; place-items: center; margin-bottom: 6px; }
.etapes li span { color: var(--gris); font-size: .925rem; }
.bandeau-compagnies { background: linear-gradient(160deg, var(--vert-fonce), var(--vert)); color: #fff; border-radius: var(--rayon); padding: 22px 18px; margin: 28px 0 8px; }
.bandeau-compagnies ul { padding-left: 1.1em; margin: 0 0 16px; }
.bandeau-compagnies li { margin-bottom: 6px; }
.bouton.secondaire.clair { color: #fff; border-color: rgba(255,255,255,.75); }
.bouton.secondaire.clair:hover { background: rgba(255,255,255,.12); }
details.carte summary { cursor: pointer; font-weight: 700; }
details.carte p { margin: 10px 0 0; color: var(--gris); }
/* Guide d'utilisation */
.sommaire { display: flex; flex-wrap: wrap; gap: 8px; }
.chapitre { scroll-margin-top: 12px; }
.chapitre h3 { margin-top: 1.1em; }
.chapitre ol, .chapitre ul { padding-left: 1.3em; }
.chapitre li { margin-bottom: 6px; }
/* Menu du personnel : en ligne sur grand écran, menu déroulant sur téléphone et tablette */
.menu-perso { display: flex; gap: 14px; align-items: center; flex-wrap: nowrap; white-space: nowrap; }
.bouton-menu { display: none; }
@media (min-width: 1025px) { .entete nav { flex-wrap: nowrap; } }
@media (max-width: 1024px) {
  .entete { position: relative; }
  .entete .contenu { flex-wrap: nowrap; }
  .identite { flex: 1 1 auto; }
  .entete nav { flex-wrap: nowrap; gap: 10px; }
  .entete nav .bouton-menu { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1.5px solid rgba(255,255,255,.6);
    border-radius: 8px; font-weight: 700; white-space: nowrap; opacity: 1; }
  .menu-perso { display: none; position: absolute; z-index: 1000; top: 100%; right: 8px; width: max-content; max-width: calc(100% - 16px); flex-direction: column; align-items: stretch; gap: 0;
    background: var(--vert-fonce); border-radius: 0 0 10px 10px; box-shadow: 0 10px 22px rgba(0,0,0,.3); padding: 4px 0; }
  .menu-perso.ouvert { display: flex; }
  .entete nav .menu-perso > a, .entete nav .menu-perso > form button { display: block; width: 100%; text-align: left; padding: 8px 16px; font-size: .95rem; line-height: 1.3; opacity: 1; }
  .entete nav .menu-perso > a:hover, .entete nav .menu-perso > form button:hover { background: rgba(255,255,255,.08); text-decoration: none; }
  .menu-perso > a + a, .menu-perso > form { border-top: 1px solid rgba(255,255,255,.1); }
  .menu-perso > form { display: block !important; }
}
.recap tr.remise td { color: var(--vert); font-weight: 700; }
/* Fidélité */
.fidelite { margin-top: 8px; max-width: 280px; }
.jauge { height: 6px; border-radius: 999px; background: var(--ligne); overflow: hidden; margin-top: 4px; }
.jauge span { display: block; height: 100%; background: var(--jaune); border-radius: 999px; }
.fidelite-badge { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 6px; background: var(--jaune-pale); border: 1px solid var(--jaune); font-size: .85rem; font-weight: 700; }
.carte-fidelite { background: var(--jaune-pale); border-color: var(--jaune); }
/* Tableau de croissance */
.kpi .chiffre { font-size: 1.45rem; }
.evolution { font-weight: 700; color: var(--gris); }
.evolution.hausse { color: var(--vert); }
.evolution.baisse { color: var(--rouge); }
.graphe { position: relative; margin: 0; }
.graphe svg { width: 100%; height: auto; display: block; overflow: visible; }
.graphe .repere { stroke: var(--ligne); stroke-width: 1; }
.graphe .base { stroke: var(--gris); stroke-width: 1; }
.graphe .axe { fill: var(--gris); font-size: 12px; }
.graphe .marque { fill: var(--vert); }
.graphe .zone { fill: transparent; }
.graphe .barre { cursor: pointer; outline: none; }
.graphe .barre.actif .marque, .graphe .barre:focus .marque { fill: var(--vert-fonce); }
.graphe .barre.actif .zone, .graphe .barre:focus .zone { fill: var(--vert-pale); }
.graphe .bulle { position: absolute; top: -6px; transform: translate(-50%, -100%); background: var(--carte); border: 1px solid var(--ligne);
  box-shadow: 0 4px 14px rgba(0,0,0,.12); border-radius: 8px; padding: 6px 10px; font-size: .85rem; white-space: nowrap; pointer-events: none; }
.graphe .chiffres summary { cursor: pointer; font-size: .85rem; color: var(--gris); margin-top: 6px; }
.barres-h { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.barres-h li { display: grid; grid-template-columns: minmax(0, 11rem) 1fr auto; gap: 10px; align-items: center; font-size: .925rem; }
.barres-h .nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barres-h .piste { height: 10px; background: var(--fond); border-radius: 999px; overflow: hidden; }
.barres-h .piste span { display: block; height: 100%; background: var(--vert); border-radius: 999px; }
@media (prefers-color-scheme: dark) { .graphe .marque { fill: #3fb878; } }
/* Téléphone : chiffres clés sur deux colonnes ; nom de l'espace qui ne passe jamais sous le bouton Menu */
.kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi .carte { margin-bottom: 0; }
@media (min-width: 640px) { .kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 480px) { .kpi .chiffre { font-size: 1.15rem; } .kpi .carte { padding: 12px; } }
.kpi { margin-bottom: 14px; }
.nom-espace { min-width: 0; overflow-wrap: break-word; }
.nom-espace .court { display: none; }
@media (max-width: 480px) { .nom-espace .long { display: none; } .nom-espace .court { display: inline; } }
.entete nav { flex: 0 0 auto; }
@media (max-width: 480px) { .nom-espace { font-size: 1rem; } .nom-espace small { font-size: .8rem; } }
.etat-sauvegarde { font-size: .9rem; margin: 10px 0 0; }
.etat-sauvegarde.ok { color: var(--vert); }
.petit-texte { font-size: .8rem; color: var(--gris); margin: 4px 0 8px; }
.code-fidelite { margin: 6px 0 14px; }
.code-fidelite summary { cursor: pointer; font-weight: 700; color: var(--vert); }
.fidelite-code { margin-top: 6px; padding: 6px 8px; border-radius: 8px; background: var(--jaune-pale); border: 1px dashed var(--jaune); font-size: .85rem; }
/* Page « Pour les compagnies » */
.heros-compagnies { padding-bottom: 36px; }
.heros-compagnies h1 { font-size: 1.9rem; max-width: 760px; }
.heros-compagnies p { max-width: 720px; }
.surtitre { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--jaune); margin: 0 0 6px; }
.bouton.jaune { background: var(--jaune); color: #1c2421; }
.bouton.jaune:hover { background: #ffc933; }
.offre-tarif { border-left: 4px solid var(--jaune); margin-top: 28px; }
.liste-coches { list-style: none; padding: 16px; margin: 0; }
.liste-coches li { padding-left: 1.6em; position: relative; margin-bottom: 10px; }
.liste-coches li::before { content: "✓"; position: absolute; left: 0; color: var(--vert); font-weight: 800; }
/* Conditions générales */
.texte-legal { max-width: 860px; margin: 0 auto; line-height: 1.6; }
.texte-legal h2 { margin-top: 1.6em; font-size: 1.15rem; scroll-margin-top: 12px; }
.texte-legal li { margin-bottom: 8px; }
.sommaire-legal ol { columns: 2; column-gap: 24px; padding-left: 1.2em; margin: 12px 0 0; }
@media (max-width: 640px) { .sommaire-legal ol { columns: 1; } .heros-compagnies h1 { font-size: 1.5rem; } }
/* Places vendues en espèces au guichet */
.legende-plan { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin: 8px 0 12px; font-size: .875rem; }
.legende-plan .case { display: inline-block; width: 16px; height: 16px; border-radius: 4px; vertical-align: -3px; border: 1.5px solid var(--ligne); }
.case.libre { background: var(--carte); border-color: var(--vert); }
.case.choisie { background: var(--vert); border-color: var(--vert); }
.case.guichet { background: var(--jaune); border-color: #c99400; }
.case.en_ligne { background: var(--ligne); }
.plan-guichet { display: grid; gap: 6px; justify-content: center; }
.plan-guichet .avant { text-align: center; font-size: .8rem; color: var(--gris); border-bottom: 2px dashed var(--ligne); padding-bottom: 6px; margin-bottom: 4px; }
.rangee-sieges { display: flex; gap: 6px; justify-content: center; }
.rangee-sieges .allee { width: 22px; }
.siege-g { width: 42px; height: 40px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: .85rem; border: 1.5px solid var(--ligne); }
.siege-g.libre { border-color: var(--vert); color: var(--vert); cursor: pointer; position: relative; background: var(--carte); }
.siege-g.libre input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.siege-g.libre:has(input:checked) { background: var(--vert); color: #fff; }
.siege-g.libre:has(input:focus-visible) { outline: 3px solid var(--jaune); outline-offset: 1px; }
.siege-g.guichet { background: var(--jaune); border-color: #c99400; color: #1c2421; }
.siege-g.en_ligne { background: var(--ligne); color: var(--gris); }
@media (max-width: 400px) { .siege-g { width: 36px; height: 36px; } .rangee-sieges { gap: 4px; } }
.actions-guichet { white-space: nowrap; }
.actions-guichet .bouton + .bouton { margin-left: 4px; }

/* Écran Guichet sur téléphone : on garde l'heure, le trajet, les places et les boutons visibles sans défilement. */
.seul-mobile { display: none; }
@media (max-width: 640px) {
  .cache-mobile { display: none; }
  .seul-mobile { display: inline; }
  .actions-guichet .bouton, .actions-guichet .bouton + .bouton { display: block; margin: 0 0 6px; text-align: center; padding-left: 10px; padding-right: 10px; }
  .tableau-guichet th, .tableau-guichet td { padding-left: 4px; padding-right: 4px; }
  .tableau-guichet th.nombre { white-space: normal; }
}

/* Courbe de vitesse d'un trajet (suivi GPS) */
.courbe-vitesse { position: relative; margin: 0; }
.courbe-vitesse svg { width: 100%; height: auto; display: block; overflow: visible; touch-action: pan-y; }
.courbe-vitesse .repere { stroke: var(--ligne); stroke-width: 1; }
.courbe-vitesse .base { stroke: var(--gris); stroke-width: 1; }
.courbe-vitesse .axe { fill: var(--gris); font-size: 12px; }
.courbe-vitesse .aire { fill: var(--vert-pale); }
.courbe-vitesse .trace { fill: none; stroke: var(--vert); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.courbe-vitesse .trace.exces { stroke: var(--rouge); stroke-width: 2.5; }
.courbe-vitesse .limite { stroke: var(--rouge); stroke-width: 1.5; stroke-dasharray: 6 4; }
.courbe-vitesse .limite-texte { fill: var(--rouge); font-size: 12px; font-weight: 600; }
.courbe-vitesse .curseur { stroke: var(--gris); stroke-width: 1; }
.courbe-vitesse .point { fill: var(--vert); stroke: var(--carte); stroke-width: 2; }
.courbe-vitesse .point.exces { fill: var(--rouge); }
.courbe-vitesse .survol { fill: transparent; cursor: crosshair; }
.courbe-vitesse .bulle { position: absolute; top: -6px; transform: translateX(-50%); background: var(--encre); color: var(--carte);
  padding: 3px 8px; border-radius: 6px; font-size: .82rem; white-space: nowrap; pointer-events: none; }
.chiffre.rouge, strong.rouge { color: var(--rouge); }
.defile-courbe { overflow-x: auto; padding-top: 30px; margin-top: -20px; }
@media (max-width: 640px) { .courbe-vitesse { min-width: 620px; } }

/* Taxi (service facultatif) */
.bloc-taxi { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.bloc-taxi p { flex: 1 1 260px; }
.bloc-taxi .discret { display: block; }
.offre-taxi .modalites { margin: 10px 0; padding-left: 18px; color: var(--gris); }
.liste-choix { display: grid; gap: 8px; margin-bottom: 12px; }
.choix-carte { display: flex; gap: 10px; align-items: center; border: 1.5px solid var(--ligne); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.choix-carte input { width: auto; min-height: 0; margin: 0; }
.choix-carte span { flex: 1; }
.choix-carte:has(input:checked) { border-color: var(--vert); background: var(--vert-pale); }
.titre-champ { display: block; font-weight: 600; margin-bottom: 6px; }
.etape-whatsapp { background: var(--vert-pale); border-radius: 10px; padding: 12px 14px; margin-top: 10px; }
.etape-whatsapp ol { margin: 10px 0 0; padding-left: 20px; }
.bouton.whatsapp { background: #1fa855; border-color: #1fa855; color: #fff; }
.course { border-top: 1px solid var(--ligne); padding: 10px 0; display: grid; gap: 3px; }
.course:first-of-type { border-top: 0; }
.course-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.course-actions details summary { list-style: none; cursor: pointer; }
.lien-discret { background: none; border: 0; color: var(--gris); cursor: pointer; font-size: 1rem; padding: 4px 6px; min-height: 0; }
.champ:has(input[value="plus_tard"]:not(:checked)) input[type="datetime-local"] { display: none; }

/* Hôtels (service facultatif) */
.recherche-hotel .rangee .champ { flex: 1 1 140px; }
.carte-hotel { display: flex; gap: 12px; padding: 10px; color: inherit; text-decoration: none; align-items: stretch; }
.carte-hotel img, .carte-hotel .sans-photo { width: 120px; height: 96px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; background: var(--vert-pale); }
.carte-hotel .sans-photo { display: grid; place-items: center; font-size: 2rem; }
.carte-hotel .infos { display: flex; flex-direction: column; gap: 4px; justify-content: center; min-width: 0; }
.carte-hotel.complet { opacity: .65; }
.etoiles { color: var(--jaune); letter-spacing: 1px; font-size: .9em; }
.galerie { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin-bottom: 14px; }
.galerie img { height: 220px; width: auto; max-width: 85vw; object-fit: cover; border-radius: 10px; scroll-snap-align: start; flex: 0 0 auto; }
.galerie.petite { flex-wrap: wrap; overflow: visible; }
.galerie.petite figure { margin: 0; width: 120px; }
.galerie.petite img { height: 90px; width: 120px; }
.galerie figcaption { font-size: .8rem; color: var(--gris); display: flex; justify-content: space-between; align-items: center; }
.choix-carte.chambre img { width: 64px; height: 52px; object-fit: cover; border-radius: 6px; }
.choix-carte.chambre .prix { text-align: right; white-space: nowrap; }
.choix-carte.indisponible { opacity: .55; cursor: not-allowed; }
.planning th, .planning td { text-align: center; padding: 6px 4px; font-size: .85rem; }
.planning tbody th { text-align: left; white-space: nowrap; }
.planning td.plein { background: var(--rouge-pale); color: var(--rouge); font-weight: 700; }
.planning td.partiel { background: var(--jaune-pale); }
.type-chambre { border-top: 1px solid var(--ligne); padding: 8px 0; }
.type-chambre summary { cursor: pointer; }
.form-type { margin-top: 8px; }
.form-type label input { margin-top: 4px; }
.case-a-cocher { display: flex; gap: 8px; align-items: center; margin: 4px 0 10px; }
.case-a-cocher input { width: auto; min-height: 0; }
/* Sur téléphone, le prix de la chambre passe sous la description pour laisser la place au texte. */
.choix-carte.chambre { flex-wrap: wrap; }
.choix-carte.chambre > span:not(.prix) { flex: 1 1 140px; }
@media (max-width: 640px) {
  .choix-carte.chambre .prix { flex: 1 0 100%; display: flex; gap: 8px; justify-content: flex-end; align-items: baseline; }
  .choix-carte.chambre .prix br { display: none; }
}

/* En-tête aux couleurs de la photo du bus : ciel bleu, « Kamer » bleu marine, « trip » orange.
   Ligne du haut : photo + nom en gros ; ligne du bas : liens (Hôtel, Taxi, Mes billets, EN/FR) ou menu du personnel. */
:root { --ciel: #a6d3fd; --ciel-pale: #dcecfd; --marine: #1f3c8f; --orange: #f08a12; }
.entete { background: linear-gradient(180deg, var(--ciel), var(--ciel-pale)); color: var(--marine); }
.entete .contenu { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 8px; }
.identite { gap: 18px; align-items: center; }
.logo img { height: 146px; width: auto; }
.marque { display: flex; flex-direction: column; justify-content: center; min-width: 0; gap: 6px; }
.titre-site { font-size: clamp(2rem, 8.6vw, 4.4rem); font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--marine); text-decoration: none;
  text-shadow: 0 1px 0 rgba(255,255,255,.7); white-space: nowrap; }
.titre-site span { color: var(--orange); }
.nom-espace { color: var(--marine); border-left: 0; padding-left: 0; }
.nom-espace small { color: var(--marine); opacity: .85; }
.entete nav { justify-content: flex-end; border-top: 1px solid rgba(31,60,143,.18); padding-top: 8px; font-size: 1rem; }
.entete nav a, .entete nav button { color: var(--marine); font-weight: 600; opacity: 1; }
.entete nav .bouton-menu { border-color: var(--marine) !important; }
.menu-perso { background: transparent; }
@media (max-width: 1024px) {
  .menu-perso { background: var(--marine); }
  .entete nav .menu-perso > a, .entete nav .menu-perso > form button { color: #fff; }
}
@media (max-width: 520px) {
  .identite { gap: 10px; }
  .logo img { width: 45vw; height: auto; }
  .entete nav { justify-content: space-between; gap: 8px; }
}
.heros { background: linear-gradient(180deg, var(--ciel-pale), #eef6fe); color: var(--marine); }
.heros p { opacity: 1; color: #2c4373; }
@media (min-width: 1025px) {
  .entete nav { flex-wrap: nowrap; align-items: flex-start; gap: 14px; }
  .menu-perso { flex: 1 1 0; min-width: 0; flex-wrap: wrap; justify-content: flex-end; gap: 6px 14px; }
}

/* Liens sous « Kamertrip », à droite de la photo, et tout tient sur un téléphone. */
.entete nav { justify-content: flex-start; border-top: 0; padding-top: 0; flex-wrap: wrap; gap: 4px 14px; font-size: .95rem; }
@media (min-width: 1025px) { .menu-perso { justify-content: flex-start; } .entete nav { flex-wrap: nowrap; } }
@media (max-width: 520px) {
  .entete .contenu { padding-top: 8px; padding-bottom: 8px; }
  .identite { gap: 8px; align-items: center; }
  .logo img { width: 42vw; height: auto; border-radius: 8px; }
  .marque { gap: 4px; }
  .titre-site { font-size: 8vw; }
  .entete nav { justify-content: flex-start; gap: 2px 9px; font-size: .78rem; }
  .entete nav .bouton-menu { padding: 4px 8px; font-size: .8rem; }
  .nom-espace { font-size: .85rem; }
  .nom-espace small { font-size: .7rem; }
}
.logo { flex: 0 0 auto; }

/* Liens plus grands ; sur téléphone leur taille suit la largeur de l'écran pour ne jamais déborder. */
.entete nav { font-size: 1.1rem; gap: 4px 18px; }
@media (max-width: 520px) {
  .logo img { width: 40vw; }
  .titre-site { font-size: 8.4vw; }
  .entete nav { font-size: 3.7vw; gap: 2px 2.3vw; flex-wrap: nowrap; white-space: nowrap; }
}

/* Champ de mot de passe avec bouton « œil » (afficher / masquer) */
.champ-mot-de-passe { position: relative; display: block; }
.champ-mot-de-passe input { width: 100%; padding-right: 52px; }
.voir-mot-de-passe { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 40px; display: inline-flex;
  align-items: center; justify-content: center; background: none; border: 0; border-radius: 8px; color: var(--gris); cursor: pointer; padding: 0; }
.voir-mot-de-passe:hover, .voir-mot-de-passe[aria-pressed="true"] { color: var(--vert); }
.voir-mot-de-passe:focus-visible { outline: 2px solid var(--vert); outline-offset: 1px; }

/* Ordinateur et tablette : « Kamertrip » et les liens poussés à droite de l'en-tête, la photo à gauche */
@media (min-width: 521px) {
  .identite { justify-content: space-between; }
  .marque { flex: 1 1 auto; align-items: flex-end; text-align: right; }
  .entete nav { justify-content: flex-end; align-self: stretch; }
  .menu-perso { justify-content: flex-end; }
}
@media (min-width: 1025px) { .menu-perso { font-size: 1rem; gap: 4px 13px; } }

/* Bus, départ et destination sur chaque billet */
.billet-trajet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; margin: 12px 0 4px; padding: 10px 0;
  border-top: 1px solid var(--ligne); border-bottom: 1px solid var(--ligne); }
.billet-trajet div { min-width: 0; }
.billet-trajet dt { color: var(--gris); font-size: .8rem; }
.billet-trajet dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 480px) { .billet-trajet { grid-template-columns: 1fr 1fr; } .billet-trajet div:last-child { grid-column: 1 / -1; } }
