/* ============================================================
   Plombier Nice — feuille de style
   Composition : palette par section (noir / rouge / bleu / jaune),
   titre empilé, bento asymétrique, bande glissable, motif SVG.
   ============================================================ */

/* ---------- Jetons ---------- */
:root {
  --bg-1: #0a0a0a;
  --bg-2: #e10600;
  --bg-3: #003c8a;
  --bg-4: #f4ff33;

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

  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(1.1rem, 4vw, 3.5rem);
  --maxw: 1240px;
  --radius: 2px;

  --pattern: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24'><circle cx='2' cy='2' r='1.1' fill='%23ffffff' fill-opacity='0.10'/></svg>");
  --pattern-ink: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24'><circle cx='2' cy='2' r='1.1' fill='%230a0a0a' fill-opacity='0.14'/></svg>");
}

/* Thème clair : les sections sombres s'éclaircissent, les accents restent. */
html[data-theme="light"] {
  --bg-1: #f5f3ee;
  --bg-2: #c00500;
  --bg-3: #00306e;
  --bg-4: #e8f52a;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.55vw + 0.9rem, 1.075rem);
  line-height: 1.62;
  color: var(--paper);
  background-color: var(--bg-1);
  background-image: var(--pattern);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

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

h1, h2, h3 { line-height: 1.02; margin: 0 0 0.6em; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 4.6vw, 3.4rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.45rem); letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: inherit; }

.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;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--bg-4); color: var(--ink); padding: 0.7rem 1rem; font-weight: 600;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

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

/* ---------- Barre supérieure ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1rem;
  padding: 0.7rem var(--gutter);
  background: color-mix(in srgb, var(--bg-1) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--paper) 16%, transparent);
  color: var(--paper);
}
html[data-theme="light"] .topbar { color: var(--ink); border-bottom-color: rgba(10,10,10,0.14); }

.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; margin-right: auto; }
.brand-mark {
  display: grid; place-items: center;
  width: 40px; height: 40px; flex: none;
  background: var(--bg-2); color: #fff;
  font-family: var(--font-mono); font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.brand-text { font-weight: 800; font-size: 1rem; line-height: 1.1; display: flex; flex-direction: column; }
.brand-text small { font-family: var(--font-mono); font-weight: 400; font-size: 0.62rem; opacity: 0.65; letter-spacing: 0.06em; text-transform: uppercase; }

.topnav { display: none; gap: 1.4rem; font-size: 0.9rem; }
.topnav a { text-decoration: none; padding: 0.35rem 0; border-bottom: 2px solid transparent; }
.topnav a:hover { border-bottom-color: var(--bg-4); }

.topbar-actions { display: flex; align-items: center; gap: 0.5rem; }

.theme-toggle {
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: 44px; padding: 0 0.7rem;
  background: transparent; color: inherit;
  border: 1px solid currentColor; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em;
  text-transform: uppercase; cursor: pointer;
}
.theme-icon {
  width: 13px; height: 13px; border-radius: 50%;
  background: currentColor;
  box-shadow: inset -4px -3px 0 0 color-mix(in srgb, var(--bg-1) 100%, transparent);
}
html[data-theme="light"] .theme-icon { box-shadow: inset -4px -3px 0 0 #f5f3ee; }
.theme-label { display: none; }

.call-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 44px; padding: 0 0.95rem;
  background: var(--bg-2); color: #fff; text-decoration: none;
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em;
  border-radius: var(--radius);
  white-space: nowrap;
}
.call-btn:hover { background: color-mix(in srgb, var(--bg-2) 82%, #000); }
.call-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1 } 50% { opacity: 0.25 } }

/* ---------- Sections : palette tournante ---------- */
section { padding: clamp(3rem, 8vw, 6.5rem) var(--gutter); }

.sec-dark   { background-color: var(--bg-1); background-image: var(--pattern); background-size: 24px 24px; color: var(--paper); }
.sec-red    { background-color: var(--bg-2); background-image: var(--pattern); background-size: 24px 24px; color: #fff; }
.sec-blue   { background-color: var(--bg-3); background-image: var(--pattern); background-size: 24px 24px; color: #fff; }
.sec-yellow { background-color: var(--bg-4); background-image: var(--pattern-ink); background-size: 24px 24px; color: var(--ink); }

html[data-theme="light"] .sec-dark { color: var(--ink); background-image: var(--pattern-ink); }
html[data-theme="light"] .sec-dark .btn-ghost { border-color: var(--ink); }

.sec-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.kicker {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em;
  text-transform: uppercase; opacity: 0.8; margin-bottom: 0.9rem;
}
.sec-intro { font-size: 1.06rem; opacity: 0.92; }

/* ---------- Héros ---------- */
.hero { padding-top: clamp(2.5rem, 6vw, 5rem); }
.hero-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; gap: clamp(1.8rem, 4vw, 3.5rem);
  grid-template-columns: 1fr;
  align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: 1.4rem;
  border: 1px solid currentColor; border-radius: 999px; padding: 0.4rem 0.85rem;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--bg-2); animation: blink 1.8s ease-in-out infinite; }
html[data-theme="light"] .pulse { background: #c00500; }

/* Titre empilé, lignes décalées */
.stacked { font-size: clamp(2.4rem, 9vw, 5.6rem); margin-bottom: 0.5em; }
.stacked span { display: block; }
.stacked span:nth-child(1) { margin-left: 0; }
.stacked span:nth-child(2) { margin-left: 1.6em; }
.stacked span:nth-child(3) { margin-left: -0.35em; font-size: 0.82em; opacity: 0.92; }

.lede { font-size: clamp(1.02rem, 1.2vw, 1.16rem); max-width: 54ch; opacity: 0.94; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.8rem 0 2.2rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 1.4rem;
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.02em; text-decoration: none; border-radius: var(--radius);
  border: 2px solid transparent;
}
.btn-solid { background: var(--bg-2); color: #fff; }
.btn-solid:hover { background: color-mix(in srgb, var(--bg-2) 80%, #000); }
.btn-ghost { border-color: currentColor; }
.btn-ghost:hover { background: color-mix(in srgb, currentColor 14%, transparent); }

.hero-facts {
  display: grid; gap: 1rem; margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  padding-top: 1.4rem;
}
.hero-facts dt {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em;
  text-transform: uppercase; opacity: 0.7; margin-bottom: 0.3rem;
}
.hero-facts dd { margin: 0; font-weight: 600; font-size: 0.96rem; }

.hero-figure { margin: 0; }
.hero-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.hero-figure figcaption {
  font-family: var(--font-mono); font-size: 0.7rem; opacity: 0.7;
  margin-top: 0.7rem; letter-spacing: 0.02em;
}

/* ---------- Bento asymétrique ---------- */
.bento {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
.card {
  background: color-mix(in srgb, #000 16%, transparent);
  border: 1px solid color-mix(in srgb, #fff 26%, transparent);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 2.4vw, 1.9rem);
}
.card h3 { margin-bottom: 0.5em; }
.card p { font-size: 0.97rem; opacity: 0.95; }
.card-num {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em;
  opacity: 0.75; margin-bottom: 0.9rem;
}
.card-meta {
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.04em;
  margin: 0; padding-top: 0.9rem;
  border-top: 1px solid color-mix(in srgb, #fff 24%, transparent);
}
.card-empty {
  display: flex; flex-direction: column; justify-content: center; gap: 0.6rem;
  background: transparent;
  border-style: dashed;
  border-color: color-mix(in srgb, #fff 40%, transparent);
}
.card-empty p { margin: 0; font-size: 0.92rem; opacity: 0.9; }
.empty-mark { font-family: var(--font-mono); font-size: 1.6rem; line-height: 1; opacity: 0.7; }

/* ---------- Bande glissable ---------- */
.band-wrap { max-width: var(--maxw); margin: 0 auto; position: relative; }
.band {
  overflow-x: auto; overflow-y: hidden;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-x;
  padding-bottom: 0.5rem;
}
.band::-webkit-scrollbar { display: none; }
.band.is-dragging { cursor: grabbing; }
.band.is-dragging * { user-select: none; }
.band-track { display: flex; gap: 1rem; width: max-content; }
.band-item {
  margin: 0; width: min(78vw, 420px); flex: none;
  background: color-mix(in srgb, #000 18%, transparent);
  border: 1px solid color-mix(in srgb, #fff 24%, transparent);
  border-radius: var(--radius);
  overflow: hidden;
}
.band-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.band-item figcaption { padding: 1rem 1.1rem 1.2rem; font-size: 0.9rem; }
.band-item figcaption strong { display: block; font-size: 1rem; margin-bottom: 0.35rem; }
.band-item figcaption span { opacity: 0.9; }
.band-hint {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; opacity: 0.7; margin: 0.9rem 0 0;
}

/* ---------- Étapes ---------- */
.steps {
  max-width: var(--maxw); margin: 0 auto;
  list-style: none; padding: 0;
  display: grid; gap: 1.2rem; grid-template-columns: 1fr;
}
.steps li {
  background: color-mix(in srgb, #fff 42%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 2.4vw, 1.8rem);
}
.step-n {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; margin-bottom: 0.9rem;
  background: var(--ink); color: var(--bg-4);
  font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600;
}
.steps h3 { margin-bottom: 0.45em; }
.steps p { margin: 0; font-size: 0.97rem; }

.guarantee {
  max-width: var(--maxw); margin: 2rem auto 0;
  font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.7;
  padding: 1.1rem 1.2rem;
  border-left: 4px solid var(--ink);
  background: color-mix(in srgb, #fff 34%, transparent);
}

/* ---------- Contact ---------- */
.contact-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: 1fr;
}
.contact-block h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.contact-lede { max-width: 48ch; opacity: 0.94; }

.hours { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.hours th, .hours td { text-align: left; padding: 0.62rem 0; border-bottom: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
.hours th { font-weight: 600; }
.hours td { font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.02em; }
.hours tr.closed td { opacity: 0.6; }
.hours tr.closed th { opacity: 0.6; }
.hours-note { font-size: 0.88rem; opacity: 0.82; margin-top: 1rem; }

.phone-big {
  display: block; text-decoration: none;
  border: 2px solid currentColor; border-radius: var(--radius);
  padding: 1.1rem 1.2rem; margin: 1.4rem 0 1.8rem;
  transition: background-color 160ms ease;
}
.phone-big:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.phone-label {
  display: block; font-family: var(--font-mono); font-size: 0.66rem;
  letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.72; margin-bottom: 0.35rem;
}
.phone-number { display: block; font-size: clamp(1.5rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: -0.01em; }

.addr { font-style: normal; font-size: 1rem; line-height: 1.75; }
.addr strong { display: block; margin-bottom: 0.2rem; }
.addr-note { font-size: 0.86rem; opacity: 0.78; }
.map-link {
  display: inline-block; margin-top: 1rem;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em;
  text-decoration: none; border-bottom: 2px solid var(--bg-4); padding-bottom: 2px;
}
html[data-theme="light"] .map-link { border-bottom-color: var(--bg-2); }

.zones {
  max-width: var(--maxw); margin: clamp(2.5rem, 5vw, 4rem) auto 0;
  padding-top: 1.8rem;
  border-top: 1px solid color-mix(in srgb, currentColor 24%, transparent);
}
.zones h3 { font-size: 1.1rem; }
.zones p { max-width: 78ch; font-size: 0.95rem; opacity: 0.92; }
.zones-note { font-family: var(--font-mono); font-size: 0.78rem; opacity: 0.72; }

/* ---------- Pied de page ---------- */
.site-footer {
  background: #050505; color: #f2f2f2;
  padding: clamp(2rem, 4vw, 3rem) var(--gutter) 4.5rem;
  border-top: 4px solid var(--bg-2);
}
html[data-theme="light"] .site-footer { background: #14120f; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; }
.footer-brand { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.5rem; }
.footer-note { font-family: var(--font-mono); font-size: 0.72rem; opacity: 0.6; letter-spacing: 0.02em; }

.claim-wrap { margin: 1.6rem 0 0.8rem; }
.claim-banner {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.02em;
  color: #d8d8d8; text-decoration: none;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius);
  padding: 0.5rem 0.8rem;
}
.claim-banner:hover { background: rgba(255,255,255,0.13); color: #fff; }

.muted.attribution {
  position: static; margin: 0; font-size: 0.7rem; opacity: 0.5;
  font-family: var(--font-mono);
}
.muted.attribution a { color: inherit; }

/* ---------- Animation d'entrée ---------- */
@keyframes fadeRise {
  from { opacity: 0; translate: 0 14px; }
  to   { opacity: 1; translate: 0 0; }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    section {
      animation: fadeRise 420ms cubic-bezier(.2,.7,.1,1) both;
      animation-timeline: view();
      animation-range: entry 0% cover 22%;
    }
  }
}

/* ---------- Points de rupture ---------- */
@media (min-width: 720px) {
  .theme-label { display: inline; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
  .bento { grid-template-columns: repeat(6, 1fr); }
  .card { grid-column: span 3; }
  .card-wide { grid-column: 1 / 4; }
  .card-wide + .card { grid-column: 4 / 7; }
  .card-tall { grid-column: 2 / 5; }
  .card-empty { grid-column: 5 / 7; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1000px) {
  .topnav { display: flex; }
  .bento { grid-template-columns: repeat(6, 1fr); }
  .card-wide { grid-column: 1 / 4; }
  .card-wide + .card { grid-column: 4 / 7; }
  .card-tall { grid-column: 2 / 5; }
  .card-empty { grid-column: 5 / 7; }
  .band-item { width: 440px; }
}

@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;
  }
}
