/* ============================================================
   THE WALKING FRIDGE — feuille de style principale
   Thème : navy + blanc + bleu ciel · motifs de froid/givre
   Mobile-first, responsive.
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --navy-900: #001233;
  --navy-800: #001845;
  --navy-700: #023e7d;
  --navy-600: #0a2472;
  --blue-500: #0466c8;
  --sky-400:  #4ea8de;
  --sky-300:  #90e0ef;
  --ice-100:  #e8f4fb;
  --frost:    #f4fafe;
  --white:    #ffffff;
  --ink:      #0b1b3a;
  --muted:    #5a6b8c;

  --radius:   22px;
  --radius-sm:14px;
  --shadow:   0 18px 40px -18px rgba(2, 30, 84, 0.35);
  --shadow-lg:0 30px 60px -20px rgba(2, 30, 84, 0.45);

  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --maxw: 1200px;
}

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* Masqué visuellement mais lisible par les lecteurs d'écran / moteurs de recherche */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- Utilitaires ---------- */
.section {
  padding: clamp(3.5rem, 8vw, 7rem) 1.25rem;
  max-width: var(--maxw);
  margin: 0 auto;
}

.section__head { text-align: center; max-width: 640px; margin: 0 auto clamp(2rem, 5vw, 3.5rem); }

.section__kicker {
  display: inline-block;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .82rem;
  color: var(--blue-500);
  background: var(--ice-100);
  padding: .4rem .9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: .01em;
  color: var(--navy-600);
  text-transform: uppercase;
}
.section__title--light { color: var(--white); }

.section__lead { color: var(--muted); font-size: clamp(1rem, 2.4vw, 1.12rem); margin-top: .9rem; }
.section__lead--light { color: var(--sky-300); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
  font-size: 1.05rem;
  padding: .95rem 1.8rem;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn--primary {
  background: var(--white);
  color: var(--navy-600);
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.5);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 18px 38px -12px rgba(0,0,0,.55); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .7rem clamp(1rem, 4vw, 2rem);
  transition: background .3s ease, box-shadow .3s ease;
}
.nav--scrolled {
  background: rgba(0, 24, 69, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px -8px rgba(0,0,0,.5);
}
.nav__brand { display: flex; align-items: center; gap: .5rem; color: var(--white); }
.nav__brand-mark { color: var(--sky-300); font-size: 1.3rem; }
.nav__brand-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.nav__links { display: none; gap: 1.6rem; }
.nav__links a {
  color: var(--white);
  font-weight: 600;
  font-size: .95rem;
  opacity: .85;
  transition: opacity .2s;
}
.nav__links a:hover { opacity: 1; }

@media (min-width: 820px) {
  .nav__links { display: flex; }
}

/* ============================================================
   1. HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}

.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__sky {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #023e7d 0%, #0466c8 45%, #4ea8de 100%);
}
.hero__skyline { position: absolute; bottom: 22%; left: 0; width: 100%; height: 46%; }
.hero__seine {
  position: absolute; bottom: 0; left: 0; right: 0; height: 24%;
  background: linear-gradient(180deg, #0a2472 0%, #023e7d 100%);
  box-shadow: inset 0 8px 30px rgba(144,224,239,.15);
}
/* Photo réelle de Paris en fond (si présente). Repli automatique sur le décor SVG si le fichier manque. */
.hero__photo {
  position: absolute; inset: 0;
  background-image: url('../assets/paris-eiffel.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero__overlay {
  position: absolute; inset: 0;
  /* Assombri un peu plus pour garder le texte lisible par-dessus la photo */
  background:
    radial-gradient(1200px 600px at 30% 20%, rgba(0,18,51,.25), rgba(0,18,51,.62)),
    linear-gradient(180deg, rgba(0,24,69,.35), rgba(0,24,69,.55));
}

.hero__content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 6rem 1.5rem 5rem;
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero__content { grid-template-columns: 1.1fr .9fr; gap: 1rem; }
}

/* Hero en mode "affiche" : image de marque en vedette */
.hero__content--poster {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.4rem;
  width: 100%;
  padding-top: 5.5rem;
}
@media (min-width: 900px) {
  .hero__content--poster { grid-template-columns: none; }
}
.hero__poster {
  display: block;
  width: 100%;
  max-width: 940px;
  margin-inline: auto;
  height: auto;
  align-self: stretch;
  border-radius: var(--radius);
  box-shadow: 0 30px 70px -20px rgba(0,10,40,.7);
  border: 3px solid rgba(255,255,255,.18);
}
.hero__content--poster .hero__eyebrow { margin-bottom: 0; }
.hero__content--poster .hero__cta { margin-top: .4rem; }

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 700;
  font-size: .8rem;
  color: var(--sky-300);
  margin-bottom: .8rem;
}
.hero__title { line-height: .9; text-shadow: 0 6px 24px rgba(0,18,51,.5); }
.hero__title-the {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: .08em;
  color: var(--sky-300);
}
.hero__title-main {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 12vw, 7rem);
  letter-spacing: .01em;
  text-transform: uppercase;
  -webkit-text-stroke: 2px rgba(255,255,255,.15);
}
.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3.4vw, 1.7rem);
  color: var(--white);
  margin-top: .6rem;
  letter-spacing: .04em;
}
.hero__sub { color: var(--ice-100); margin-top: .8rem; font-size: clamp(1rem, 2.6vw, 1.15rem); max-width: 34ch; }
.hero__cta { margin-top: 1.8rem; }

/* Mascotte */
.hero__mascot { display: flex; justify-content: center; align-items: flex-end; }
.mascot-svg-wrap { width: clamp(220px, 60vw, 360px); }
.mascot-svg-wrap svg { width: 100%; height: auto; }

/* animation "marche" */
@keyframes walkBob {
  0%,100% { transform: translateY(0) rotate(-1deg); }
  50%     { transform: translateY(-12px) rotate(1deg); }
}
.mascot-svg-wrap { animation: walkBob 2.4s ease-in-out infinite; transform-origin: bottom center; }
@media (prefers-reduced-motion: reduce) {
  .mascot-svg-wrap { animation: none; }
}

/* indicateur de scroll */
.hero__scroll {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 4; width: 26px; height: 42px;
  border: 2px solid rgba(255,255,255,.6); border-radius: 14px;
}
.hero__scroll span {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; border-radius: 2px; background: var(--white);
  animation: scrollDot 1.6s infinite;
}
@keyframes scrollDot { 0%{opacity:1;top:8px} 100%{opacity:0;top:22px} }

/* Flocons animés */
.snowflakes { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.snowflakes span {
  position: absolute; top: -10%;
  color: rgba(255,255,255,.85);
  font-size: 1rem;
  animation: fall linear infinite;
}
.snowflakes span:nth-child(1){ left: 6%;  font-size:.9rem;  animation-duration: 11s; animation-delay: 0s; }
.snowflakes span:nth-child(2){ left: 18%; font-size:1.3rem; animation-duration: 14s; animation-delay: 2s; }
.snowflakes span:nth-child(3){ left: 30%; font-size:.8rem;  animation-duration: 9s;  animation-delay: 1s; }
.snowflakes span:nth-child(4){ left: 42%; font-size:1.1rem; animation-duration: 13s; animation-delay: 4s; }
.snowflakes span:nth-child(5){ left: 55%; font-size:.9rem;  animation-duration: 10s; animation-delay: 0s; }
.snowflakes span:nth-child(6){ left: 66%; font-size:1.4rem; animation-duration: 15s; animation-delay: 3s; }
.snowflakes span:nth-child(7){ left: 74%; font-size:.85rem; animation-duration: 12s; animation-delay: 5s; }
.snowflakes span:nth-child(8){ left: 84%; font-size:1.1rem; animation-duration: 9.5s;animation-delay: 1.5s; }
.snowflakes span:nth-child(9){ left: 91%; font-size:.9rem;  animation-duration: 13s; animation-delay: 2.5s; }
.snowflakes span:nth-child(10){left: 97%; font-size:1.2rem; animation-duration: 16s; animation-delay: 4.5s; }
@keyframes fall {
  0%   { transform: translateY(0) rotate(0); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translateY(115vh) rotate(360deg); opacity: .2; }
}
@media (prefers-reduced-motion: reduce) { .snowflakes { display: none; } }

/* ============================================================
   2. MENU / CARTE
   ============================================================ */
.menu { position: relative; }
.menu__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 560px) { .menu__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .menu__grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--white);
  border: 1px solid var(--ice-100);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .22s ease, box-shadow .22s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.card__media {
  height: 190px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--sky-300), var(--sky-400));
}
.card__media--drinks   { background: linear-gradient(160deg, #90e0ef, #0466c8); }
.card__media--choco    { background: linear-gradient(160deg, #6b4f3a, #3a271a); }
.card__media--sandwich { background: linear-gradient(160deg, #ffd166, #ef8a17); }
.card__media--ice      { background: linear-gradient(160deg, #90e0ef, #023e7d); }
.card__media--water    { background: linear-gradient(160deg, #caf0f8, #4ea8de); }
.card__media--sparkling{ background: linear-gradient(160deg, #d8f3dc, #52b788); }
.card__emoji { font-size: 3.6rem; filter: drop-shadow(0 8px 12px rgba(0,0,0,.25)); }
/* Vraie photo produit : recouvre l'emoji quand elle charge ; supprimée par onerror sinon */
.card__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
}

.card__body { padding: 1.3rem 1.3rem 1.5rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.card__title { font-family: var(--font-display); font-size: 1.4rem; text-transform: uppercase; color: var(--navy-600); letter-spacing: .01em; }
.card__desc { color: var(--muted); font-size: .95rem; flex: 1; }

.price-badge {
  align-self: flex-start;
  margin-top: .8rem;
  background: var(--navy-600);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.5rem;
  padding: .35rem 1.1rem;
  border-radius: 14px;
  box-shadow: 0 8px 18px -8px rgba(10,36,114,.7);
}

.card--featured { outline: 3px solid var(--sky-300); outline-offset: -3px; }

/* ============================================================
   3. MAP
   ============================================================ */
.map { position: relative; }
.map__frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--navy-600);
  background: var(--navy-800);
}
.map__live {
  width: 100%;
  height: clamp(320px, 55vh, 520px);
  display: block;
  background: var(--navy-800);
  z-index: 1;
}
/* Lisibilité des crédits Leaflet sur fond sombre */
.map__frame .leaflet-control-attribution {
  background: rgba(0, 18, 51, .7);
  color: #b9c7e0;
}
.map__frame .leaflet-control-attribution a { color: var(--sky-300); }

/* Marqueur "triporteur" qui pulse */
.fridge-marker { position: relative; }
.fridge-marker__dot {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  font-size: 20px;
  background: var(--navy-600);
  border: 2px solid var(--sky-300);
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(0,0,0,.5);
  z-index: 2;
}
.fridge-marker__pulse {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--sky-300);
  animation: pulse 1.8s ease-out infinite;
}

/* État du badge (en ligne / hors ligne) */
.map__badge[data-status="online"] .map__pulse { background: #33d17a; }
.map__badge[data-status="online"] .map__pulse::after { border-color: #33d17a; }
.map__badge[data-status="offline"] .map__pulse { background: #8aa0c6; }
.map__badge[data-status="offline"] .map__pulse::after { border-color: #8aa0c6; }

.map__badge {
  position: absolute;
  z-index: 1000;
  left: 16px; bottom: 16px;
  display: flex; align-items: center; gap: .7rem;
  background: rgba(0, 24, 69, 0.92);
  color: var(--white);
  padding: .7rem 1rem;
  border-radius: 14px;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.6);
  max-width: calc(100% - 32px);
}
.map__badge strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sky-300); }
.map__badge span { font-size: .95rem; }
.map__pulse {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--sky-300); position: relative; flex-shrink: 0;
}
.map__pulse::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--sky-300); animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse { 0%{transform:scale(.6);opacity:1} 100%{transform:scale(1.8);opacity:0} }

.map__note { text-align: center; color: var(--muted); margin-top: 1.2rem; font-size: .95rem; }

/* Photo réelle du triporteur */
.fridge-photo {
  margin: 0 auto clamp(2rem, 5vw, 3rem);
  max-width: 460px;
  text-align: center;
}
.fridge-photo img {
  width: 100%;
  height: auto;
  /* PNG détouré (fond transparent) : ombre portée douce plutôt qu'un cadre */
  filter: drop-shadow(0 18px 22px rgba(2,30,84,.28));
}
.fridge-photo figcaption {
  margin-top: .8rem;
  font-weight: 600;
  color: var(--navy-600);
}

/* ============================================================
   4. PAIEMENT
   ============================================================ */
.pay {
  background: linear-gradient(160deg, var(--navy-700), var(--navy-800));
  position: relative;
  overflow: hidden;
}
.pay::before {
  content: '❄'; position: absolute; top: -20px; right: -10px;
  font-size: 12rem; color: rgba(255,255,255,.04); pointer-events: none;
}
.pay__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) 1.25rem;
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 780px) { .pay__inner { grid-template-columns: auto 1fr; gap: 3rem; } }

.pay__contactless {
  color: var(--sky-300);
  display: grid; place-items: center;
}
.pay__contactless svg { width: clamp(90px, 22vw, 130px); height: auto; }

.pay__logos { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.6rem; }
.pay__logo {
  background: var(--white);
  border-radius: 12px;
  padding: .7rem 1.1rem;
  display: grid; place-items: center;
  box-shadow: 0 10px 24px -12px rgba(0,0,0,.5);
  min-height: 52px;
}
.pay__logo svg { height: 30px; width: auto; }
.pay__logo--nfc svg { height: 34px; }

/* ============================================================
   5. FOOTER
   ============================================================ */
.footer {
  background: var(--navy-900);
  color: var(--ice-100);
  padding: 2.5rem 1.25rem;
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}
@media (min-width: 760px) {
  .footer__inner { flex-direction: row; justify-content: space-between; text-align: left; }
}
.footer__brand { display: flex; align-items: center; gap: .7rem; }
.footer__mark { color: var(--sky-300); font-size: 1.8rem; }
.footer__brand strong { display: block; font-family: var(--font-display); font-size: 1.15rem; letter-spacing: .02em; text-transform: uppercase; }
.footer__brand span { font-size: .85rem; color: var(--sky-300); }

.footer__social a {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--ice-100); font-weight: 600; font-size: .92rem;
  transition: color .2s;
}
.footer__social a:hover { color: var(--sky-300); }
.footer__meta { font-size: .82rem; color: var(--muted); }

/* ============================================================
   ANIMATIONS AU SCROLL (reveal)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   PAGE CHAUFFEUR (/admin)
   ============================================================ */
.hidden { display: none !important; }

.btn--danger { background: #e5484d; color: #fff; box-shadow: 0 12px 30px -10px rgba(229,72,77,.6); }
.btn--danger:hover { transform: translateY(-3px); }
.btn--google {
  background: #fff; color: #3c4043;
  border: 1px solid #dadce0;
  font-weight: 600;
}
.btn--google:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(0,0,0,.4); }

.admin {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: linear-gradient(160deg, var(--navy-700), var(--navy-900));
}
.admin__card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2rem 1.6rem 2.2rem;
  text-align: center;
}
.admin__brand {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-display); text-transform: uppercase;
  color: var(--navy-600); font-size: 1.1rem; letter-spacing: .02em;
}
.admin__mark { color: var(--sky-400); }
.admin__eyebrow {
  margin-top: .3rem;
  text-transform: uppercase; letter-spacing: .14em;
  font-size: .75rem; font-weight: 700; color: var(--blue-500);
}
.admin__title { font-family: var(--font-display); font-size: 1.8rem; color: var(--navy-600); text-transform: uppercase; margin: 1rem 0 .6rem; }
.admin__text { color: var(--muted); font-size: .96rem; margin-bottom: 1.2rem; }
.admin__text code { background: var(--ice-100); padding: .1rem .4rem; border-radius: 6px; font-size: .85em; }
.admin__driver { font-weight: 700; color: var(--navy-700); margin-bottom: 1.4rem; word-break: break-word; }

.admin__share { width: 100%; justify-content: center; font-size: 1.1rem; padding: 1.1rem; }
.admin__status {
  margin-top: 1.2rem; padding: 1rem;
  background: var(--frost); border: 1px solid var(--ice-100);
  border-radius: var(--radius-sm);
  display: flex; flex-direction: column; gap: .25rem;
}
.admin__status strong { color: var(--navy-700); }
.admin__status span { color: var(--muted); font-size: .9rem; }
.admin__hint { margin-top: 1rem; font-size: .85rem; color: var(--muted); }
.admin__logout {
  margin-top: 1.2rem; background: none; border: none; cursor: pointer;
  color: var(--blue-500); font-weight: 600; font-size: .9rem; text-decoration: underline;
}
