/* MONOLITH — portfolio. Papier chaud, encre presque noire, corail doux en touche,
   bleu #1f00ff réservé au logo. Mouvement « premium » : une seule courbe, 3 durées. */

:root {
  --paper: #f4f1ea;
  --paper-2: #ebe6db;
  --ink: #16150f;
  --ink-soft: #5d5a52;
  --line: #d8d2c4;
  /* gamme tirée du bleu du logo (#1f00ff), dosée pour rester douce */
  --blue: #1f00ff;           /* le bleu du logo : petits repères, numéros, focus (7,4:1) */
  --blue-soft: #6d61f2;      /* bleu adouci : grands titres, traits, tirets (4:1) */
  --blue-pale: #b9b2ff;      /* sur fond nuit : accents du bloc contact */
  --blue-mist: #ebe9f6;      /* voile lavande : section services */
  --night: #17123d;          /* encre bleutée : boutons, onglet actif, bloc contact */
  --blue: #1f00ff;
  --radius: 22px;
  --radius-lg: 34px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.05, 0.7, 0.1, 1);
  --t-quick: 160ms;
  --t-std: 420ms;
  --t-slow: 900ms;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1360px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html:not(.lenis) { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 "Outfit", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
em { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* grain papier, très léger */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .06;
  transform: translateZ(0); contain: strict; /* calque figé : pas de repeinte au défilement */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: 15px 26px; border-radius: 999px;
  background: var(--night); color: var(--paper); text-decoration: none; font-weight: 500;
  transition: transform var(--t-quick) var(--ease), background var(--t-quick) var(--ease);
}
.btn:hover { background: #251e5c; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--small { padding: 10px 18px; font-size: 15px; }
.link { text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color var(--t-quick) var(--ease); }
.link:hover { border-color: var(--ink); }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-soft); letter-spacing: .02em; }
.eyebrow--light { color: #b8b2a4; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }

/* ---------- navigation ---------- */
/* barre en verre légèrement givré. Pas de `transform` sur cet élément :
   Safari désactive backdrop-filter dès qu'il y en a un → centrage par marges, masquage par `top`. */
.nav {
  position: fixed; top: 14px; left: 0; right: 0; z-index: 50;
  width: min(calc(100% - 2 * var(--gutter)), var(--max)); margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
  padding: 8px 8px 8px 22px; border-radius: 999px;
  background: rgba(250, 248, 243, .52);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  backdrop-filter: blur(14px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .85),   /* reflet du haut */
    inset 0 -1px 0 rgba(22, 21, 15, .04),     /* épaisseur du bas */
    0 10px 30px -12px rgba(22, 21, 15, .22);  /* ombre portée douce */
  transition: top var(--t-std) var(--ease);
}
.nav.is-hidden { top: -90px; }
.nav > .btn, .nav__toggle { justify-self: end; }
.nav__logo img { height: 18px; width: auto; }
.nav__links { display: flex; gap: 28px; font-size: 15px; }
.nav__links a { text-decoration: none; color: var(--ink-soft); transition: color var(--t-quick) var(--ease); }
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh; max-width: var(--max); margin: 0 auto;
  padding: 130px var(--gutter) 60px;
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px;
}
.hero__title { font-size: clamp(52px, 8.4vw, 132px); line-height: .95; letter-spacing: -0.045em; margin: 22px 0 28px; }
.hero__title em { color: var(--blue-soft); }
/* masque de l'apparition : marge sous la ligne pour ne pas couper les jambages (g, q, p),
   compensée par une marge négative ; le masque est retiré après l'intro (.is-done) */
.line { display: block; overflow: hidden; padding: .04em 0 .22em; margin-bottom: -.26em; }
.hero__title.is-done .line { overflow: visible; }
.line > span { display: inline-block; }
.hero__lead { max-width: 30em; font-size: 19px; color: var(--ink-soft); }
.hero__cta { display: flex; align-items: center; gap: 24px; margin-top: 36px; flex-wrap: wrap; }

.deck { position: relative; aspect-ratio: 1; width: 100%; max-width: 620px; justify-self: center; perspective: 1400px; }
/* 3 couches pour que les animations ne se marchent pas dessus :
   .card = placement CSS seul (GSAP n'y touche jamais : il absorberait translate/rotate) ;
   .card__move = souris (x/y) + défilement (yPercent/rotation) ; .card__in = intro. */
.card {
  position: absolute; left: 50%; top: 50%; margin: 0;
  width: 52%; aspect-ratio: 4 / 5;
  translate: calc(-50% + var(--x)) calc(-50% + var(--y));
  rotate: var(--r);
}
.card__move { width: 100%; height: 100%; will-change: transform; }
.card__in {
  width: 100%; height: 100%; border-radius: var(--radius); overflow: hidden;
  background: #fff; padding: 10px;
  box-shadow: 0 1px 2px rgba(22,21,15,.08), 0 18px 40px -12px rgba(22,21,15,.28);
  will-change: transform, opacity;
}
.js .card__in { opacity: 0; } /* caché jusqu'à l'intro : pas de flash au rechargement */
.card img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--radius) - 8px); }
.card--top { width: 60%; aspect-ratio: 3 / 2; }

/* ---------- bandeau ---------- */
.strip {
  max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.strip__item strong { display: block; font-weight: 500; font-size: 18px; }
.strip__item span { color: var(--ink-soft); font-size: 15px; }

/* ---------- sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(90px, 12vw, 160px) var(--gutter); }
.section--tint { max-width: none; background: var(--blue-mist); border-radius: var(--radius-lg); margin: 0 clamp(8px, 1.5vw, 20px); }
.section--tint > * { max-width: calc(var(--max) - 2 * var(--gutter)); margin-left: auto; margin-right: auto; }
.section__head { margin-bottom: clamp(48px, 7vw, 90px); }
.section__title { font-size: clamp(38px, 5.4vw, 80px); line-height: 1; letter-spacing: -0.035em; margin-top: 18px; max-width: 14em; }
.section__note { margin-top: 18px; color: var(--ink-soft); font-size: 14px; }

/* ---------- projets ---------- */
.project {
  display: grid; grid-template-columns: minmax(240px, 4fr) 8fr; gap: clamp(24px, 4vw, 64px);
  padding: clamp(40px, 6vw, 80px) 0; border-top: 1px solid var(--line);
}
.project--flip .project__meta { order: 2; }
.project__meta { position: sticky; top: 110px; align-self: start; display: grid; gap: 14px; }
.project__meta > p:last-child { color: var(--ink-soft); }
.project__num { font-size: 14px; color: var(--blue); font-weight: 500; }
.project__meta h3 { font-size: clamp(28px, 3vw, 42px); }
.project__place { color: var(--ink-soft); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.tags li::before { content: "— "; color: var(--blue-soft); }

.project__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.project__grid--3 { grid-template-columns: repeat(3, 1fr); }
.shot { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); aspect-ratio: 1; }
.shot--wide { grid-column: span 2; aspect-ratio: 16 / 10; }
.shot--tall { aspect-ratio: 3 / 4; }
/* le zoom au survol passe par `scale` : `transform` est piloté par le parallaxe GSAP */
.shot img { width: 100%; height: 115%; object-fit: cover; scale: 1; transition: scale var(--t-slow) var(--ease); }
.shot:hover img { scale: 1.03; }

/* récit d'une façade (épinglé au défilement) */
.story { border-top: 1px solid var(--line); }
.story__inner {
  min-height: 100svh; display: grid; grid-template-columns: minmax(240px, 4fr) 8fr;
  gap: clamp(24px, 4vw, 64px); align-items: center; padding: clamp(40px, 6vw, 80px) 0;
}
.story__meta { display: grid; gap: 22px; }
.story__meta h3 { font-size: clamp(28px, 3vw, 42px); }
.story__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.story__steps li {
  display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 12px 0;
  border-top: 1px solid var(--line); opacity: .45;
  transition: opacity var(--t-std) var(--ease);
}
.story__steps li > span { font-size: 14px; padding-top: 2px; }
.story__steps strong { font-weight: 500; font-size: 18px; }
.story__steps p { font-size: 15px; color: var(--ink-soft); }
.story__steps li.is-on { opacity: 1; }
.story__steps li.is-on > span { color: var(--blue); }

.story__stage { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.story__frame { position: absolute; inset: 0; margin: 0; }
.story__frame img { width: 100%; height: 100%; object-fit: cover; }
.story__tag {
  position: absolute; top: 16px; left: 16px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.92); font-size: 13px; font-variant-numeric: tabular-nums;
}
.story__bar { position: absolute; left: 16px; right: 16px; bottom: 16px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.45); overflow: hidden; }
.story__bar span { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }

/* carrousel posts */
.feed { min-width: 0; }
.feed__track { display: flex; gap: 14px; transition: transform var(--t-std) var(--ease); }
.feed { overflow: hidden; }
.feed figure { margin: 0; flex: 0 0 calc((100% - 28px) / 3); border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; }
.feed figure img { width: 100%; height: 100%; object-fit: cover; }
.feed__ctrl { display: flex; gap: 10px; margin-top: 18px; }
.feed__ctrl button {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: transparent;
  font: inherit; font-size: 18px; color: var(--ink); cursor: pointer;
  transition: background var(--t-quick) var(--ease), border-color var(--t-quick) var(--ease);
}
.feed__ctrl button:hover:not(:disabled) { background: var(--night); color: var(--paper); border-color: var(--night); }
.feed__ctrl button:disabled { opacity: .35; cursor: default; }

/* ---------- services ---------- */
.tabs-row { margin-bottom: 26px; }
.tabs { position: relative; display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--paper); }
.tabs button {
  position: relative; z-index: 1; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 500;
  padding: 10px 22px; border-radius: 999px; cursor: pointer; color: var(--ink-soft);
  transition: color var(--t-std) var(--ease);
}
.tabs button[aria-selected="true"] { color: var(--paper); }
.tabs__ink { position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px; background: var(--night); transition: transform var(--t-std) var(--ease), width var(--t-std) var(--ease); }

.price-list { list-style: none; margin: 0; padding: 0; }
.price-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.price-list strong { display: block; font-weight: 500; font-size: 19px; }
.price-list span { color: var(--ink-soft); font-size: 15px; }
.price-list b { font-weight: 500; font-size: 19px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-list small { font-size: 14px; color: var(--ink-soft); font-weight: 400; }
.panel:not([hidden]) { animation: panel-in var(--t-std) var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } }


/* ---------- méthode ---------- */
.steps-wrap { position: relative; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; }
.steps__line { position: absolute; left: 0; right: 0; top: 26px; height: 2px; background: var(--line); }
.steps__line span { display: block; height: 100%; width: 100%; background: var(--blue-soft); transform-origin: left; transform: scaleX(0); }
.steps li { display: grid; gap: 12px; align-content: start; }
.steps__n {
  position: relative; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); border: 2px solid var(--line); font-weight: 500;
  transition: border-color var(--t-std) var(--ease), background var(--t-std) var(--ease), color var(--t-std) var(--ease);
}
.steps li.is-on .steps__n { border-color: var(--blue); background: var(--blue); color: #fff; }
.steps h3 { font-size: 22px; margin-top: 10px; }
.steps p { color: var(--ink-soft); }

/* ---------- contact ---------- */
.contact {
  margin: 0 clamp(8px, 1.5vw, 20px); padding: clamp(90px, 12vw, 170px) var(--gutter);
  background: var(--night); color: var(--paper); border-radius: var(--radius-lg);
  text-align: center; display: grid; justify-items: center; gap: 28px;
}
.contact__title { font-size: clamp(40px, 6vw, 92px); line-height: 1; letter-spacing: -0.04em; }
.contact__title em { color: var(--blue-pale); }
.contact__mail {
  font-size: clamp(22px, 3.4vw, 46px); text-decoration: none; letter-spacing: -0.02em;
  background: linear-gradient(var(--blue-pale), var(--blue-pale)) left bottom / 0 2px no-repeat;
  padding-bottom: 6px; transition: background-size var(--t-std) var(--ease);
  overflow-wrap: anywhere;
}
.contact__mail:hover { background-size: 100% 2px; }
.contact__row { display: flex; gap: 32px; flex-wrap: wrap; justify-content: center; color: #b8b2a4; }
.contact__row a { text-decoration: none; color: var(--paper); }

.footer {
  max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter);
  display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--ink-soft); font-size: 14px;
}
.footer img { height: 14px; width: auto; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer__links a { text-decoration: none; transition: color var(--t-quick) var(--ease); }
.footer__links a:hover { color: var(--ink); }
.footer__ig { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); transition: color var(--t-quick) var(--ease); }
.footer__ig:hover { color: var(--blue); }

/* ---------- page mentions légales ---------- */
.legal { max-width: 860px; margin: 0 auto; padding: 150px var(--gutter) 100px; }
.legal__title { font-size: clamp(44px, 6vw, 84px); line-height: 1; letter-spacing: -0.04em; margin: 18px 0 20px; }
.legal__intro { color: var(--ink-soft); font-size: 18px; max-width: 36em; }
.legal .legal__toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0 20px; padding: 0; list-style: none; }
.legal__toc a {
  display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  text-decoration: none; font-size: 14px; transition: background var(--t-quick) var(--ease), color var(--t-quick) var(--ease);
}
.legal__toc a:hover { background: var(--night); color: var(--paper); border-color: var(--night); }
.legal section { padding: 44px 0; border-top: 1px solid var(--line); scroll-margin-top: 100px; }
.legal h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 18px; }
.legal h2 span { color: var(--blue); font-size: .5em; vertical-align: middle; margin-right: 12px; }
.legal h3 { font-size: 18px; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 1.1em; margin: 10px 0 0; display: grid; gap: 6px; }
.legal strong { color: var(--ink); font-weight: 500; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; margin: 0; }
.legal dt { color: var(--ink); font-weight: 500; }
.legal dd { margin: 0; color: var(--ink-soft); }
.legal a { text-decoration-color: var(--blue-soft); text-underline-offset: 3px; }
.todo { background: #fde3d7; color: #9a3d16; padding: 1px 7px; border-radius: 6px; font-size: .92em; }
@media (max-width: 640px) {
  .legal dl { grid-template-columns: 1fr; gap: 2px; }
  .legal dd { margin-bottom: 10px; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 120px; min-height: auto; }
  .deck { max-width: 460px; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .project, .story__inner { grid-template-columns: 1fr; }
  .story__inner { min-height: 100svh; align-content: center; gap: 20px; padding: 80px 0 24px; }
  .story__steps p { display: none; }
  .story__steps li { padding: 8px 0; }
  .project--flip .project__meta { order: 0; }
  .project__meta { position: static; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 48px; }
  .steps__line { display: none; }
  .feed figure { flex-basis: calc((100% - 14px) / 2); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav__links { display: none; }
  .nav { padding-left: 18px; }
  .strip { grid-template-columns: 1fr; gap: 14px; }
  .project__grid, .project__grid--3 { grid-template-columns: 1fr; }
  .shot--wide { grid-column: auto; aspect-ratio: 4 / 3; }
  .steps { grid-template-columns: 1fr; }
  .price-list li { flex-direction: column; gap: 4px; }
  .feed figure { flex-basis: 82%; }
  .tabs button { padding: 10px 16px; }
  .footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- ajouts grille v2 ---------- */
.panel__note { max-width: 46em; color: var(--ink-soft); font-size: 15px; margin-bottom: 8px; }
.tabs-row { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs-row::-webkit-scrollbar { display: none; }
.tabs button { white-space: nowrap; }

/* ---------- menu mobile ---------- */
.nav__toggle {
  display: none; position: relative; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--night); cursor: pointer;
}
.nav__toggle span {
  position: absolute; left: 14px; right: 14px; height: 2px; border-radius: 2px; background: var(--paper);
  transition: transform var(--t-std) var(--ease);
}
.nav__toggle span:first-child { transform: translateY(-4px); }
.nav__toggle span:last-child { transform: translateY(4px); }
.nav__toggle[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }

/* menu ouvert : même verre givré que la barre, plus dense pour rester lisible.
   La surface floutée ne s'anime pas (seuls les liens bougent) : pas de coût au rendu. */
.menu {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(244, 241, 234, .74);
  -webkit-backdrop-filter: blur(26px) saturate(1.5);
  backdrop-filter: blur(26px) saturate(1.5);
  display: flex; flex-direction: column; justify-content: center; gap: 40px;
  padding: 100px var(--gutter) max(40px, env(safe-area-inset-bottom));
}
.menu[hidden] { display: none; }
.menu nav { display: grid; gap: 6px; }
.menu nav a { font-size: clamp(40px, 12vw, 64px); letter-spacing: -0.03em; line-height: 1.1; text-decoration: none; }
.menu p { color: var(--ink-soft); line-height: 1.8; }
.menu p a { text-decoration: none; }
.menu.is-open nav a, .menu.is-open p { animation: menu-in var(--t-std) var(--ease-out) both; }
.menu.is-open nav a:nth-child(2) { animation-delay: 40ms; }
.menu.is-open nav a:nth-child(3) { animation-delay: 80ms; }
.menu.is-open nav a:nth-child(4) { animation-delay: 120ms; }
.menu.is-open p { animation-delay: 160ms; }
@keyframes menu-in { from { opacity: 0; transform: translateY(14px); } }

@media (max-width: 640px) {
  .nav__toggle { display: block; }
  .nav__cta { display: none; }
  .nav { grid-template-columns: 1fr auto; padding: 6px 6px 6px 18px; }
}

/* ---------- panneau 3D (mariage) ---------- */
.shot--3d { position: relative; aspect-ratio: 3 / 4; background: #6f7d55 url("work/mariage/fond-jardin.jpg") center / cover; cursor: grab; }
.shot--3d:active { cursor: grabbing; }
.shot--3d canvas { display: block; opacity: 0; transition: opacity var(--t-slow) var(--ease); }
.shot--3d.is-ready canvas { opacity: 1; }
.shot--3d.no-3d { background-image: url("work/mariage/panneau-photo-800.webp"); }
.shot__hint {
  position: absolute; left: 14px; bottom: 14px; z-index: 1; pointer-events: none;
  padding: 6px 12px; border-radius: 999px; font-size: 13px;
  background: rgba(250, 248, 243, .6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
