/* Police Outfit (licence libre SIL OFL 1.1), hébergée sur le site : aucun appel à Google à l'ouverture de la page */
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("outfit.woff2") format("woff2");
}

:root {
  --fond: #0a0c11;
  --panneau: #12151c;
  --carte: #1a1e27;
  --carte-survol: #222735;
  --bord: #272c38;
  --texte: #e9ebf1;
  --doux: #8a93a6;
  --ambre: #ffb547;      /* lumière de lampadaire */
  --ambre-sombre: #3a2c14;
  --direct: #ff4d4d;
  --rayon: 12px;
  --largeur-panneau: 340px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--fond);
  color: var(--texte);
  font: 15px/1.45 "Outfit", system-ui, sans-serif;
  overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- Mise en page ---------- */
.appli {
  display: grid;
  grid-template-columns: 1fr var(--largeur-panneau);
  height: 100dvh;
}
body.panneau-cache .appli { grid-template-columns: 1fr 0px; }
body.panneau-cache .panneau { visibility: hidden; }

.scene { position: relative; background: #000; min-width: 0; }
#lecteur { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.scene-vide {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--doux); padding: 24px; text-align: center;
}
/* Globe 3D : calque par-dessus la vidéo pendant le vol vers la ville */
.globe {
  position: absolute; inset: 0; z-index: 1; overflow: hidden;
  background: radial-gradient(ellipse at center, #0b1630 0%, #03050b 70%);
  opacity: 0; transition: opacity .6s ease;   /* fondu de sortie vers la vidéo */
}
.globe.visible { opacity: 1; transition-duration: .3s; }   /* entrée plus rapide */
.globe-carte { position: absolute; inset: 0; z-index: 0; }   /* z-index 0 : le dessin du globe reste sous le nom, le bouton et le crédit */
.globe-nom, .globe-passer, .globe-credit, .globe-aide, .globe-fermer { z-index: 1; }
.globe-carte .maplibregl-ctrl-attrib { display: none; }  /* le crédit EOX est affiché par .globe-credit */
.globe-nom {
  position: absolute; left: 50%; bottom: 16%; transform: translateX(-50%);
  max-width: calc(100% - 32px); text-align: center; pointer-events: none;
  font-size: clamp(20px, 3.2vw, 38px); font-weight: 700; letter-spacing: .02em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .85); overflow-wrap: anywhere;
  opacity: 0; transition: opacity .8s ease;
}
.globe-nom small { display: block; font-size: .45em; font-weight: 500; color: var(--ambre); letter-spacing: .06em; margin-top: 2px; }
.globe.arrive .globe-nom { opacity: 1; }
.globe-passer {
  position: absolute; right: 14px; bottom: 34px;
  padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(10, 12, 17, .6); font-size: 13px;
}
.globe-passer:hover { background: rgba(10, 12, 17, .85); }
.globe-credit {
  position: absolute; left: 8px; right: 8px; bottom: 6px; text-align: right;
  font-size: 10px; color: rgba(233, 235, 241, .65); text-shadow: 0 1px 3px #000; overflow-wrap: anywhere;
}
.globe-credit a { color: inherit; }
/* Globe libre (bouton 🌍) : on tourne la Terre, on touche un point, « Partir » */
.globe-aide, .globe-fermer { display: none; }
.globe.libre .globe-aide, .globe.libre .globe-fermer { display: block; }
.globe.libre .globe-passer, .globe.libre .globe-nom { display: none; }
.globe-aide {
  position: absolute; left: 14px; top: 14px; right: 120px; pointer-events: none;
  font-size: 13px; color: rgba(233, 235, 241, .85); text-shadow: 0 1px 4px #000;
}
.globe-fermer {
  position: absolute; right: 14px; top: 12px;
  padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(10, 12, 17, .7); font-size: 13px;
}
.globe-fermer:hover { background: rgba(10, 12, 17, .9); }
.globe-fiche {
  position: absolute; left: 12px; top: 40px; z-index: 2;
  width: min(250px, calc(100% - 24px)); max-height: calc(100% - 80px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 3px;
  background: var(--carte); border: 1px solid var(--bord); border-left: 3px solid var(--ambre);
  border-radius: 10px; padding: 10px 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
.globe-fiche[hidden] { display: none; }
.globe-fiche strong { font-size: 15px; padding-right: 22px; overflow-wrap: anywhere; }
.fiche-lieu { font-size: 12px; color: var(--ambre); overflow-wrap: anywhere; }
.fiche-nb { font-size: 12px; color: var(--doux); }
.fiche-fermer {
  position: absolute; top: 4px; right: 6px; width: 26px; height: 26px;
  border: 0; background: none; color: var(--doux); font-size: 15px;
}
.fiche-fermer:hover { color: var(--texte); }
.btn-partir {
  margin-top: 6px; align-self: flex-start; padding: 7px 12px; border-radius: 8px; border: 0;
  background: var(--ambre); color: #1b1408; font-weight: 700; font-size: 13px; cursor: pointer;
}
.btn-ligne {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0;
  padding: 6px 8px; border-radius: 8px; border: 1px solid var(--bord); background: var(--panneau); text-align: left;
}
.btn-ligne:hover { border-color: var(--ambre); }
.btn-ligne .ligne-nom { font-size: 13px; color: var(--texte); min-width: 0; overflow-wrap: anywhere; }
.btn-ligne .ligne-partir { flex: none; font-size: 12px; font-weight: 700; color: var(--ambre); }
.btn-explorer {
  flex: none; width: 100%; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--bord); background: var(--carte); font-size: 14px; text-align: left;
}
.btn-explorer:hover { background: var(--carte-survol); border-color: var(--ambre); }

.btn-afficher {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--bord); background: rgba(18, 21, 28, .85);
  font-size: 18px; display: none;
}
body.panneau-cache .btn-afficher { display: block; }

/* ---------- Panneau ---------- */
.panneau {
  background: var(--panneau);
  border-left: 1px solid var(--bord);
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px; overflow-y: auto; min-width: 0;
}
.panneau-tete { display: flex; align-items: center; justify-content: space-between; }
.marque { font-weight: 700; font-size: 22px; letter-spacing: -.02em; }
.marque span { color: var(--ambre); }
.marque-grande { font-size: 40px; }

.btn-icone {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--bord); background: var(--carte); font-size: 16px;
}
.btn-icone:hover { background: var(--carte-survol); }

.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
/* 6 modes sur 2 lignes de 3 : l’icône à gauche du mot */
.modes button {
  display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 4px; border-radius: 10px; border: 1px solid var(--bord); white-space: nowrap;
  background: var(--carte); font-weight: 500; font-size: 13px; min-width: 0;
}
.modes .ico { font-size: 17px; line-height: 1; }
.modes button:hover:not(:disabled) { background: var(--carte-survol); }
.modes button.actif { background: var(--ambre); color: #1b1408; border-color: var(--ambre); }
.modes button:disabled { opacity: .35; cursor: not-allowed; }

.bloc {
  background: var(--carte); border: 1px solid var(--bord);
  border-radius: var(--rayon); padding: 12px;
}

/* Villes */
/* La liste des villes prend toute la place libre du panneau, les autres blocs gardent leur taille */
.panneau > * { flex-shrink: 0; }
.panneau > .bloc-villes { flex: 1 1 auto; flex-shrink: 1; min-height: 220px; }
.bloc-villes { display: flex; flex-direction: column; gap: 8px; }
#recherche {
  width: 100%; padding: 9px 12px; border-radius: 9px;
  border: 1px solid var(--bord); background: var(--fond); color: var(--texte); font: inherit;
}
#recherche:focus { outline: 2px solid var(--ambre); outline-offset: -1px; }
.villes { list-style: none; margin: 0; padding: 0; flex: 1 1 0; min-height: 0; overflow-y: auto; position: relative; }
.villes ul { list-style: none; margin: 0; padding: 0; }
.villes button {
  width: 100%; text-align: left; background: none; border: 0;
  border-radius: 8px; display: flex; align-items: center; gap: 8px;
}
.villes button:hover { background: var(--carte-survol); }

/* Rubriques : pays puis département */
.villes .tete { padding: 7px 8px; }
.rubrique-pays > .tete {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ambre);
}
.rubrique-dep > .tete { font-size: 14px; font-weight: 600; }
.rubrique-pays > ul { padding-left: 6px; }
.rubrique-dep > ul { padding-left: 20px; }
.chevron { display: inline-block; width: 10px; color: var(--doux); transition: transform .15s; }
.tete[aria-expanded="true"] .chevron { transform: rotate(90deg); }
.code {
  min-width: 30px; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums;
  padding: 1px 6px; border-radius: 6px; border: 1px solid var(--bord); background: var(--panneau); color: var(--doux);
}
.tete .titre { min-width: 0; overflow-wrap: anywhere; }
.tete .compte { margin-left: auto; color: var(--doux); font-size: 12px; font-weight: 400; }

/* Villes */
.villes .ville { padding: 7px 10px; justify-content: space-between; align-items: baseline; }
.villes .ville.actif { background: var(--ambre-sombre); color: var(--ambre); }
.villes .nom { font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.villes .infos { color: var(--doux); font-size: 12px; text-align: right; white-space: nowrap; }
.villes .aucune { color: var(--doux); padding: 8px 10px; }

/* Radio */
.bloc-radio { display: flex; flex-direction: column; gap: 8px; }
.radio-etat { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--doux); text-transform: uppercase; letter-spacing: .08em; }
.pastille { width: 9px; height: 9px; border-radius: 50%; background: var(--doux); }
.pastille.direct { background: var(--direct); animation: pouls 1.6s infinite; }
.pastille.connexion { background: var(--ambre); animation: pouls .8s infinite; }
@keyframes pouls { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.radio-nom { font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.radio-commandes { display: flex; justify-content: center; gap: 12px; }
.btn-rond {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--bord); background: var(--panneau); font-size: 15px;
}
.btn-rond:hover { background: var(--carte-survol); }
.btn-lecture { width: 52px; height: 52px; background: var(--ambre); color: #1b1408; border-color: var(--ambre); font-size: 18px; }
.btn-lecture:hover { background: #ffc46e; }

.curseur { display: flex; align-items: center; gap: 10px; }
.curseur input { flex: 1; accent-color: var(--ambre); }

/* Réglages */
.bloc-reglages { display: flex; flex-direction: column; gap: 10px; }
.ligne { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.segment { display: flex; border: 1px solid var(--bord); border-radius: 9px; overflow: hidden; }
.segment button { background: var(--panneau); border: 0; padding: 5px 11px; font-size: 13px; }
.segment button + button { border-left: 1px solid var(--bord); }
.segment button.actif { background: var(--ambre); color: #1b1408; font-weight: 600; }

.bascule {
  width: 46px; height: 26px; border-radius: 13px; border: 0; padding: 3px;
  background: var(--bord); position: relative; transition: background .2s;
}
.bascule span {
  display: block; width: 20px; height: 20px; border-radius: 50%;
  background: var(--texte); transition: transform .2s;
}
.bascule[aria-checked="true"] { background: var(--ambre); }
.bascule[aria-checked="true"] span { transform: translateX(20px); background: #1b1408; }

/* Vidéo */
.bloc-video { display: flex; flex-direction: column; gap: 4px; }
.video-tete { display: flex; justify-content: space-between; align-items: center; }
.petit { font-size: 12px; color: var(--doux); text-transform: uppercase; letter-spacing: .08em; }
.btn-texte { background: none; border: 0; color: var(--ambre); padding: 0; font-size: 13px; }
.btn-texte:hover { text-decoration: underline; }
.btn-texte:disabled { color: var(--doux); text-decoration: none; cursor: default; }
.video-titre { font-weight: 600; overflow-wrap: anywhere; }
.video-lien { color: var(--doux); font-size: 13px; text-decoration: none; overflow-wrap: anywhere; }
.video-lien:hover { color: var(--texte); text-decoration: underline; }

.panneau-pied { color: var(--doux); font-size: 11px; margin-top: auto; padding-top: 4px; }
.liens-legaux { display: block; margin-top: 4px; }
.panneau-pied a, .accueil-accord a { color: var(--doux); text-decoration: underline; }
.panneau-pied a:hover, .accueil-accord a:hover { color: var(--texte); }

/* ---------- Accueil ---------- */
.accueil {
  position: fixed; inset: 0; z-index: 10;
  display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at center, rgba(10, 12, 17, .55), rgba(10, 12, 17, .92));
  backdrop-filter: blur(3px);
}
.accueil-carte { max-width: 440px; text-align: center; }
.accueil-carte p { color: var(--doux); font-size: 17px; margin: 10px 0 26px; }
.btn-principal {
  padding: 14px 30px; border-radius: 999px; border: 0;
  background: var(--ambre); color: #1b1408; font-weight: 700; font-size: 17px;
  box-shadow: 0 0 40px rgba(255, 181, 71, .35);
}
.btn-principal:hover { background: #ffc46e; }
.accueil-carte .accueil-accord { font-size: 12px; line-height: 1.5; margin: 22px auto 0; max-width: 380px; }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed; left: 16px; bottom: 16px; z-index: 20;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  background: var(--carte); border: 1px solid var(--bord); border-left: 3px solid var(--ambre);
  padding: 10px 14px; border-radius: 10px; max-width: 340px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  animation: entree .25s ease;
}
@keyframes entree { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Téléphone ---------- */
@media (max-width: 820px) {
  body { overflow: auto; }
  .appli { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; min-height: 100dvh; }
  body.panneau-cache .appli { grid-template-columns: 1fr; }
  body.panneau-cache .panneau { visibility: visible; }
  .scene { aspect-ratio: 16 / 9; position: sticky; top: 0; z-index: 3; }  /* la vidéo reste en haut quand on fait défiler */
  .panneau { border-left: 0; border-top: 1px solid var(--bord); overflow: visible; }
  .panneau > .bloc-villes { flex: none; min-height: 0; }
  .villes { flex: none; max-height: 340px; }
  #btnMasquer, .btn-afficher { display: none !important; }
  .marque-grande { font-size: 32px; }
  /* petit écran : crédit du globe plus compact, pour ne pas manger l'image */
  .globe-credit { font-size: 8px; line-height: 1.2; bottom: 4px; }
  .globe-passer { bottom: 30px; padding: 5px 12px; font-size: 12px; }
  .globe-aide { font-size: 11px; top: 12px; }
  .globe-fermer { padding: 5px 12px; font-size: 12px; top: 8px; right: 10px; }
  .globe-fiche { top: 34px; left: 8px; max-height: calc(100% - 64px); padding: 8px 10px; }
}

/* ---------- Pages Mentions légales et Confidentialité ---------- */
body.page-legale { overflow: auto; }
.legal { max-width: 720px; margin: 0 auto; padding: 32px 16px 48px; }
.legal h1 { font-size: 28px; margin: 18px 0 8px; }
.legal h2 { font-size: 17px; color: var(--ambre); margin: 26px 0 6px; }
.legal p { color: var(--texte); margin: 0 0 10px; overflow-wrap: anywhere; }
.legal a { color: var(--ambre); }
.legal .retour { color: var(--doux); text-decoration: none; font-size: 14px; }
.legal .retour:hover { color: var(--texte); }
.legal .maj { color: var(--doux); font-size: 13px; margin-top: 30px; }
