/* K.A.T.E.C. – site vitrine
   Palette : gravier / bitume / rouge signal (chevrons du camion) */
:root {
  --gravier: #efede8;
  --gravier-2: #e3e0d9;
  --bitume: #17191c;
  --bitume-2: #2b2e33;
  --gris: #6b6e74;
  --rouge: #d0261c;
  --rouge-2: #b11f16;
  --blanc: #ffffff;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --max: 1240px;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .service-list li { opacity: 1; transform: none; transition: none; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--bitume);
  background: var(--gravier);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.02; margin: 0; letter-spacing: -0.005em; }
h2 { font-size: clamp(2.25rem, 4.5vw, 3.75rem); font-weight: 700; }
h3 { font-size: clamp(1.5rem, 2.4vw, 2.125rem); font-weight: 700; }
p { margin: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--bitume); color: var(--blanc); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

:focus-visible { outline: 3px solid var(--rouge); outline-offset: 3px; }

/* Motif : chevrons rouge/blanc, comme sur les camions */
.chevrons {
  height: 14px;
  background: repeating-linear-gradient(135deg, var(--rouge) 0 22px, var(--blanc) 22px 44px);
}

/* Boutons */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  padding: .8rem 1.4rem;
  text-decoration: none;
  border: 2px solid transparent;
}
.btn-red { background: var(--rouge); color: var(--blanc); border-color: var(--rouge); }
.btn-red:hover { background: var(--rouge-2); border-color: var(--rouge-2); }
.btn-ghost { color: var(--blanc); border-color: rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-ghost-dark { color: var(--bitume); border-color: var(--bitume); }
.btn-ghost-dark:hover { background: var(--gravier-2); }
.link { font-weight: 500; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Barre haute */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 2rem;
  padding: .75rem var(--pad);
  background: var(--gravier);
  border-bottom: 1px solid var(--gravier-2);
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; margin-right: auto; }
.brand-mark {
  width: 34px; height: 34px;
  background: repeating-linear-gradient(135deg, var(--rouge) 0 8px, var(--blanc) 8px 16px);
  border: 2px solid var(--bitume);
}
.brand-text { font-family: var(--display); font-weight: 700; font-size: 1.6rem; line-height: .9; letter-spacing: .02em; }
.brand-text small { display: block; font-weight: 500; font-size: .8rem; letter-spacing: .08em; color: var(--gris); }
.nav { display: flex; gap: 1.6rem; }
.nav a { text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--rouge); }
.topbar-tel { font-family: var(--display); font-weight: 700; font-size: 1.35rem; text-decoration: none; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 0; padding: .4rem; cursor: pointer; }
.nav-toggle span:not(.sr-only) { display: block; width: 26px; height: 3px; background: var(--bitume); margin: 5px 0; }

/* Héro : photo pleine largeur, titre bas gauche, panneau de chantier */
.hero {
  position: relative;
  min-height: min(92vh, 900px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  grid-template-rows: 1fr auto;
  gap: 0 2rem;
  padding: 0 var(--pad) 0;
  color: var(--blanc);
  isolation: isolate;
}
.hero picture, .hero img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; object-position: 60% 55%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(23,25,28,.25) 0%, rgba(23,25,28,.15) 40%, rgba(23,25,28,.82) 100%);
}
.hero-inner { grid-row: 2; align-self: end; max-width: 46rem; padding: 6rem 0 3rem; }
.hero h1 { font-size: clamp(2.75rem, 6.2vw, 5.5rem); font-weight: 700; text-wrap: balance; }
.hero-sub { margin-top: 1.25rem; font-size: 1.15rem; max-width: 36rem; color: rgba(255,255,255,.9); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

.hero-board {
  grid-column: 2; grid-row: 2; align-self: end;
  background: var(--blanc); color: var(--bitume);
  margin-bottom: -3.5rem;
  box-shadow: 0 1px 0 var(--gravier-2);
}
.hero-board dl { margin: 0; padding: 1.25rem 1.5rem 1.5rem; display: grid; gap: 1rem; }
.hero-board dt { font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--rouge); }
.hero-board dd { margin: 0; line-height: 1.4; }
.hero-board dd a { text-decoration: none; font-weight: 500; }
.hero-board dd a:hover { color: var(--rouge); }

/* Intro */
.intro { max-width: var(--max); margin: 0 auto; padding: 7.5rem var(--pad) 3rem; }
.intro p { max-width: 42rem; font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.4; font-weight: 400; }

/* En-têtes de section */
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 3rem; align-items: end; margin-bottom: 2.5rem; }
.section-head p { color: var(--gris); max-width: 32rem; }

/* Prestations : grandes images en quinconce, glissement à l'apparition */
.services { max-width: var(--max); margin: 0 auto; padding: 3rem var(--pad) 5rem; overflow: hidden; }
.service-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--bitume); }
.service-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--bitume-2);
  opacity: 0;
  transform: translateX(-8vw);
  transition: opacity .8s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
}
.service-list li:nth-child(even) { transform: translateX(8vw); }
.service-list li:nth-child(odd) img { order: -1; }
.service-list li.in { opacity: 1; transform: none; }
.service-list li:last-child { border-bottom: 2px solid var(--bitume); }
.service-text p { margin-top: .75rem; max-width: 34rem; }
.service-list img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* Galerie */
.gallery { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) 5rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.gallery figure { margin: 0; }
.gallery .wide { grid-column: 1 / -1; }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.gallery .wide img { aspect-ratio: 21 / 9; }
.gallery figcaption { margin-top: .5rem; font-size: .95rem; color: var(--gris); }

/* Déroulement : vraie séquence, donc numérotée */
.method { background: var(--bitume); color: var(--gravier); }
.method .section-head { max-width: var(--max); margin: 0 auto 2.5rem; padding: 5rem var(--pad) 0; }
.steps { list-style: none; margin: 0 auto; padding: 0 var(--pad) 5rem; max-width: var(--max); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
.steps li { border-top: 2px solid var(--gravier); padding-top: 1rem; }
.step-n { font-family: var(--display); font-weight: 700; font-size: 3rem; line-height: 1; color: var(--rouge); display: block; }
.steps h3 { margin-top: .5rem; }
.steps p { margin-top: .6rem; color: rgba(239,237,232,.8); }

/* Secteur + avis */
.zone { max-width: var(--max); margin: 0 auto; padding: 5rem var(--pad); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.zone-text p { margin-top: 1rem; max-width: 36rem; }
.towns { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem .9rem; font-family: var(--display); font-size: 1.35rem; font-weight: 500; }
.towns li::after { content: "·"; margin-left: .9rem; color: var(--gris); }
.towns li:last-child::after { content: ""; margin: 0; }
.zone-proof { background: var(--blanc); padding: 1.75rem; border-left: 6px solid var(--rouge); }
.stars { font-family: var(--display); font-weight: 700; font-size: 2.25rem; line-height: 1; }
.stars span { color: var(--rouge); letter-spacing: .05em; margin-right: .4rem; }
.zone-proof p + p { margin-top: .75rem; }
.zone-proof .link { display: inline-block; margin-top: 1rem; }

/* Contact : panneau blanc bordé de chevrons */
.contact { background: var(--blanc); }
.contact-inner { max-width: var(--max); margin: 0 auto; padding: 4rem var(--pad) 5rem; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 3rem; }
.contact-text p { margin-top: 1rem; max-width: 34rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.contact-address { font-style: normal; line-height: 1.6; }
.contact-address strong { font-family: var(--display); font-size: 1.4rem; }
.hours { margin-top: 1.25rem; border-collapse: collapse; width: 100%; max-width: 24rem; }
.hours th, .hours td { text-align: left; padding: .4rem 0; border-bottom: 1px solid var(--gravier-2); font-weight: 400; }
.hours td { text-align: right; }

/* Pied de page */
.footer { background: var(--bitume); color: var(--gravier); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 2.5rem var(--pad) 3rem; }
.footer-brand { font-family: var(--display); font-weight: 700; font-size: 1.6rem; }
.footer-links { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.footer-links a, .footer-copy a { color: var(--gravier); text-underline-offset: 3px; }
.legal summary { cursor: pointer; font-weight: 500; }
.legal p { margin-top: .75rem; font-size: .95rem; color: rgba(239,237,232,.8); }
.footer-copy { margin-top: 1.5rem; font-size: .9rem; color: rgba(239,237,232,.6); }

/* Responsive */
@media (max-width: 980px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head { grid-template-columns: 1fr; }
  .zone, .contact-inner { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--gravier); border-bottom: 1px solid var(--gravier-2); }
  .nav a { padding: 1rem var(--pad); border-top: 1px solid var(--gravier-2); }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
  .topbar-tel { display: none; }
  .topbar { gap: 1rem; }
  .hero { grid-template-columns: 1fr; grid-template-rows: auto auto; min-height: auto; }
  .hero-inner { grid-row: 1; padding: 7rem 0 2.5rem; }
  .hero-board { grid-column: 1; grid-row: 2; margin-bottom: -2.5rem; }
  .intro { padding-top: 6rem; }
  .service-list li { grid-template-columns: 1fr; gap: 1rem; transform: translateY(2rem); }
  .service-list li:nth-child(even) { transform: translateY(2rem); }
  .service-list li:nth-child(odd) img { order: 0; }
  .service-list img { aspect-ratio: 16 / 9; }
  .gallery-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .brand-text { font-size: 1.35rem; }
  .btn { width: 100%; text-align: center; }
}
