/* ─── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 18px; }
body {
  background: #1a1612;
  color: #f0ead6;
  font-family: 'EB Garamond', Georgia, serif;
  line-height: 1.618;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ─── Palette & Nombre d'or ─────────────────────────────────── */
:root {
  --bg1: #1a1612;
  --bg2: #2a2520;
  --bg3: #0f0d0a;
  --gold: #d4a843;
  --gold2: #b8960c;
  --text1: #f0ead6;
  --text2: #c8bfa8;
  --sep: rgba(212, 168, 67, .4);
  /* Échelle typographique — φ = 1.618, base 1rem = 18 px */
  --fs-xs:  0.786rem; /* 14 px · 1/√φ · labels, badges  */
  --fs-base:1rem;     /* 18 px · φ⁰  · corps de texte   */
  --fs-md:  1.272rem; /* 23 px · √φ  · lead, sous-titres */
  --fs-lg:  1.618rem; /* 29 px · φ   · h4, ornements     */
  --fs-xl:  2.058rem; /* 37 px · φ√φ · h3               */
  --fs-2xl: 2.618rem; /* 47 px · φ²  · h2               */
  --fs-3xl: 4.236rem; /* 76 px · φ³  · h1               */
}

/* ─── Typo ─────────────────────────────────────────────────── */
h1, h2, h3, h4, .cinzel { font-family: 'Cinzel', serif; }
h1 { line-height: 1.15; }
h2, h3, h4 { line-height: 1.2; }
p { line-height: 1.65; letter-spacing: normal; }

/* ─── Utilitaires ──────────────────────────────────────────── */
.ornament {
  display: block;
  text-align: center;
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 1.618rem;
  margin: 1rem 0;
  letter-spacing: .3em;
}
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.container { max-width: 1200px; margin: 0 auto; }

/* ─── Header ────────────────────────────────────────────────── */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background .3s, box-shadow .3s;
  background: transparent;
}
#header.scrolled {
  background: rgba(26, 22, 18, .95);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, .5);
}
.header-brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-shrink: 0;
}
.header-brand a {
  display: flex;
  align-items: center;
  gap: .8rem;
}
.header-brand img {
  height: 44px;
  width: auto;
  filter: brightness(.9);
}
.brand-text { line-height: 1; }
.brand-name {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .05em;
}
.brand-sub {
  font-size: 0.786rem;
  color: var(--text2);
  letter-spacing: .15em;
  text-transform: uppercase;
}
nav ul {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
nav a {
  font-family: 'Cinzel', serif;
  font-size: 0.786rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text2);
  transition: color .3s;
}
nav a:hover, nav a.nav-current, nav a.active { color: var(--gold); }
@keyframes header-phone-shimmer {
  0%   { background-position: -200% center; }
  40%  { background-position: 200% center; }
  100% { background-position: 200% center; }
}
.header-phone {
  display: inline-block;
  padding: .42rem .78rem;
  border: 1px solid var(--sep);
  background: linear-gradient(
    105deg,
    rgba(212,168,67,.08) 35%,
    rgba(212,168,67,.45) 50%,
    rgba(212,168,67,.08) 65%
  );
  background-size: 250% auto;
  animation: header-phone-shimmer 5s ease-in-out infinite;
  font-family: 'Cinzel', serif;
  font-size: 0.786rem;
  color: var(--gold);
  letter-spacing: .05em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color .25s, color .50s;
}
.header-phone:hover {
  text-decoration: none;
  border-color: var(--gold);
  color: var(--text1);
  animation-play-state: paused;
}

/* Burger */
.burger-toggle { display: none; }
.burger-label {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: .4rem;
}
.burger-label span {
  display: block;
  width: 24px; height: 2px;
  background: var(--gold);
  transition: transform .3s, opacity .3s;
}

@media (max-width: 768px) {
  .burger-label { display: flex; }
  nav {
    position: fixed;
    top: 0; right: -100%;
    width: 80%; max-width: 320px;
    height: 100vh;
    background: rgba(26, 22, 18, .98);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    transition: right .35s ease;
    border-left: 1px solid var(--sep);
    z-index: 999;
  }
  .burger-toggle:checked ~ nav { right: 0; }
  .burger-toggle:checked ~ .burger-label span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger-toggle:checked ~ .burger-label span:nth-child(2) { opacity: 0; }
  .burger-toggle:checked ~ .burger-label span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  nav ul { flex-direction: column; gap: 1.5rem; align-items: flex-start; }
  nav a { font-size: 1rem; }
  .header-phone { display: none; }
  .nav-contact-mobile { display: list-item; }
  .nav-contact-mobile a {
    display: inline-block;
    margin-top: .4rem;
    padding: .55rem 1.4rem;
    background: rgba(212,168,67,.12);
    border: 1px solid rgba(212,168,67,.45);
    border-radius: 2rem;
    color: var(--gold);
    font-size: var(--fs-xs);
    letter-spacing: .1em;
    text-transform: uppercase;
  }
  .nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text2);
    cursor: pointer;
    border-radius: 50%;
    transition: color .2s, background .2s;
  }
  .nav-close:hover { color: var(--gold); background: rgba(212,168,67,.1); }
}

/* ─── Page Hero ────────────────────────────────────────────── */
.page-hero {
  position: relative;
  height: 52vh;
  min-height: 320px;
  background:
    linear-gradient(rgba(26,22,18,.7), rgba(26,22,18,.55)),
    url('../assets/realisations/realisation-03/image-01.webp') center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(26,22,18,.6) 100%);
}
.page-hero .hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem 1.5rem;
}
.page-title {
  font-size: clamp(2.618rem, 6vw, 4.236rem);
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--text1);
  text-shadow: 0 0 40px rgba(212,168,67,.3);
  margin-bottom: .3rem;
}
.page-sub {
  color: var(--text2);
  font-style: italic;
  font-size: 1.272rem;
  margin-top: .5rem;
}

/* ─── Boutons ──────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: .786rem 1.618rem;
  font-family: 'Cinzel', serif;
  font-size: 0.786rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  border-radius: 0;
  transition: box-shadow .3s, transform .15s;
}
.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.btn-primary {
  background: var(--gold);
  color: #1a1612;
}
.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(212,168,67,.45);
  transform: translateY(-2px);
}

/* ─── Gallery section ──────────────────────────────────────── */
.gallery-section {
  padding: 4rem 1.618rem;
  background: var(--bg1);
  scroll-margin-top: 80px;
}
.gallery-section .container {
  max-width: 1600px;
}
.gallery-intro {
  text-align: center;
  color: var(--text2);
  font-style: italic;
  font-size: 1.272rem;
  max-width: 720px;
  margin: 0 auto 2.618rem;
  line-height: 1.618;
}

/* ─── Projects grid ────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.778rem;
}

/* ─── Carrousel wrapper ────────────────────────────────────── */
.project-carousel {
  position: relative;
  user-select: none;
  border: 1px solid rgba(212,168,67,.25);
  overflow: hidden;
  background: var(--bg3);
  transition: box-shadow .35s;
}
.project-carousel:hover {
  box-shadow: 0 8px 40px rgba(212,168,67,.18);
}

/* Format CARRÉ */
.carousel-track-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  filter: sepia(.3) brightness(.82) contrast(1.1);
  transition: filter .5s ease;
}
.project-carousel:hover .carousel-slide img {
  filter: sepia(0) brightness(1) contrast(1);
}

/* ─── Boutons flèche ───────────────────────────────────────── */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(26, 22, 18, .72);
  border: 1px solid var(--sep);
  border-radius: 0;
  width: 42px;
  height: 42px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  transition: background .25s, border-color .25s;
}
.carousel-btn:hover {
  background: rgba(212, 168, 67, .18);
  border-color: var(--gold);
}
.carousel-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.carousel-btn.btn-prev { left: 0; }
.carousel-btn.btn-next { right: 0; }

.carousel-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

/* Cacher si 1 seule image */
.project-carousel[data-count="1"] .carousel-btn { display: none; }

/* ─── Visionneuse plein écran ──────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 13, 10, .96);
  z-index: 6000;
  padding: 1.2rem;
}

.lightbox.is-open { display: flex; }

.lightbox-media {
  max-width: min(94vw, 1400px);
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid rgba(212, 168, 67, .35);
  box-shadow: 0 12px 50px rgba(0, 0, 0, .6);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(26, 22, 18, .8);
  color: var(--gold);
  border: 1px solid var(--sep);
  cursor: pointer;
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1.5rem;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 2.6rem;
  height: 2.6rem;
  font-size: 1.5rem;
  line-height: 1;
}

.lightbox-nav.prev { left: 1rem; }
.lightbox-nav.next { right: 1rem; }

.lightbox-caption {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cinzel', serif;
  font-size: .786rem;
  letter-spacing: .08em;
  color: var(--text2);
  text-transform: uppercase;
}

/* ─── CTA section ──────────────────────────────────────────── */
.cta-section {
  background: var(--bg2);
  border-top: 1px solid var(--sep);
  border-bottom: 1px solid var(--sep);
  padding: 4rem 1.618rem;
  scroll-margin-top: 80px;
}
.cta-inner {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.cta-title {
  font-size: clamp(1.618rem, 3.5vw, 2.618rem);
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--gold);
  text-shadow: 0 0 25px rgba(212,168,67,.25);
  margin-bottom: .3rem;
}
.cta-sub {
  color: var(--text2);
  font-style: italic;
  font-size: 1.272rem;
  margin-bottom: 2rem;
}

/* ─── Footer ────────────────────────────────────────────────── */
footer {
  background: var(--bg3);
  padding: 2.618rem 1.618rem 1.618rem;
  border-top: 1px solid var(--sep);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.618fr 1fr 1fr;
  gap: 2.618rem;
  max-width: 1200px;
  margin: 0 auto 2.618rem;
}
.footer-brand .brand-name { font-size: 1rem; margin-bottom: .3rem; }
.footer-brand p { color: var(--text2); font-size: 1rem; line-height: 1.618; margin-top: .5rem; }
.footer-brand .brand-sub { font-size: 0.786rem; color: var(--text2); letter-spacing: .15em; text-transform: uppercase; }
.footer-col h4 {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 0.786rem;
  letter-spacing: .12em;
  margin-bottom: .8rem;
}
.footer-col a {
  display: block;
  color: var(--text2);
  font-size: 1rem;
  margin-bottom: .4rem;
  transition: color .3s;
}
.footer-col a i { margin-right: .4rem; color: var(--gold); font-size: 0.786rem; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  text-align: center;
  color: rgba(200,191,168,.45);
  font-size: 0.786rem;
  border-top: 1px solid rgba(255,255,255,.05);
  padding-top: 1.2rem;
  max-width: 1200px;
  margin: 0 auto;
  font-family: 'Cinzel', serif;
  letter-spacing: .04em;
}
.footer-bottom .footer-link-rows { margin-top: .6rem; }
.footer-bottom .footer-link-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.footer-bottom .footer-link-row--legal { margin-bottom: .35rem; }
.footer-bottom .legal-mini-link {
  display: inline-block;
  font-size: .68rem;
  color: rgba(200,191,168,.75);
  letter-spacing: .04em;
  margin: 0;
}
.footer-bottom .legal-mini-link:hover { color: var(--gold); }

/* ─── Bouton flottant mobile ───────────────────────────────── */
.float-call {
  display: none;
  position: fixed;
  bottom: 1.4rem; right: 1.4rem;
  z-index: 5000;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--gold);
  color: #1a1612;
  align-items: center;
  justify-content: center;
  font-size: 1.272rem;
  box-shadow: 0 4px 20px rgba(212,168,67,.45);
  border: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.float-call:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(212,168,67,.6); }

/* ─── NAV CONTACT MOBILE (masqué sur desktop) ─────────────── */
.nav-contact-mobile { display: none; }

/* ─── NAV CLOSE (croix fermeture menu mobile) ─────────────── */
.nav-close { display: none; }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-contact-mobile { display: list-item; }
  .nav-close { display: flex; }
  .projects-grid { grid-template-columns: 1fr; gap: 1rem; }
  .gallery-section { padding: 2.2rem 1rem; }
  .gallery-intro { font-size: 1.02rem; margin-bottom: 1.2rem; }
  .carousel-track-wrapper { aspect-ratio: 4 / 3; }
  .carousel-btn { width: 34px; height: 34px; }
  .carousel-btn svg { width: 14px; height: 14px; }
  .float-call { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .page-title { letter-spacing: .03em; }
  .lightbox { padding: .6rem; }
  .lightbox-close { top: .5rem; right: .5rem; }
  .lightbox-nav.prev { left: .4rem; }
  .lightbox-nav.next { right: .4rem; }
  .lightbox-caption { bottom: .45rem; font-size: .68rem; }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1101px) {
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ─── Focus global ─────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
