/* ============================================================
   Léo Sermon — Accueil
   Palette extraite directement des photographies du mobilier.
   ============================================================ */

:root {
  --bg:            #E7DACB;   /* sable ivoire doux, échantillonné sur le mur/sol du hero (zones calmes) */
  --bg-deep:       #DCC8B4;   /* sable/pierre plus soutenu, fidèle au mur et au sol réels */
  --hero-floor:    #DCC6B4;   /* ton du sol au premier plan du hero, hors ombre */
  --ink:           #241C14;   /* brun très foncé, quasi noir — textes */
  --ink-soft:      #6B5C4A;   /* brun atténué — textes secondaires */
  --cream:         #FBF6EE;   /* texte clair sur photo (header/hover) */
  --line:          rgba(36, 28, 20, 0.12);

  --font-serif: "Fraunces", "Iowan Old Style", "Georgia", serif;
  --font-sans:  "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 64px);
  --content-max: 1480px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

/* ---------------- Header ---------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  height: 220px;
  background: linear-gradient(to bottom, rgba(20, 14, 8, 0.32), rgba(20, 14, 8, 0));
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s var(--ease);
  z-index: -1;
}

.site-header.scrolled,
.site-header.nav-open {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header.scrolled::before,
.site-header.nav-open::before {
  opacity: 0;
}

.header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 22px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.22);
  transition: color 0.5s var(--ease), text-shadow 0.5s var(--ease);
}

.site-header.scrolled .logo,
.site-header.nav-open .logo {
  color: var(--ink);
  text-shadow: none;
}

.nav-desktop {
  display: flex;
  gap: 40px;
}

.nav-desktop a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.22);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.5s var(--ease), text-shadow 0.5s var(--ease);
}

.site-header.scrolled .nav-desktop a,
.site-header.nav-open .nav-desktop a {
  color: var(--ink-soft);
  text-shadow: none;
}

.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transition: right 0.4s var(--ease);
}

.nav-desktop a:hover {
  color: var(--cream);
}

.site-header.scrolled .nav-desktop a:hover,
.site-header.nav-open .nav-desktop a:hover {
  color: var(--ink);
}

.nav-desktop a:hover::after {
  right: 0;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.5s var(--ease), text-shadow 0.5s var(--ease);
}

.site-header.scrolled .menu-toggle,
.site-header.nav-open .menu-toggle {
  color: var(--ink);
  text-shadow: none;
}

.nav-mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 0;
  background: var(--bg);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.45s var(--ease);
}

.nav-mobile a {
  font-family: var(--font-serif);
  font-size: 26px;
  padding: 18px var(--gutter);
  border-top: 1px solid var(--line);
}

.site-header.nav-open .nav-mobile {
  max-height: 320px;
}

@media (max-width: 720px) {
  .nav-desktop { display: none; }
  .menu-toggle { display: block; }
  .nav-mobile { display: flex; }
}

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  background: var(--bg);
}

.hero-frame {
  position: absolute;
  inset: 0;
}

/* Un <picture> est "inline" par défaut : sans cette règle, un fin
   filet du fond de page reste visible sous la photo (espace réservé
   pour une ligne de texte). */
.hero-frame picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 55%;
}

.hero-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48%;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(220, 198, 180, 0)    0%,
    rgba(220, 198, 180, 0.04) 15%,
    rgba(221, 200, 182, 0.10) 28%,
    rgba(223, 202, 184, 0.20) 40%,
    rgba(225, 205, 187, 0.34) 52%,
    rgba(228, 209, 193, 0.50) 63%,
    rgba(231, 213, 197, 0.68) 73%,
    rgba(234, 217, 202, 0.85) 84%,
    var(--bg) 100%
  );
}

/* Assombrissement très large et progressif du mur derrière le texte
   (sans bord visible) : le texte clair reste lisible même sur les
   zones les plus lumineuses de la photo. */
.hero-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 62% 58% at 28% 36%,
    rgba(28, 18, 10, 0.30) 0%,
    rgba(28, 18, 10, 0.16) 48%,
    rgba(28, 18, 10, 0) 100%
  );
}

.hero-copy {
  position: absolute;
  left: 19%;
  top: 29%;
  max-width: 500px;
  text-align: left;
  pointer-events: none;
}

.hero-title,
.hero-subtitle {
  margin: 0;
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(2.25rem, 2.1vw, 2.75rem);
  line-height: 1.45;
  letter-spacing: 0.015em;
  color: var(--cream);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.hero-subtitle {
  margin-top: 14px;
  max-width: 460px;
  font-size: clamp(1.75rem, 1.65vw, 2.125rem);
  text-wrap: balance;
}

/* iPad et téléphone partagent la même composition portrait : la photo
   entière occupe le premier écran, le texte est calé au même endroit
   sur les deux. Au-delà de 1024px, la photo desktop (paysage) reprend
   le dessus. Ce bloc doit rester APRÈS les règles de base ci-dessus
   pour bien les remplacer (même sélecteurs, même spécificité — sinon
   c'est la règle la plus basse dans le fichier qui gagne, peu importe
   la largeur d'écran). */
@media (max-width: 1024px) {
  .hero {
    height: 100vh;
    height: 100svh;
    height: round(down, 100svh, 1px);
    min-height: 560px;
    max-height: none;
  }

  .hero-frame {
    inset: auto;
    top: 0;
    left: 0;
    right: 0;
    /* Pas de aspect-ratio ici : combiné à left/right:0, il forçait le
       navigateur à calculer la largeur depuis la hauteur, ce qui
       laissait un filet de fond visible sur le bord droit. La hauteur
       ci-dessous respecte le ratio réel de la photo (941 / 1672), sans
       jamais dépasser la hauteur de la Hero : sur un écran aussi carré
       que l'iPad portrait, ce calcul dépasserait la hauteur de l'écran
       et pousserait le fondu hors champ (caché par le overflow:hidden
       de la Hero). */
    height: min(round(down, 177.68vw, 1px), 100%);
  }

  .hero-image {
    object-fit: cover;
    object-position: 50% 50%;
    transform: none;
  }

  /* Fondu vers le fond de page : il commence sous les pieds de la table
     et se termine exactement sur la couleur du fond, sans coupure. */
  .hero-fade {
    bottom: -3px;
    height: calc(32% + 3px);
    background: linear-gradient(
      to bottom,
      rgba(231, 218, 203, 0)    0%,
      rgba(231, 218, 203, 0.03) 12%,
      rgba(231, 218, 203, 0.09) 24%,
      rgba(231, 218, 203, 0.19) 36%,
      rgba(231, 218, 203, 0.34) 48%,
      rgba(231, 218, 203, 0.53) 60%,
      rgba(231, 218, 203, 0.73) 74%,
      rgba(231, 218, 203, 0.90) 86%,
      var(--bg) 96%,
      var(--bg) 100%
    );
  }

  .hero-frame::before {
    background: radial-gradient(
      ellipse 90% 20% at 48% 37%,
      rgba(28, 18, 10, 0.20) 0%,
      rgba(28, 18, 10, 0.10) 55%,
      rgba(28, 18, 10, 0) 100%
    );
  }

  /* Signature dans la zone calme du mur, sous le header, bien au-dessus
     de la table */
  .hero-copy {
    left: 16vw;
    right: 16px;
    top: 28%;
    max-width: none;
  }

  .hero-title,
  .hero-subtitle {
    font-size: clamp(1.5625rem, 6.7vw, 1.8125rem);
    line-height: 1.3;
    letter-spacing: 0.005em;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.28);
    text-wrap: balance;
  }

  /* Accroche : nettement plus petite que le titre. Taille resserrée
     pour que la phrase (plus longue) tienne sur 2 lignes sans
     toucher la table en contrebas. */
  .hero-subtitle {
    margin-top: 10px;
    max-width: none;
    font-size: clamp(0.9375rem, 4.1vw, 1.09375rem);
    line-height: 1.35;
  }
}

/* ---------------- Intro editorial (post-hero) ---------------- */

.intro {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(64px, 8vw, 96px) var(--gutter) clamp(36px, 3.5vw, 52px);
}

.intro-line {
  margin: 0 auto;
  max-width: 640px;
  text-align: center;
  text-wrap: balance;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.375rem, 1.75vw, 1.875rem);
  line-height: 1.4;
  color: var(--ink-soft);
}

@media (max-width: 720px) {
  .intro-line {
    font-size: clamp(1.5rem, 6vw, 1.75rem);
    line-height: 1.42;
  }
}

/* ---------------- Approach (Imaginer / Concevoir / Façonner) ---------------- */

.approach {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(100px, 8vw, 140px) var(--gutter) clamp(80px, 7vw, 100px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(40px, 6vw, 72px);
}

.approach-step {
  padding-top: 24px;
  border-top: 1px solid rgba(36, 28, 20, 0.09);
}

.approach-index {
  display: block;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  opacity: 0.6;
}

.approach-title {
  margin: 16px 0 0;
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 500;
  font-size: clamp(1.375rem, 1.6vw, 1.625rem);
  color: var(--ink);
}

.approach-text {
  margin: 12px 0 0;
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 28ch;
}

@media (max-width: 720px) {
  .approach {
    grid-template-columns: 1fr;
    gap: clamp(36px, 9vw, 48px);
  }
}

/* ---------------- Universes ---------------- */

.universes {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: clamp(20px, 2vw, 24px);
}

.universe-link {
  display: flex;
  flex-direction: column;
  position: relative;
}

.universe-media {
  position: relative;
  overflow: hidden;
  background: var(--bg-deep);
  aspect-ratio: 3 / 2;
}

.universe-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001); /* forces GPU layer, avoids seam on zoom */
  transition: transform 0.6s var(--ease);
}

.universe--nomades .universe-media img { object-position: 50% 62%; }
.universe--mortex .universe-media img { object-position: 50% 46%; }

.universe-link:hover .universe-media img,
.universe-link:focus-visible .universe-media img {
  transform: scale(1.015);
}

/* Voile discret + titre — visibles uniquement au hover (desktop) */

.universe-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 14, 8, 0.2);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}

.universe-link:hover .universe-media::after,
.universe-link:focus-visible .universe-media::after {
  opacity: 1;
}

.universe-caption--overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) translateY(6px);
  opacity: 0;
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 500;
  font-size: clamp(1.125rem, 1.7vw, 1.5rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  text-align: center;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.universe-link:hover .universe-caption--overlay,
.universe-link:focus-visible .universe-caption--overlay {
  opacity: 1;
  transform: translate(-50%, -50%) translateY(0);
}

.universe-caption--below {
  display: none;
  margin-top: 16px;
  text-align: center;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

@media (max-width: 860px) {
  .universes {
    grid-template-columns: 1fr;
  }

  .universe-link {
    width: 100%;
  }

  .universe-media {
    width: 100%;
  }

  .universe--nomades .universe-media { aspect-ratio: 1448 / 1086; }
  .universe--mortex .universe-media { aspect-ratio: 1672 / 941; }

  .universe--nomades .universe-media img,
  .universe--mortex .universe-media img {
    object-position: 50% 50%;
  }

  .universe-media::after,
  .universe-caption--overlay {
    display: none;
  }

  .universe-caption--below {
    display: block;
  }
}

/* ---------------- CTA / Contact ---------------- */

.cta-contact {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(60px, 10vw, 100px) var(--gutter) clamp(100px, 14vw, 160px);
  text-align: center;
  border-top: 1px solid var(--line);
}

/* Sur la Home, "Façonner" (.approach) assure déjà la transition avec
   cette section — le filet et le grand espace du haut deviendraient
   redondants ici. */
.page-home .cta-contact {
  padding-top: clamp(30px, 3vw, 50px);
  border-top: none;
}

.page-home .cta-line {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.cta-line {
  margin: 0 0 36px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1.2;
  color: var(--ink);
}

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink);
  padding-bottom: 6px;
}

.cta-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transition: right 0.45s var(--ease);
}

.cta-link:hover::after,
.cta-link:focus-visible::after {
  right: 0;
}

.cta-link .arrow {
  transition: transform 0.4s var(--ease);
}

.cta-link:hover .arrow,
.cta-link:focus-visible .arrow {
  transform: translateX(6px);
}

/* ---------------- Footer ---------------- */

.site-footer {
  border-top: 1px solid rgba(36, 28, 20, 0.08);
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(70px, 7vw, 100px) var(--gutter) clamp(70px, 7vw, 100px);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.footer-name {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
}

.footer-tag,
.footer-loc {
  margin: 4px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-soft);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.footer-links a {
  color: var(--ink-soft);
  transition: color 0.3s var(--ease);
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-links span {
  color: var(--line);
}

.footer-copy {
  width: 100%;
  margin: 32px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-soft);
  opacity: 0.7;
}

/* ---------------- Contact WhatsApp (flottant) ---------------- */

.whatsapp-float {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 90;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(36, 28, 20, 0.25);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.whatsapp-float svg {
  width: 22px;
  height: 22px;
  fill: var(--cream);
}

.whatsapp-float:hover,
.whatsapp-float:focus-visible {
  transform: scale(1.06);
  box-shadow: 0 8px 26px rgba(36, 28, 20, 0.32);
}

/* ---------------- Scroll reveal ---------------- */

[data-animate] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

[data-animate].in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .universe-media img,
  .cta-link .arrow,
  .universe-caption,
  .whatsapp-float {
    transition: none !important;
  }
  .universe-link:hover .universe-media img {
    transform: none;
  }
}

/* ============================================================
   Accueil — composition téléphone (≤ 720 px uniquement)
   Pensée pour le mobile : cadrage, tailles, marges et retours à
   la ligne travaillés séparément du desktop et de l'iPad.
   ============================================================ */
@media (max-width: 720px) {
  .page-home {
    --gutter: 30px;
  }

  /* Hero : la composition portrait (photo + texte) est désormais
     partagée avec l'iPad, définie dans le bloc @media (max-width:
     1024px) ci-dessus. */

  /* Phrase éditoriale : deuxième niveau, nettement sous la Hero */
  .intro {
    padding: 80px var(--gutter) 44px;
  }

  .intro-line {
    font-size: clamp(1.25rem, 5.4vw, 1.4375rem);
    line-height: 1.28;
    text-wrap: balance;
  }

  /* Catégories : marges de 30 px, titre discret sous chaque image */
  .universes {
    gap: 48px;
  }

  .universe-caption--below {
    margin-top: 16px;
    font-size: 13px;
    letter-spacing: 0.16em;
    color: var(--ink);
  }

  .universe-caption--below::after {
    content: " \2192";
    letter-spacing: 0;
  }

}

/* ============================================================
   Accueil — section « Échanger / Imaginer ensemble / Façonner »
   Introduction rassurante, puis 3 colonnes égales sur une ligne.
   ============================================================ */

.process {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(100px, 8vw, 140px) var(--gutter) clamp(80px, 7vw, 100px);
}

.process-intro {
  max-width: 640px;
  margin: 0 0 clamp(48px, 5vw, 72px);
}

.process-lead {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.3;
  color: var(--ink);
  text-wrap: balance;
}

.process-sub {
  margin: 16px 0 0;
  max-width: 520px;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.process-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 4vw, 72px);
}

.process-step {
  padding-top: 24px;
  border-top: 1px solid rgba(36, 28, 20, 0.1);
}

.process-index {
  display: block;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  opacity: 0.6;
}

.process-title {
  margin: 16px 0 0;
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 500;
  font-size: clamp(1.25rem, 1.7vw, 1.625rem);
  line-height: 1.2;
  color: var(--ink);
}

.process-text {
  margin: 12px 0 0;
  max-width: 30ch;
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* Téléphone : les 3 étapes restent côte à côte, textes réduits */
@media (max-width: 720px) {
  .process-lead {
    font-size: clamp(1.25rem, 5.6vw, 1.5rem);
  }

  .process-sub {
    font-size: 14px;
    line-height: 1.6;
  }

  .process-steps {
    gap: 14px;
  }

  .process-step {
    padding-top: 16px;
  }

  .process-index {
    font-size: 10.5px;
  }

  .process-title {
    margin-top: 12px;
    min-height: 2.4em;
    font-size: clamp(0.9375rem, 4.1vw, 1.0625rem);
    text-wrap: balance;
  }

  .process-text {
    margin-top: 8px;
    max-width: none;
    font-size: 12px;
    line-height: 1.55;
  }
}

/* Très petits écrans : une seule colonne */
@media (max-width: 340px) {
  .process-steps {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .process-title {
    min-height: 0;
  }

  .process-text {
    font-size: 13.5px;
  }
}
