/* ============================================================
   Entreprise Renaudin — plomberie Lyon 6e
   Composition: charcoal + phosphor green · terminal warmth
   ============================================================ */

:root {
  --bg:        #1c1c1c;
  --bg-2:      #232323;
  --bg-3:      #2b2b2b;
  --ink:       #39ff14;
  --ink-soft:  #b9f7a8;
  --secondary: #ffb000;
  --paper:     #f4f1e8;
  --line:      #3d3d3d;
  --line-soft: #4a4a4a;

  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-hand: "Caveat", "Segoe Script", cursive;

  --pad: clamp(1.25rem, 4vw, 4rem);
  --maxw: 1180px;
  --radius: 2px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.0625rem);
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-wrap: pretty;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(1.9rem, 1.2rem + 3.4vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 2vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 1rem + 0.6vw, 1.35rem); }
h4 { font-size: 1rem; margin-bottom: 0.35em; }

p { margin: 0 0 1.1em; }

a { color: var(--secondary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px dashed var(--secondary);
  outline-offset: 3px;
}

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

/* ---------- scroll progress strip (design element) ---------- */
.progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  height: 4px;
  background: var(--bg-3);
  z-index: 60;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--ink);
  transform-origin: 0 50%;
  transform: scaleX(0);
  animation: fill linear both;
  animation-timeline: scroll(root block);
}
@keyframes fill { to { transform: scaleX(1); } }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.7rem var(--pad);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  margin-inline-end: auto;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 2px solid var(--ink);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  flex: none;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  font-weight: 600;
  font-size: 0.95rem;
}
.brand-text em {
  font-style: normal;
  font-size: 0.7rem;
  color: var(--secondary);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topnav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.topnav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 0.15rem;
}
.topnav a:hover { color: var(--ink); }

.call-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #0d0d0d;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid var(--ink);
}
.call-btn:hover { background: var(--secondary); border-color: var(--secondary); color: #0d0d0d; }
.call-btn .dot {
  width: 8px; height: 8px;
  background: #0d0d0d;
  border-radius: 50%;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.25; } }

/* ---------- hand-drawn scribble marks ---------- */
mark.scribble {
  background: none;
  color: inherit;
  position: relative;
  padding: 0 0.1em;
  white-space: nowrap;
}
mark.scribble::after {
  content: "";
  position: absolute;
  inset-inline: -0.15em;
  inset-block-end: -0.18em;
  height: 0.42em;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M2 13 C 40 4, 70 17, 104 9 S 168 3, 198 12' fill='none' stroke='%23ffb000' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ---------- hover footnote annotations ---------- */
.note {
  position: relative;
  border-bottom: 1px dotted var(--secondary);
  cursor: help;
}
.note::after {
  content: attr(data-note);
  position: absolute;
  inset-block-end: calc(100% + 0.6rem);
  inset-inline-start: 0;
  width: max-content;
  max-width: min(280px, 70vw);
  padding: 0.5rem 0.7rem;
  background: var(--paper);
  color: #1c1c1c;
  font-family: var(--font-hand);
  font-size: 1.05rem;
  line-height: 1.3;
  border: 1px solid #1c1c1c;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  z-index: 5;
}
.note:hover::after,
.note:focus-visible::after { opacity: 1; transform: translateY(0); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.4rem;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--ink);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn-primary { background: var(--ink); color: #0d0d0d; }
.btn-primary:hover { background: var(--secondary); border-color: var(--secondary); color: #0d0d0d; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #0d0d0d; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }

/* ---------- section scaffolding ---------- */
section { padding-block: clamp(3.5rem, 7vw, 7rem); }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-sub { color: var(--ink-soft); font-size: 0.92rem; }

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 1.2rem;
}

/* ---------- hero ---------- */
.hero {
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(57, 255, 20, 0.035) 0 1px,
      transparent 1px 4px
    ),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.lede { font-size: 1.05rem; color: var(--ink-soft); max-width: 54ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 1.8rem 0 2.4rem; }

.hero-facts {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}
.hero-facts li { display: flex; flex-direction: column; gap: 0.15rem; }
.hero-facts strong { font-size: 1.3rem; color: var(--ink); }
.hero-facts span { font-size: 0.78rem; color: var(--secondary); letter-spacing: 0.04em; }

.hero-figure { margin: 0; }
.hero-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line-soft);
  filter: saturate(0.85) contrast(1.05);
}
.hero-figure figcaption {
  margin-top: 0.7rem;
  font-size: 0.76rem;
  color: var(--secondary);
  letter-spacing: 0.03em;
}

/* ---------- services (menu-first) ---------- */
.services { background: var(--bg-2); }

.menu { display: grid; gap: clamp(2rem, 4vw, 3rem); }

.menu-block h3 {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.5rem;
  margin-bottom: 1.4rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 0.9rem 0;
  border-bottom: 1px dotted var(--line-soft);
}
.item:last-child { border-bottom: none; }
.item-main h4 { color: var(--ink); }
.item-main p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-soft);
  max-width: 58ch;
}
.item-price {
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  text-align: right;
}

/* ---------- interventions ---------- */
.interventions { background: var(--bg-3); }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.step {
  border: 1px solid var(--line-soft);
  border-top: 3px solid var(--secondary);
  padding: 1.4rem 1.3rem;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
}
.step-num {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--secondary);
  margin-bottom: 0.7rem;
}
.step h3 { font-size: 1.05rem; }
.step p { margin: 0; font-size: 0.86rem; color: var(--ink-soft); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}
.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line-soft);
  filter: saturate(0.85) contrast(1.05);
}
.gallery figcaption {
  margin-top: 0.6rem;
  font-size: 0.76rem;
  color: var(--secondary);
}

/* ---------- infos / footer cards ---------- */
.infos { background: var(--bg); }

.footer-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 3vw, 2rem);
}
.card {
  border: 1px solid var(--line-soft);
  padding: 1.5rem 1.4rem;
  background: var(--bg-2);
}
.card h3 {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--secondary);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}
.card address { font-style: normal; line-height: 1.8; margin-bottom: 0.9rem; }
.card address strong { color: var(--ink); }
.card-note { font-size: 0.82rem; color: var(--ink-soft); }
.card-links { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0; }
.card-links a { font-size: 0.85rem; font-weight: 600; }

.hours { list-style: none; margin: 0 0 1rem; padding: 0; }
.hours li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px dotted var(--line);
  font-size: 0.86rem;
}
.hours li:last-child { border-bottom: none; }
.hours li span:last-child { color: var(--ink); font-weight: 600; }

/* ---------- closing ---------- */
.closing {
  background: var(--ink);
  color: #0d0d0d;
  text-align: center;
}
.closing blockquote { margin: 0 auto clamp(2rem, 4vw, 3rem); max-width: 46ch; }
.closing blockquote p {
  font-family: var(--font-hand);
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.3rem);
  line-height: 1.3;
  margin-bottom: 0.8rem;
}
.closing cite {
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}
.closing .btn-primary {
  background: #0d0d0d;
  border-color: #0d0d0d;
  color: var(--ink);
}
.closing .btn-primary:hover { background: var(--paper); border-color: var(--paper); color: #0d0d0d; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--bg-3);
  border-top: 1px solid var(--line);
  padding-block: 2rem;
}
.footer-inner { display: grid; gap: 0.9rem; justify-items: start; }
.footer-line { margin: 0; font-size: 0.82rem; color: var(--ink-soft); }

.claim-banner {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.4rem 0.7rem;
  background: rgba(255, 176, 0, 0.1);
  border: 1px solid rgba(255, 176, 0, 0.35);
  color: var(--secondary);
  text-decoration: none;
}
.claim-banner:hover { background: rgba(255, 176, 0, 0.2); color: var(--secondary); }

.muted.attribution { margin: 0; font-size: 0.72rem; }
.muted.attribution a { color: var(--line-soft); text-decoration: none; }
.muted.attribution a:hover { color: var(--ink-soft); text-decoration: underline; }

/* ---------- responsive ---------- */
@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
}

@media (max-width: 859px) {
  .footer-cards { grid-template-columns: 1fr; }
  .topnav { display: none; }
  .brand-text em { font-size: 0.64rem; }
}

@media (max-width: 520px) {
  .item { grid-template-columns: 1fr; gap: 0.25rem; }
  .item-price { text-align: left; }
  .call-btn { width: 100%; justify-content: center; }
  .brand { margin-inline-end: 0; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .progress span { transform: scaleX(1); }
  .note::after { transition: none; }
}
