/* =====================================================================
   ATELIER 26/11 — landings B « Photos du groupe en bento »
   (atelier esthetique, carte p-jam-landings, variante B validee)

   Pages : zones/<ville>/ x14, zones/, concerts/, mariage/,
   soiree-entreprise/, sud-landes/.
   Chargee par un <link> place APRES le <style> en ligne de chaque page :
   retirer ce <link> = la page revient exactement a l'etat d'avant.

   Zero JS (regle des landings). Toutes les classes sont prefixees
   .lp-hero--photo / .lp-bento / .lp-tile / .lpb-* : rien d'autre ne bouge.

   Animations : declarees SEULEMENT sous prefers-reduced-motion:
   no-preference. Sans ce reglage, ou dans un navigateur qui ne connait
   pas animation-timeline, tout est visible d'office (etat final).
   (styles.css ramene toute animation a 0,01 ms en mode reduit : aucune
   de nos animations n'y existe, donc rien ne reste masque.)
   ===================================================================== */

/* ---------- 0. DEFILEMENT ----------
   styles.css met body en overflow-x:hidden, ce qui fait du <body> un conteneur
   de defilement qui ne defile jamais : la barre .lp-nav (sticky dans le <style>
   de chaque page) ne collait plus, et animation-timeline:view() n'avait aucun
   effet. overflow-x:clip coupe pareil sans creer de conteneur. Navigateur qui
   ne connait pas clip (avant Safari 16) : la ligne est ignoree = comme avant. */
body { overflow-x: clip; }

/* ---------- 1. HERO EN PHOTO ---------- */
.lp-hero.lp-hero--photo {
  position: relative;
  isolation: isolate;               /* la photo (z-index -1) reste DANS le hero */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;        /* texte en bas */
  min-height: min(620px, 80vh);
  min-height: min(620px, 80svh);
  padding: 140px 0 56px;
  text-align: left;
  background: #0a0a14;
}
.lp-hero--photo > .container { width: 100%; }

/* La photo, plein cadre, sous un voile nuit + fondu vers le fond */
.lp-hero__photo {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: #14132b;
}
.lp-hero__photo picture { display: block; height: 100%; }
.lp-hero__photo img {
  position: absolute;
  left: 0;
  top: -40px;                        /* marge pour la parallaxe (40 px max) */
  width: 100%;
  max-width: none;
  height: calc(100% + 40px);
  object-fit: cover;
  object-position: var(--lpb-pos, 50% 40%);
}
.lp-hero__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,20,0) 0%, rgba(10,10,20,.30) 35%,
                    rgba(10,10,20,.78) 72%, #0a0a14 100%),
    rgba(10,10,20,.45);              /* voile nuit 45 % partout */
}

/* Ligne de contexte (ville · secteur), seulement sur les pages villes */
.lp-hero--photo .lp-kicker {
  /* marge > debord du dessin d'Anton au-dessus du titre (aucun contact) */
  margin: 0 0 clamp(18px, 2.2vw, 30px);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.4;
  text-transform: uppercase;
  color: #e91e63;
  text-shadow: 0 1px 10px rgba(10,10,20,.9);
}

/* Titre : h1 actuel, mot pour mot, en tres gros */
.lp-hero.lp-hero--photo h1 {
  font-size: clamp(44px, 7.6vw, 110px);
  line-height: 1.14;                /* capitales accentuees (À, É) sous un Q : >= 3 px d'air entre les lignes */
  letter-spacing: .005em;
  text-transform: uppercase;
  margin: 0 0 22px;
  overflow-wrap: break-word;
  text-shadow: 0 2px 24px rgba(10,10,20,.45);
}
.lp-hero--photo .lpb-w { display: inline-block; }
/* le degrade du mot accentue est porte par chaque mot (les mots sont des blocs) */
.lp-hero--photo h1 .accent { background: none; -webkit-text-fill-color: currentColor; }
.lp-hero--photo h1 .accent .lpb-w {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

/* Accroche : texte actuel en entier, ~72 caracteres par ligne */
.lp-hero.lp-hero--photo p.lead {
  max-width: 72ch;
  margin: 0 0 28px;
  color: #dcdce6;
}
.lp-hero.lp-hero--photo .lp-cta { justify-content: flex-start; }

/* ---------- 2. GRILLE BENTO (section repertoire) ---------- */
.lp-bento {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 200px 200px;
  gap: 16px;
  margin-top: 28px;
}
.lp-tile {
  position: relative;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: #14132b;
}
.lp-tile--big { grid-row: span 2; }
.lp-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: var(--lpb-pos, 50% 40%);
  transition: transform 600ms cubic-bezier(.22,1,.36,1);
}
/* fondu sombre en bas de la grande tuile, sous son titre */
.lp-tile--big::after {
  content: "";
  position: absolute;
  inset: 40% 0 0 0;
  background: linear-gradient(180deg, rgba(10,10,20,0), rgba(10,10,20,.88));
  pointer-events: none;
}
.lp-tile__bas {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
/* .lp-bento devant : le style en ligne de chaque page (.lp-sec p = gris, marge 16 px, 780 px max)
   est plus fort que .lp-tile__titre seul ; ici le titre reste blanc, sans marge ni largeur max */
.lp-bento .lp-tile__titre {
  margin: 0;
  max-width: none;
  font-family: 'Anton', "Anton repli", sans-serif;
  font-weight: 400;
  font-size: clamp(26px, 2.8vw, 40px);
  line-height: 1.08;
  text-transform: uppercase;
  color: #fff;
}
/* legende (seulement si elle est vraie : lieu lu dans la publication Instagram) */
.lp-tile__cap {
  display: inline-block;
  margin: 0;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.3;
  color: #ffe3ea;
  background: rgba(10,10,20,.78);
  transition: transform 600ms cubic-bezier(.22,1,.36,1);
}
/* cartes chiffre : chiffres ecrits dans le HTML (deja presents sur la page) */
.lp-tile--chiffre {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 20px;
  background: linear-gradient(135deg, #2a0f3d, #7b2cbf);
}
.lp-tile--chiffre b {
  display: block;
  font-family: 'Anton', "Anton repli", sans-serif;
  font-weight: 400;
  font-size: clamp(34px, 4vw, 64px);
  line-height: 1;
  color: #fff;
  margin-bottom: .32em;             /* le dessin d'Anton deborde de la ligne : pas de contact avec le texte dessous */
}
.lp-tile--chiffre b.lpb-court { font-size: clamp(28px, 3vw, 44px); }
.lp-tile--chiffre span { font-size: 13px; line-height: 1.35; color: #ffd6e0; }

/* ---------- 3. TELEPHONE ---------- */
@media (max-width: 767px) {
  .lp-hero.lp-hero--photo {
    min-height: 70vh;
    min-height: 70svh;
    padding: 110px 0 40px;
  }
  /* a 44 px, la queue du Q d'Anton frole les accents de la ligne suivante : un peu plus d'air */
  .lp-hero.lp-hero--photo h1 { line-height: 1.24; }
  /* tres petit ecran ou gros zoom (ex. 390 px a 200 % = 195 px) : un mot long (« D'ENTREPRISE ») en 44 px
     depassait du hero et etait coupe ; ici le titre suit la largeur (43 px a 320, 40 px a 296, 28 px mini) */
  @media (max-width: 339px) {
    .lp-hero.lp-hero--photo h1 { font-size: max(28px, 13.5vw); }
  }
  .lp-bento {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-rows: auto;
  }
  .lp-tile--photo { height: 150px; }
  .lp-tile--big { grid-row: auto; height: 220px; }
  .lp-tile--chiffre { min-height: 112px; }
}

/* ---------- 4. MOUVEMENTS (seulement si l'utilisateur n'a pas demande moins d'animations) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* photo qui se devoile de bas en haut */
  .lp-hero__photo { animation: lpb-devoile 900ms cubic-bezier(.22,1,.36,1) both; }
  /* mots du titre l'un apres l'autre (~60 ms d'ecart) */
  .lp-hero--photo .lpb-w {
    animation: lpb-mot 700ms cubic-bezier(.22,1,.36,1) both;
    animation-delay: calc(250ms + var(--i, 0) * 60ms);
  }

  @supports (animation-timeline: scroll()) {
    /* legere parallaxe de la photo (40 px max) */
    .lp-hero__photo img {
      animation: lpb-parallaxe linear both;
      animation-timeline: scroll(root);
      animation-range: 0 620px;
    }
    /* sections qui montent de 24 px en fondu a l'entree dans l'ecran */
    body .lp-sec {
      animation: lpb-monte linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }

  /* survol d'une tuile photo a la souris (rien sur tactile) */
  @media (hover: hover) and (pointer: fine) {
    .lp-tile--photo:hover img { transform: scale(1.04); }
    .lp-tile--photo:hover .lp-tile__cap { transform: translateY(-6px); }
  }
}

@keyframes lpb-devoile { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes lpb-mot { from { opacity: 0; transform: translateY(.35em); } to { opacity: 1; transform: none; } }
@keyframes lpb-parallaxe { from { transform: translateY(0); } to { transform: translateY(40px); } }
@keyframes lpb-monte { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
