@font-face { font-family: "Fraunces"; src: url("assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("assets/fonts/fraunces-latin-wght-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("assets/fonts/manrope-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }

@property --p { syntax: "<percentage>"; inherits: true; initial-value: 0%; }

/* ---------- Thèmes ---------- */
:root, :root[data-theme="ardoise"] {
  --bg: #1f2428; --bg2: #272d32; --ink: #ece6da; --muted: #a8a69c; --accent: #d9b17a;
  --line: rgba(236,230,218,.16); --btn-bg: #d9b17a; --btn-ink: #1d2125;
  --ember: #ffb36b; --spot: #ff4a3d; --shadow: rgba(0,0,0,.45);
}
:root[data-theme="bouleau"] {
  --bg: #ead9bb; --bg2: #dfc9a4; --ink: #2f1f12; --muted: #66503a; --accent: #8a4f22;
  --line: rgba(47,31,18,.2); --btn-bg: #2f1f12; --btn-ink: #f3e6cc;
  --ember: #c4521a; --spot: #e0361f; --shadow: rgba(47,31,18,.25);
}
:root[data-theme="noel"] {
  --bg: #0f2a22; --bg2: #163a2f; --ink: #f4ebd6; --muted: #b9c7b8; --accent: #e2b753;
  --line: rgba(244,235,214,.2); --btn-bg: #b02a40; --btn-ink: #fff7e6;
  --ember: #ffd27a; --spot: #ff5a4d; --shadow: rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.65 "Manrope", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
h1, h2 { font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -.02em; margin: 0; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.1; }
p { margin: 0 0 1em; max-width: 62ch; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--btn-bg); color: var(--btn-ink); padding: .6em 1em; z-index: 100; }
.skip:focus { left: 8px; }

/* Logo : version claire sur fond foncé, version sombre sur Bouleau */
.logo-dark { display: none; }
:root[data-theme="bouleau"] .logo-light { display: none; }
:root[data-theme="bouleau"] .logo-dark { display: block; }

/* ---------- En-tête ---------- */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1.5rem;
  padding: .6rem clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; margin-right: auto; flex-shrink: 0; }
.brand .logo { width: 48px; height: auto; }
.brand-name { font: 600 1.15rem/1 "Fraunces", serif; letter-spacing: -.01em; }
.nav { display: flex; gap: 1.2rem; }
.nav a { text-decoration: none; font-weight: 600; font-size: .92rem; padding: .3rem 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.menu-btn { display: none; font: 700 .9rem "Manrope", sans-serif; color: var(--ink); background: transparent; border: 1.5px solid var(--line); border-radius: 999px; padding: .6em 1.1em; cursor: pointer; }
.themes { display: flex; gap: .55rem; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.swatch[data-set-theme="ardoise"] { background: linear-gradient(135deg, #1f2428 50%, #d9b17a 50%); }
.swatch[data-set-theme="bouleau"] { background: linear-gradient(135deg, #ead9bb 50%, #8a4f22 50%); }
.swatch[data-set-theme="noel"] { background: linear-gradient(135deg, #0f2a22 50%, #b02a40 50%); }
.swatch[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block; font: 700 .98rem/1 "Manrope", sans-serif; text-decoration: none; cursor: pointer;
  padding: .95em 1.5em; border-radius: 999px; border: 2px solid var(--btn-bg);
  background: var(--btn-bg); color: var(--btn-ink);
}
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); filter: none; }
.btn-small { padding: .7em 1.2em; font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.5rem, 5vw, 5rem); align-items: center;
  max-width: 1240px; margin: 0 auto; padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem) clamp(2.5rem, 6vw, 5rem);
  min-height: min(86vh, 760px);
}
.hero h1 { font-size: clamp(2.4rem, 4.9vw, 4.7rem); line-height: 1.06; font-weight: 650; margin-bottom: 1.4rem; }

/* L'instant mémorable : le laser grave le titre */
.burn {
  --p: 0%; position: relative; display: block; width: fit-content; max-width: 100%;
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--ink) 24%, transparent);
  background: linear-gradient(90deg, var(--ink) 0, var(--ink) calc(var(--p) - 5%), var(--ember) calc(var(--p) - .5%), transparent var(--p));
  -webkit-background-clip: text; background-clip: text;
  animation: burn 1.3s cubic-bezier(.45,.05,.35,1) both; animation-delay: var(--d, 0s);
}
.burn::after {
  content: ""; position: absolute; top: 56%; left: var(--p); width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; background: #fff;
  box-shadow: 0 0 8px 3px var(--spot), 0 0 26px 10px color-mix(in srgb, var(--spot) 55%, transparent);
  opacity: 0; animation: dot 1.3s linear both; animation-delay: var(--d, 0s); pointer-events: none;
}
@keyframes burn { from { --p: 0%; } to { --p: 108%; } }
@keyframes dot { 0% { opacity: 0; } 6% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; } }
.lede, .hero .actions, .hero-media { animation: arrive .8s ease both; animation-delay: 2.4s; }
.hero-media { animation-delay: 1.4s; }
@keyframes arrive { from { opacity: 0; } to { opacity: 1; } }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 52ch; margin-bottom: 1.8rem; }

.hero-media { margin: 0; justify-self: center; width: min(100%, 380px); }
.frame { aspect-ratio: 9 / 16; max-height: 74vh; margin: 0 auto; border-radius: 20px; overflow: hidden; border: 1px solid var(--accent); box-shadow: 0 30px 60px -20px var(--shadow); background: var(--bg2); }
.frame video { width: 100%; height: 100%; object-fit: cover; }
.hero-media figcaption { color: var(--muted); font-size: .9rem; margin-top: .8rem; text-align: center; }

/* ---------- Noël ---------- */
.noel { background: var(--bg2); border-block: 1px solid var(--line); }
.noel-inner {
  max-width: 1240px; margin: 0 auto; padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem);
  display: grid; grid-template-columns: 320px 1fr; gap: clamp(1.5rem, 5vw, 4.5rem); align-items: center;
}
.phone { margin: 0; width: 100%; max-width: 320px; border-radius: 26px; overflow: hidden; border: 1px solid var(--accent); box-shadow: 0 30px 60px -24px var(--shadow); background: #000; aspect-ratio: 9 / 16; }
.phone video { width: 100%; height: 100%; object-fit: cover; }
.noel-text h2 { margin-bottom: 1rem; max-width: 18ch; }
.steps { margin: 0 0 1.8rem; padding-left: 1.3rem; max-width: 46ch; }
.steps li { margin-bottom: .4rem; padding-left: .3rem; }
.steps li::marker { font-family: "Fraunces", serif; font-weight: 700; color: var(--accent); }
.boules { grid-column: 1 / -1; list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.boules li { width: clamp(92px, 14vw, 150px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 2px solid var(--accent); }
.boules img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Galerie ---------- */
.gallery-section { max-width: 1320px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 3rem) clamp(3rem, 7vw, 5rem); }
.page-head { max-width: 1320px; margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 3rem) 1.6rem; }
.page-head h1 { font-size: clamp(2rem, 4.2vw, 3.6rem); line-height: 1.08; margin-bottom: 1rem; max-width: 22ch; }
.page-head p { color: var(--muted); font-size: 1.1rem; }
.page-head .count { font-size: .92rem; margin: 0; }
.page-head .chips { margin: 1.4rem 0 1rem; }
.chip { text-decoration: none; display: inline-block; }
.section-head { margin-bottom: 1.6rem; }
.cats-section { max-width: 1320px; margin: 0 auto; padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 3rem); }
.section-head h2 { margin-bottom: .6rem; }
.section-head p { color: var(--muted); margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.6rem; }
.chip { font: 600 .95rem/1 "Manrope", sans-serif; padding: .75em 1.2em; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.masonry { column-count: 4; column-gap: 14px; }
.tile { display: block; width: 100%; margin: 0 0 14px; padding: 0; border: 0; background: var(--bg2); border-radius: 4px; overflow: hidden; cursor: zoom-in; break-inside: avoid; }
.tile[hidden] { display: none; }
.tile img, .tile video { width: 100%; height: auto; }


/* ---------- Catégories (accueil) ---------- */
.cats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.cat-tile { position: relative; display: block; grid-column: span 2; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px; text-decoration: none; color: #f6f1e6; background: var(--bg2); }
.cat-tile.cat-big { grid-column: span 3; aspect-ratio: 4 / 3; }
.cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-text { position: absolute; inset: auto 0 0 0; padding: 3.2rem 1.2rem 1.1rem; display: grid; gap: .2rem; background: linear-gradient(to top, rgba(8,10,12,.88), rgba(8,10,12,.6) 55%, transparent); }
.cat-title { font: 650 1.5rem/1.1 "Fraunces", serif; }
.cat-desc { font-size: .95rem; color: #ddd6c6; max-width: 40ch; }
.cat-count { font-size: .85rem; color: #f1c987; font-weight: 700; }
.cat-tile:hover .cat-title { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; text-decoration-thickness: 2px; }
.plaque { margin: 0 auto 2rem; max-width: 520px; border-radius: 10px; overflow: hidden; box-shadow: 0 24px 50px -20px var(--shadow); }
.plaque img { width: 100%; height: auto; }

/* ---------- Atelier ---------- */
.atelier { background: var(--bg2); border-block: 1px solid var(--line); }
.atelier-inner { max-width: 1240px; margin: 0 auto; padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 5rem); align-items: center; }
.atelier-text h2 { margin-bottom: 1.2rem; }
.atelier-text p { color: var(--muted); }
.atelier-text p:first-of-type { color: var(--ink); }
.atelier-media { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.atelier-media figure { margin: 0; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 4px; }
.atelier-media figure:last-child { margin-top: 2.5rem; }
.atelier-media img, .atelier-media video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Contact / pied de page ---------- */
.contact-inner { max-width: 860px; margin: 0 auto; padding: clamp(3rem, 8vw, 7rem) clamp(1rem, 4vw, 3rem); text-align: center; }
.contact-inner h2 { margin-bottom: 1rem; }
.contact-inner p { margin-inline: auto; color: var(--muted); }
.contact-inner .actions { justify-content: center; margin-top: 1.6rem; }
.dev-hint { margin-top: 1.4rem; font-size: .9rem; border: 1px dashed var(--line); padding: .8rem 1rem; border-radius: 8px; }
.foot { border-top: 1px solid var(--line); padding: 2rem clamp(1rem, 4vw, 3rem) 2.5rem; display: grid; justify-items: center; gap: .5rem; text-align: center; color: var(--muted); font-size: .9rem; }
.foot p { margin: 0; }
.foot .small { font-size: .82rem; }
.foot .logo { width: 48px; height: auto; }

/* ---------- Lightbox : ne se ferme qu'avec le bouton ✕ ou Échap ---------- */
.lightbox { border: 0; padding: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: rgba(8,10,12,.94); color: #f2ede2; }
.lightbox:not([open]) { display: none; }
.lightbox[open] { display: grid; grid-template-columns: 64px 1fr 64px; grid-template-rows: auto 1fr auto; align-items: center; }
.lightbox::backdrop { background: rgba(8,10,12,.94); }
.lb-close { grid-column: 1 / -1; justify-self: end; margin: 1rem; font: 700 1rem "Manrope", sans-serif; color: #f2ede2; background: transparent; border: 1.5px solid rgba(242,237,226,.5); border-radius: 999px; padding: .6em 1.2em; cursor: pointer; }
.lb-close:hover { background: rgba(242,237,226,.12); }
.lb-nav { font-size: 3rem; line-height: 1; color: #f2ede2; background: transparent; border: 0; cursor: pointer; height: 100%; }
.lb-nav:hover { background: rgba(242,237,226,.08); }
.lb-fig { margin: 0; display: grid; place-items: center; min-height: 0; height: 100%; }
.lb-fig img, .lb-fig video { max-width: 100%; max-height: calc(100dvh - 9rem); object-fit: contain; }
.lb-cap { grid-column: 1 / -1; text-align: center; margin: 0 auto; padding: .5rem 1rem 1rem; max-width: 70ch; color: #cfc8b8; }

/* ---------- Neige (thème Noël uniquement) ---------- */
.snow { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; display: none; }
:root[data-theme="noel"] .snow { display: block; }
.flake { position: absolute; top: -10px; width: var(--s); height: var(--s); border-radius: 50%; background: #fff; opacity: var(--o); animation: fall var(--t) linear infinite; animation-delay: var(--dl); }
@keyframes fall { to { transform: translate3d(var(--dx), 105vh, 0); } }

/* ---------- Adaptatif ---------- */
@media (max-width: 1100px) {
  .menu-btn { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem clamp(1rem, 4vw, 3rem) 1rem; }
  .nav.open { display: flex; }
  .nav a { padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .top { position: sticky; }
}
@media (max-width: 1000px) { .masonry { column-count: 3; } }
@media (max-width: 820px) {
  .cat-tile, .cat-tile.cat-big { grid-column: span 3; aspect-ratio: 4 / 3; }
  .hero, .noel-inner, .atelier-inner { grid-template-columns: 1fr; }
  .hero { min-height: 0; }
  .noel-inner { justify-items: start; }
  .phone { margin-inline: auto; }
  .brand-name { font-size: 1rem; }
}
@media (max-width: 600px) {
  .cats { grid-template-columns: 1fr; }
  .cat-tile, .cat-tile.cat-big { grid-column: auto; aspect-ratio: 4 / 3; }
  .masonry { column-count: 2; column-gap: 10px; }
  .tile { margin-bottom: 10px; }
  .top { gap: .5rem; padding-inline: .8rem; }
  .brand-name { display: none; }
  .brand .logo { width: 40px; }
  .themes { gap: .35rem; }
  .swatch { width: 22px; height: 22px; }
  .btn-small { padding: .65em .9em; font-size: .85rem; }
  .menu-btn { padding: .55em .9em; }
  .lightbox[open] { grid-template-columns: 44px 1fr 44px; }
  .lb-nav { font-size: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .burn { animation: none; --p: 108%; }
  .burn::after { display: none; }
  .lede, .hero .actions, .hero-media { animation: none; }
  .flake { animation: none; display: none; }
}

/* ---------- Mentions légales ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 3rem) clamp(3rem, 7vw, 5rem); }
.legal h2 { font-size: 1.35rem; margin: 2rem 0 .6rem; }
.legal ul { padding-left: 1.2rem; margin: 0 0 1em; }
.legal li { margin-bottom: .3rem; }
.legal a, .foot a { text-decoration: underline; text-underline-offset: 3px; }
