/* ============================================================
   MtlTrafic — v272.83 : SPLASH D'ACCUEIL + PUB FLOTTANTE (Bob)
   ============================================================ */

#mtl-splash {
  position: fixed;
  inset: 0;
  /* v272.88 (Bob) : z 2900 — SOUS le formulaire d'achat (z 3000) : quand
     on touche « + Votre pub ici » dans la splash, la FORMULAIRE passe
     DEVANT (Bob : la pub apparaissait entre la splash et le site). */
  z-index: 2900;
  background: linear-gradient(165deg, #fff8f3 0%, #f2f7ff 55%, #eaf3ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: max(0.5rem, env(safe-area-inset-top, 0px)) 1rem 0.6rem;
  animation: splashIn 0.4s ease;
  cursor: pointer;
}
/* v272.91 (Bob, batch-18 : « la bannière URGENCE traversait la splash
   en plein milieu ») — quand la splash est ouverte, html.splash-open :
   la bannière d'urgence, les pubs flottantes et toasts passent SOUS
   la splash (z 2500 < 2900). La splash reste toujours l'écran MAÎTRE. */
html.splash-open .urgent-banner.urgent-flash,
html.splash-open .mtl-floating-ad,
html.splash-open .mtl-update-toast,
html.splash-open .pwa-install { z-index: 2500 !important; }
/* v272.91 (Bob, batch-18 : « elle passe en mode entrave une fraction de
   seconde avant de retourner sur la splash ») — voile de boot : la page
   est MASQUÉE dès le premier pixel (index.html) jusqu'à ce que splash.js
   lève html.pre-splash avec la splash prête. Zéro flash. */
html.pre-splash body > *:not(#mtl-splash):not(#boot-veil) { visibility: hidden !important; }
#boot-veil {
  position: fixed; inset: 0; z-index: 2800;
  background: linear-gradient(165deg, #fff8f3, #f2f7ff 55%, #eaf3ff);
}
/* v272.88 : pendant que le formulaire d'achat est ouvert, la splash
   s'efface complètement (pas de clic fantôme, pas de bannière coincée
   entre deux). La fermeture du formulaire la fait revenir. */
#mtl-splash.below-modal { opacity: 0.25; pointer-events: none; }
#mtl-splash.bye { opacity: 0; transform: scale(1.02); transition: opacity 0.4s ease, transform 0.4s ease; }
@keyframes splashIn { from { opacity: 0; } to { opacity: 1; } }

.splash-inner {
  max-width: 460px;
  width: 100%;
  margin: auto;
  text-align: center;
  cursor: default;
}
.splash-welcome {
  /* v272.84 (Bob, batch-17) : TITRE PLUS GROS ET PLUS HAUT — laisse la
     place au logo officiel. Couleurs du site : texte noir, .com orange. */
  font: 900 1.5rem/1.25 var(--font-display, inherit);
  color: #0f1a2b;
  margin: 0.2rem 0 0.1rem;
}
.splash-welcome b { color: #e8632c; font-weight: 900; }
.splash-welcome .dot { color: #e8632c; }
.splash-logo {
  /* LE VRAI LOGO (photo route en U) — bien grand sous le titre.
     v272.88 : hauteur bornée (le bouton ENTRER sortait du bas). */
  display: block;
  margin: 0.2rem auto 0.1rem;
  width: auto;
  height: min(30vh, 240px);
  max-width: 78vw;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 10px 28px -10px rgba(15, 26, 43, 0.45);
}
.splash-tagline { font: 500 0.8rem/1.4 inherit; color: #8a94a3; margin: 0.1rem 0 0.7rem; }
/* v272.203 (Bob : « entoure en gros quelle version on est ») — BADGE DE
   VERSION sur la page d'accueil : gros, entouré, visible au premier
   regard. Fond noir (contraste max), bordure épaisse, au-dessus du logo.
   Bob sait tout de suite quelle version l'appareil tourne. */
.splash-ver-badge {
  display: inline-block;
  font: 900 1rem/1.2 var(--font-display, inherit);
  letter-spacing: 0.04em;
  color: #fff;
  background: #16202b;
  border: 3px solid #e8632c;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  margin: 0.1rem auto 0.55rem;
  box-shadow: 0 4px 14px -6px rgba(22, 32, 43, 0.5);
}

.splash-ad { margin: 0.4rem 0; }
.splash-ad .ad-slot .ad-desc { display: none; } /* v272.88 : compact */
.splash-ad .ad-slot { box-shadow: var(--shadow-md); border-radius: 14px; }

.splash-modes-label {
  /* v272.91 (Bob, batch-18) : PLUS GROS ET PLUS VOYANT — il titre
     maintenant les 4 gros boutons (les mini octogones sont retirés).
     (propriétés EXPLICITES : « font: … inherit » est un raccourci
     invalide que les navigateurs abandonnent silencieusement) */
  font-weight: 900; font-size: 1.02rem; line-height: 1;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #0f1a2b; margin: 0.85rem 0 0.5rem;
  display: flex; align-items: center; justify-content: center; gap: 0.45rem;
}
.splash-modes-label::before,
.splash-modes-label::after { content: ""; height: 2px; width: 34px; background: #e8632c; border-radius: 2px; opacity: 0.8; }
.splash-modes {
  display: flex; justify-content: center; gap: 0.7rem; margin: 0 0 0.9rem;
}
.splash-modes button {
  width: 56px; height: 56px;
  font-size: 1.5rem;
  border: none;
  background: #fff;
  color: #0f1a2b;
  cursor: pointer;
  /* octogone de la famille */
  clip-path: polygon(29.3% 0, 70.7% 0, 100% 29.3%, 100% 70.7%, 70.7% 100%, 29.3% 100%, 0 70.7%, 0 29.3%);
  box-shadow: 0 6px 16px -6px rgba(16, 24, 40, 0.35);
  transition: transform 0.15s ease;
}
.splash-modes button:active { transform: scale(0.92); }

.splash-big {
  /* v272.84 : 4 boutons (MIXTE en premier — il montre les 3 à la fois) */
  display: flex; gap: 0.5rem; margin: 0 0 0.7rem;
}
.splash-big button {
  flex: 1;
  padding: 0.7rem 0.2rem 0.6rem;
  border: none;
  border-radius: 14px;
  background: linear-gradient(160deg, #0f1a2b, #1a2b45);
  color: #fff;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  box-shadow: 0 8px 20px -8px rgba(15, 26, 43, 0.55);
  transition: transform 0.15s ease;
}
.splash-big button:active { transform: scale(0.95); }
.splash-big button b { font-size: 1.3rem; line-height: 1; }
.splash-big button span { font: 800 0.7rem/1.1 var(--font-display, inherit); }
.splash-big button[data-m="mixte"] { background: linear-gradient(160deg, #0f1a2b, #2c3e57); } /* noir-bleuté : les 3 réunis */
.splash-big button[data-m="entraves"] { background: linear-gradient(160deg, #ff7a1a, #e2492f); }
.splash-big button[data-m="nav"] { background: linear-gradient(160deg, #1a73e8, #0b57c2); }
.splash-big button[data-m="livraison"] { background: linear-gradient(160deg, #12b76a, #0a8f52); }

#splash-enter {
  width: 100%;
  padding: 0.95rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(160deg, #e2492f, #c1121f);
  color: #fff;
  font: 900 1.05rem/1 var(--font-display, inherit);
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 10px 26px -8px rgba(226, 73, 47, 0.65);
  transition: transform 0.15s ease;
}
#splash-enter:active { transform: scale(0.97); }

/* ---------- PUB FLOTTANTE ALÉATOIRE SUR LA CARTE ---------- */
.mtl-floating-ad {
  position: absolute;
  z-index: 1150; /* au-dessus de la carte, SOUS les boutons (1100-1450) et le chip */
  width: min(300px, 66vw);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.35s ease, transform 0.35s var(--spring);
  pointer-events: auto;
}
.mtl-floating-ad.show { opacity: 1; transform: scale(1); }
/* v272.119 (batch-30) : version COMPACTE téléphone — 56 % de largeur,
   max 230 px, texte réduit : plus jamais un mur de pub sur la carte. */
.mtl-floating-ad.fa-compact { width: min(230px, 56vw); }
.mtl-floating-ad.fa-compact .ad-slot .ad-content { padding: 0.4rem 0.5rem; gap: 0.4rem; }
.mtl-floating-ad.fa-compact .ad-slot .ad-title { font-size: 0.78rem; }
.mtl-floating-ad.fa-compact .ad-slot .ad-desc { display: none; }
.mtl-floating-ad .ad-slot { margin: 0; border-radius: 14px; box-shadow: 0 14px 34px -12px rgba(16, 24, 40, 0.5); }
/* v272.91 (Bob, batch-18 : le texte « cliquez ici » DÉPASSAIT de la boîte
   rouge — « rallonger un petit peu la boîte, un des 2 choix ») — la boîte
   s'élargit (78 % de l'écran, max 620 px) et la fenêtre du texte aussi :
   plus de coupure, et le marquee interne fait lire TOUT le message. */
.urgent-banner.urgent-flash { max-width: min(78vw, 620px) !important; padding: 0.85rem 1.3rem !important; }
.urgent-banner.urgent-flash .ub-txt { max-width: min(56vw, 470px); }
.mtl-floating-ad .ad-slot .ad-content { padding: 0.5rem 0.6rem; gap: 0.5rem; }
.mtl-floating-ad .ad-slot .ad-visual { width: 34px; height: 34px; font-size: 1rem; }
.mtl-floating-ad .ad-slot .ad-title { font-size: 0.78rem; }
.mtl-floating-ad .ad-slot .ad-desc { font-size: 0.68rem; }
.mtl-floating-ad .fa-x {
  position: absolute;
  top: -9px; right: -9px;
  width: 26px; height: 26px;
  border: none;
  border-radius: 50%;
  background: #0f1a2b;
  color: #fff;
  font-size: 0.8rem;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}

@media (max-width: 420px) {
  .splash-modes button { width: 50px; height: 50px; font-size: 1.3rem; }
  .splash-logo { width: 180px; }
}

/* ============================================================
   v272.151 (Bob : « arrange les icônes, recentre comme il faut,
   fais ça beau ») — les 4 tuiles de la splash n'étaient PAS égales
   (mesuré 320×783 : 64/64/72/64 px — « Navigation » débordait de
   8 px à cause de min-width:auto du flex) → la rangée penchait à
   droite. Fixes : tuiles ÉGALES (flex-basis 0 + min-width 0),
   libellés sur une ligne, scrollbar de la splash masquée (elle
   volait 17 px et décentrait toute la colonne sur PC).
   ============================================================ */
#mtl-splash { scrollbar-width: none; }
#mtl-splash::-webkit-scrollbar { display: none; }
.splash-big { gap: 0.4rem; }
.splash-big button { flex: 1 1 0 !important; min-width: 0 !important; padding: 0.7rem 0.1rem 0.6rem; }
.splash-big button b { font-size: 1.25rem; }
.splash-big button span { white-space: nowrap; font-size: 0.64rem; letter-spacing: 0.02em; }
