/* ============================================================
   Agua — plombier chauffagiste pro gaz, Nice
   Palette : papier chaud + encre dessinée à la main
   ============================================================ */

:root {
  --bg:        #f8f2e2;
  --bg-2:      #f1e7d0;
  --bg-3:      #e7d9ba;
  --ink:       #0a0a0a;
  --ink-soft:  #3a352c;
  --ink-faint: #6d6555;
  --rule:      #0a0a0a;
  --accent:    #b8451f;   /* terre cuite / cuivre */
  --accent-2:  #1f5c4a;   /* vert atelier */
  --paper-shadow: rgba(10, 10, 10, .10);

  --section-a: var(--bg);
  --section-b: var(--bg-2);
  --section-c: var(--bg-3);

  --maxw: 1120px;
  --pad: clamp(1.25rem, 5vw, 3rem);
  --radius: 2px;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

html[data-theme="dark"] {
  --bg:        #14120e;
  --bg-2:      #1c1913;
  --bg-3:      #241f17;
  --ink:       #f6efe0;
  --ink-soft:  #ddd3bf;
  --ink-faint: #a89c85;
  --rule:      #f6efe0;
  --accent:    #e07a4a;
  --accent-2:  #6fbfa2;
  --paper-shadow: rgba(0, 0, 0, .5);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg:        #14120e;
    --bg-2:      #1c1913;
    --bg-3:      #241f17;
    --ink:       #f6efe0;
    --ink-soft:  #ddd3bf;
    --ink-faint: #a89c85;
    --rule:      #f6efe0;
    --accent:    #e07a4a;
    --accent-2:  #6fbfa2;
    --paper-shadow: rgba(0, 0, 0, .5);
  }
}

*, *::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-body);
  font-size: clamp(1rem, .96rem + .2vw, 1.075rem);
  line-height: 1.65;
  font-variation-settings: "opsz" 14;
  text-wrap: pretty;
  overflow-x: hidden;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 96, "SOFT" 40, "WONK" 1;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 .6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 1.4rem + 4.4vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.9rem); font-weight: 650; }
h3 { font-size: clamp(1.15rem, 1rem + .7vw, 1.5rem); font-weight: 650; }
h4 { font-size: 1.02rem; font-weight: 600; margin-bottom: .15em; letter-spacing: -0.005em; }

p { margin: 0 0 1rem; }

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

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg);
  padding: .75rem 1rem; z-index: 999;
}
.skip:focus { left: 1rem; top: 1rem; }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ---------- Scribble underline (typography axis) ---------- */
mark.scribble {
  background: none;
  color: inherit;
  position: relative;
  white-space: nowrap;
  padding-bottom: .12em;
}
mark.scribble::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -0.06em;
  height: .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 30 4, 58 17, 88 9 S 150 3, 198 11' fill='none' stroke='%23b8451f' stroke-width='3.2' stroke-linecap='round'/%3E%3Cpath d='M6 17 C 44 11, 92 19, 140 13 S 176 10, 194 15' fill='none' stroke='%23b8451f' stroke-width='1.6' stroke-linecap='round' opacity='.55'/%3E%3C/svg%3E");
  pointer-events: none;
}
html[data-theme="dark"] mark.scribble::after {
  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 30 4, 58 17, 88 9 S 150 3, 198 11' fill='none' stroke='%23e07a4a' stroke-width='3.2' stroke-linecap='round'/%3E%3Cpath d='M6 17 C 44 11, 92 19, 140 13 S 176 10, 194 15' fill='none' stroke='%23e07a4a' stroke-width='1.6' stroke-linecap='round' opacity='.55'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) mark.scribble::after {
    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 30 4, 58 17, 88 9 S 150 3, 198 11' fill='none' stroke='%23e07a4a' stroke-width='3.2' stroke-linecap='round'/%3E%3Cpath d='M6 17 C 44 11, 92 19, 140 13 S 176 10, 194 15' fill='none' stroke='%23e07a4a' stroke-width='1.6' stroke-linecap='round' opacity='.55'/%3E%3C/svg%3E");
  }
}

/* ---------- Signature : annotation au survol ---------- */
.note {
  position: relative;
  border-bottom: 1.5px dotted var(--accent);
  cursor: help;
  font-style: normal;
}
.note::after {
  content: attr(data-note);
  position: absolute;
  left: 50%;
  bottom: calc(100% + .55rem);
  transform: translate(-50%, .35rem);
  width: max-content;
  max-width: min(19rem, 70vw);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: .72rem;
  line-height: 1.45;
  letter-spacing: 0;
  padding: .5rem .65rem;
  border-radius: var(--radius);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 20;
  white-space: normal;
  text-align: left;
}
.note::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + .28rem);
  transform: translateX(-50%) rotate(45deg);
  width: .5rem; height: .5rem;
  background: var(--ink);
  opacity: 0;
  transition: opacity .18s ease;
  z-index: 21;
}
.note:hover::after,
.note:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.note:hover::before,
.note:focus-visible::before { opacity: 1; }

/* ---------- Header ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(9px);
  border-bottom: 2px solid var(--rule);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
  padding-block: .55rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  margin-right: auto;
}
.brand-mark { width: 34px; height: 34px; color: var(--accent); flex: none; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.brand-text em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.nav { display: flex; align-items: center; gap: 1.35rem; }
.nav a {
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  padding: .35rem 0;
  border-bottom: 1.5px solid transparent;
}
.nav a:hover { border-bottom-color: var(--accent); }
.nav-call {
  font-family: var(--font-mono);
  font-size: .82rem !important;
  border: 2px solid var(--rule) !important;
  border-radius: 999px;
  padding: .5rem .9rem !important;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-call:hover { background: var(--ink); color: var(--bg); }

.theme-toggle {
  flex: none;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: transparent;
  border: 2px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
}
.theme-toggle:hover { background: var(--ink); color: var(--bg); }
.theme-icon {
  width: 15px; height: 15px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: inset -4px -3px 0 0 var(--bg);
}
html[data-theme="dark"] .theme-icon { box-shadow: none; }

/* ---------- Progress bar (motion axis) ---------- */
.progress {
  height: 4px;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
@supports (animation-timeline: scroll()) {
  .progress span {
    animation: fill linear both;
    animation-timeline: scroll(root block);
  }
}
@keyframes fill { to { transform: scaleX(1); } }

/* ---------- Hero ---------- */
.hero { background: var(--section-a); padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(3rem, 7vw, 6rem); }
.hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; }
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 46ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin: 1.75rem 0 1.5rem; }

.btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: .1rem;
  min-height: 52px;
  padding: .7rem 1.35rem;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  line-height: 1.2;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn-ink {
  background: var(--ink);
  color: var(--bg);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 0 var(--accent);
}
.btn-ink:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 0 var(--accent); }
.btn-label { font-size: 1.02rem; }
.btn-sub { font-family: var(--font-mono); font-size: .7rem; opacity: .78; font-weight: 400; }
.btn-ghost {
  border: 2px solid var(--rule);
  color: var(--ink);
  align-items: center;
  flex-direction: row;
}
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-block { width: 100%; align-items: center; text-align: center; }

.trust {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  font-size: .85rem;
  color: var(--ink-faint);
}
.trust li { position: relative; padding-left: 1rem; }
.trust li::before {
  content: "";
  position: absolute; left: 0; top: .62em;
  width: .42rem; height: .42rem;
  background: var(--accent);
  border-radius: 50%;
}
.trust strong { color: var(--ink); }

.hero-figure, .method-figure, .zone-figure { margin: 0; }
.hero-figure img, .method-figure img, .zone-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 2px solid var(--rule);
  box-shadow: 8px 8px 0 0 var(--paper-shadow);
}
.hero-figure img { aspect-ratio: 5 / 4; }
figcaption {
  font-size: .82rem;
  color: var(--ink-faint);
  margin-top: .85rem;
  max-width: 44ch;
}

/* ---------- Strip ---------- */
.strip { background: var(--accent-2); color: #f8f2e2; padding: 1.6rem 0; }
.strip-inner {
  display: grid;
  gap: 1rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.strip p { margin: 0; font-size: .9rem; }
.strip-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
}

/* ---------- Section head ---------- */
.section-head { max-width: 60ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-lede { color: var(--ink-soft); }

/* ---------- Services (menu layout) ---------- */
.services { background: var(--section-b); padding: clamp(3rem, 7vw, 6rem) 0; }
.menu { display: grid; gap: 2rem; }
@media (min-width: 820px) {
  .menu { grid-template-columns: 1fr 1fr; gap: 2.5rem 3.5rem; }
}
.menu-block h3 {
  border-bottom: 2px solid var(--rule);
  padding-bottom: .5rem;
  margin-bottom: 1.1rem;
}
.menu-block h3::before {
  content: "";
  display: inline-block;
  width: .55rem; height: .55rem;
  background: var(--accent);
  margin-right: .55rem;
  transform: translateY(-.08em) rotate(45deg);
}
.item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .35rem 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
}
.item:last-of-type { border-bottom: none; }
.item-main p {
  margin: 0;
  font-size: .88rem;
  color: var(--ink-faint);
  line-height: 1.5;
}
.price {
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  align-self: start;
  padding-top: .2rem;
  color: var(--accent);
}
.menu-foot {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--rule);
  font-size: .9rem;
  color: var(--ink-soft);
  max-width: 70ch;
}

/* ---------- Method ---------- */
.method { background: var(--section-c); padding: clamp(3rem, 7vw, 6rem) 0; }
.method-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
@media (min-width: 900px) {
  .method-grid { grid-template-columns: 1.1fr .9fr; }
}
.method-copy p { color: var(--ink-soft); max-width: 58ch; }

/* ---------- Terms ---------- */
.terms { background: var(--section-a); padding: clamp(3rem, 7vw, 6rem) 0; }
.terms-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.term {
  border: 2px solid var(--rule);
  border-width: 2px 1px 1px 2px;
  padding: 1.35rem 1.35rem 1.1rem;
  background: var(--bg-2);
}
.term h3 { font-size: 1.08rem; margin-bottom: .4rem; }
.term p { margin: 0; font-size: .9rem; color: var(--ink-soft); }

/* ---------- Zone ---------- */
.zone { background: var(--section-b); padding: clamp(3rem, 7vw, 6rem) 0; }
.zone-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
@media (min-width: 900px) {
  .zone-grid { grid-template-columns: .95fr 1.05fr; }
}
.zone-copy > p { color: var(--ink-soft); max-width: 52ch; }
.zone-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: .55rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  font-size: .92rem;
}
.zone-list li {
  padding-left: 1.35rem;
  position: relative;
  color: var(--ink-soft);
}
.zone-list li::before {
  content: "→";
  position: absolute; left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* ---------- Cards ---------- */
.cards { background: var(--section-c); padding: clamp(3rem, 7vw, 6rem) 0; }
.footer-cards {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}
.card {
  background: var(--bg);
  border: 2px solid var(--rule);
  padding: 1.6rem 1.5rem;
  display: flex;
  flex-direction: column;
}
.card h3 { font-size: 1.15rem; }
.card-note { font-size: .85rem; color: var(--ink-faint); margin-bottom: 0; }
.card-lede { font-size: .92rem; color: var(--ink-soft); }
.card-call { background: var(--bg-2); }
.card-link {
  margin-top: auto;
  padding-top: 1rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  text-decoration: none;
  border-bottom: 1.5px solid var(--accent);
  align-self: flex-start;
}
.card-link:hover { background: var(--accent); color: var(--bg); }

.hours { width: 100%; border-collapse: collapse; font-size: .9rem; margin-bottom: 1rem; }
.hours th, .hours td { text-align: left; padding: .4rem 0; font-weight: 400; }
.hours th { color: var(--ink-soft); }
.hours td { text-align: right; font-family: var(--font-mono); font-size: .82rem; }
.hours tr + tr th, .hours tr + tr td { border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); }
.hours .closed td { color: var(--accent); font-weight: 600; }

address { font-style: normal; line-height: 1.6; margin-bottom: 1rem; }

/* ---------- Quote ---------- */
.quote { background: var(--accent); color: #fdf6e8; padding: clamp(3rem, 7vw, 5.5rem) 0; }
.quote blockquote { margin: 0; max-width: 34ch; }
.quote p {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2.4rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: .75rem;
}
.quote footer {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .85;
}

/* ---------- Footer ---------- */
.site-foot {
  background: var(--bg);
  border-top: 2px solid var(--rule);
  padding: 2.5rem 0 2rem;
}
.foot-top {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
}
.foot-brand { font-family: var(--font-display); font-weight: 650; margin: 0; }
.foot-meta { margin: 0; font-size: .85rem; color: var(--ink-faint); }
.foot-meta a { text-decoration: none; border-bottom: 1.5px solid var(--accent); }

.claim-banner {
  display: inline-block;
  margin: 1.5rem 0 1rem;
  padding: .5rem .8rem;
  font-size: .78rem;
  text-decoration: none;
  color: var(--ink-soft);
  background: var(--bg-2);
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: var(--radius);
}
.claim-banner:hover { background: var(--bg-3); color: var(--ink); }

.muted { font-size: .78rem; color: var(--ink-faint); margin: 0; }
.muted a { color: inherit; }

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

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  .nav { gap: .9rem; }
  .nav a:not(.nav-call) { display: none; }
  .item { grid-template-columns: 1fr; }
  .price { padding-top: 0; }
  .note::after { left: 0; transform: translate(0, .35rem); }
  .note::before { left: 1rem; }
  .note:hover::after, .note:focus-visible::after { transform: translate(0, 0); }
}
