/* =========================================================
   RM Menuiserie : maquette bespoke (Timy Studio)
   DA "Grand Sud" derivee de SES vraies photos :
   calcaire + anthracite (ses cadres alu) + vert olive (son logo).
   ========================================================= */

:root {
  /* Matiere mediterraneenne : calcaire chaud + anthracite + olive */
  --sand:      #EEE6D6;   /* fond principal, pierre/lin */
  --sand-2:    #E4D9C4;   /* bandes, fond secondaire */
  --card:      #FAF5EB;   /* surfaces elevees */
  --cream:     #F3ECDD;   /* texte sur fond sombre */

  --ink:       #23252A;   /* anthracite, ses cadres alu */
  --ink-2:     #3B3F45;
  --ink-soft:  #6E7178;

  --olive:      #5F7D3A;  /* accent, tire de son logo */
  --olive-deep: #47602A;
  --olive-lite: #86A15B;
  --gold:       #D8A93F;  /* etoiles */

  --line:   rgba(35, 37, 42, 0.13);
  --line-2: rgba(35, 37, 42, 0.24);
  --olive-soft: rgba(95, 125, 58, 0.12);

  --display: 'Montserrat', system-ui, sans-serif;   /* titraille = lignee de son enseigne */
  --body:    'Manrope', system-ui, sans-serif;
  --brand:   'Montserrat', system-ui, sans-serif;   /* wordmark = son enseigne peinte */

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

  --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(--sand);
  /* lumiere douce du sud, tres subtile, ne se tuile pas */
  background-image:
    radial-gradient(120% 60% at 85% -5%, rgba(216, 200, 160, 0.45), transparent 60%),
    radial-gradient(90% 50% at -10% 5%, rgba(134, 161, 91, 0.10), transparent 55%);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.eyebrow {
  display: inline-block;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--olive-deep);
  position: relative;
  padding-left: 26px;
}
.eyebrow::before {
  content: ""; position: absolute; left: 0; top: 0.52em;
  width: 18px; height: 2px; border-radius: 2px;
  background: var(--olive);
  transform-origin: left center;
}
.eyebrow-light { color: #D7E2C4; }
.eyebrow-light::before { background: var(--olive-lite); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5em;
  font-family: var(--body); font-weight: 700; font-size: 0.98rem;
  padding: 0.95em 1.7em;
  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), color 0.25s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-olive { background: var(--olive); color: var(--cream); box-shadow: 0 12px 26px -12px rgba(71, 96, 42, 0.75); }
.btn-olive:hover { background: var(--olive-deep); transform: translateY(-2px); box-shadow: 0 18px 32px -14px rgba(71, 96, 42, 0.85); }
.btn-light { background: rgba(243, 236, 221, 0.10); color: var(--cream); border-color: rgba(243, 236, 221, 0.42); 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;
}
.pitch-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--olive-lite); box-shadow: 0 0 0 0 rgba(134,161,91,0.7); animation: pulse 2.4s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(134,161,91,0.6);} 70% { box-shadow: 0 0 0 8px rgba(134,161,91,0);} 100% { box-shadow: 0 0 0 0 rgba(134,161,91,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(238, 230, 214, 0.88); backdrop-filter: blur(12px); border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 0.6em; text-decoration: none; color: var(--ink); }
.brand-mark { width: 40px; height: 40px; flex: none; display: block; }
/* wordmark : reprise de son enseigne peinte (geometrique gras, capitales, vert) */
.brand-name { font-family: var(--brand); font-weight: 800; font-size: 1.04rem; text-transform: uppercase; letter-spacing: 0.015em; color: var(--olive-deep); }
.nav-links { display: flex; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 0.94rem; position: relative; padding: 4px 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--olive); 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.15; }
.nav-tel-label { font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
.nav-tel-num { font-family: var(--display); font-weight: 600; font-size: 1.08rem; color: var(--olive-deep); }
.nav-tel:hover .nav-tel-num { color: var(--olive); }

/* ---------- Hero cinematique ---------- */
.hero { position: relative; min-height: 92vh; min-height: 92dvh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 114%; object-fit: cover; object-position: center 42%; will-change: transform; }
/* scrim chaud, lumiere du sud, remonte depuis le bas-gauche */
.hero-scrim { position: absolute; inset: 0; background:
  linear-gradient(360deg, rgba(24,22,18,0.90) 0%, rgba(24,22,18,0.66) 26%, rgba(24,22,18,0.28) 54%, rgba(24,22,18,0.12) 100%),
  linear-gradient(90deg, rgba(24,22,18,0.42) 0%, rgba(24,22,18,0) 62%); }
.hero-content { position: relative; z-index: 1; padding: 132px 28px 92px; }
.hero h1 { font-size: clamp(2.7rem, 6.8vw, 5.1rem); font-weight: 800; color: var(--cream); margin: 0.42em 0 0.5em; max-width: 16ch; letter-spacing: -0.03em; }
.hero h1 .hl { color: var(--olive-lite); }
.hero-lede { font-size: clamp(1.08rem, 2vw, 1.3rem); color: rgba(243,236,221,0.9); max-width: 50ch; font-weight: 500; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2.2rem; }
.hero-scroll { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 1; width: 26px; height: 42px; border: 2px solid rgba(243,236,221,0.5); border-radius: 999px; display: grid; justify-items: center; padding-top: 7px; }
.hero-scroll span { width: 4px; height: 8px; border-radius: 2px; background: var(--cream); animation: scrolldot 1.8s var(--ease) infinite; }
@keyframes scrolldot { 0% { opacity: 0; transform: translateY(-4px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }

/* ---------- Bande de faits (anthracite : ses cadres) ---------- */
.facts { background: var(--ink); color: var(--cream); }
.facts-in { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 30px 26px; display: flex; flex-direction: column; gap: 3px; border-left: 1px solid rgba(243,236,221,0.14); }
.fact:first-child { border-left: none; }
.fact strong { font-family: var(--display); font-weight: 700; font-size: 1.34rem; letter-spacing: -0.02em; color: var(--cream); }
.fact span { font-size: 0.88rem; color: rgba(243,236,221,0.62); }

/* ---------- Section heads ---------- */
.sec-head { max-width: 48ch; margin-bottom: clamp(34px, 4vw, 58px); }
.sec-head .eyebrow { margin-bottom: 1em; }
.sec-head h2 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); }
.sec-head p { margin-top: 0.8em; font-size: 1.12rem; color: var(--ink-2); }

section.metiers, section.galerie, section.artisan, section.contact { padding: clamp(66px, 8vw, 122px) 0; }

/* ---------- Savoir-faire (liste editoriale) ---------- */
.metier-list { list-style: none; border-top: 1px solid var(--line); }
.metier {
  position: relative;
  display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: clamp(20px, 4vw, 56px);
  padding: clamp(24px, 3vw, 38px) 0 clamp(24px, 3vw, 38px) 22px;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.4s var(--ease);
}
.metier::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%) scaleY(0);
  width: 4px; height: 58%; border-radius: 3px; background: var(--olive);
  transition: transform 0.4s var(--ease);
}
.metier:hover { padding-left: 32px; }
.metier:hover::before { transform: translateY(-50%) scaleY(1); }
.metier-k { font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: var(--olive); }
.metier-body h3 { font-size: clamp(1.45rem, 2.9vw, 2.05rem); font-weight: 700; }
.metier-body p { margin-top: 0.5em; color: var(--ink-2); max-width: 54ch; font-size: 1.04rem; }
.metier-tag { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--line-2); border-radius: 999px; padding: 0.35em 0.95em; white-space: nowrap; }
/* clin d'oeil moustique (repris de son logo) sur la ligne moustiquaires */
.metier-body h3 .mosquito { width: 40px; height: auto; display: inline-block; vertical-align: -6px; margin-left: 0.5em; opacity: 0; transform: translateY(-3px) rotate(-8deg); transition: opacity 0.5s var(--ease) 0.1s, transform 0.5s var(--ease) 0.1s; }
.metier-moust:hover .mosquito { opacity: 0.9; transform: translateY(0) rotate(0deg); }

/* ---------- Realisations (galerie mosaique variee) ---------- */
.galerie { background: var(--sand-2); }
.mosaic { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 220px; gap: 16px; }
.m-cell { position: relative; cursor: pointer; margin: 0; grid-column: span 2; overflow: hidden; border-radius: var(--r); border: 1px solid var(--line); box-shadow: 0 20px 40px -30px rgba(35,37,42,0.5); }
.m-cell.m-wide { grid-column: span 3; }
.m-cell.m-tall { grid-row: span 2; }
.m-cell > img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 0.8s var(--ease); }
.m-cell:hover > img { transform: scale(1.06); }
.m-cell figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 18px 14px; font-size: 0.9rem; font-weight: 600; color: var(--cream);
  background: linear-gradient(0deg, rgba(24,22,18,0.82), rgba(24,22,18,0));
  display: flex; align-items: center; gap: 0.55em;
  transform: translateY(6px); opacity: 0; transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.m-cell figcaption::before { content: ""; width: 16px; height: 2px; background: var(--olive-lite); flex: none; }
.m-cell:hover figcaption, .m-cell:focus-within figcaption { opacity: 1; transform: translateY(0); }

/* ---------- L'artisan ---------- */
.artisan-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 5vw, 74px); align-items: center; }
.artisan-photo { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4/5; border: 1px solid var(--line); box-shadow: 0 44px 84px -46px rgba(35,37,42,0.55); cursor: pointer; }
.artisan-photo img { width: 100%; height: 112%; object-fit: cover; will-change: transform; }
.artisan-text .eyebrow { margin-bottom: 0.9em; }
.artisan-text h2 { font-size: clamp(1.95rem, 3.8vw, 2.9rem); }
.artisan-text .lede { margin-top: 0.9em; font-size: 1.12rem; color: var(--ink-2); max-width: 52ch; }
.steps { list-style: none; margin-top: 2.3rem; display: grid; gap: 1.35rem; }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start; }
.steps li > span { font-family: var(--display); font-weight: 600; color: var(--olive-deep); font-size: 1rem; border: 1px solid var(--line-2); border-radius: 50%; width: 42px; height: 42px; display: grid; place-items: center; flex: none; }
.steps h4 { font-size: 1.16rem; font-weight: 600; }
.steps p { color: var(--ink-soft); margin-top: 0.15em; max-width: 48ch; }

/* ---------- Avis (bande olive profonde) ---------- */
.avis { background: var(--olive-deep); color: var(--cream); padding: clamp(66px, 8vw, 112px) 0; position: relative; }
.avis-head { text-align: center; max-width: 42ch; margin: 0 auto clamp(38px, 4vw, 58px); }
.avis-head .stars { color: var(--gold); font-size: 1.25rem; letter-spacing: 0.16em; display: block; margin-bottom: 0.7em; }
.avis-head h2 { color: var(--cream); font-size: clamp(2rem, 4vw, 3rem); }
.avis-head p { color: rgba(243,236,221,0.72); margin-top: 0.5em; }
.avis-head p a { color: var(--cream); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(243,236,221,0.4); }
.avis-head p a:hover { text-decoration-color: var(--cream); }
.avis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 940px; margin: 0 auto; }
.avis blockquote { background: rgba(243,236,221,0.07); border: 1px solid rgba(243,236,221,0.17); border-radius: var(--r); padding: 34px; }
.avis blockquote p { font-family: var(--body); font-weight: 500; font-size: 1.22rem; line-height: 1.5; color: var(--cream); font-style: italic; }
.avis cite { display: block; margin-top: 1.3rem; font-style: normal; font-weight: 700; }
.avis cite span { display: block; font-weight: 500; font-size: 0.84rem; color: rgba(243,236,221,0.58); margin-top: 0.15em; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 0.85fr; gap: clamp(36px, 5vw, 74px); align-items: start; }
.contact-info .eyebrow { margin-bottom: 1em; }
.contact-info h2 { font-size: clamp(2rem, 4vw, 3rem); }
.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: 700; font-size: clamp(1.9rem, 4.3vw, 2.7rem); color: var(--olive-deep); text-decoration: none; letter-spacing: -0.02em; }
.contact-tel:hover { color: var(--olive); }
.contact-meta { margin-top: 1.9rem; 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.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; padding-top: 0.15em; }
.contact-meta dd { color: var(--ink-2); }
.map { margin-top: 1.9rem; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); height: 250px; }
.map iframe { width: 100%; height: 100%; border: 0; filter: saturate(0.92); }
.gmaps { display: inline-flex; align-items: center; gap: 0.4em; margin-top: 1rem; font-weight: 700; color: var(--olive-deep); text-decoration: none; border-bottom: 1px solid var(--olive-soft); padding-bottom: 2px; transition: color 0.2s var(--ease), border-color 0.2s var(--ease); }
.gmaps:hover { color: var(--olive); border-bottom-color: var(--olive); }

.contact-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 38px); box-shadow: 0 32px 62px -42px rgba(35,37,42,0.42); }
.field { display: grid; gap: 0.45rem; margin-bottom: 1.15rem; }
.field label { font-size: 0.84rem; font-weight: 700; color: var(--ink-2); }
.field input, .field textarea {
  font-family: var(--body); font-size: 1rem; color: var(--ink);
  background: var(--sand); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 0.82em 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(--olive); box-shadow: 0 0 0 3px var(--olive-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: 50px 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(--brand); font-weight: 800; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.015em; color: var(--olive-lite); }
.foot-brand span { font-size: 0.85rem; color: rgba(243,236,221,0.6); }
.foot-links { display: flex; flex-wrap: wrap; gap: 22px; }
.foot-links a { color: rgba(243,236,221,0.8); text-decoration: none; font-size: 0.92rem; }
.foot-links a:hover { color: var(--cream); }
.foot-cred { font-size: 0.82rem; color: rgba(243,236,221,0.5); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(18,16,12,0.95); 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(243,236,221,0.12); color: var(--cream); border: 1px solid rgba(243,236,221,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(243,236,221,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(4, 1fr); grid-auto-rows: 200px; }
  .m-cell, .m-cell.m-wide { grid-column: span 2; }
  .m-cell.m-tall { grid-row: span 1; }
  .artisan-grid { grid-template-columns: 1fr; }
  .artisan-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; }
  .fact:nth-child(n+3) { border-top: 1px solid rgba(243,236,221,0.14); }
}
@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; }
  .hero-scroll { display: none; }
}
@media (max-width: 480px) {
  .facts-in { grid-template-columns: 1fr 1fr; }
  .mosaic { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; gap: 12px; }
  .m-cell, .m-cell.m-wide { grid-column: span 1; }
  .m-cell figcaption { opacity: 1; transform: none; font-size: 0.8rem; }
}

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