/* ============================================================
   ANNEXE NDIAMBOUR — mécanicien mobile, Dakar
   Palette : warm earth editorial
   ============================================================ */

:root {
  --bg: #f5efe4;
  --bg-2: #efe6d6;
  --ink: #2b1e14;
  --ink-soft: #5a4636;
  --accent: #c25a37;
  --accent-deep: #9c4326;
  --secondary: #6a7a4a;
  --line: rgba(43, 30, 20, 0.16);
  --line-strong: rgba(43, 30, 20, 0.32);
  --paper: #fbf7ef;
  --shadow: 0 1px 2px rgba(43, 30, 20, 0.06), 0 12px 32px -18px rgba(43, 30, 20, 0.35);

  --serif: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --measure: 68ch;
  --radius: 3px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17110c;
    --bg-2: #1e1710;
    --ink: #f2e9dc;
    --ink-soft: #c3b3a1;
    --accent: #e07a52;
    --accent-deep: #f0946e;
    --secondary: #9aab74;
    --line: rgba(242, 233, 220, 0.16);
    --line-strong: rgba(242, 233, 220, 0.34);
    --paper: #211a13;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 34px -18px rgba(0, 0, 0, 0.8);
  }
}

/* Manual theme override (header switcher) */
html[data-theme="dark"] {
  --bg: #17110c;
  --bg-2: #1e1710;
  --ink: #f2e9dc;
  --ink-soft: #c3b3a1;
  --accent: #e07a52;
  --accent-deep: #f0946e;
  --secondary: #9aab74;
  --line: rgba(242, 233, 220, 0.16);
  --line-strong: rgba(242, 233, 220, 0.34);
  --paper: #211a13;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 34px -18px rgba(0, 0, 0, 0.8);
}

html[data-theme="light"] {
  --bg: #f5efe4;
  --bg-2: #efe6d6;
  --ink: #2b1e14;
  --ink-soft: #5a4636;
  --accent: #c25a37;
  --accent-deep: #9c4326;
  --secondary: #6a7a4a;
  --line: rgba(43, 30, 20, 0.16);
  --line-strong: rgba(43, 30, 20, 0.32);
  --paper: #fbf7ef;
  --shadow: 0 1px 2px rgba(43, 30, 20, 0.06), 0 12px 32px -18px rgba(43, 30, 20, 0.35);
}

/* ---------- reset ---------- */

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

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; max-width: var(--measure); text-wrap: pretty; }

a { color: var(--accent-deep); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

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

/* ---------- animated noise field ---------- */

.noise-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: multiply;
}

html[data-theme="dark"] .noise-layer { mix-blend-mode: screen; opacity: 0.22; }

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .noise-layer { mix-blend-mode: screen; opacity: 0.22; }
}

.noise-layer svg { width: 100%; height: 100%; }

/* ---------- shell ---------- */

.shell {
  position: relative;
  z-index: 1;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.1;
}

.brand strong {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand span {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover { background: var(--bg-2); border-color: var(--accent); }

.call-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.55rem 1.05rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.call-btn:hover { background: var(--accent-deep); color: #fff; transform: translateY(-1px); }

/* ---------- diagonal split hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  overflow: hidden;
}

.hero-top {
  background: var(--bg);
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(3rem, 9vw, 6rem);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 5vw));
  margin-bottom: -4.9vw;
}

.hero-bottom {
  background: var(--ink);
  color: var(--bg);
  padding-block: clamp(4.5rem, 11vw, 7.5rem) clamp(2.5rem, 6vw, 4rem);
  clip-path: polygon(0 5vw, 100% 0, 100% 100%, 0 100%);
}

.hero-bottom a { color: var(--bg); }

.hero-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: end;
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 1.1rem;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--secondary);
}

.hero h1 {
  font-size: clamp(2.6rem, 8.5vw, 5.6rem);
  margin-bottom: 0.35em;
  font-variation-settings: "wght" 300, "SOFT" 20, "WONK" 1;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "wght" 500, "SOFT" 60, "WONK" 1;
}

.hero-lede {
  font-size: clamp(1.05rem, 2.2vw, 1.22rem);
  color: var(--ink-soft);
  max-width: 46ch;
}

.hero-figure {
  margin: 0;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  padding: 0.6rem;
  box-shadow: var(--shadow);
  rotate: -1.2deg;
}

.hero-figure img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.hero-figure figcaption {
  font-size: 0.78rem;
  color: var(--ink-soft);
  padding-top: 0.55rem;
  letter-spacing: 0.02em;
}

.hero-bottom .hero-figure { rotate: 1deg; border-color: rgba(245, 239, 228, 0.3); background: transparent; }
.hero-bottom .hero-figure figcaption { color: rgba(245, 239, 228, 0.72); }

.hero-bottom h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  max-width: 22ch;
}

.hero-bottom p { color: rgba(245, 239, 228, 0.82); }

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.7rem 1.3rem;
  border: 1px solid rgba(245, 239, 228, 0.45);
  border-radius: var(--radius);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-ghost:hover { background: rgba(245, 239, 228, 0.12); border-color: var(--bg); color: var(--bg); }

.btn-solid {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.7rem 1.3rem;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color 0.2s ease;
}

.btn-solid:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }

/* ---------- kinetic hero weight shift ---------- */

@keyframes weigh {
  from { font-variation-settings: "wght" 200, "SOFT" 10, "WONK" 1; }
  to   { font-variation-settings: "wght" 800, "SOFT" 40, "WONK" 1; }
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero h1 {
      animation: weigh linear both;
      animation-timeline: scroll(root);
      animation-range: 0 30vh;
    }
  }
}

/* ---------- generic section ---------- */

.section { padding-block: clamp(3rem, 8vw, 6rem); }

.section-head {
  display: grid;
  gap: 0.4rem;
  margin-bottom: clamp(1.8rem, 4vw, 3rem);
}

.section-head h2 {
  font-size: clamp(1.8rem, 4.6vw, 3rem);
  margin: 0;
}

.section-head p { color: var(--ink-soft); margin: 0; }

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* ---------- expandable index (signature) ---------- */

.index-list {
  border-top: 1px solid var(--line-strong);
}

.index-item {
  border-bottom: 1px solid var(--line);
}

.index-item summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 1rem;
  padding: clamp(1rem, 2.6vw, 1.5rem) 0;
  min-height: 44px;
}

.index-item summary::-webkit-details-marker { display: none; }

.index-num {
  font-family: var(--serif);
  font-size: 0.82rem;
  color: var(--secondary);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.index-title {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.8vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.2s ease, transform 0.25s ease;
}

.index-item summary:hover .index-title { color: var(--accent); transform: translateX(4px); }

.index-marker {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  line-height: 1;
  color: var(--ink-soft);
  transition: transform 0.25s ease, background-color 0.2s ease, color 0.2s ease;
}

.index-item[open] .index-marker {
  transform: rotate(45deg);
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.index-item[open] .index-title { color: var(--accent); }

.index-body {
  display: grid;
  gap: 1.2rem;
  padding-bottom: clamp(1.4rem, 3vw, 2.2rem);
  animation: unfold 0.35s ease both;
}

@media (min-width: 820px) {
  .index-body { grid-template-columns: 1.05fr 0.95fr; align-items: start; }
}

@keyframes unfold {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.index-body p { color: var(--ink-soft); margin-bottom: 0.9rem; }

.index-body figure { margin: 0; }

.index-body img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 100%;
  border: 1px solid var(--line);
}

.index-body figcaption {
  font-size: 0.76rem;
  color: var(--ink-soft);
  padding-top: 0.5rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.4rem;
}

.tag {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
}

/* ---------- split band (services / approach) ---------- */

.band {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

.band-inner {
  display: grid;
  gap: clamp(1.6rem, 4vw, 3.4rem);
}

@media (min-width: 880px) {
  .band-inner { grid-template-columns: 0.9fr 1.1fr; }
}

.band h2 { font-size: clamp(1.7rem, 4.2vw, 2.6rem); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.4rem 1.6rem;
  margin-top: 1.6rem;
}

.stat {
  border-top: 2px solid var(--accent);
  padding-top: 0.7rem;
}

.stat b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}

.stat span {
  font-size: 0.82rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.check-list li {
  position: relative;
  padding-left: 1.7rem;
  color: var(--ink-soft);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 9px;
  height: 9px;
  background: var(--secondary);
  border-radius: 50%;
}

/* ---------- zone d'intervention ---------- */

.zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.zone {
  background: var(--bg);
  padding: 1.1rem 1.2rem;
}

.zone b {
  display: block;
  font-family: var(--serif);
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.zone span { font-size: 0.84rem; color: var(--ink-soft); }

/* ---------- contact / infos ---------- */

.contact {
  background: var(--ink);
  color: var(--bg);
}

.contact a { color: var(--bg); }

.contact-grid {
  display: grid;
  gap: clamp(1.8rem, 4vw, 3.5rem);
}

@media (min-width: 880px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

.contact h2 { font-size: clamp(1.8rem, 4.6vw, 2.9rem); }

.contact p { color: rgba(245, 239, 228, 0.8); }

.phone-big {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 6vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--bg);
  border-bottom: 3px solid var(--accent);
  padding-bottom: 0.1em;
  margin: 0.4rem 0 1.2rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.phone-big:hover { color: var(--accent); border-color: var(--bg); }

.hours {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(245, 239, 228, 0.22);
}

.hours li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(245, 239, 228, 0.22);
  font-size: 0.95rem;
}

.hours li span:first-child { color: rgba(245, 239, 228, 0.72); }

.hours li.closed span:last-child { color: var(--accent); }

.hours li.today {
  background: rgba(245, 239, 228, 0.07);
  padding-inline: 0.6rem;
  margin-inline: -0.6rem;
  font-weight: 600;
}

.hours li.today span:first-child { color: var(--bg); }

.addr-block {
  font-style: normal;
  font-size: 1.02rem;
  color: rgba(245, 239, 228, 0.86);
  margin-bottom: 1.2rem;
}

.note {
  font-size: 0.86rem;
  color: rgba(245, 239, 228, 0.62);
  border-left: 2px solid var(--accent);
  padding-left: 0.9rem;
  max-width: 42ch;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding-block: clamp(2rem, 5vw, 3rem);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.footer-grid {
  display: grid;
  gap: 1.2rem;
}

@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1fr auto; align-items: end; }
}

.footer-brand {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  font-weight: 700;
}

.claim-banner {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.45rem 0.8rem;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  text-decoration: none;
  margin-bottom: 0.9rem;
}

.claim-banner:hover { color: var(--accent-deep); border-color: var(--accent); }

.attribution {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.attribution a { color: var(--ink-soft); }

/* ---------- motion safety ---------- */

@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;
  }
  .index-body { animation: none; }
  .hero-figure { rotate: 0deg; }
}
