/* ── RESET & TOKENS (partagés sur toutes les pages) ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blanc:   #F8F6F2;
  --noir:    #3B2A1F;
  --sable:   #C9B99A;
  --or:      #8B7355;
  --gris:    #6B6B6B;
  --nav-h:   84px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--blanc);
  color: var(--noir);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── SCROLL PROGRESS ── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--or);
  z-index: 200;
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-progress { transition: width 0.1s ease-out; }
}

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--noir);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 56px;
  z-index: 100;
  box-shadow: 0 0 0 rgba(0,0,0,0);
}

@media (prefers-reduced-motion: no-preference) {
  .nav { transition: box-shadow 0.3s ease; }
}

.nav.is-scrolled {
  box-shadow: 0 14px 30px -16px rgba(0,0,0,0.45);
}

.nav__logo {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
}

.nav__logo-bold {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--blanc);
}

.nav__logo-script {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 27px;
  color: var(--blanc);
}

.nav__logo-dot { color: var(--sable); font-size: 20px; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__links a {
  position: relative;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sable);
  text-decoration: none;
  transition: color 0.25s;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--blanc);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(.16,.8,.24,1);
}

.nav__links a:hover { color: var(--blanc); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.nav__burger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--blanc);
}

/* ── MAIN ── */
main { margin-top: var(--nav-h); }

/* ── SECTIONS COMMUNES ── */
section { padding: 120px 80px; }

.section-label {
  font-size: 13px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--or);
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 24px;
}

.section-title em { font-style: italic; }

.divider {
  width: 48px;
  height: 1px;
  background: var(--sable);
  margin: 40px 0;
}

.btn,
.form-submit,
.float-cta {
  --glass-bg:
    radial-gradient(130% 200% at 18% -30%, rgba(255,251,242,0.95) 0%, rgba(255,251,242,0) 48%),
    linear-gradient(115deg, rgba(255,255,255,0.6) 0%, rgba(255,246,230,0.14) 45%, rgba(255,255,255,0.55) 100%);
  --glass-bg-hover:
    radial-gradient(130% 200% at 18% -30%, rgba(255,251,242,1) 0%, rgba(255,251,242,0) 52%),
    linear-gradient(115deg, rgba(255,255,255,0.76) 0%, rgba(255,246,230,0.26) 45%, rgba(255,255,255,0.72) 100%);
  --glass-border: rgba(255,255,255,0.8);
  --glass-shadow: 0 8px 22px -10px rgba(43,36,29,0.3);
  --glass-shadow-hover: 0 14px 30px -10px rgba(43,36,29,0.38);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* couche 1 : déforme le fond derrière le bouton, comme du verre liquide */
.btn::before,
.form-submit::before,
.float-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  backdrop-filter: blur(3px) url(#glass-distortion) saturate(160%);
}

/* couche 2 : teinte chaude + reflet brillant (fixe) + lueur mobile (glisse au survol) */
.btn::after,
.form-submit::after,
.float-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--glass-bg);
  background-size: 100% 100%, 220% 220%;
  background-position: 0% 0%, 0% 50%;
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,0.95),
    inset 0 1px 3px rgba(255,255,255,0.7),
    inset 0 -1.5px 2px rgba(255,255,255,0.18);
  transition: background-position 0.7s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover::after,
.form-submit:hover::after,
.float-cta:hover::after {
  background: var(--glass-bg-hover);
  background-size: 100% 100%, 220% 220%;
  background-position: 0% 0%, 100% 50%;
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,1),
    inset 0 1px 4px rgba(255,255,255,0.85),
    inset 0 -1.5px 2px rgba(255,255,255,0.22);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--noir);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  padding: 14px 26px;
  box-shadow: var(--glass-shadow);
  transition: box-shadow 0.3s ease, transform 0.25s cubic-bezier(.16,.8,.24,1);
  width: fit-content;
}

.btn:hover { box-shadow: var(--glass-shadow-hover); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.95, 1.06); transition: transform 0.18s cubic-bezier(.34,1.56,.64,1); }

.btn__arrow { transition: transform 0.25s; }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* Texte à compléter par vos soins — repérable visuellement */
.tbd {
  font-style: italic;
  color: var(--or);
  opacity: 0.75;
}

/* ── FOOTER ── */
footer {
  background: var(--noir);
  border-top: 1px solid rgba(248,246,242,0.1);
  padding: 32px 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #a89179;
  letter-spacing: 0.1em;
}

footer a { color: #a89179; text-decoration: none; transition: color 0.25s; }
footer a:hover { color: var(--blanc); }

/* ── MOBILE (règles communes) ── */
@media (max-width: 900px) {
  :root { --nav-h: 64px; }

  .nav { padding: 0 24px; }
  .nav__logo { font-size: 16px; }
  .nav__burger { display: flex; }

  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--noir);
    transition: max-height 0.35s ease;
  }

  .nav__links.is-open { max-height: 400px; }

  .nav__links a {
    padding: 18px 24px;
    border-top: 1px solid rgba(248,246,242,0.1);
  }

  section { padding: 80px 24px; }

  footer { padding: 24px; flex-direction: column; gap: 8px; }
}

/* ── FICHE PROJET (pages semard / carnot / sèves…) ── */
.projet-hero {
  margin-top: var(--nav-h);
  height: 70vh;
  min-height: 420px;
  overflow: hidden;
}

.projet-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .projet-hero img {
    animation: hero-zoom-in 1.8s cubic-bezier(.16,.8,.24,1) both;
  }
}

@keyframes hero-zoom-in {
  from { transform: scale(1.12); }
  to { transform: scale(1); }
}

.projet-detail {
  padding: 96px 80px;
  max-width: 1100px;
  margin: 0 auto;
}

.projet-detail__meta {
  font-size: 14px;
  color: var(--gris);
  margin-top: 8px;
}

.projet-detail__loc {
  font-size: 13px;
  font-style: italic;
  color: var(--or);
  margin-top: 8px;
}

.projet-detail__text {
  margin-top: 56px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--gris);
  max-width: 680px;
}

.projet-detail__text p { margin-bottom: 20px; }

.projet-detail__text h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 500;
  color: var(--noir);
  margin: 40px 0 16px;
}

.projet-detail__text ul {
  margin: 0 0 20px;
  padding-left: 20px;
}

.projet-detail__text li { margin-bottom: 10px; }

.projet-detail__text a {
  color: var(--noir);
  text-decoration: underline;
  text-decoration-color: var(--sable);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.25s, text-decoration-color 0.25s;
}
.projet-detail__text a:hover {
  color: var(--or);
  text-decoration-color: var(--or);
}

/* ── BLOG ── */
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--gris);
  margin-top: 8px;
}

.article-meta__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--sable);
  display: inline-block;
}

.article-cta {
  margin-top: 56px;
  padding: 32px;
  background: var(--blanc);
  border: 1px solid var(--sable);
}

.article-cta p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: var(--noir);
  margin-bottom: 16px;
}

.projet-detail__more {
  margin-top: 48px;
  font-size: 13px;
  font-style: italic;
  color: var(--or);
  opacity: 0.75;
}

.projet-detail__back {
  margin-top: 56px;
}

.projet-gallery {
  columns: 3;
  column-gap: 12px;
  margin-top: 56px;
}

/* pour les galeries avec peu de photos : le masonry en colonnes équilibre
   par hauteur totale (pas par nombre de photos), ce qui peut donner un
   3+1 au lieu d'un 2+2 selon les proportions — on force une vraie grille
   2 colonnes pour garantir 2 photos par rangée */
.projet-gallery--2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
  column-gap: 12px;
  row-gap: 12px;
}

.projet-gallery--2col figure {
  margin: 0;
  break-inside: auto;
}

.projet-gallery--2col figure.is-wide {
  grid-column: 1 / -1;
}

.projet-gallery figure {
  margin: 0 0 12px;
  overflow: hidden;
  break-inside: avoid;
}

/* photos au format paysage : pleine largeur pour ne pas paraître minuscules
   coincées dans une colonne étroite */
.projet-gallery figure.is-wide {
  column-span: all;
}

.projet-gallery img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .projet-gallery img { transform: scale(1.15); }
  .projet-gallery.visible img { transform: scale(1); }
}

.projet-gallery figure:hover img { transform: scale(1.05); }

@media (max-width: 900px) {
  .projet-hero { height: 46vh; min-height: 260px; }
  .projet-detail { padding: 64px 24px; }
  .projet-gallery { columns: 2; column-gap: 8px; }
  .projet-gallery figure { margin-bottom: 8px; }
}

/* ── ANIMATIONS ── */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: opacity 0.8s cubic-bezier(.16,.8,.24,1), transform 0.8s cubic-bezier(.16,.8,.24,1);
  }
  .fade-in.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  /* Cascade : les éléments d'un groupe apparaissent l'un après l'autre */
  .approche-step,
  .pillar,
  .formula-card__list li,
  .projet-gallery figure,
  .livrable-card {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .fade-in.visible .approche-step,
  .fade-in.visible .pillar,
  .fade-in.visible .formula-card__list li,
  .fade-in.visible.projet-gallery figure,
  .fade-in.visible .livrable-card {
    opacity: 1;
    transform: translateY(0);
  }

  .approche-step:nth-child(1), .pillar:nth-child(1), .formula-card__list li:nth-child(1), .projet-gallery figure:nth-child(1), .livrable-card:nth-child(1) { transition-delay: 0.03s; }
  .approche-step:nth-child(2), .pillar:nth-child(2), .formula-card__list li:nth-child(2), .projet-gallery figure:nth-child(2), .livrable-card:nth-child(2) { transition-delay: 0.09s; }
  .approche-step:nth-child(3), .pillar:nth-child(3), .formula-card__list li:nth-child(3), .projet-gallery figure:nth-child(3), .livrable-card:nth-child(3) { transition-delay: 0.15s; }
  .approche-step:nth-child(4), .formula-card__list li:nth-child(4), .projet-gallery figure:nth-child(4), .livrable-card:nth-child(4) { transition-delay: 0.21s; }
  .formula-card__list li:nth-child(5), .projet-gallery figure:nth-child(5), .livrable-card:nth-child(5) { transition-delay: 0.27s; }
  .formula-card__list li:nth-child(6), .projet-gallery figure:nth-child(6), .livrable-card:nth-child(6) { transition-delay: 0.33s; }
  .formula-card__list li:nth-child(7), .projet-gallery figure:nth-child(7) { transition-delay: 0.39s; }
  .formula-card__list li:nth-child(8), .projet-gallery figure:nth-child(8) { transition-delay: 0.45s; }
  .formula-card__list li:nth-child(n+9), .projet-gallery figure:nth-child(n+9) { transition-delay: 0.5s; }
}
