/* ── Page d'accueil Joon — landing page complète ── */

/* ── État de chargement ── */
body.home-loading #home-hero,
body.home-loading #main-content { display: none !important; }

/* ── Conteneur principal ── */
.home-hero {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  background: #fff;
  color: #1a1a2e;
  overflow-x: hidden;
}
.home-hero.hidden { display: none !important; }

/* ─────────────────────────────────────────────
   NAV
───────────────────────────────────────────── */
.hl-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #ede9fe;
}
.hl-nav-inner {
  width: 100%;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hl-nav-logo { flex: 1; }
.hl-nav-logo img { height: 24px; display: block; }
.hl-nav:not(.scrolled) .hl-nav-logo { visibility: hidden; opacity: 0; pointer-events: none; }
@keyframes hl-nav-logo-in {
  from { opacity: 0; transform: translateY(-8px) scale(.82); }
  to   { opacity: 1; transform: translateY(0)     scale(1);  }
}
.hl-nav.scrolled .hl-nav-logo {
  visibility: visible;
  animation: hl-nav-logo-in .38s cubic-bezier(.22,.68,0,1.25) both;
}
.hl-nav-auth { display: flex; align-items: center; gap: 10px; }
.hl-nav-user { color: #fff; font-weight: 600; font-size: 15px; }
#hl-nav-auth .home-user-info { color: #1a1a1a; }

/* ── Bouton menu (3 barres) ── */
.hl-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  z-index: 201;
}
.hl-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #000;
  border-radius: 2px;
  transition: transform .3s cubic-bezier(.22,.68,0,1.25), opacity .2s ease;
}
.hl-menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hl-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hl-menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Sous-menu lateral (drawer) ── */
.hl-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 20, .45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 199;
}
.hl-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.hl-menu-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(300px, 82vw);
  background: #fff;
  box-shadow: 4px 0 24px rgba(0,0,0,.14);
  transform: translateX(-100%);
  transition: transform .32s cubic-bezier(.22,.68,0,1);
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: 20px;
}
.hl-menu-drawer.open { transform: translateX(0); }
.hl-menu-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.hl-menu-drawer-logo { height: 30px; display: block; }
.hl-menu-close {
  border: none;
  background: transparent;
  color: #1a1a2e;
  cursor: pointer;
  padding: 6px;
  display: flex;
}
.hl-menu-drawer-links { display: flex; flex-direction: column; gap: 4px; }
.hl-menu-drawer-link {
  font-size: 15.5px;
  font-weight: 600;
  color: #1a1a2e;
  text-decoration: none;
  padding: 14px 8px;
  border-radius: 10px;
  transition: background .15s, color .15s;
}
.hl-menu-drawer-link:hover { background: #f5f2ff; color: #3b2689; }

/* ─────────────────────────────────────────────
   BOUTONS COMMUNS
───────────────────────────────────────────── */
.hl-btn-ghost {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #3b2689;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background .15s;
}
.hl-btn-ghost:hover { background: #f5f3ff; }

.hl-btn-primary {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #3b2689;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background .15s;
}
.hl-btn-primary:hover { background: #f5f3ff; box-shadow: none; }

/* ─────────────────────────────────────────────
   HERO FOLD
───────────────────────────────────────────── */
.hl-fold {
  position: relative;
  max-width: 100%;
  margin: 0;
  padding: 68px 0 0;
  min-height: calc(100vh - 72px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  overflow: visible;
}
.hl-fold-left {
  position: relative;
  z-index: 2;
  width: 50%;
  padding: 64px 48px 80px 7%;
  margin-top: -8%;
}
@keyframes hl-logo-in {
  from { opacity: 0; transform: translateY(-14px) scale(.92); }
  to   { opacity: 1; transform: translateY(0)     scale(1);   }
}

.hl-fold-logo {
  height: 56px;
  display: block;
  margin: 0 0 24px;
  animation: hl-logo-in .55s cubic-bezier(.22,.68,0,1.2) both;
}

.hl-fold-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #d946ef;
  margin: 0 0 14px;
}
.hl-fold-title {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.025em;
  color: #1a1a2e;
  margin: 0 0 16px;
}
.hl-fold-sub {
  font-size: 1.05rem;
  color: #5b5470;
  font-weight: 500;
  margin: 0 0 32px;
  line-height: 1.65;
  max-width: 440px;
}

/* ── Carte adresse alignee avec le texte du hero ── */
.hl-fold-address-center {
  position: relative;
  z-index: 3;
  width: 100%;
  margin-top: 8px;
}
.hl-address-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  width: 100%;
}

#home-hero-address-slot { position: relative; margin-bottom: 4px; }
/* Aligne la largeur du champ d'adresse sur celle du bouton "Trouver les
   restaurants" : le formulaire partage le padding horizontal de .home-address-edit-body
   avec le panneau topbar (hors hero), donc on neutralise ce padding ici seulement. */
#home-hero-address-slot .home-address-edit-body { padding-left: 0; padding-right: 0; padding-bottom: 0; }
#home-hero-address-slot .home-address-edit-body .address-suggestions { left: 0; right: 0; }

.hl-search-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #3b2689 0%, #34227a 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s;
}
.hl-search-btn:hover { opacity: .9; }

#home-hero-address-slot .address-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f5f3ff;
  border: 1.5px solid #c4b5fd;
  border-radius: 12px;
  padding: 4px 4px 4px 14px;
  transition: border-color .15s, box-shadow .15s;
}
#home-hero-address-slot .address-input-wrapper:focus-within {
  border-color: #3b2689;
  box-shadow: 0 0 0 3px rgba(59,38,137,.08);
}
#home-hero-address-slot .address-input-wrapper input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 12px 4px;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a2e;
  font-family: inherit;
}
#home-hero-address-slot .address-input-wrapper input::placeholder { color: #9ca3af; }
#home-hero-address-slot .address-input-wrapper input:focus { outline: none; box-shadow: none; }

#home-hero-address-slot .geolocation-btn {
  flex: 0 0 auto;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity .15s;
}
#home-hero-address-slot .geolocation-btn:hover { opacity: .7; }

#home-hero-address-slot .address-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  z-index: 200;
}
#home-hero-address-slot .home-topbar-address-status {
  display: none;
  margin: 6px 2px 0;
  color: #9ca3af;
  font-size: 12.5px;
}
/* Messages d'erreur geolocalisation (refus, position indisponible...) :
   le seul retour visuel pour l'utilisateur dans ce contexte (le champ
   adresse reste vide), donc affiche meme si le hero masque les prompts
   habituels ci-dessus. */
#home-hero-address-slot .home-topbar-address-status.is-visible {
  display: block;
  color: var(--danger, #d32f2f);
}

.home-hero-locate-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #3b2689 0%, #d946ef 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14.5px;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.home-hero-locate-btn:hover { opacity: .92; }
.home-hero-locate-btn:disabled { opacity: .6; cursor: wait; }

.hl-fold-right { display: flex; justify-content: flex-end; }

/* Photo plein écran côté droit avec coupe diagonale */
.hl-fold-photo-full {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  clip-path: polygon(12% 0%, 100% 0%, 100% 100%, 0% 100%);
  overflow: hidden;
  pointer-events: none;
}
.hl-fold-photo-full > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  display: block;
}

.hl-fold-photo-store-badges {
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hl-fold-photo-store-badges .store-badge {
  height: 36px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .35));
}
.hl-fold-photo-store-badges .store-badge--google { height: 48px; margin: -6px 0; }

/* ─────────────────────────────────────────────
   EMPLACEMENTS PHOTO
───────────────────────────────────────────── */
.hl-photo {
  background: transparent;
  border-radius: 0;
  border: none;
  overflow: hidden;
  position: relative;
}
.hl-photo-1 {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 3/4;
  min-height: 400px;
}
.hl-photo-1 > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.hl-photo-2 {
  width: 100%;
  aspect-ratio: 4/5;
}
.hl-photo-3 {
  width: 100%;
  height: 100%;
  min-height: 440px;
}
.hl-photo::after {
  content: 'Image à ajouter';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #a78bfa;
  letter-spacing: .04em;
  pointer-events: none;
}
.hl-photo > img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hl-photo:has(> img)::after { display: none; }

/* ─────────────────────────────────────────────
   COMMENT ÇA MARCHE
───────────────────────────────────────────── */
.hl-how {
  background: #f9f7ff;
  padding: 88px 28px;
}
.hl-section-inner { max-width: 1100px; margin: 0 auto; }

.hl-section-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #d946ef;
  margin: 0 0 10px;
  text-align: center;
}
.hl-section-title {
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: #1a1a2e;
  margin: 0 0 52px;
  text-align: center;
  line-height: 1.2;
}
.hl-steps {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.hl-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.hl-step-num {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #3b2689;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(59,38,137,.28);
  flex-shrink: 0;
}
.hl-step-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
}
.hl-step-text {
  font-size: .9rem;
  color: #5b5470;
  line-height: 1.6;
  margin: 0;
}
.hl-step-arrow {
  font-size: 1.4rem;
  color: #c4b5fd;
  flex-shrink: 0;
  align-self: flex-start;
  padding-top: 18px;
}

/* ─────────────────────────────────────────────
   SECTION SPLIT — livreurs
───────────────────────────────────────────── */
.hl-split {
  max-width: 1200px;
  margin: 0 auto;
  padding: 88px 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.hl-split-photo-right .hl-split-text { order: 1; }
.hl-split-photo-right .hl-photo      { order: 2; }

.hl-split-body {
  font-size: 1rem;
  color: #5b5470;
  line-height: 1.75;
  margin: 0 0 24px;
}
.hl-checks {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hl-checks li {
  font-size: .95rem;
  font-weight: 600;
  color: #1a1a2e;
  padding-left: 26px;
  position: relative;
}
.hl-checks li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #d946ef;
  font-weight: 800;
}

/* ─────────────────────────────────────────────
   SECTION PLEIN-ÉCRAN — produits frais
───────────────────────────────────────────── */
.hl-full-photo {
  position: relative;
  min-height: 440px;
  display: flex;
  overflow: hidden;
}
.hl-full-photo .hl-photo-3 {
  position: absolute;
  inset: 0;
  border-radius: 0;
  min-height: 0;
}
.hl-full-photo-overlay {
  position: relative;
  z-index: 1;
  background: linear-gradient(90deg, rgba(59,38,137,.78) 0%, rgba(59,38,137,.32) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 72px;
  width: 100%;
  min-height: 440px;
}
.hl-full-photo-title {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.18;
  margin: 0 0 14px;
  letter-spacing: -.025em;
  max-width: 520px;
}
.hl-full-photo-sub {
  font-size: 1rem;
  color: rgba(255,255,255,.82);
  line-height: 1.65;
  font-weight: 500;
  margin: 0;
  max-width: 420px;
}

/* ─────────────────────────────────────────────
   CTA BANNER
───────────────────────────────────────────── */
.hl-cta {
  background: linear-gradient(135deg, #3b2689 0%, #4c35a0 100%);
  padding: 88px 28px;
}
.hl-cta-inner { text-align: center; }
.hl-cta-title {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
  letter-spacing: -.025em;
}
.hl-cta-sub {
  font-size: 1rem;
  color: rgba(255,255,255,.78);
  margin: 0 0 28px;
}
.hl-cta-btn {
  font-size: 1rem;
  padding: 14px 36px;
  background: #fff;
  color: #3b2689;
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
}
.hl-cta-btn:hover { opacity: .95; }

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
.hl-footer {
  background: #0f0a1e;
  padding: 44px 28px;
}
.hl-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.hl-footer-logo img { height: 28px; opacity: .75; display: block; }
.hl-footer-copy {
  color: rgba(255,255,255,.4);
  font-size: 13px;
  margin: 0;
  flex: 1;
}
.hl-footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.hl-footer-links a {
  color: rgba(255,255,255,.45);
  font-size: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: color .15s;
}
.hl-footer-links a:hover { color: rgba(255,255,255,.85); }

.hl-footer-store-badges { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hl-footer-store-badges .store-badge { height: 32px; width: auto; display: block; }
.hl-footer-store-badges .store-badge--google { height: 43px; margin: -5.5px 0; }

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 920px) {
  .hl-fold {
    flex-direction: column;
    min-height: unset;
    padding: 0;
  }
  .hl-fold-left {
    width: 100%;
    margin-top: 0;
    padding: 48px 16px 8px;
  }
  /* Carte adresse imbriquee dans .hl-fold-left : plus besoin de repositionnement,
     juste reprendre toute la largeur disponible dans la colonne de texte. */
  .hl-fold-address-center {
    width: 100%;
    max-width: 100%;
    margin-top: 0;
    padding-bottom: 28px;
  }
  /* Photo pleine largeur en dessous, coupée en bas */
  .hl-fold-photo-full {
    position: relative;
    width: 100%;
    height: 260px;
    clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
    border-radius: 0;
    order: 3;
  }
  .hl-fold-left { order: 1; }
  .hl-fold-right { justify-content: center; }
  .hl-fold-photo-store-badges { display: none; }
  .hl-photo-1 { max-width: 100%; aspect-ratio: 4/3; }
  .hl-fold-sub { max-width: 100%; margin-bottom: 14px; }
  .hl-address-card { max-width: 100%; }

  .hl-split {
    grid-template-columns: 1fr;
    padding: 56px 20px;
    gap: 36px;
  }
  .hl-split-photo-right .hl-split-text { order: 1; }
  .hl-split-photo-right .hl-photo      { order: 2; }

  .hl-full-photo-overlay { padding: 40px 28px; }
  .hl-full-photo-title { max-width: 100%; }
  .hl-full-photo-sub   { max-width: 100%; }
  .hl-section-title { margin-bottom: 36px; }
}

@media (max-width: 620px) {
  .hl-fold { padding-top: 60px; }
  .hl-fold-logo { height: 40px; margin: 0 auto 18px; }
  .hl-fold-eyebrow { text-align: center; }
  .hl-fold-left { padding-bottom: 0; }
  .hl-fold-sub { margin-bottom: 16px; }
  #home-hero-address-slot { margin-bottom: 0; }
  .hl-nav-inner { height: 60px; gap: 12px; padding: 0 16px; }
  .hl-nav-user { color: #1a1a2e; }
  .hl-btn-ghost { padding: 8px 10px; font-size: 13px; }
  .hl-btn-primary { padding: 9px 16px; font-size: 13px; }

  .hl-steps {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }
  .hl-step-arrow { transform: rotate(90deg); padding: 0; align-self: center; }

  .hl-how, .hl-cta { padding: 56px 20px; }

  .hl-footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hl-footer-copy { flex: none; }
}
