@import url("https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600&family=Inter:wght@400;500;600&display=swap");

/* ==========================================================================
   Charte Mon VTC Perpignan
   Bleu nuit et bleu vif tirés du logo, sur un fond beige lin.
   ========================================================================== */

:root {
  --nuit: #0B1B7A;          /* bleu nuit du logo */
  --nuit-profond: #07125A;
  --azur: #2F63F2;          /* bleu vif du logo, ajusté pour le contraste AA */
  --azur-voile: rgba(47, 99, 242, 0.10);
  --papier: #F1E8D8;        /* fond beige lin */
  --sable-fonce: #E6DAC4;   /* bandes et pied de page */
  --creme: #FBF7EF;         /* cartes et champs */
  --encre: #151A33;
  --gris: #5D6072;
  --gris-clair: #8E8C88;
  --ligne: #E0D5C1;
  --ligne-forte: #CDBFA6;
  --rouge: #A63D2A;
  --rouge-fond: #F6E3DC;
  --vert: #1F7A4D;
  --vert-fond: #E3F1E8;
  --ombre: 0 1px 2px rgba(11, 27, 122, 0.06), 0 8px 24px rgba(11, 27, 122, 0.06);
  --rayon: 14px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: var(--papier);
  color: var(--encre);
}

h1,
h2 {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--nuit);
}

a {
  color: var(--nuit);
}

:focus-visible {
  outline: 3px solid var(--azur);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

/* --- En-tête (logo + navigation), commun à toutes les pages --- */

.entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 24px 0;
}

.entete .logo img {
  height: clamp(44px, 5.5vw, 80px);
  width: auto;
  display: block;
}

.entete nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.entete nav a {
  color: var(--encre);
  text-decoration: none;
  font-size: 0.95rem;
}

.entete nav a:hover {
  color: var(--azur);
}

.entete nav a.bouton-reservation {
  background: var(--nuit);
  color: #fff;
  padding: 10px 20px;
  border-radius: 100px;
  font-weight: 500;
}

.entete nav a.bouton-reservation:hover {
  background: var(--azur);
  color: #fff;
}

/* --- Mise en page "carte centrée" (pages du parcours) --- */

body.page-carte {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 0 16px 60px;
}

body.page-carte .entete {
  width: 100%;
}

body.page-carte .card {
  margin-top: 36px;
}

body.page-carte.centre-vertical {
  justify-content: center;
}

body.page-carte.centre-vertical .entete {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.card {
  width: 100%;
  max-width: 500px;
  background: var(--creme);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 32px;
}

.card.large {
  max-width: 640px;
}

.card.texte-centre {
  text-align: center;
}

.card h1 {
  font-size: 1.7rem;
  line-height: 1.2;
  margin: 0 0 8px;
}

.card .intro {
  color: var(--gris);
  margin: 0 0 24px;
}

.card.texte-centre h1 {
  margin: 0 0 12px;
}

.card.texte-centre p {
  color: var(--gris);
  margin: 0 0 8px;
}

.card .mise-en-avant {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--nuit);
}

.titre-succes {
  color: var(--nuit);
}

.titre-erreur {
  color: var(--rouge);
}

.lien-retour {
  margin-top: 24px !important;
}

.lien-retour a {
  color: var(--azur);
}

/* --- Étapes du parcours (fil d'Ariane) --- */

.etapes-parcours {
  display: flex;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.etapes-parcours li {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--ligne);
}

.etapes-parcours li.fait {
  background: var(--nuit);
}

.etapes-parcours li.en-cours {
  background: var(--azur);
}

/* --- Champs de formulaire --- */

.champ {
  margin-bottom: 16px;
}

.champs-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--gris);
}

.optionnel {
  font-weight: 400;
  color: var(--gris-clair);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ligne-forte);
  border-radius: 10px;
  font-size: 1rem;
  background: #fff;
  color: var(--encre);
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea {
  resize: vertical;
  min-height: 96px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--azur);
  box-shadow: 0 0 0 3px var(--azur-voile);
}

input:disabled {
  background: var(--papier);
  color: var(--gris-clair);
}

.aide {
  display: block;
  font-size: 0.8rem;
  color: var(--gris);
  margin-top: 5px;
}

.case-a-cocher {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--encre);
  font-size: 0.95rem;
}

.case-a-cocher input {
  width: 18px;
  height: 18px;
  accent-color: var(--nuit);
}

/* Piège à robots : invisible pour les humains */
.pot-de-miel {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Boutons --- */

.actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.actions button,
.actions .btn-lien {
  flex: 1;
  padding: 14px;
  border-radius: 100px;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.btn-secondaire {
  border: 1px solid var(--ligne-forte);
  background: transparent;
  color: var(--encre);
}

.btn-secondaire:hover {
  border-color: var(--nuit);
}

.btn-principal {
  border: none;
  background: var(--nuit);
  color: #fff;
  font-weight: 500;
  transition: background 0.15s;
}

.btn-principal:hover:not(:disabled) {
  background: var(--azur);
}

.btn-principal:disabled {
  background: var(--ligne-forte);
  cursor: not-allowed;
}

.btn-large {
  display: block;
  width: 100%;
  padding: 14px;
  border-radius: 100px;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

/* --- Messages --- */

#erreur,
.message-erreur {
  color: var(--rouge);
  background: var(--rouge-fond);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.88rem;
  margin: 16px 0 0;
  display: none;
}

#erreur.visible,
.message-erreur.visible {
  display: block;
}

#contexte {
  display: none;
  margin: 0 0 20px;
  font-size: 0.88rem;
  color: var(--gris);
}

#avertissement {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  background: var(--rouge-fond);
  color: var(--rouge);
  margin-bottom: 16px;
  display: none;
}

#avertissement.visible {
  display: block;
}

/* Encart "trajet longue distance" (page Trajet) */
.encart-devis {
  display: none;
  margin: 12px 0 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--azur-voile);
  border: 1px solid rgba(47, 99, 242, 0.25);
  font-size: 0.92rem;
  color: var(--nuit);
}

.encart-devis.visible {
  display: block;
}

.encart-devis p {
  margin: 0 0 10px;
}

/* --- Carte Google Maps --- */

#carte {
  margin-top: 8px;
  width: 100%;
  height: 300px;
  background: var(--sable-fonce);
  border: 1px solid var(--ligne);
  border-radius: 10px;
  overflow: hidden;
  color: var(--gris);
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-trajet {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--nuit);
  margin: 12px 0 4px;
  min-height: 1.5em;
}

.info-trajet-discret {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--gris);
}

/* --- Levier (maintenant / plus tard, mode de paiement) --- */

.levier-groupe {
  margin: 4px 0 8px;
}

.levier {
  position: relative;
  display: flex;
  background: var(--papier);
  border: 1px solid var(--ligne);
  border-radius: 100px;
  padding: 4px;
}

.levier-fond {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: calc(50% - 4px);
  background: var(--nuit);
  border-radius: 100px;
  transition: transform 0.2s ease;
}

.levier-fond.en-ligne {
  transform: translateX(100%);
}

.levier-prise-en-charge[data-selection="maintenant"] .levier-fond {
  transform: translateX(100%);
}

.levier-prise-en-charge button[data-valeur] {
  color: var(--encre);
}

.levier-prise-en-charge[data-selection="plus_tard"] button[data-valeur="plus_tard"],
.levier-prise-en-charge[data-selection="maintenant"] button[data-valeur="maintenant"] {
  color: #fff;
}

.levier button {
  position: relative;
  z-index: 1;
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--encre);
  cursor: pointer;
  border-radius: 100px;
}

.levier button:disabled {
  cursor: not-allowed;
}

.levier button.actif {
  color: #fff;
}

/* --- Minuteur (Enregistrement) --- */

#minuteur {
  font-size: 0.88rem;
  color: var(--gris);
  margin: 0 0 24px;
  padding: 10px 14px;
  background: var(--papier);
  border-radius: 8px;
}

#minuteur strong {
  color: var(--nuit);
  font-variant-numeric: tabular-nums;
}

#minuteur.urgent strong {
  color: var(--rouge);
}

#expire {
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--rouge-fond);
  color: var(--rouge);
  font-size: 0.9rem;
  margin-bottom: 16px;
  display: none;
}

#expire.visible {
  display: block;
}

/* --- Curseur + frise (Créneaux disponibles) --- */

.curseur-ligne {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

input[type="range"] {
  flex: 1;
  accent-color: var(--nuit);
}

.curseur-ligne span {
  font-size: 0.95rem;
  font-weight: 600;
  min-width: 48px;
  text-align: right;
  color: var(--nuit);
  font-variant-numeric: tabular-nums;
}

.frise-wrap {
  margin: 4px 0 6px;
}

.frise {
  position: relative;
  height: 32px;
  background: var(--vert-fond);
  border: 1px solid var(--ligne);
  border-radius: 8px;
  overflow: hidden;
}

.occupe {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--rouge-fond);
  border-left: 2px solid var(--rouge);
  border-right: 2px solid var(--rouge);
}

.occupe.indispo {
  background: repeating-linear-gradient(45deg, var(--ligne), var(--ligne) 6px, var(--sable-fonce) 6px, var(--sable-fonce) 12px);
  border-left: 2px solid var(--gris-clair);
  border-right: 2px solid var(--gris-clair);
}

.bloc-demande {
  position: absolute;
  top: -4px;
  height: 40px;
  border-radius: 4px;
  border: 2px solid var(--nuit);
  background: rgba(11, 27, 122, 0.12);
}

.bloc-demande.conflit {
  border-color: var(--rouge);
  background: rgba(166, 61, 42, 0.18);
}

.repere-heures {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--gris);
  margin-bottom: 8px;
}

.legende-frise {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.78rem;
  color: var(--gris);
  margin: 0 0 12px;
}

.legende-frise span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: -1px;
}

.legende-frise .libre::before { background: var(--vert-fond); border: 1px solid var(--vert); }
.legende-frise .pris::before { background: var(--rouge-fond); border: 1px solid var(--rouge); }
.legende-frise .ferme::before { background: var(--sable-fonce); border: 1px solid var(--gris-clair); }

/* --- Ma réservation --- */

.bandeau-statut {
  margin-bottom: 16px;
  font-size: 0.92rem;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--papier);
}

.point-statut {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--vert);
  margin-right: 6px;
}

.num-reservation {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- Page Politique / mentions légales --- */

body.page-politique {
  padding: 0 20px 80px;
}

.politique {
  max-width: 760px;
  margin: 48px auto 0;
}

.politique > h1 {
  font-size: 2.2rem;
  margin: 0 0 4px;
}

.politique-maj {
  color: var(--gris);
  font-size: 0.9rem;
  margin: 0 0 32px;
}

.politique-sommaire {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 16px 20px;
  margin: 0 0 48px;
  background: var(--creme);
  border: 1px solid var(--ligne);
  border-radius: 10px;
  font-size: 0.92rem;
}

.politique-sommaire a {
  color: var(--nuit);
  text-decoration: none;
  font-weight: 500;
}

.politique-sommaire a:hover {
  color: var(--azur);
}

.politique section {
  margin: 0 0 56px;
}

.politique section + section {
  border-top: 1px solid var(--ligne-forte);
  padding-top: 40px;
}

.politique h2 {
  font-size: 1.65rem;
  margin: 0 0 24px;
}

.politique h3 {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--nuit);
  margin: 28px 0 8px;
}

.politique h3:first-of-type {
  margin-top: 0;
}

.politique p {
  color: var(--encre);
  line-height: 1.7;
  margin: 0 0 4px;
  max-width: 68ch;
}

.politique a {
  color: var(--azur);
}

.politique .a-completer {
  display: inline-block;
  color: var(--rouge);
  background: var(--rouge-fond);
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 0.88em;
  font-style: normal;
}

/* --- Mobile --- */

@media (max-width: 600px) {
  .entete {
    padding: 16px 16px 0;
  }

  .entete .logo img {
    height: 38px;
  }

  .card {
    padding: 24px 20px;
  }

  .card h1 {
    font-size: 1.5rem;
  }

  .champs-duo {
    grid-template-columns: 1fr;
    gap: 0;
  }

  #carte {
    height: 240px;
  }

  .politique {
    margin-top: 24px;
  }

  .politique > h1 {
    font-size: 1.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

.espace-champ {
  margin-top: 16px;
}

.texte-centre {
  text-align: center;
}

#confirmationDevis h2 {
  font-size: 1.6rem;
  margin: 8px 0 12px;
}

#confirmationDevis p {
  color: var(--gris);
}

/* --- Page Nous contacter --- */

.liste-contact {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  border-top: 1px solid var(--ligne);
}

.liste-contact li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ligne);
  font-size: 0.95rem;
}

.libelle-contact {
  color: var(--gris);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

.liste-contact a {
  color: var(--nuit);
  font-weight: 500;
  text-align: right;
}

.encart-aide {
  background: var(--papier);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 24px;
  line-height: 1.6;
}

.encart-aide a {
  color: var(--azur);
}

/* Bandeau « page disponible en français seulement » (mentions légales). */
.avis-langue {
  margin: 0 0 24px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--azur-voile);
  border: 1px solid rgba(47, 99, 242, 0.25);
  color: var(--nuit);
  font-size: 0.9rem;
}
/* ==========================================================================
   Ajouts v13 — sélecteur de langue et espace client
   À coller à la fin de assets/css/style.css
   ========================================================================== */

/* Les champs mot de passe n'étaient pas couverts par le style des champs. */
input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ligne-forte);
  border-radius: 10px;
  font-size: 1rem;
  background: #fff;
  color: var(--encre);
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input[type="password"]:focus {
  outline: none;
  border-color: var(--azur);
  box-shadow: 0 0 0 3px var(--azur-voile);
}

/* --- Sélecteur de langue (drapeau déroulant) --- */

.selecteur-langue {
  position: relative;
  display: inline-block;
}

.drapeau-bouton {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--ligne-forte);
  background: var(--creme);
  border-radius: 100px;
  padding: 6px 14px 6px 12px;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.drapeau-bouton:hover {
  border-color: var(--nuit);
}

/* Petite flèche indiquant que le drapeau se déroule. */
.drapeau-bouton::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 2px solid var(--gris);
  border-bottom: 2px solid var(--gris);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.drapeau-bouton[aria-expanded="true"]::after {
  transform: rotate(-135deg);
  margin-top: 3px;
}

.choix-langue {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1002;
  list-style: none;
  margin: 0;
  padding: 6px;
  min-width: 170px;
  background: var(--creme);
  border: 1px solid var(--ligne);
  border-radius: 10px;
  box-shadow: var(--ombre);
}

.choix-langue button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: 9px 12px;
  border-radius: 8px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--encre);
  cursor: pointer;
}

.choix-langue button:hover {
  background: var(--papier);
}

.choix-langue button[aria-current="true"] {
  color: var(--nuit);
  font-weight: 600;
}

/* --- Espace client --- */

.valeur-figee {
  margin: 0;
  padding: 12px 14px;
  background: var(--papier);
  border: 1px solid var(--ligne);
  border-radius: 10px;
  color: var(--gris);
  font-size: 0.95rem;
  word-break: break-all;
}

.sous-titre {
  font-size: 1.2rem;
  margin: 28px 0 14px;
}

.reservation-ligne {
  border: 1px solid var(--ligne);
  border-left: 4px solid var(--azur);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--creme);
}

.reservation-ligne.statut-confirmee,
.reservation-ligne.statut-payee_confirmee {
  border-left-color: var(--vert);
}

.reservation-ligne.statut-annulee,
.reservation-ligne.statut-expiree {
  border-left-color: var(--gris-clair);
  opacity: 0.7;
}

.reservation-ligne header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.reservation-ligne p {
  margin: 0 0 4px;
  font-size: 0.93rem;
  line-height: 1.5;
}

.trajet-resume {
  font-weight: 500;
}

/* Le menu mobile empile le sélecteur avec les liens. */
@media (max-width: 900px) {
  .accueil .entete nav .selecteur-langue {
    margin-top: 18px;
    align-self: flex-start;
  }

  .choix-langue {
    right: auto;
    left: 0;
  }
}

/* Message de succès (mot de passe modifié, lien envoyé). */
.message-succes {
  display: none;
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--vert-fond);
  color: var(--vert);
}

.message-succes.visible {
  display: block;
}

/* --- Donner un avis --- */

.choix-etoiles,
.choix-signature {
  border: none;
  margin: 0 0 20px;
  padding: 0;
}

.choix-etoiles legend,
.choix-signature legend {
  font-weight: 600;
  margin-bottom: 8px;
  padding: 0;
}

/* Étoiles en ordre inverse dans le HTML : ~ colore celles « à gauche » */
.etoiles-saisie {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 4px;
}

.etoiles-saisie input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.etoiles-saisie label {
  font-size: 2.2rem;
  line-height: 1;
  color: var(--ligne-forte);
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}

.etoiles-saisie label:hover,
.etoiles-saisie label:hover ~ label,
.etoiles-saisie input:checked ~ label {
  color: #E0A526;
}

.etoiles-saisie label:hover {
  transform: scale(1.1);
}

.etoiles-saisie input:focus-visible + label {
  outline: 2px solid var(--azur);
  outline-offset: 2px;
  border-radius: 4px;
}

.choix-signature label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-weight: 400;
  cursor: pointer;
}

.avis-merci {
  text-align: center;
  padding: 12px 0;
}

.avis-merci-etoiles {
  font-size: 2rem;
  color: #E0A526;
  letter-spacing: 4px;
  margin: 0 0 8px;
}
