/* ============================================================
   L'ÂME ET LA MATIÈRE · Page d'attente · site.css
   ============================================================ */

:root {
  /* Palette */
  --noir:     #1C1916;   /* fond principal : charbon chaud, pas noir pur */
  --noir-alt: #252220;   /* sections sombres secondaires */
  --rouge:    #B03A2E;   /* accent, extrait du logo */
  --texte:    #EDE8E0;   /* texte sur fond sombre */
  --texte-2:  #8A8278;   /* texte secondaire */
  --ligne:    rgba(237,232,224,.12); /* séparateurs */

  /* Typo */
  --serif:  'Libre Baskerville', Georgia, serif;
  --sans:   'DM Sans', system-ui, sans-serif;

  /* Easing */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Reset minimal ------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { background: var(--noir); color: var(--texte); font-family: var(--sans); overflow-x: hidden; cursor: none; }
@media (pointer: coarse) { body { cursor: auto; } }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
address { font-style: normal; }

/* ---- Grain overlay ------------------------------------ */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .03; pointer-events: none; z-index: 9999;
}

/* ---- Curseur custom ----------------------------------- */
#cursor {
  position: fixed; width: 16px; height: 16px;
  border: 1.5px solid var(--rouge); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%,-50%);
  transition: width .3s var(--ease), height .3s var(--ease), background .3s, opacity .25s;
  opacity: 0; will-change: left, top;
}
#cursor.on   { opacity: 1; }
#cursor.big  { width: 38px; height: 38px; background: rgba(176,58,46,.1); }
@media (pointer: coarse) { #cursor { display: none; } }

/* ---- Underline hover ---------------------------------- */
.link-hover { position: relative; }
.link-hover::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 100%; height: 1px; background: var(--rouge);
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.link-hover:hover::after { transform: scaleX(1); }

/* ============================================================
   HEADER
   ============================================================ */
#header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  /* Même proportion que .hero-left / .hero-right : logo centré sur la zone sombre */
  display: grid;
  grid-template-columns: 58fr 42fr;
  align-items: center;
  padding: 56px 0 16px 0;
  background: transparent;
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  transition:
    padding .45s var(--ease),
    background .5s var(--ease),
    backdrop-filter .55s ease,
    -webkit-backdrop-filter .55s ease;
}
#header.scrolled {
  background: rgba(28,25,22,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 36px 0 12px 0;
  /* Barre sticky : logo centré sur toute la largeur */
  grid-template-columns: 1fr;
}
.logo-link {
  justify-self: center;
}
.logo-img  {
  height: 180px;
  width: auto;
  transition: height .45s var(--ease);
}
#header.scrolled .logo-img {
  height: 120px;
}

@media (prefers-reduced-motion: reduce) {
  #header,
  #header .logo-img {
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex; align-items: stretch;
  overflow: hidden;
}

/* Texte gauche */
.hero-left {
  flex: 0 0 58%;
  display: flex; flex-direction: column; justify-content: center;
  padding: 292px 7vw 80px 8vw;
}

.hero-label {
  font-family: var(--sans); font-weight: 500;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--rouge); margin-bottom: 28px;
}

h1 {
  display: flex; flex-direction: column;
  margin-bottom: 32px;
}
h1 span {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(36px, 4.8vw, 72px);
  color: var(--texte); line-height: 1.18;
  /* état initial pour l'animation */
  opacity: 0; transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0ms);
}
h1 span.visible { opacity: 1; transform: translateY(0); }
.hero-offset { padding-left: clamp(16px, 2vw, 28px); } /* décalage asymétrique */

.hero-text {
  font-family: var(--sans); font-weight: 300;
  font-size: clamp(14px, 1.1vw, 16px); line-height: 1.75;
  color: var(--texte-2); max-width: 440px; margin-bottom: 40px;
}

.btn {
  display: inline-flex; align-items: center;
  font-family: var(--sans); font-weight: 500;
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--texte); border: 1px solid rgba(237,232,224,.25);
  padding: 14px 28px;
  transition: border-color .3s, color .3s, background .3s;
  width: fit-content;
}
.btn:hover { border-color: var(--rouge); color: var(--texte); background: rgba(176,58,46,.08); }

/* Image droite */
.hero-right {
  flex: 0 0 42%;
  position: relative; overflow: hidden;
  clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); /* état initial */
  transition: clip-path 1s var(--ease);
}
.hero-right.visible { clip-path: polygon(10% 0, 100% 0, 100% 100%, 0% 100%); }
.hero-right img {
  position: absolute; inset: -20px 0 0 0;
  width: 100%; height: calc(100% + 20px);
  object-fit: cover; object-position: center;
}
.hero-fade {
  position: absolute; inset: 0;
  background: linear-gradient(to right, var(--noir) 0%, rgba(28,25,22,.3) 40%, transparent 70%);
  z-index: 1;
}

/* ============================================================
   COLONNES DE CONTENU
   ============================================================ */
.cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: var(--noir-alt);
}

.col {
  padding: 64px 5vw 64px;
  border-right: 1px solid var(--ligne);
  /* animation scroll */
  opacity: 0; transform: translateY(20px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.col:last-child { border-right: none; }
.col.visible    { opacity: 1; transform: translateY(0); }

.col-line {
  display: block;
  width: 44px;
  height: 2px;
  background: var(--rouge);
  margin-bottom: 22px;
}
.col h2 {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(21px, 1.95vw, 28px); color: #F2EEE8;
  margin-bottom: 20px; line-height: 1.3;
}
.col p {
  font-family: var(--sans); font-weight: 300;
  font-size: 15.25px; line-height: 1.78; color: #A39C92;
  margin-bottom: 12px;
}
.col p:last-child { margin-bottom: 0; }
.col em { font-style: italic; color: #F2EEE8; }

/* ============================================================
   GALERIE (grille éditoriale)
   ============================================================ */
.gallery {
  background: var(--noir);
  border-top: 1px solid var(--ligne);
  padding: clamp(4.25rem, 9.5vw, 6.75rem) clamp(4.5vw, 6.5vw, 10vw);
  opacity: 0;
  transition: opacity .9s var(--ease);
}
.gallery.visible { opacity: 1; }

.gallery-inner {
  max-width: 1480px;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(100px, min(12.5vw, 180px));
  gap: clamp(12px, 1.35vw, 20px);
}

.gallery-item {
  position: relative;
  margin: 0;
  overflow: hidden;
  min-height: 0;
  background: var(--noir-alt);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .55s var(--ease);
}

@media (pointer: fine) {
  .gallery-item:hover img { transform: scale(1.035); }
}

.gallery-legend {
  margin-top: clamp(2rem, 4vw, 2.85rem);
  text-align: center;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(237, 232, 224, .42);
}

/* Bento : 7 vues sur 3 rangées (12 col) */
.g-1 { grid-column: span 5; grid-row: span 2; }
.g-2 { grid-column: span 3; grid-row: span 1; }
.g-3 { grid-column: span 4; grid-row: span 1; }
.g-4 { grid-column: span 3; grid-row: span 1; }
.g-5 { grid-column: span 4; grid-row: span 1; }
.g-6 { grid-column: span 7; grid-row: span 1; }
.g-7 { grid-column: span 5; grid-row: span 1; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--noir);
  border-top: 1px solid var(--ligne);
}

.contact-left {
  padding: 80px 6vw 80px 8vw;
  border-right: 1px solid var(--ligne);
}

.section-label {
  display: block;
  font-family: var(--sans); font-weight: 500;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--rouge); margin-bottom: 24px;
  /* animation */
  clip-path: inset(0 100% 0 0);
  transition: clip-path .7s var(--ease);
}
.section-label.visible { clip-path: inset(0 0% 0 0); }

.contact-left h2 {
  font-family: var(--serif); font-style: normal; font-weight: 400;
  font-size: clamp(26px, 3vw, 42px); line-height: 1.25;
  color: var(--texte); margin-bottom: 24px;
}
.contact-left h2 em { font-style: italic; }

.contact-sub {
  font-family: var(--sans); font-weight: 300;
  font-size: 15px; line-height: 1.7; color: var(--texte-2);
  max-width: 380px;
}

/* Bloc adresse + liens */
.contact-right {
  padding: 80px 7vw 80px 6vw;
  display: flex; flex-direction: column; justify-content: center;
  gap: 4px;
  /* animation */
  opacity: 0; transform: translateY(18px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.contact-right.visible { opacity: 1; transform: translateY(0); }

.contact-name {
  font-family: var(--sans); font-weight: 500;
  font-size: 15px; color: var(--texte);
  letter-spacing: .04em; margin-bottom: 4px;
}
.contact-place {
  font-family: var(--sans); font-weight: 300;
  font-size: 14px; color: var(--texte-2);
  line-height: 1.6; margin-bottom: 28px;
}
.contact-link {
  display: block; width: fit-content;
  font-family: var(--sans); font-weight: 400;
  font-size: 15px; color: var(--texte);
  margin-bottom: 10px;
  transition: color .25s;
}
.contact-link:hover { color: var(--rouge); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding: 52px 6vw 40px;
  background: var(--noir-alt);
  border-top: 1px solid var(--ligne);
  text-align: center;
}
.footer-logo { height: 200px; width: auto; }
.footer-tagline {
  font-family: var(--serif); font-style: italic;
  font-size: 15px; color: var(--texte-2); line-height: 1.6;
}
.footer-copy {
  font-family: var(--sans); font-weight: 300;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--texte-2); opacity: .5;
}

/* ============================================================
   ANIMATIONS — états initiaux (hors hero gérés par JS)
   ============================================================ */
.anim-clip {
  clip-path: inset(0 100% 0 0);
  transition: clip-path .7s var(--ease);
}
.anim-clip.visible { clip-path: inset(0 0% 0 0); }

.anim-up {
  opacity: 0; transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0ms);
}
.anim-up.visible { opacity: 1; transform: translateY(0); }

.anim-image {
  clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
  transition: clip-path 1s var(--ease);
}
.anim-image.visible { clip-path: polygon(10% 0, 100% 0, 100% 100%, 0% 100%); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero-left { padding: 272px 6vw 70px; }

  /* Logo centré sur toute la largeur (hero en colonne ou étroit) */
  #header {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body { cursor: auto; }

  #header {
    padding: 40px 0 18px;
    position: relative;
  }
  #header.scrolled {
    padding: 28px 0 14px;
    grid-template-columns: 1fr;
  }

  /* Sans ça, min-height: 100vh laisse un grand vide sous le CTA avant .cols */
  .hero {
    flex-direction: column;
    min-height: auto;
  }

  /* Le 58% du desktop s'applique à la hauteur en colonne → énorme trou sous le CTA */
  .hero-left {
    flex: 0 0 auto;
    width: 100%;
    justify-content: flex-start;
    padding: 36px 7vw 36px;
  }

  .hero-right {
    order: -1; flex: 0 0 auto;
    height: 55vw; min-height: 220px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%) !important;
  }
  .hero-right.visible { clip-path: polygon(0 0, 100% 0, 100% 88%, 0% 100%) !important; }
  .hero-right img {
    inset: 0;
    height: 100%;
    object-position: center 28%;
  }
  .hero-fade { background: linear-gradient(to bottom, transparent 50%, var(--noir) 100%); }

  h1 span    { font-size: clamp(30px, 9vw, 50px); }

  .cols { grid-template-columns: 1fr; }
  .col  { border-right: none; border-bottom: 1px solid var(--ligne); padding: 48px 7vw; }
  .cols .col:first-child { padding-top: 32px; }
  .col:last-child { border-bottom: none; }

  .gallery {
    padding: 4rem 6vw 4.25rem;
  }
  /* Colonne en flex + gap : row-gap en grid restait invisible entre 1 et 4 */
  .gallery-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .gallery .gallery-grid > .gallery-item {
    display: grid;
    width: 100%;
    flex: 0 0 auto;
    min-height: max(38vh, 220px);
    grid-column: unset;
    grid-row: unset;
  }
  .gallery .gallery-grid > .gallery-item:first-child {
    min-height: max(44vh, 240px);
  }
  .gallery .gallery-grid > .gallery-item img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
  }

  /* Masquage mobile : vues 2 et 3 hors flux (flex ne réserve pas d’emplacement) */
  .gallery .gallery-grid > .gallery-item.g-2,
  .gallery .gallery-grid > .gallery-item.g-3 {
    display: none !important;
  }

  .contact { grid-template-columns: 1fr; }
  .contact-left  { padding: 56px 7vw 40px; border-right: none; border-bottom: 1px solid var(--ligne); }
  .contact-right { padding: 40px 7vw 56px; }

  footer { padding: 40px 7vw 32px; }
}

@media (max-width: 480px) {
  .logo-img { height: 140px; }
  #header.scrolled .logo-img { height: 96px; }
  #header   { padding: 32px 5vw 14px; }
  h1 span   { font-size: clamp(26px, 10.5vw, 40px); }
  .gallery-grid {
    gap: 16px;
  }
  .gallery .gallery-grid > .gallery-item {
    min-height: max(34vh, 200px);
  }
  .gallery .gallery-grid > .gallery-item:first-child {
    min-height: max(40vh, 220px);
  }
}
