/* ============================================================
   LA GARE DE RUFISQUE — mécanicien mobile
   Composition: receipt/listing layout · rotating section palette
   · stacked headline · grain overlay · drag-to-scroll band
   ============================================================ */

:root {
  --noir: #0a0a0a;
  --rouge: #e10600;
  --bleu: #003c8a;
  --jaune: #f4ff33;

  --ink: #0a0a0a;
  --paper: #f6f4ef;

  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: "Bricolage Grotesque", "JetBrains Mono", system-ui, sans-serif;

  --col: 40ch;
  --pad: clamp(1.25rem, 5vw, 3rem);
  --rule: 1px dotted currentColor;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--noir);
  color: var(--paper);
  font-family: var(--mono);
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  line-height: 1.65;
  font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- grain overlay (background axis) --- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
}

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

a { color: inherit; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem var(--pad);
  background: color-mix(in srgb, var(--noir) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--paper) 18%, transparent);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  margin-right: auto;
  min-height: 44px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  background: var(--rouge);
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: -0.02em;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.brand-text em {
  font-style: normal;
  font-weight: 400;
  font-size: 0.66rem;
  opacity: 0.6;
  text-transform: lowercase;
  letter-spacing: 0.08em;
}

.topnav {
  display: none;
  gap: 1.25rem;
}
.topnav a {
  text-decoration: none;
  opacity: 0.75;
  padding: 0.5rem 0;
}
.topnav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

.call-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1rem;
  background: var(--jaune);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  border: 1px solid var(--jaune);
  transition: background 200ms, color 200ms;
}
.call-btn:hover { background: transparent; color: var(--jaune); }

.call-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--rouge);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.25 } }

@media (min-width: 720px) {
  .topnav { display: flex; }
}

/* ============================================================
   SECTIONS — rotating palette
   ============================================================ */
.sec {
  padding: clamp(3.5rem, 9vw, 7rem) var(--pad);
  position: relative;
}

.sec--noir  { background: var(--noir);  color: var(--paper); }
.sec--rouge { background: var(--rouge); color: #fff; }
.sec--bleu  { background: var(--bleu);  color: #fff; }
.sec--jaune { background: var(--jaune); color: var(--ink); }

.col {
  max-width: var(--col);
  margin-inline: auto;
}
.col--wide { max-width: 62ch; }

/* --- motion axis: fade + rise on scroll enter --- */
@keyframes fadeRise {
  from { opacity: 0; translate: 0 14px; }
  to   { opacity: 1; translate: 0 0; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .sec > .col,
    .sec > .band {
      animation: fadeRise 420ms cubic-bezier(.2,.7,.1,1) both;
      animation-timeline: view();
      animation-range: entry 0% cover 22%;
    }
  }
}

/* ============================================================
   TYPE
   ============================================================ */
.kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.7;
  margin: 0 0 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: var(--rule);
}

h1, h2 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 11vw, 4.6rem); }

/* --- typography axis: stacked headline breaking baseline --- */
.stack span { display: block; }
.stack span:nth-child(2) { margin-left: 1.6em; }
.stack span:nth-child(3) { margin-left: -0.35em; }
.stack span:nth-child(3) { color: var(--jaune); }

h2 { font-size: clamp(1.9rem, 6.5vw, 2.9rem); }

.lede {
  font-size: 1.02em;
  margin: 0 0 2rem;
  max-width: 46ch;
}

.sec p { margin: 0 0 1.15rem; }

.fine {
  font-size: 0.82rem;
  opacity: 0.78;
  border-top: var(--rule);
  padding-top: 1rem;
  margin-top: 2rem;
}

.micro {
  font-size: 0.78rem;
  opacity: 0.7;
  margin-top: 1rem;
}

/* ============================================================
   RECEIPT BLOCK (layout axis)
   ============================================================ */
.receipt {
  border: 1px solid currentColor;
  padding: 1.1rem 1.15rem 0.9rem;
  margin: 2rem 0;
  font-size: 0.86rem;
  background: color-mix(in srgb, var(--paper) 5%, transparent);
}

.receipt-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.receipt hr {
  border: 0;
  border-top: var(--rule);
  margin: 0.85rem 0;
}

.receipt-rows { margin: 0; }
.receipt-rows > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.28rem 0;
}
.receipt-rows dt {
  opacity: 0.68;
  flex: none;
}
.receipt-rows dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.receipt-rows dd a { text-decoration: underline; text-underline-offset: 3px; }

.receipt-foot {
  margin: 0;
  text-align: center;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}

.receipt--light { background: color-mix(in srgb, #fff 12%, transparent); }

/* ============================================================
   BUTTONS
   ============================================================ */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.4rem;
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  border: 2px solid var(--jaune);
  transition: background 200ms, color 200ms, translate 200ms;
}
.btn--solid { background: var(--jaune); color: var(--ink); }
.btn--solid:hover { background: transparent; color: var(--jaune); }
.btn--ghost { background: transparent; color: var(--jaune); }
.btn--ghost:hover { background: var(--jaune); color: var(--ink); }

/* ============================================================
   SERVICE LINES (receipt-style list)
   ============================================================ */
.lines {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  border-top: var(--rule);
}

.lines li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1rem;
  padding: 1.1rem 0;
  border-bottom: var(--rule);
}

.line-name {
  font-weight: 700;
  font-size: 0.98em;
  letter-spacing: -0.01em;
}

.line-price {
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
  font-size: 0.86em;
  align-self: start;
}

.line-note {
  grid-column: 1 / -1;
  font-size: 0.84em;
  opacity: 0.85;
  max-width: 42ch;
}

/* ============================================================
   STATS
   ============================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 2.5rem;
  background: color-mix(in srgb, #fff 30%, transparent);
  border: 1px solid color-mix(in srgb, #fff 30%, transparent);
}
.stat {
  background: var(--bleu);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.stat b {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.stat span { font-size: 0.74rem; opacity: 0.82; }

@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   HOURS TABLE
   ============================================================ */
.hours {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0 0;
  font-size: 0.9rem;
}
.hours th, .hours td {
  text-align: left;
  padding: 0.62rem 0;
  border-bottom: var(--rule);
  font-weight: 400;
}
.hours th { font-weight: 700; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }

/* ============================================================
   ZONES
   ============================================================ */
.zones {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  border-top: var(--rule);
}
.zones li {
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem 0;
  border-bottom: var(--rule);
}
.zones b { font-size: 0.95em; }
.zones span { font-size: 0.82em; opacity: 0.72; }

.map-wrap {
  margin-top: 2rem;
  border: 1px solid color-mix(in srgb, var(--paper) 30%, transparent);
  filter: grayscale(1) contrast(1.05);
  transition: filter 300ms;
}
.map-wrap:hover { filter: grayscale(0); }
.map-wrap iframe {
  display: block;
  width: 100%;
  height: 300px;
  border: 0;
}

/* ============================================================
   PHONE BIG
   ============================================================ */
.phone-big {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 2rem 0;
  padding: 1.25rem 1.15rem;
  border: 2px solid #fff;
  text-decoration: none;
  transition: background 200ms, color 200ms;
}
.phone-big:hover { background: #fff; color: var(--rouge); }
.phone-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.8;
}
.phone-num {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.5rem, 6vw, 2.1rem);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   DRAG-TO-SCROLL BAND (signature axis)
   ============================================================ */
.sec--band { padding-inline: 0; }
.sec--band > .col { padding-inline: var(--pad); }

.band {
  overflow: hidden;
  cursor: grab;
  margin-top: 2.5rem;
  padding-block: 0.5rem;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.band.is-dragging { cursor: grabbing; }

.band-track {
  display: flex;
  gap: 1rem;
  padding-inline: var(--pad);
  width: max-content;
  will-change: transform;
}

.band-item {
  margin: 0;
  width: min(78vw, 320px);
  flex: none;
  border: 1px solid color-mix(in srgb, var(--paper) 25%, transparent);
  background: color-mix(in srgb, var(--paper) 4%, transparent);
}
.band-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  pointer-events: none;
  filter: grayscale(0.85) contrast(1.08);
  transition: filter 350ms;
}
.band-item:hover img { filter: grayscale(0) contrast(1); }

.band-item figcaption {
  padding: 0.7rem 0.8rem 0.85rem;
  font-size: 0.76rem;
  line-height: 1.5;
  opacity: 0.85;
}
.band-item figcaption b {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 1;
  margin-bottom: 0.15rem;
}

.band-hint {
  font-size: 0.72rem;
  opacity: 0.6;
  margin: 0.5rem 0 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-foot {
  background: var(--noir);
  color: var(--paper);
  padding: 3rem var(--pad) 5rem;
  border-top: 1px solid color-mix(in srgb, var(--paper) 18%, transparent);
}
.foot-line {
  font-size: 0.82rem;
  margin: 0 0 0.6rem;
  opacity: 0.9;
}
.foot-line--muted { opacity: 0.6; }
.foot-line a { text-underline-offset: 3px; }

.claim-banner {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.72rem;
  text-decoration: none;
  background: color-mix(in srgb, var(--paper) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--paper) 22%, transparent);
  color: color-mix(in srgb, var(--paper) 80%, transparent);
  transition: background 200ms, color 200ms;
}
.claim-banner:hover {
  background: color-mix(in srgb, var(--paper) 16%, transparent);
  color: var(--paper);
}

.attribution {
  position: fixed;
  bottom: 0.5rem;
  right: 0.75rem;
  font-size: 0.7rem;
  opacity: 0.5;
  font-family: var(--mono);
  z-index: 60;
}
.attribution a { color: inherit; }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .sec > .col, .sec > .band { opacity: 1 !important; translate: 0 !important; }
}
