/* Atelier Latitude — Section Hero
   Thème enfant Divi : assets/al-hero.css (chargé par functions.php) */

.al-hero {
  --al-ink: #342E29;
  --al-paper: #F5F1EA;
  --al-taupe: #8C7B6B;
  --al-accent: #AAB1A0;  /* sauge ; variante sable : #DDD2C3 */
  --al-title: #342E29;   /* variante taupe : #8C7B6B */
  --al-offset: 0px;      /* hauteur du header Divi s’il n’est pas superposé au hero (ex. 80px) */
  --al-ease: cubic-bezier(.2, .7, .2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(clamp(720px, 100vh, 1040px) - var(--al-offset));
  min-height: calc(clamp(720px, 100svh, 1040px) - var(--al-offset));
  overflow: hidden;
  background: var(--al-paper);
  color: var(--al-ink);
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.al-hero *, .al-hero *::before, .al-hero *::after { box-sizing: border-box; }

/* Photo : parallaxe + grain + fondu vers le fond crème */
.al-hero__media {
  position: absolute; left: 0; right: 0; bottom: 0;
  top: calc(clamp(176px, 27%, 290px) - var(--al-offset));
  overflow: hidden;
}
.al-hero__parallax { position: absolute; left: 0; right: 0; top: -8%; bottom: 0; will-change: transform; }
.al-hero .al-hero__img {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%; max-width: none; margin: 0;
  object-fit: cover;
  filter: saturate(.9) sepia(.05);
}
.al-hero__grain {
  position: absolute; inset: 0; pointer-events: none;
  opacity: .08; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.al-hero__wash {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, #F5F1EA 0%, rgba(245,241,234,.86) 12%, rgba(245,241,234,0) 34%, rgba(245,241,234,0) 54%, rgba(222,211,196,.6) 74%, rgba(238,232,223,.95) 88%, #F5F1EA 100%);
}

/* Contenu */
.al-hero__inner {
  position: relative; z-index: 2; flex: 1;
  display: flex; flex-direction: column;
  width: 100%; max-width: 1440px; margin: 0 auto;
  padding: calc(clamp(128px, 19vh, 188px) - var(--al-offset)) clamp(20px, 5vw, 80px) clamp(28px, 5vh, 52px);
}
.al-hero__head { margin-left: clamp(0px, 6vw, 112px); }
.al-hero .al-hero__title {
  margin: 0 0 0 -.04em; padding: 0;
  max-width: 11.2em;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 400;
  font-size: clamp(36px, 6.8vw, 116px);
  line-height: .96;
  letter-spacing: -.03em;
  text-transform: none;
  color: var(--al-title);
  text-wrap: balance;
}
.al-hero__mask { display: inline-block; clip-path: inset(-.3em -.25em -.24em -.25em); }
.al-hero__word { display: inline-block; }
.al-hero__spacer { flex: 1; min-height: clamp(200px, 32vh, 360px); }

.al-hero__bottom { position: relative; }
.al-hero__line { height: 1px; background: rgba(52,46,41,.3); transform-origin: left center; }

/* Badge rond « Discutons de votre espace »
   Centré sur la ligne si le contenu dépasse 900px de large, sinon à droite et remonté de 64px. */
.al-hero__badge {
  position: absolute; top: 0; z-index: 3; display: block;
  left: clamp(50%, (900px - 100%) * 1000, calc(100% - 54px));
  margin-top: clamp(-64px, (100% - 900px) * 1000, 0px);
  width: clamp(108px, 9.6vw, 140px);
  height: clamp(108px, 9.6vw, 140px);
  transform: translate(-50%, -50%);
  text-decoration: none;
}
.al-hero__magnet { position: absolute; inset: 0; display: block; transition: transform .7s var(--al-ease); }
.al-hero__pop {
  position: absolute; inset: 0; display: block;
  border-radius: 50%;
  background: var(--al-ink);
  box-shadow: 0 22px 44px -20px rgba(52,46,41,.6);
  transition: transform .6s var(--al-ease);
}
.al-hero__pop:hover { transform: scale(1.05); }
.al-hero__ring { position: absolute; inset: 0; display: block; width: 100%; height: 100%; transform-origin: 50% 50%; }
.al-hero__ring text { font-family: 'Manrope', sans-serif; font-size: 10.5px; font-weight: 600; letter-spacing: 2.4px; fill: var(--al-paper); }
.al-hero__core { position: absolute; inset: 27%; border-radius: 50%; border: 1px solid rgba(245,241,234,.16); }
.al-hero__arrow {
  position: absolute; left: 50%; top: 50%;
  width: 26px; height: 26px;
  transform: translate(-50%, -50%);
  fill: none; stroke: var(--al-accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}

.al-hero__row {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start;
  gap: 24px 48px;
  padding-top: clamp(22px, 3vh, 32px);
}
.al-hero .al-hero__tagline {
  flex: 0 0 auto; margin: 0; padding: 0;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 400;
  font-size: clamp(19px, 1.8vw, 26px);
  line-height: 1.1;
  letter-spacing: -.005em;
  text-transform: uppercase;
  color: var(--al-ink);
}
.al-hero__aside {
  flex: 0 1 400px; min-width: min(100%, 280px);
  display: flex; flex-direction: column; align-items: flex-end; gap: 20px;
  text-align: right;
}
.al-hero .al-hero__text { margin: 0; padding: 0; font-size: 16px; line-height: 1.65; color: var(--al-ink); text-wrap: pretty; }
.al-hero .al-hero__link {
  display: inline-flex; align-items: center; gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--al-ink);
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--al-ink); text-decoration: none;
  transition: gap .5s var(--al-ease), color .3s, border-color .3s;
}
.al-hero .al-hero__link:hover { gap: 18px; color: var(--al-taupe); border-color: var(--al-taupe); }
.al-hero__link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.al-hero a:focus-visible { outline: 1.5px solid var(--al-taupe); outline-offset: 4px; }

@media (max-width: 959.98px) {
  .al-hero__aside { align-items: flex-start; text-align: left; }
}

/* Animations d’entrée (désactivées si le visiteur a choisi « réduire les animations ») */
@keyframes al-hero-media { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: none; } }
@keyframes al-hero-word  { from { transform: translateY(140%); } to { transform: none; } }
@keyframes al-hero-line  { from { transform: scaleX(0); } to { transform: none; } }
@keyframes al-hero-pop   { from { opacity: 0; transform: scale(.55) rotate(-30deg); } to { opacity: 1; transform: none; } }
@keyframes al-hero-up    { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  .al-hero__media  { animation: al-hero-media 2.2s var(--al-ease) -.13s backwards; }
  .al-hero__word   { animation: al-hero-word 1.2s var(--al-ease) backwards; animation-delay: calc(.2s + var(--i, 0) * 60ms); }
  .al-hero__line   { animation: al-hero-line 1.7s var(--al-ease) .57s backwards; }
  .al-hero__pop    { animation: al-hero-pop 1.2s var(--al-ease) 1.02s backwards; }
  .al-hero__reveal { animation: al-hero-up 1s var(--al-ease) backwards; animation-delay: calc(.82s + var(--i, 0) * 140ms); }
}
