:root {
  --color-bg: #F2E9DA;
  --color-text: #2E2119;
  --color-text-muted: #6E6250;
  --color-accent: #5B6169;
  --color-accent-dark: #3F4750;
  --color-border: #DED0B8;
  --color-hero-bg: #C4714B;
  --color-hero-text: #FBF3E7;
  --color-hero-text-muted: #F1DCC9;
  --color-sky: #BFE3F2;
  --color-roof: #C97B52;
  --color-roof-dark: #7A3F2A;
  --max-width: 1100px;
  --roof-h: clamp(72px, calc(50vw * 0.17), 190px);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 130px; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 68px 0;
}

.ladder-rail {
  position: fixed;
  top: 0;
  left: calc(25vw - 279px);
  width: 32px;
  height: 100vh;
  z-index: 5;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      var(--color-border) 0,
      var(--color-border) 4px,
      transparent 4px,
      transparent 24px
    ),
    linear-gradient(90deg, transparent 5px, var(--color-accent) 5px, var(--color-accent) 8px, transparent 8px),
    linear-gradient(90deg, transparent 24px, var(--color-accent) 24px, var(--color-accent) 27px, transparent 27px);
}

.ladder-character {
  position: absolute;
  left: 1px;
  top: 0;
  width: 30px;
  height: 50px;
  will-change: transform;
  display: none;
}

.ladder-character.is-climbing { display: block; }

/* petits écrans : une échelle mince dans la marge de gauche */
@media (max-width: 1220px) {
  .ladder-rail {
    left: 2px;
    height: calc(100vh / 0.6);
    transform: scale(0.6);
    transform-origin: left top;
  }
}

.roof-worker {
  position: absolute;
  left: 26%;
  top: calc(var(--roof-h) * 0.7);
  width: 38px;
  z-index: 3;
  will-change: transform;
}

.roof-worker svg { overflow: visible; display: block; transform-origin: 50% 95%; }

.roof-worker.is-hidden { display: none; }

.roof-note {
  position: absolute;
  left: 22px;
  top: -6px;
  font-size: 14px;
  line-height: 1;
  color: #FBF3E7;
  text-shadow: 0 1px 2px rgba(46, 33, 25, 0.7);
  opacity: 0;
}

.roof-worker.is-whistling .roof-note { animation: note-float 1.6s ease-out infinite; }
.roof-worker.is-whistling .roof-note--b { animation-delay: 0.8s; left: 10px; }

.roof-zzz {
  position: absolute;
  left: -14px;
  top: 8px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  color: #FBF3E7;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  opacity: 0;
}

.roof-worker.is-sleeping .roof-zzz { animation: zzz-float 2.8s ease-out infinite; }
.roof-worker.is-sleeping .roof-zzz--b { animation-delay: 1.4s; font-size: 16px; left: -22px; }

@keyframes zzz-float {
  0% { opacity: 0; transform: translate(0, 4px) scale(0.7); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(-8px, -26px) scale(1.2); }
}

@keyframes note-float {
  0% { opacity: 0; transform: translate(0, 4px) rotate(-8deg); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(10px, -22px) rotate(12deg); }
}

.w-flip { transform-origin: 30px 40px; }
.w-leg-b { transform-origin: 28px 52px; }
.w-leg-f { transform-origin: 31px 52px; }
.w-body { transform-origin: 28px 52px; }
.w-head { transform-origin: 28px 27px; }
.w-arm-f { transform-origin: 36px 34px; }
.w-arm-b { transform-origin: 22px 34px; }

/* le chantier : pile de tuiles, trou, tuiles, poussière et étincelles */
.roof-job {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.site-header.is-scrolled .roof-job { display: none; }

.roof-pile {
  left: calc(14% - 36px);
  top: calc(var(--roof-h) * 0.7 + 26px);
  width: 30px;
  height: 24px;
}

.roof-pile i {
  position: absolute;
  left: 0;
  width: 30px;
  height: 6px;
  border-radius: 2px;
  background: #C97B52;
  border: 1px solid #A85C3A;
}

.roof-pile i:nth-child(1) { bottom: 0; background: #B5683F; }
.roof-pile i:nth-child(2) { bottom: 6px; }
.roof-pile i:nth-child(3) { bottom: 12px; background: #B5683F; }
.roof-pile i:nth-child(4) { bottom: 18px; }

.roof-hole {
  left: calc(26% + 22px);
  top: calc(var(--roof-h) * 0.7 + 38px);
  width: 24px;
  height: 14px;
  border-radius: 2px;
  background: #5E3020;
}

.roof-tile {
  left: calc(26% + 22px);
  top: calc(var(--roof-h) * 0.7 + 38px);
  width: 24px;
  height: 14px;
  border-radius: 2px;
  border: 1px solid #A85C3A;
  opacity: 0;
}

.roof-tile--new {
  background: linear-gradient(90deg, #E39A6C 0 50%, #D4875A 50%);
  opacity: 1;
}

.roof-tile--old {
  background: linear-gradient(90deg, #C97B52 0 50%, #B5683F 50%);
}

.roof-tile--old::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 0;
  width: 1px;
  height: 14px;
  background: #4A2415;
  transform: rotate(18deg);
}

.roof-tile--spare {
  left: calc(26% - 6px);
  background: linear-gradient(90deg, #E39A6C 0 50%, #D4875A 50%);
}

.roof-mortar {
  left: calc(26% + 19px);
  top: calc(var(--roof-h) * 0.7 + 36px);
  width: 30px;
  height: 18px;
  border-radius: 5px;
  background: #A39A90;
  opacity: 0;
}

.roof-crumb {
  left: calc(26% + 32px);
  top: calc(var(--roof-h) * 0.7 + 42px);
  width: 5px;
  height: 4px;
  border-radius: 1px;
  background: #A85C3A;
  opacity: 0;
}

.roof-gleam {
  left: calc(26% + 38px);
  top: calc(var(--roof-h) * 0.7 + 34px);
  width: 11px;
  height: 11px;
  background: #FFFFFF;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0;
}

.roof-bird {
  left: 0;
  top: 0;
  width: 16px;
  height: 8px;
  overflow: visible;
  opacity: 0;
}

.roof-dust {
  left: calc(26% + 27px);
  top: calc(var(--roof-h) * 0.7 + 36px);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  opacity: 0;
}

.roof-spark {
  left: calc(26% + 36px);
  top: calc(var(--roof-h) * 0.7 + 36px);
  width: 13px;
  height: 13px;
  background: #FFE08A;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0;
}

.section--alt {
  background: rgba(255, 255, 255, 0.45);
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: 16px;
}

h1, h2, h3 { line-height: 1.25; font-weight: 800; }

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.1rem; }

p { color: var(--color-text-muted); }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-bg);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
}

/* Header */
.site-header {
  position: sticky;
  top: calc(-1 * var(--roof-h));
  z-index: 10;
  --sky: var(--color-sky);
  --tile-b: 1;
  --tile-s: 0;
  --wind: 0.3;
  background: var(--sky);
  transition: background-color 1.4s ease;
}

.site-header__sky {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--roof-h);
  pointer-events: none;
}

.sky__sun {
  position: absolute;
  left: 4%;
  top: calc(var(--roof-h) * 0.16);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #FFE08A;
  box-shadow: 0 0 0 6px rgba(255, 224, 138, 0.4);
  animation: sun-glow 5s ease-in-out infinite;
}

.sky__cloud {
  position: absolute;
  width: 44px;
  height: 12px;
  border-radius: 12px;
  background: #FFFFFF;
  animation: cloud-drift 22s ease-in-out infinite alternate;
}

.sky__cloud::before,
.sky__cloud::after {
  content: "";
  position: absolute;
  background: #FFFFFF;
  border-radius: 50%;
}

.sky__cloud::before { width: 20px; height: 20px; left: 6px; top: -10px; }
.sky__cloud::after { width: 16px; height: 16px; left: 22px; top: -7px; }

.sky__cloud--left { left: 22%; top: calc(var(--roof-h) * 0.16); }
.sky__cloud--right { left: 80%; top: calc(var(--roof-h) * 0.22); transform: scale(0.8); animation-duration: 28s; }

.sky__birds {
  position: absolute;
  left: 38%;
  top: calc(var(--roof-h) * 0.08);
  width: 36px;
  height: 14px;
  animation: bird-bob 4s ease-in-out infinite;
}

@keyframes sun-glow {
  0%, 100% { box-shadow: 0 0 0 6px rgba(255, 224, 138, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(255, 224, 138, 0.22); }
}

@keyframes cloud-drift {
  from { translate: 0 0; }
  to { translate: 30px 0; }
}

@keyframes bird-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 6px -4px; }
}

.site-header__roof {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--roof-h);
  background: repeating-linear-gradient(0deg, #6F4A30 0 4px, #8A5E3C 4px 16px);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  filter: brightness(var(--tile-b)) sepia(var(--tile-s));
  transition: filter 1.4s ease;
}


.site-header__fascia {
  position: absolute;
  top: var(--roof-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(0deg, #6F4A30 0 4px, #8A5E3C 4px 16px);
  filter: brightness(var(--tile-b)) sepia(var(--tile-s));
  transition: filter 1.4s ease;
}

/* les tuiles se posent de gauche à droite à l'ouverture */
.site-header__roof::after,
.site-header__fascia::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--color-roof);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='28' shape-rendering='geometricPrecision'%3E%3Crect width='24' height='28' fill='%23C97B52'/%3E%3Crect x='12' y='0' width='12' height='28' fill='%23B5683F'/%3E%3Crect x='3' y='0' width='3' height='28' fill='white' fill-opacity='.14'/%3E%3Crect x='10' y='0' width='2' height='28' fill='black' fill-opacity='.14'/%3E%3Crect x='12' y='0' width='1' height='28' fill='black' fill-opacity='.25'/%3E%3Cpath d='M0 21 Q6 28 12 21' fill='none' stroke='black' stroke-opacity='.3' stroke-width='1.3'/%3E%3Cpath d='M12 7 Q18 14 24 7' fill='none' stroke='black' stroke-opacity='.12' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 24px 28px;
}

/* pendant la pose, le dessin animé (canvas) remplace les tuiles fixes */
.site-header.is-laying .site-header__roof::after,
.site-header.is-laying .site-header__fascia::after {
  visibility: hidden;
  animation: show-tiles 0.01s linear 8s forwards;
}

@keyframes show-tiles {
  to { visibility: visible; }
}

.site-header__laying {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  filter: brightness(var(--tile-b)) sepia(var(--tile-s));
  transition: opacity 0.35s ease, filter 1.4s ease;
}

/* le couvreur et le chantier n'apparaissent qu'à la fin de la pose des tuiles */
.site-header.is-building .roof-job,
.site-header.is-building .roof-worker {
  visibility: hidden;
  animation: show-late 0.01s linear 9s forwards;
}

@keyframes show-late {
  to { visibility: visible; }
}

/* cheminée avec fumée */
.site-header__chimney {
  position: absolute;
  z-index: 2;
  left: 68%;
  top: calc(var(--roof-h) * 0.34);
  width: 24px;
  height: calc(var(--roof-h) * 0.46);
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 2px, transparent 2px 9px),
    #7A3F2A;
}

.site-header__chimney::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -6px;
  width: 32px;
  height: 7px;
  background: var(--color-accent);
}

.site-header__chimney i {
  position: absolute;
  left: 5px;
  top: -10px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FFFFFF;
  opacity: 0;
  animation: smoke 4.5s ease-out infinite;
}

.site-header__chimney i:nth-child(2) { animation-delay: 1.5s; }
.site-header__chimney i:nth-child(3) { animation-delay: 3s; }

@keyframes smoke {
  0% { transform: translate(0, 0) scale(0.5); opacity: 0.85; }
  100% { transform: translate(calc(10px + var(--wind) * 28px), -38px) scale(1.8); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header.is-laying .site-header__roof::after,
  .site-header.is-laying .site-header__fascia::after { animation: none; visibility: visible; }
  .site-header.is-building .roof-job,
  .site-header.is-building .roof-worker { animation: none; visibility: visible; }
  .site-header[data-tod="night"] .sky__stars { animation: none; }
  .sky__sun,
  .sky__cloud,
  .sky__birds { animation: none; }
  .roof-worker.is-whistling .roof-note { animation: none; opacity: 0; }
  .roof-worker.is-sleeping .roof-zzz { animation: none; opacity: 0; }
  .site-header__chimney i { animation: none; opacity: 0.6; }
  .site-header__chimney i:nth-child(n + 2) { display: none; }
}

/* Moment de la journée */
.site-header[data-tod="dawn"] { --sky: #F7D4B5; --tile-b: 0.97; --tile-s: 0.12; }
.site-header[data-tod="dusk"] { --sky: #F2B089; --tile-b: 0.86; --tile-s: 0.3; }
.site-header[data-tod="night"] { --sky: #1F2C52; --tile-b: 0.7; --tile-s: 0; }

.site-header[data-tod="dawn"] .sky__sun {
  left: 10%;
  top: calc(var(--roof-h) * 0.5);
  background: #FFB070;
  box-shadow: 0 0 0 6px rgba(255, 176, 112, 0.4);
}

.site-header[data-tod="dusk"] .sky__sun {
  left: 88%;
  top: calc(var(--roof-h) * 0.42);
  background: #FF9A5C;
  box-shadow: 0 0 0 6px rgba(255, 154, 92, 0.4);
}

.site-header[data-tod="night"] .sky__sun { opacity: 0; }
.site-header[data-tod="night"] .sky__birds { opacity: 0; }
.site-header[data-tod="night"] .sky__cloud { filter: brightness(0.55); }
.site-header[data-tod="dusk"] .sky__cloud { filter: sepia(0.45) brightness(0.97); }

.sky__moon {
  position: absolute;
  left: 6%;
  top: calc(var(--roof-h) * 0.2);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #F4F1E4;
  box-shadow: 0 0 10px rgba(244, 241, 228, 0.6);
  opacity: 0;
  transition: opacity 1.4s ease;
}

.sky__moon::after {
  content: "";
  position: absolute;
  left: 8px;
  top: -3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sky);
  transition: background-color 1.4s ease;
}

.site-header[data-tod="night"] .sky__moon { opacity: 1; }

.sky__stars {
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 4vw 8px #fff, 12vw 28px #fff, 18vw 12px #fff, 23vw 22px #E8EEFF, 78vw 10px #fff, 85vw 30px #fff, 93vw 14px #E8EEFF, 97vw 42px #fff, 90vw 6px #fff, 8vw 44px #E8EEFF;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.site-header[data-tod="night"] .sky__stars { opacity: 1; animation: twinkle 3.2s ease-in-out infinite; }

@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}


.site-header__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: calc(var(--roof-h) + 16px);
  padding-bottom: 26px;
  gap: 16px;
  color: var(--color-hero-text);
}

.site-header__logo {
  display: flex;
  align-items: center;
}

.site-header__logo img {
  height: 64px;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 14px;
  font-size: 0.88rem;
  font-weight: 700;
}

/* Boutons du toit : des Velux sur lesquels on peut cliquer */
.site-nav a,
.site-header .site-header__cta {
  position: relative;
  isolation: isolate;
  display: inline-block;
  white-space: nowrap;
  padding: 10px 15px;
  color: var(--color-text);
  transition: transform 0.15s ease;
}

/* cadre métal et vitre, légèrement inclinés comme une fenêtre de toit */
.site-nav a::before,
.site-header .site-header__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: skewX(-6deg);
  border: 3px solid var(--color-hero-text);
  border-radius: 3px;
  background: linear-gradient(170deg, #D6EAF3 0%, #A9CCDD 60%, #8DB8CD 100%);
  box-shadow: 0 3px 6px rgba(46, 33, 25, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

/* reflet sur la vitre */
.site-nav a::after,
.site-header .site-header__cta::after {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: -1;
  transform: skewX(-6deg);
  border-radius: 1px;
  background: linear-gradient(105deg, transparent 0 14%, rgba(255, 255, 255, 0.5) 14% 28%, transparent 28% 34%, rgba(255, 255, 255, 0.3) 34% 40%, transparent 40%);
  pointer-events: none;
}

/* vitre allumée au survol (menu) */
.site-nav a:hover,
.site-nav a:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.site-nav a:hover::before,
.site-nav a:focus-visible::before {
  background: linear-gradient(170deg, #FFF6D6 0%, #FFE8A3 55%, #FFD36B 100%);
  box-shadow: 0 4px 10px rgba(46, 33, 25, 0.4), 0 0 14px rgba(255, 214, 107, 0.75), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

/* le bouton principal : un Velux bleu marine, distinct des autres */
.site-header .site-header__cta {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-hero-text);
}

.site-header .site-header__cta::before {
  border-color: var(--color-hero-text);
  background: linear-gradient(170deg, #2C4566 0%, #1B2F4A 55%, #13233A 100%);
  box-shadow: 0 3px 8px rgba(19, 35, 58, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.site-header .site-header__cta::after {
  background: linear-gradient(105deg, transparent 0 14%, rgba(255, 255, 255, 0.22) 14% 28%, transparent 28% 34%, rgba(255, 255, 255, 0.12) 34% 40%, transparent 40%);
}

.site-header .site-header__cta:hover,
.site-header .site-header__cta:focus-visible {
  color: #FFFFFF;
  transform: translateY(-2px);
  outline: none;
}

.site-header .site-header__cta:hover::before,
.site-header .site-header__cta:focus-visible::before {
  background: linear-gradient(170deg, #3B5B85 0%, #28446A 55%, #1B3252 100%);
  box-shadow: 0 5px 12px rgba(19, 35, 58, 0.6), 0 0 14px rgba(251, 243, 231, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

@media (max-width: 720px) {
  html { scroll-padding-top: 16px; }
  .site-header { position: relative; top: 0; }
  .site-header__inner { flex-wrap: wrap; row-gap: 12px; }
  .site-nav { flex-wrap: wrap; gap: 14px 16px; }
  .site-nav { gap: 10px; }
  .site-nav a { padding: 8px 10px; font-size: 0.8rem; }
  .site-header .site-header__cta { padding: 9px 16px; font-size: 0.85rem; margin-top: 4px; }
}

/* Footer */
.site-footer {
  background: var(--color-bg);
  color: var(--color-accent);
  padding: 48px 0;
  text-align: center;
  border-top: 1px solid var(--color-border);
}

.site-footer__logo {
  height: 48px;
  width: auto;
  margin-bottom: 8px;
}

.site-footer__tagline {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.site-footer__email {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.site-footer__legal {
  font-size: 0.8rem;
  margin-bottom: 16px;
  color: var(--color-text-muted);
}

.site-footer__legal a { text-decoration: underline; }

.site-footer__top {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 2px;
}

.site-footer__top .nacelle-icon { flex-shrink: 0; transition: transform 0.2s ease; }
.site-footer__top:hover .nacelle-icon { transform: translateY(-3px); }
.site-footer__top.is-away .nacelle-icon { visibility: hidden; }

/* la nacelle qui remonte le couvreur */
.lift-scene {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  overflow: hidden;
}

.lift-boom {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.lift-truck {
  position: absolute;
  left: 0;
  bottom: 10px;
  width: 160px;
  height: 80px;
  will-change: transform;
}

.lift-truck svg,
.lift-basket svg,
.lift-passenger svg { display: block; width: 100%; height: 100%; overflow: visible; }

.lift-basket {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 40px;
  z-index: 2;
  will-change: transform;
}

.lift-passenger {
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 46px;
  z-index: 1;
  will-change: transform;
}

.lift-truck .outrigger { transition: opacity 0.2s ease; }

/* Hero */
.hero {
  padding: 120px 0 80px;
  background: var(--color-bg);
  color: var(--color-text);
}

.hero__logo {
  height: 56px;
  width: auto;
  margin-bottom: 20px;
}

.hero__inner { max-width: 720px; }

.hero__subtitle {
  font-size: 1.1rem;
  margin-top: 20px;
  color: var(--color-text-muted);
}

.hero__subtitle--lead {
  font-weight: 700;
  color: var(--color-text);
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.hero__microline {
  margin-top: 40px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  letter-spacing: 0.5px;
}

/* Expertises */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 16px;
}

.expertise-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 8px;
  padding: 44px 24px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 190px;
  text-align: center;
  color: #fff;
  background: var(--card-img) center / cover no-repeat, var(--color-border);
  box-shadow: 0 10px 26px rgba(46, 33, 25, 0.18);
}

/* voile sombre pour garder le texte lisible */
.expertise-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(28, 20, 15, 0.82) 0%, rgba(28, 20, 15, 0.42) 60%, rgba(28, 20, 15, 0.22) 100%);
  transition: opacity 0.3s ease;
}

.expertise-card:hover::before { opacity: 0.85; }

.expertise-card h3 { color: #fff; }

.expertise-card__icon {
  width: 30px;
  height: 30px;
  color: #fff;
  margin-bottom: 12px;
}

@media (max-width: 720px) {
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Photos d'ambiance entre les sections */
.photo-break { position: relative; }

.photo-break img {
  position: absolute;
  left: 0;
  top: -10%;
  display: block;
  width: 100%;
  height: 120%;
  object-fit: cover;
  filter: saturate(0.92) sepia(0.06);
  will-change: transform;
}

.photo-break--full {
  height: clamp(220px, 44vh, 500px);
  overflow: hidden;
}

/* apparition : la bande s'ouvre depuis le centre */
html.js .photo-break--full img {
  clip-path: inset(0 50% 0 50%);
  transition: clip-path 1.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

html.js .photo-break--full.is-visible img { clip-path: inset(0 0 0 0); }

@media (max-width: 720px) {
  .photo-break--full { height: clamp(180px, 32vh, 300px); }
}

@media (prefers-reduced-motion: reduce) {
  html.js .photo-break--full img { clip-path: none; transition: none; }
  .photo-break img { top: 0; height: 100%; }
}

/* Titres de partie */
.part-banner {
  background: var(--color-hero-bg);
  color: var(--color-hero-text);
  padding: 48px 0;
}

.part-banner__title {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-hero-text);
}

.part-banner__text {
  font-size: 1.15rem;
  margin-top: 12px;
  max-width: 640px;
  color: var(--color-hero-text-muted);
}

/* Titres de section */
.section__title {
  font-size: clamp(1.75rem, 3.6vw, 2.25rem);
}

.section__subtitle {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 8px;
  max-width: 640px;
  color: var(--color-text);
}

/* Notre modèle */
.section__intro {
  max-width: 640px;
  font-size: 1.05rem;
  margin-top: 16px;
  margin-bottom: 56px;
}

.model-heading {
  font-size: 1.2rem;
  margin-bottom: 28px;
  max-width: 640px;
}

/* Cartes (modèle, apports, communauté, rôle) */
.card-grid {
  display: grid;
  gap: 24px;
  margin-bottom: 40px;
}

.card-grid:last-child { margin-bottom: 0; }

.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }

.info-card {
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-accent);
  border-radius: 8px;
  padding: 24px 28px;
}

.info-card__number {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.info-card h3 { margin-bottom: 8px; }

@media (max-width: 720px) {
  .card-grid--2,
  .card-grid--3 { grid-template-columns: 1fr; }
}

/* Comment ça marche */
.process__note {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 48px;
}

.timeline {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 9px;
  right: calc(25% - 9px);
  height: 2px;
  background: var(--color-accent);
}

.timeline__step {
  position: relative;
  padding-top: 40px;
}

.timeline__dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-hero-bg);
  border: 4px solid var(--color-bg);
  box-shadow: 0 0 0 2px var(--color-accent);
}

.timeline__step h3 { margin-bottom: 8px; font-size: 1rem; }

@media (max-width: 900px) {
  .timeline { grid-template-columns: 1fr; gap: 32px; }
  .timeline::before {
    top: 10px;
    bottom: 10px;
    left: 9px;
    right: auto;
    width: 2px;
    height: auto;
  }
  .timeline__step { padding-top: 0; padding-left: 48px; }
}

/* FAQ */
/* les questions vont d'un bord à l'autre de la page, le texte reste aligné sur le contenu */
#questions { overflow-x: clip; }

.faq-list {
  --faq-pad: max(24px, calc((100vw - 1100px) / 2 + 24px));
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-top: 1px solid var(--color-border);
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px var(--faq-pad);
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: left;
}

.faq-question__number {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-accent);
  flex-shrink: 0;
}

.faq-question__text { flex: 1; }

.faq-question:hover { background: rgba(255, 255, 255, 0.4); }

.faq-icon {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-accent);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item--open .faq-icon { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer p {
  padding: 0 max(var(--faq-pad), calc(100% - var(--faq-pad) - 820px)) 22px var(--faq-pad);
  max-width: none;
}

.faq-item--open .faq-answer { max-height: 300px; }

/* Contact */
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact__intro p { margin-top: 16px; }

.contact__email {
  margin-top: 16px;
  font-size: 0.95rem;
}

.contact__email a { text-decoration: underline; font-weight: 600; }

.contact-form__error a { text-decoration: underline; }

.contact__confidentiality {
  margin-top: 32px !important;
  font-size: 0.9rem;
  color: var(--color-text) !important;
  font-weight: 600;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 32px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--color-text);
}

.contact-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.contact-form__consent input { width: auto; margin-top: 3px; }
.contact-form__consent a { text-decoration: underline; }

.contact-form__note {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.contact-form__success {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  text-align: center;
}

.contact-form__error {
  font-size: 0.85rem;
  font-weight: 600;
  color: #A63D2F;
  text-align: center;
}

#contact-submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

@media (max-width: 900px) {
  .contact__inner { grid-template-columns: 1fr; }
}

/* Pages légales */
.legal-header {
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
}

.legal-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.legal-header img { height: 48px; width: auto; }

.legal-header a.legal-back {
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 1px solid var(--color-text);
  padding-bottom: 2px;
}

.legal-page { padding: 64px 0 96px; }

.legal-page .container { max-width: 760px; }

.legal-page h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: 8px; }

.legal-page .legal-updated { font-size: 0.85rem; margin-bottom: 40px; }

.legal-page h2 {
  font-size: 1.2rem;
  margin: 40px 0 12px;
}

.legal-page p,
.legal-page li { margin-bottom: 12px; color: var(--color-text); }

.legal-page ul { padding-left: 24px; margin-bottom: 12px; }

.legal-page a { text-decoration: underline; }

.legal-todo {
  background: #FFF3CD;
  padding: 0 4px;
  border-radius: 3px;
}

/* Champs invalides, une fois touchés */
.contact-form input.is-touched:invalid,
.contact-form textarea.is-touched:invalid {
  border-color: #A63D2F;
}

.contact-form__field-error {
  font-size: 0.8rem;
  color: #A63D2F;
  margin-top: -4px;
}

/* Téléphone : espacements resserrés (placé en dernier pour l'emporter) */
@media (max-width: 720px) {
  .hero { padding: 48px 0 56px; }
  .section { padding: 44px 0; }
  .section__intro { margin-bottom: 32px; }
  .part-banner { padding: 32px 0; }
  .card-grid { gap: 16px; margin-bottom: 32px; }
  .info-card { padding: 20px; }
  .expertise-card { padding: 36px 12px 18px; min-height: 150px; }
  .contact__inner { gap: 40px; }
  .hero__microline { margin-top: 28px; }
  .contact-form input,
  .contact-form textarea { font-size: 16px; }
}
