/* =========================================================
   Menuiserie Rolland : maquette bespoke (Timy Studio)
   Palette derivee de SES vraies photos : bois + bleu ardoise.
   ========================================================= */

:root {
  /* Matiere : parchemin chaud + bois + bleu ardoise (sa devanture) */
  --paper:     #F1E8DB;
  --paper-2:   #E7DAC6;
  --card:      #FAF4EA;
  --ink:       #1F1812;
  --ink-2:     #3B322A;
  --ink-soft:  #6E6353;
  --cream:     #F4ECDF;

  --blue:      #2F5E86;
  --blue-deep: #1E4763;
  --wood:      #6E4A2C;

  --line:   rgba(31, 24, 18, 0.12);
  --line-2: rgba(31, 24, 18, 0.22);
  --blue-soft: rgba(47, 94, 134, 0.10);

  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body:    'Hanken Grotesk', system-ui, sans-serif;

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;

  --wrap: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background-color: var(--paper);
  background-image: url("./img/topography.svg");
  background-size: 620px;
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Grain de matiere, fixe, n'impacte pas le scroll */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  opacity: 0;
  background-image: none;
  mix-blend-mode: multiply;
}

img { display: block; max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.04; letter-spacing: -0.02em; color: var(--ink); }

.eyebrow {
  display: inline-block;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5em;
  font-family: var(--body); font-weight: 600; font-size: 1rem;
  padding: 0.95em 1.6em;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-blue { background: var(--blue); color: var(--cream); box-shadow: 0 10px 24px -12px rgba(31,71,99,0.7); }
.btn-blue:hover { background: var(--blue-deep); transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(31,71,99,0.8); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); transform: translateY(-2px); }
.btn-light { background: rgba(244,236,223,0.10); color: var(--cream); border-color: rgba(244,236,223,0.40); backdrop-filter: blur(4px); }
.btn-light:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn .arr { display: inline-block; transition: transform 0.25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

/* ---------- Marqueur maquette ---------- */
.pitch {
  display: flex; align-items: center; justify-content: center; gap: 0.6em;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.82rem;
  font-weight: 500;
  text-align: center;
  padding: 0.55em 1.2em;
  letter-spacing: 0.01em;
}
.pitch-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 0 rgba(47,94,134,0.7); animation: pulse 2.4s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47,94,134,0.6);} 70% { box-shadow: 0 0 0 8px rgba(47,94,134,0);} 100% { box-shadow: 0 0 0 0 rgba(47,94,134,0);} }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(241, 232, 219, 0.86); backdrop-filter: blur(12px); border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 0.6em; text-decoration: none; color: var(--ink); }
.brand-mark { width: 38px; height: 38px; flex: none; display: block; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 0.95rem; position: relative; padding: 4px 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--blue); transition: width 0.3s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.nav-tel { display: flex; flex-direction: column; align-items: flex-end; text-decoration: none; line-height: 1.1; }
.nav-tel-label { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.nav-tel-num { font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--blue); }
.nav-tel:hover .nav-tel-num { color: var(--blue-deep); }

/* ---------- Hero cinematique (image plein cadre + surimpression) ---------- */
.hero { position: relative; min-height: 90vh; min-height: 90dvh; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 114%; object-fit: cover; object-position: center 32%; will-change: transform; }
.hero-scrim { position: absolute; inset: 0; background:
  linear-gradient(98deg, rgba(20,15,11,0.95) 0%, rgba(20,15,11,0.80) 30%, rgba(20,15,11,0.42) 58%, rgba(20,15,11,0.18) 100%); }
.hero-content { position: relative; z-index: 1; padding: 132px 28px 88px; }
.eyebrow-light { color: #C6D5E2; }
.hero h1 { font-size: clamp(2.9rem, 7vw, 5.4rem); font-weight: 800; color: var(--cream); margin: 0.45em 0 0.5em; max-width: 15ch; }
.hero h1 .hl { color: #8FBBDD; font-style: italic; }
.hero-lede { font-size: clamp(1.08rem, 2vw, 1.32rem); color: rgba(244,236,223,0.86); max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2.2rem; }

/* ---------- Bande de faits ---------- */
.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper-2); }
.facts-in { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 26px 24px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); }
.fact:first-child { border-left: none; }
.fact strong { font-family: var(--display); font-weight: 700; font-size: 1.4rem; letter-spacing: -0.02em; }
.fact span { font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- Section heads ---------- */
.sec-head { max-width: 46ch; margin-bottom: clamp(32px, 4vw, 56px); }
.sec-head h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
.sec-head p { margin-top: 0.8em; font-size: 1.1rem; color: var(--ink-2); }

section.metiers, section.galerie, section.atelier, section.contact { padding: clamp(64px, 8vw, 120px) 0; }

/* ---------- Savoir-faire (liste editoriale) ---------- */
.metier-list { list-style: none; border-top: 1px solid var(--line); }
.metier {
  display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: clamp(20px, 4vw, 56px);
  padding: clamp(24px, 3vw, 36px) 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.35s var(--ease);
}
.metier:hover { background: linear-gradient(90deg, var(--blue-soft), transparent 60%); }
.metier-k { font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--blue); }
.metier-body h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.metier-body p { margin-top: 0.5em; color: var(--ink-2); max-width: 52ch; font-size: 1.05rem; }
.metier-tag { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--line-2); border-radius: 999px; padding: 0.3em 0.9em; white-space: nowrap; }

/* ---------- Realisations (galerie cliquable) ---------- */
.galerie { background: var(--paper-2); }
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.m-cell { cursor: pointer; margin: 0; }
.m-cell > img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center; border-radius: var(--r); border: 1px solid var(--line); transition: transform 0.6s var(--ease), box-shadow 0.4s var(--ease); }
.m-cell:hover > img { transform: translateY(-5px); box-shadow: 0 32px 54px -28px rgba(31,24,18,0.55); }
.m-cell figcaption { margin-top: 0.75rem; font-size: 0.9rem; color: var(--ink-soft); display: flex; align-items: center; gap: 0.55em; }
.m-cell figcaption::before { content: ""; width: 18px; height: 1px; background: var(--blue); flex: none; }

/* ---------- L'atelier ---------- */
.atelier-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.atelier-photo { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4/5; border: 1px solid var(--line); box-shadow: 0 40px 80px -44px rgba(31,24,18,0.5); cursor: pointer; }
.atelier-photo img { width: 100%; height: 112%; object-fit: cover; will-change: transform; }
.atelier-text .eyebrow { margin-bottom: 0.8em; }
.atelier-text h2 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); }
.atelier-text .lede { margin-top: 0.9em; font-size: 1.12rem; color: var(--ink-2); max-width: 50ch; }
.steps { list-style: none; margin-top: 2.2rem; display: grid; gap: 1.3rem; }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start; }
.steps li > span { font-family: var(--display); font-weight: 700; color: var(--blue); font-size: 1rem; border: 1px solid var(--line-2); border-radius: 50%; width: 40px; height: 40px; display: grid; place-items: center; flex: none; }
.steps h4 { font-size: 1.15rem; }
.steps p { color: var(--ink-soft); margin-top: 0.15em; max-width: 46ch; }

/* ---------- Avis (bande bleue) ---------- */
.avis { background: var(--blue-deep); color: var(--cream); padding: clamp(64px, 8vw, 110px) 0; }
.avis-head { text-align: center; max-width: 40ch; margin: 0 auto clamp(36px, 4vw, 56px); }
.avis-head h2 { color: var(--cream); font-size: clamp(2rem, 4vw, 2.9rem); }
.avis-head p { color: rgba(244,236,223,0.7); margin-top: 0.5em; }
.avis-head p a { color: var(--cream); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(244,236,223,0.4); }
.avis-head p a:hover { text-decoration-color: var(--cream); }
.stars { color: #E9B949; font-size: 1.2rem; letter-spacing: 0.15em; display: block; margin-bottom: 0.7em; }
.avis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 940px; margin: 0 auto; }
.avis blockquote { background: rgba(244,236,223,0.06); border: 1px solid rgba(244,236,223,0.16); border-radius: var(--r); padding: 32px; }
.avis blockquote p { font-family: var(--display); font-weight: 500; font-size: 1.3rem; line-height: 1.4; color: var(--cream); }
.avis cite { display: block; margin-top: 1.3rem; font-style: normal; font-weight: 600; }
.avis cite span { display: block; font-weight: 400; font-size: 0.85rem; color: rgba(244,236,223,0.55); margin-top: 0.15em; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 0.85fr; gap: clamp(36px, 5vw, 72px); align-items: start; }
.contact-info h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
.contact-lede { margin-top: 0.7em; font-size: 1.1rem; color: var(--ink-2); }
.contact-tel { display: inline-block; margin-top: 1.2rem; font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 4.5vw, 2.8rem); color: var(--blue); text-decoration: none; letter-spacing: -0.02em; }
.contact-tel:hover { color: var(--blue-deep); }
.contact-meta { margin-top: 1.8rem; display: grid; gap: 1rem; }
.contact-meta > div { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.contact-meta dt { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); padding-top: 0.15em; }
.contact-meta dd { color: var(--ink-2); }
.contact-meta dd.ph { color: var(--ink-soft); font-style: italic; }
.map { margin-top: 1.8rem; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); height: 240px; }
.map iframe { width: 100%; height: 100%; border: 0; filter: saturate(0.9); }
.gmaps { display: inline-flex; align-items: center; gap: 0.4em; margin-top: 1rem; font-weight: 600; color: var(--blue); text-decoration: none; border-bottom: 1px solid var(--blue-soft); padding-bottom: 2px; transition: color 0.2s var(--ease), border-color 0.2s var(--ease); }
.gmaps:hover { color: var(--blue-deep); border-bottom-color: var(--blue); }

.contact-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 36px); box-shadow: 0 30px 60px -40px rgba(31,24,18,0.4); }
.field { display: grid; gap: 0.45rem; margin-bottom: 1.1rem; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea {
  font-family: var(--body); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 0.8em 0.9em; width: 100%; resize: vertical;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.form-note { margin-top: 0.9rem; font-size: 0.82rem; color: var(--ink-soft); text-align: center; }

/* ---------- Footer ---------- */
.foot { background: var(--ink); color: var(--cream); padding: 48px 0; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.foot-brand { display: flex; align-items: center; gap: 0.8em; }
.foot-brand strong { display: block; font-family: var(--display); font-weight: 700; }
.foot-brand span { font-size: 0.85rem; color: rgba(244,236,223,0.6); }
.foot-links { display: flex; flex-wrap: wrap; gap: 22px; }
.foot-links a { color: rgba(244,236,223,0.8); text-decoration: none; font-size: 0.92rem; }
.foot-links a:hover { color: var(--cream); }
.foot-cred { font-size: 0.82rem; color: rgba(244,236,223,0.5); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(16,12,8,0.94); display: none; align-items: center; justify-content: center; padding: 5vh 6vw; }
.lightbox.open { display: flex; }
.lb-img { max-width: 88vw; max-height: 86vh; object-fit: contain; border-radius: 8px; box-shadow: 0 40px 90px rgba(0,0,0,0.6); }
.lb-close, .lb-nav { position: absolute; background: rgba(244,236,223,0.12); color: var(--cream); border: 1px solid rgba(244,236,223,0.28); border-radius: 50%; width: 50px; height: 50px; font-size: 1.7rem; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: background 0.2s var(--ease); }
.lb-close:hover, .lb-nav:hover { background: rgba(244,236,223,0.26); }
.lb-close { top: 4vh; right: 5vw; }
.lb-prev { left: 3vw; top: 50%; transform: translateY(-50%); }
.lb-next { right: 3vw; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lb-prev { left: 2vw; } .lb-next { right: 2vw; } .lb-nav, .lb-close { width: 42px; height: 42px; } }

/* ---------- Reveal (motion) ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .mosaic { grid-template-columns: repeat(2, 1fr); }
  .atelier-grid { grid-template-columns: 1fr; }
  .atelier-photo { max-width: 460px; }
  .contact-grid { grid-template-columns: 1fr; }
  .facts-in { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { border-left: none; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-tel-label { display: none; }
  .hero-content { padding-top: 116px; }
  .avis-grid { grid-template-columns: 1fr; }
  .metier { grid-template-columns: auto 1fr; }
  .metier-tag { display: none; }
}
@media (max-width: 480px) {
  .facts-in { grid-template-columns: 1fr 1fr; }
  .mosaic { grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .pitch-dot { animation: none; }
  .m-cell img, .hero-frame img, .atelier-photo img { transition: none; }
}
