/* =========================================================================
   RYM Rénovation — maquette Timy Studio
   DA reprise de l'identité réelle (logo cachet crème + lettrage charcoal)
   Palette MESURÉE sur les photos : crème du logo, charcoal, ocre des façades
   ========================================================================= */

:root {
  /* Fonds — famille crème chaude (crème du logo + murs peints) */
  --bg:        #EFEADD;  /* fond principal : teinte du logo, clarté relevée */
  --bg-warm:   #E7E1C3;  /* le crème exact du cachet (sections alternées) */
  --surface:   #F6F2E8;  /* cartes élevées, le plus clair */

  /* Encre — le lettrage du logo */
  --ink:       #241F1B;  /* texte principal, charcoal chaud */
  --ink-soft:  #5A554C;  /* texte secondaire (résolu 4.6:1, assombri) */

  /* Accent — l'ocre des façades peintes (p03/p06), mesuré #C08D40 */
  --accent:      #C08D40; /* filets, marques, fills */
  --accent-deep: #7C5200; /* ocre brûlé, texte sur crème (AA) */

  --border:   #D8CFB8;   /* filet sable chaud */
  --seal-bg:  #E7E1C3;   /* fond du cachet */
  --cream:    #F1ECDD;   /* texte clair sur charcoal */

  --font-display: 'Montserrat', system-ui, sans-serif;
  --font-body:    'Manrope', system-ui, sans-serif;

  --wrap: 1160px;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 7rem;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 26px;

  --t-fast: 0.18s cubic-bezier(0.4,0,0.2,1);
  --t-base: 0.32s cubic-bezier(0.4,0,0.2,1);
  --shadow-sm: 0 2px 10px rgba(36,31,27,0.06);
  --shadow-md: 0 18px 44px -22px rgba(36,31,27,0.34);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-weight: 800;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.5rem; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 1rem;
}

/* ---- Marqueur de maquette --------------------------------------------- */
.pitch {
  position: relative; z-index: 60;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.82rem;
  text-align: center;
  padding: 0.55rem 1.5rem;
  letter-spacing: 0.01em;
}
.pitch-dot {
  display: inline-block; width: 8px; height: 8px; margin-right: 0.5rem;
  border-radius: 50%; background: var(--accent);
  vertical-align: middle;
}

/* ---- NAV -------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base), background var(--t-base);
}
.nav.scrolled { border-bottom-color: var(--border); background: color-mix(in srgb, var(--bg) 94%, transparent); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand-seal { width: 40px; height: 40px; flex: none; }
.seal-arc { fill: var(--ink); font-family: var(--font-display); font-weight: 700; letter-spacing: 0.14em; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; }

.nav-links { display: flex; gap: 1.7rem; }
.nav-links a {
  font-size: 0.92rem; font-weight: 500; color: var(--ink-soft);
  position: relative; padding: 0.2rem 0;
  transition: color var(--t-fast);
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 100%; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-base);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-tel { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.12; padding: 0.35rem 0.9rem; border-radius: var(--radius-sm); transition: background var(--t-fast); }
.nav-tel:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.nav-tel-label { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.nav-tel-num { font-family: var(--font-display); font-weight: 700; font-size: 1rem; white-space: nowrap; }
.brand-name { white-space: nowrap; }

/* ---- Boutons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
  padding: 0.85rem 1.4rem; border-radius: var(--radius-full, 999px);
  border-radius: 999px;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast);
  cursor: pointer; border: 1.6px solid transparent;
}
.btn-ink { background: var(--ink); color: var(--cream); box-shadow: var(--shadow-sm); }
.btn-ink:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: #171310; }
.btn-num { font-weight: 600; opacity: 0.85; font-size: 0.9rem; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); transform: translateY(-2px); }
.btn-block { width: 100%; justify-content: center; }
.arr { transition: transform var(--t-fast); }
.btn:hover .arr { transform: translateX(3px); }

/* ---- HERO ------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 8vw, 6.5rem); }
.hero-field { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.glow { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.6; }
.glow-a { width: 46vw; height: 46vw; top: -14vw; right: -8vw; background: radial-gradient(circle, rgba(192,141,64,0.30), transparent 68%); }
.glow-b { width: 40vw; height: 40vw; bottom: -18vw; left: -12vw; background: radial-gradient(circle, rgba(231,225,195,0.9), transparent 66%); }
/* coup de rouleau : bande d'ocre translucide qui traverse derrière le titre */
.roller {
  position: absolute; left: -6%; top: 40%; width: 60%; height: 128px;
  background: linear-gradient(90deg, rgba(192,141,64,0.16), rgba(192,141,64,0.05) 82%, transparent);
  transform: rotate(-3deg);
  clip-path: inset(0 100% 0 0);
}
.hero.in .roller { animation: rollerWipe 1.1s cubic-bezier(0.22,1,0.36,1) 0.25s forwards; }
@keyframes rollerWipe { to { clip-path: inset(0 0 0 0); } }

.hero-in { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-text h1 { font-size: clamp(2.5rem, 6vw, 4.3rem); margin: 0.4rem 0 1.3rem; }
.hero-text h1 .hl { position: relative; white-space: nowrap; }
.hero-text h1 .hl::before {
  content: ''; position: absolute; left: -0.08em; right: -0.08em; bottom: 0.04em; height: 0.42em; z-index: -1;
  background: linear-gradient(90deg, rgba(192,141,64,0.55), rgba(192,141,64,0.32));
  border-radius: 3px; transform: rotate(-1.2deg);
  clip-path: inset(0 100% 0 0);
}
.hero.in .hero-text h1 .hl::before { animation: swipe 0.8s cubic-bezier(0.22,1,0.36,1) 0.7s forwards; }
@keyframes swipe { to { clip-path: inset(0 0 0 0); } }
.hero-lede { font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: var(--ink-soft); max-width: 32rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.8rem 0 2rem; }

.hero-proof { list-style: none; display: flex; flex-wrap: wrap; gap: 1.5rem 2.2rem; padding-top: 1.6rem; border-top: 1px solid var(--border); }
.hero-proof li { display: flex; flex-direction: column; gap: 0.15rem; }
.proof-strong, .rate-num { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--ink); line-height: 1; }
.proof-sub { font-size: 0.82rem; color: var(--ink-soft); }
.rate-row { display: inline-flex; align-items: center; gap: 0.5rem; }

/* Étoiles : calque clippé, jamais 5 pleines en dur */
.stars { position: relative; display: inline-block; font-size: 1.02rem; line-height: 1; letter-spacing: 0.06em; }
.stars-off { color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.stars-on { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: var(--accent); }
.stars-lg { font-size: 1.7rem; }

/* Emblème / cachet côté droit */
.hero-emblem { display: flex; justify-content: center; }
.emblem-card {
  position: relative; width: min(370px, 78vw); aspect-ratio: 1;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 42%, var(--surface), var(--bg-warm));
  border: 1px solid var(--border); border-radius: 50%;
  box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(255,255,255,0.4);
}
.seal-big { width: 84%; height: 84%; }
.seal-arc-big { fill: var(--ink); font-family: var(--font-display); font-weight: 700; letter-spacing: 0.2em; }
.seal-arc-bot { fill: var(--accent-deep); letter-spacing: 0.16em; font-weight: 600; }
.hero.in .seal-big { transform-origin: center; animation: stamp 0.7s cubic-bezier(0.34,1.56,0.64,1) 0.35s both; }
@keyframes stamp { 0% { opacity: 0; transform: scale(1.14) rotate(-4deg); } 60% { opacity: 1; } 100% { opacity: 1; transform: scale(1) rotate(0); } }

.hero-scroll { position: absolute; left: 50%; bottom: 1.1rem; transform: translateX(-50%); z-index: 2; width: 24px; height: 38px; border: 2px solid var(--ink-soft); border-radius: 12px; opacity: 0.5; }
.hero-scroll span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--ink-soft); animation: scrolldot 1.6s ease-in-out infinite; }
@keyframes scrolldot { 0%,100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(9px); opacity: 0.2; } }

/* ---- BAND faits ------------------------------------------------------- */
.facts { background: var(--ink); color: var(--cream); }
.facts-in { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 1.5rem 0; }
.fact { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.2rem; position: relative; }
.fact + .fact::before { content: ''; position: absolute; left: 0; top: 12%; height: 76%; width: 1px; background: rgba(241,236,221,0.16); }
.fact strong { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; }
.fact span { font-size: 0.8rem; opacity: 0.72; }

/* ---- SAVOIR-FAIRE ----------------------------------------------------- */
.metiers { padding: var(--space-2xl) 0; }
.sec-head { max-width: 40rem; margin-bottom: 3rem; }
.sec-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: 0.9rem; }
.sec-head p { color: var(--ink-soft); font-size: 1.05rem; }

.metier-list { list-style: none; border-top: 1px solid var(--border); }
.metier { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.6rem; padding: 1.9rem 0.4rem; border-bottom: 1px solid var(--border); transition: padding var(--t-base), background var(--t-base); }
.metier:hover { background: color-mix(in srgb, var(--bg-warm) 55%, transparent); padding-inline: 1.1rem; }
.metier-k { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--accent-deep); min-width: 2ch; }
.metier-body h3 { display: flex; align-items: center; gap: 0.6rem; font-size: 1.4rem; font-weight: 700; margin-bottom: 0.3rem; }
.metier-body p { color: var(--ink-soft); max-width: 40rem; }
.glass-mark { width: 30px; height: 27px; flex: none; }
.metier-tag { font-family: var(--font-display); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem 0.8rem; white-space: nowrap; }

/* ---- REALISATIONS (mosaïque) ------------------------------------------ */
.galerie { padding: var(--space-2xl) 0; background: var(--bg-warm); }
.mosaic { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 220px; gap: 1rem; }
.m-cell { position: relative; overflow: hidden; border-radius: var(--radius-md); cursor: zoom-in; background: var(--surface); box-shadow: var(--shadow-sm); }
.m-wide { grid-column: span 2; }
.m-tall { grid-row: span 2; }
.m-cell img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.m-cell:hover img { transform: scale(1.06); }
.m-cell figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem 1rem 0.9rem;
  font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; color: var(--cream);
  background: linear-gradient(to top, rgba(20,16,13,0.82), transparent);
  transform: translateY(6px); opacity: 0; transition: transform var(--t-base), opacity var(--t-base);
}
.m-cell:hover figcaption { transform: translateY(0); opacity: 1; }

/* ---- ARTISAN ---------------------------------------------------------- */
.artisan { padding: var(--space-2xl) 0; }
.artisan-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.artisan-photo { position: relative; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); aspect-ratio: 4/5; }
.artisan-photo img { width: 100%; height: 112%; object-fit: cover; will-change: transform; }
.artisan-photo figcaption { position: absolute; left: 1rem; bottom: 1rem; font-family: var(--font-display); font-weight: 600; font-size: 0.82rem; color: var(--cream); background: rgba(20,16,13,0.55); padding: 0.35rem 0.75rem; border-radius: 999px; backdrop-filter: blur(4px); }
.artisan-text h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 1rem; }
.artisan-text .lede { color: var(--ink-soft); font-size: 1.08rem; margin-bottom: 2rem; }
.steps { list-style: none; display: flex; flex-direction: column; gap: 1.3rem; }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start; }
.steps span { font-family: var(--font-display); font-weight: 800; font-size: 1rem; color: var(--cream); background: var(--ink); width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 50%; flex: none; }
.steps h4 { font-size: 1.08rem; font-weight: 700; margin-bottom: 0.15rem; }
.steps p { color: var(--ink-soft); font-size: 0.96rem; }

/* ---- TRUST ------------------------------------------------------------ */
.trust { padding: var(--space-xl) 0; background: var(--ink); color: var(--cream); }
.trust-in { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.trust .stars-off { color: rgba(241,236,221,0.28); }
.trust .stars-on { color: var(--accent); }
.trust-line { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.2rem, 2.6vw, 1.7rem); }
.trust-line strong { font-weight: 800; }
.trust-link { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.9rem; color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); padding-bottom: 2px; transition: color var(--t-fast); margin-top: 0.4rem; }
.trust-link:hover { color: var(--cream); }

/* ---- CONTACT ---------------------------------------------------------- */
.contact { padding: var(--space-2xl) 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-info h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-bottom: 0.8rem; }
.contact-lede { color: var(--ink-soft); margin-bottom: 1.4rem; }
.contact-tel { display: inline-block; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--ink); margin-bottom: 1.6rem; transition: color var(--t-fast); }
.contact-tel:hover { color: var(--accent-deep); }
.contact-meta { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 1.4rem; }
.contact-meta div { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--border); }
.contact-meta dt { font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }
.contact-meta dd { font-size: 0.98rem; }
.gmaps { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; font-size: 0.92rem; color: var(--accent-deep); }
.gmaps:hover { text-decoration: underline; }

.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2.2rem); box-shadow: var(--shadow-sm); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-family: var(--font-display); font-weight: 600; font-size: 0.85rem; margin-bottom: 0.4rem; }
.field input, .field textarea { width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.75rem 0.9rem; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field textarea { resize: vertical; }
.form-note { font-size: 0.78rem; color: var(--ink-soft); margin-top: 0.9rem; text-align: center; }

/* ---- FOOTER ----------------------------------------------------------- */
.foot { background: #171310; color: var(--cream); padding: 2.6rem 0; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.4rem; }
.foot-brand { display: flex; align-items: center; gap: 0.8rem; }
.foot-seal { width: 44px; height: 44px; }
.foot-brand strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; }
.foot-brand span { font-size: 0.82rem; opacity: 0.68; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.3rem; }
.foot-links a { font-size: 0.9rem; opacity: 0.8; transition: opacity var(--t-fast); }
.foot-links a:hover { opacity: 1; }
.foot-cred { font-size: 0.8rem; opacity: 0.55; width: 100%; text-align: center; border-top: 1px solid rgba(241,236,221,0.12); padding-top: 1.3rem; margin-top: 0.4rem; }

/* ---- LIGHTBOX --------------------------------------------------------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(20,16,13,0.92); display: none; align-items: center; justify-content: center; padding: 4vw; }
.lightbox.open { display: flex; }
.lb-img { max-width: 92vw; max-height: 88vh; border-radius: var(--radius-sm); box-shadow: 0 30px 80px rgba(0,0,0,0.5); }
.lb-close, .lb-nav { position: absolute; background: rgba(241,236,221,0.12); color: var(--cream); border: none; cursor: pointer; border-radius: 50%; display: grid; place-items: center; transition: background var(--t-fast); }
.lb-close { top: 4vw; right: 4vw; width: 46px; height: 46px; font-size: 1.7rem; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 2rem; }
.lb-prev { left: 3vw; } .lb-next { right: 3vw; }
.lb-close:hover, .lb-nav:hover { background: rgba(241,236,221,0.24); }

/* ---- Reveal (GSAP + fallback) ----------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(26px); }
.js .reveal.is-in { opacity: 1; transform: none; }
.reveal { transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1); }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .hero.in .roller, .hero.in .seal-big, .hero.in .hero-text h1 .hl::before { animation: none !important; }
  .roller { clip-path: inset(0 0 0 0); }
  .hero-text h1 .hl::before { clip-path: inset(0 0 0 0); }
  .hero-scroll span { animation: none; }
}

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero-in { grid-template-columns: 1fr; }
  .hero-emblem { order: -1; }
  .emblem-card { width: min(300px, 66vw); }
  .facts-in { grid-template-columns: repeat(2, 1fr); gap: 1.4rem 1rem; }
  .fact:nth-child(2)::before, .fact:nth-child(4)::before { display: none; }
  .artisan-grid, .contact-grid { grid-template-columns: 1fr; }
  .artisan-photo { max-width: 460px; }
  .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .m-wide { grid-column: span 2; }
  .m-tall { grid-row: span 1; }
}
@media (max-width: 560px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .facts-in { grid-template-columns: 1fr 1fr; }
  .metier { grid-template-columns: auto 1fr; }
  .metier-tag { display: none; }
  .mosaic { grid-template-columns: 1fr; grid-auto-rows: 210px; }
  .m-wide, .m-tall { grid-column: auto; grid-row: auto; }
  .contact-meta div { grid-template-columns: 1fr; gap: 0.2rem; }
  .foot-in { flex-direction: column; align-items: flex-start; }
  .nav-in { height: 60px; }
  .brand-seal { width: 34px; height: 34px; }
  .brand-name { font-size: 0.95rem; }
  .nav-tel { padding: 0.3rem 0; }
  .nav-tel-label { font-size: 0.6rem; }
  .nav-tel-num { font-size: 0.9rem; }
}
