/* =========================================================
   Pro Mecanique Auto — Thiès
   Palette: noir / rouge / bleu / jaune, une couleur par section
   ========================================================= */

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

  --ink-on-dark: #f6f4ef;
  --ink-on-red: #fff6f4;
  --ink-on-blue: #eef4ff;
  --ink-on-yellow: #0a0a0a;

  --paper: #f6f4ef;
  --paper-ink: #14140f;
  --paper-muted: #5c5a52;
  --line: rgba(10, 10, 10, 0.16);
  --line-dark: rgba(246, 244, 239, 0.22);

  --accent: #e10600;

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

  --pad: clamp(1.25rem, 5vw, 5rem);
  --gap: clamp(0.75rem, 1.6vw, 1.25rem);
  --radius: 2px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.55vw + 0.9rem, 1.125rem);
  line-height: 1.6;
  color: var(--paper-ink);
  background-color: var(--paper);
  /* patterned SVG tile — dot matrix */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'><circle cx='2' cy='2' r='1.1' fill='%2314140f' fill-opacity='0.13'/></svg>");
  background-size: 22px 22px;
  text-wrap: pretty;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; height: auto; }
h1, h2, h3 { margin: 0; line-height: 0.98; font-weight: 800; letter-spacing: -0.02em; }
p { margin: 0 0 1rem; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--bg-4);
  outline-offset: 3px;
}
.sec--jaune :focus-visible { outline-color: var(--bg-1); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.muted { color: var(--paper-muted); font-size: 0.85rem; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--bg-4); color: #0a0a0a; padding: 0.75rem 1rem;
  font-weight: 700; text-decoration: none;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 10, 0.94);
  color: var(--ink-on-dark);
  border-bottom: 1px solid var(--line-dark);
  backdrop-filter: blur(8px);
}
.topbar__inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0.6rem var(--pad);
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.brand__mark {
  display: grid; place-items: center;
  width: 40px; height: 40px; flex: 0 0 40px;
  background: var(--bg-2); color: #fff;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-size: 0.98rem; letter-spacing: -0.01em; }
.brand__text em {
  font-style: normal; font-family: var(--font-mono);
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: rgba(246, 244, 239, 0.62);
}
.topnav { display: flex; gap: 1.1rem; margin-left: auto; }
.topnav a {
  text-decoration: none; font-size: 0.86rem; font-weight: 600;
  padding: 0.55rem 0.15rem; border-bottom: 2px solid transparent;
}
.topnav a:hover { border-bottom-color: var(--bg-4); }
.topbar__actions { display: flex; align-items: center; gap: 0.6rem; }

.theme-toggle {
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: 44px; padding: 0 0.75rem;
  background: transparent; color: inherit;
  border: 1px solid var(--line-dark); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  cursor: pointer;
}
.theme-toggle:hover { background: rgba(246, 244, 239, 0.1); }
.theme-toggle__icon {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg-4);
  box-shadow: inset -4px -2px 0 0 rgba(10, 10, 10, 0.85);
}
[data-theme="dark"] .theme-toggle__icon {
  box-shadow: none; background: var(--bg-4);
}

.callbtn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: 44px; padding: 0 1rem;
  background: var(--bg-2); color: #fff;
  text-decoration: none; font-weight: 700; font-size: 0.86rem;
  border-radius: var(--radius);
}
.callbtn:hover { background: #c00500; }

/* ---------- section shell ---------- */
.sec { position: relative; padding: clamp(3rem, 8vw, 7rem) 0; }
.sec__inner { max-width: 1400px; margin: 0 auto; padding: 0 var(--pad); }

.sec--noir  { background-color: var(--bg-1); color: var(--ink-on-dark); }
.sec--rouge { background-color: var(--bg-2); color: var(--ink-on-red); }
.sec--bleu  { background-color: var(--bg-3); color: var(--ink-on-blue); }
.sec--jaune { background-color: var(--bg-4); color: var(--ink-on-yellow); }

.sec--noir  { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'><path d='M0 25.5H26M25.5 0V26' stroke='%23f6f4ef' stroke-opacity='0.07' stroke-width='1'/></svg>"); background-size: 26px 26px; }
.sec--rouge { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'><path d='M0 18L18 0' stroke='%23ffffff' stroke-opacity='0.09' stroke-width='1.4'/></svg>"); background-size: 18px 18px; }
.sec--bleu  { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><circle cx='12' cy='12' r='1.2' fill='%23eef4ff' fill-opacity='0.16'/></svg>"); background-size: 24px 24px; }
.sec--jaune { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><path d='M0 20L20 0' stroke='%230a0a0a' stroke-opacity='0.11' stroke-width='1.2'/></svg>"); background-size: 20px 20px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.14em;
  margin: 0 0 1.5rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid currentColor;
  border-radius: 100px;
  opacity: 0.9;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ---------- stacked headline ---------- */
.stacked {
  font-size: clamp(2.4rem, 9vw, 6.5rem);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.stacked span { display: block; }
.stacked span:nth-child(2) { margin-left: 2em; }
.stacked span:nth-child(3) { margin-left: -0.6em; }
.stacked--sm { font-size: clamp(1.9rem, 5.6vw, 4rem); }
.stacked--sm span:nth-child(2) { margin-left: 1.4em; }
.stacked--sm span:nth-child(3) { margin-left: -0.35em; }

/* ---------- broken bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--gap);
  align-items: start;
}
.cell { min-width: 0; }

.bento--hero .cell--lead      { grid-column: 1 / 4; }
.bento--hero .cell--photo     { grid-column: 4 / 7; }
.bento--hero .cell--break     { margin-top: clamp(1.5rem, 4vw, 3.5rem); }
.bento--hero .cell--stat      { grid-column: 1 / 3; }
.bento--hero .cell--stat-alt  { grid-column: 3 / 5; }
.bento--hero .cell--blank     { grid-column: 5 / 7; min-height: 1px; }

.bento--services .cell--svc   { grid-column: span 2; }
.bento--services .cell--break { margin-top: clamp(1.25rem, 3vw, 2.5rem); }
.bento--services .cell--blank { min-height: 1px; }

.bento--zone .cell--zone-lead { grid-column: 1 / 4; }
.bento--zone .cell--photo-tall{ grid-column: 4 / 7; }
.bento--zone .cell--quote     { grid-column: 2 / 6; margin-top: clamp(1.5rem, 4vw, 3rem); }

.bento--info .cell--hours     { grid-column: 1 / 4; }
.bento--info .cell--contact   { grid-column: 4 / 7; margin-top: clamp(1.25rem, 3vw, 2.5rem); }
.bento--info .cell--blank     { grid-column: 1 / 3; min-height: 1px; }

/* ---------- hero bits ---------- */
.lede { font-size: clamp(1.05rem, 1.1vw + 0.85rem, 1.35rem); line-height: 1.5; max-width: 46ch; }
.lede--small { font-size: 1rem; line-height: 1.6; opacity: 0.82; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 1.4rem;
  font-weight: 700; font-size: 0.95rem; text-decoration: none;
  border-radius: var(--radius); border: 2px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--bg-4); color: #0a0a0a; }
.btn--primary:hover { background: #e4f000; }
.btn--ghost { border-color: currentColor; color: inherit; }
.btn--ghost:hover { background: rgba(246, 244, 239, 0.12); }
.btn--dark { background: #0a0a0a; color: var(--bg-4); margin-top: 0.5rem; }
.btn--dark:hover { background: #262626; }

.cell--photo { margin: 0; }
.cell--photo img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius);
  filter: saturate(0.92) contrast(1.05);
}
.cell--photo-tall img { aspect-ratio: 3 / 4; }
.cell--photo figcaption {
  font-family: var(--font-mono); font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  opacity: 0.7; margin-top: 0.6rem;
}

.cell--stat {
  border-top: 3px solid currentColor;
  padding-top: 0.9rem;
  margin-top: clamp(1.5rem, 4vw, 3rem);
}
.stat__num {
  font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800;
  line-height: 1; margin: 0 0 0.35rem; letter-spacing: -0.03em;
}
.stat__label { font-size: 0.9rem; opacity: 0.8; margin: 0; max-width: 30ch; }

/* ---------- drag band ---------- */
.bandwrap {
  background: var(--paper);
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.bandwrap__head {
  max-width: 1400px; margin: 0 auto 1.5rem;
  padding: 0 var(--pad);
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.bandwrap__head h2 { font-size: clamp(1.5rem, 3.4vw, 2.4rem); }
.bandwrap__hint {
  font-family: var(--font-mono); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--paper-muted); margin: 0;
}
.band {
  overflow-x: auto; overflow-y: hidden;
  cursor: grab;
  padding: 0 var(--pad) 1rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.band.is-dragging { cursor: grabbing; scroll-behavior: auto; }
.band.is-dragging * { user-select: none; }
.band__track { display: flex; gap: var(--gap); width: max-content; }
.band__item {
  margin: 0; flex: 0 0 auto;
  width: clamp(220px, 30vw, 380px);
}
.band__item img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius);
  filter: saturate(0.92) contrast(1.05);
  pointer-events: none;
}
.band__item figcaption {
  font-family: var(--font-mono); font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--paper-muted); margin-top: 0.55rem;
}

/* ---------- services ---------- */
.cell--svc {
  border-top: 2px solid currentColor;
  padding-top: 1rem;
}
.svc__num {
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.12em; margin: 0 0 0.6rem; opacity: 0.75;
}
.cell--svc h3 { font-size: clamp(1.15rem, 1.6vw, 1.5rem); margin-bottom: 0.6rem; }
.cell--svc p { font-size: 0.95rem; line-height: 1.55; opacity: 0.92; margin: 0; }

.sec__note {
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
  max-width: 62ch;
  font-size: 0.95rem;
  padding-left: 1rem;
  border-left: 3px solid currentColor;
  opacity: 0.92;
}

/* ---------- zone ---------- */
.zone-list { margin: 1.5rem 0; border-top: 1px solid var(--line-dark); }
.zone-list li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line-dark);
  font-size: 0.95rem;
}
.zone-list em {
  font-style: normal; font-family: var(--font-mono);
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em;
  opacity: 0.75; text-align: right;
}

.cell--quote blockquote {
  margin: 0;
  border-left: 4px solid var(--bg-4);
  padding: 0.25rem 0 0.25rem 1.25rem;
}
.cell--quote p {
  font-size: clamp(1.15rem, 2.2vw, 1.7rem);
  line-height: 1.35; font-weight: 600; margin: 0 0 0.75rem;
}
.cell--quote footer {
  font-family: var(--font-mono); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.78;
}

/* ---------- hours + contact ---------- */
.cell--hours h3, .cell--contact h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid currentColor;
}
.hours { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.hours th, .hours td {
  text-align: left; padding: 0.55rem 0;
  border-bottom: 1px solid rgba(10, 10, 10, 0.18);
  font-weight: 400;
}
.hours th { width: 42%; font-weight: 700; }
.hours td { font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.02em; }
.hours__closed td { color: #7a1a12; }
.hours__note { font-size: 0.88rem; margin: 1rem 0 0; opacity: 0.85; }

.contact__lead { font-size: 0.95rem; margin-bottom: 1.25rem; }
.contact__list { margin: 0 0 1.25rem; }
.contact__list dt {
  font-family: var(--font-mono); font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.12em;
  opacity: 0.7; margin-top: 0.9rem;
}
.contact__list dd { margin: 0.2rem 0 0; font-size: 0.98rem; }
.contact__phone {
  font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800;
  text-decoration: none; letter-spacing: -0.02em;
  border-bottom: 3px solid #0a0a0a;
}
.contact__phone:hover { background: #0a0a0a; color: var(--bg-4); }
.contact__note { font-size: 0.88rem; margin: 1rem 0 0; opacity: 0.85; }

/* ---------- footer ---------- */
.foot {
  background: var(--bg-1); color: var(--ink-on-dark);
  padding: clamp(2rem, 5vw, 3.5rem) 0 2rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'><path d='M0 25.5H26M25.5 0V26' stroke='%23f6f4ef' stroke-opacity='0.07' stroke-width='1'/></svg>");
  background-size: 26px 26px;
}
.foot__inner {
  max-width: 1400px; margin: 0 auto; padding: 0 var(--pad);
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem; align-items: start;
}
.foot__brand { font-weight: 800; font-size: 1.1rem; margin: 0 0 0.35rem; }
.foot__line { font-size: 0.88rem; margin: 0 0 0.35rem; opacity: 0.85; }
.foot__line a { text-decoration: none; border-bottom: 1px solid var(--line-dark); }
.foot__col--end { text-align: right; }

.claim-banner {
  display: inline-block;
  font-size: 0.78rem;
  padding: 0.45rem 0.7rem;
  margin-bottom: 0.9rem;
  background: rgba(246, 244, 239, 0.08);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  color: rgba(246, 244, 239, 0.86);
  text-decoration: none;
}
.claim-banner:hover { background: rgba(246, 244, 239, 0.16); color: #fff; }
.attribution { margin: 0; }
.attribution a { color: rgba(246, 244, 239, 0.6); text-decoration: none; }
.attribution a:hover { color: #fff; text-decoration: underline; }
.foot .muted { color: rgba(246, 244, 239, 0.6); }

/* ---------- motion: staggered line reveal ---------- */
@keyframes riseIn {
  from { opacity: 0; translate: 0 20px; }
  to   { opacity: 1; translate: 0 0; }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .sec .eyebrow,
    .sec .stacked span,
    .sec .cell,
    .sec .sec__note,
    .bandwrap__head h2,
    .bandwrap__hint {
      animation: riseIn linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 40%;
    }
    .sec .stacked span:nth-child(2) { animation-range: entry 4% cover 44%; }
    .sec .stacked span:nth-child(3) { animation-range: entry 8% cover 48%; }
    .bento .cell:nth-child(2) { animation-range: entry 3% cover 43%; }
    .bento .cell:nth-child(3) { animation-range: entry 6% cover 46%; }
    .bento .cell:nth-child(4) { animation-range: entry 9% cover 49%; }
    .bento .cell:nth-child(5) { animation-range: entry 12% cover 52%; }
  }
}

/* ---------- dark theme ---------- */
[data-theme="dark"] {
  --paper: #0d0d0d;
  --paper-ink: #f2f0ea;
  --paper-muted: #9d9a91;
  --line: rgba(242, 240, 234, 0.18);
}
[data-theme="dark"] body {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'><circle cx='2' cy='2' r='1.1' fill='%23f2f0ea' fill-opacity='0.12'/></svg>");
}
[data-theme="dark"] .bandwrap { background: #0d0d0d; }
[data-theme="dark"] .bandwrap__hint { color: #9d9a91; }
[data-theme="dark"] .band__item figcaption { color: #9d9a91; }
[data-theme="dark"] .hours th,
[data-theme="dark"] .hours td { border-bottom-color: rgba(10, 10, 10, 0.22); }
[data-theme="dark"] .contact__phone { border-bottom-color: #0a0a0a; }
[data-theme="dark"] .sec--jaune .contact__phone { border-bottom-color: #0a0a0a; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .topnav { order: 3; width: 100%; margin-left: 0; gap: 1.25rem; overflow-x: auto; }
  .topbar__actions { margin-left: auto; }
  .bento { grid-template-columns: repeat(4, 1fr); }
  .bento--hero .cell--lead      { grid-column: 1 / 5; }
  .bento--hero .cell--photo     { grid-column: 1 / 5; }
  .bento--hero .cell--stat      { grid-column: 1 / 3; }
  .bento--hero .cell--stat-alt  { grid-column: 3 / 5; }
  .bento--hero .cell--blank     { display: none; }
  .bento--services .cell--svc   { grid-column: span 2; }
  .bento--zone .cell--zone-lead { grid-column: 1 / 5; }
  .bento--zone .cell--photo-tall{ grid-column: 1 / 5; }
  .bento--zone .cell--quote     { grid-column: 1 / 5; }
  .bento--info .cell--hours     { grid-column: 1 / 5; }
  .bento--info .cell--contact   { grid-column: 1 / 5; }
  .bento--info .cell--blank     { display: none; }
  .foot__inner { grid-template-columns: 1fr 1fr; }
  .foot__col--end { text-align: left; grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .bento--hero .cell--lead,
  .bento--hero .cell--photo,
  .bento--hero .cell--stat,
  .bento--hero .cell--stat-alt,
  .bento--services .cell--svc,
  .bento--zone .cell--zone-lead,
  .bento--zone .cell--photo-tall,
  .bento--zone .cell--quote,
  .bento--info .cell--hours,
  .bento--info .cell--contact { grid-column: 1 / -1; }
  .bento--hero .cell--break,
  .bento--services .cell--break,
  .bento--zone .cell--quote,
  .bento--info .cell--contact { margin-top: 0; }
  .stacked span:nth-child(2) { margin-left: 0.8em; }
  .stacked span:nth-child(3) { margin-left: 0; }
  .stacked--sm span:nth-child(2) { margin-left: 0.6em; }
  .stacked--sm span:nth-child(3) { margin-left: 0; }
  .foot__inner { grid-template-columns: 1fr; }
  .brand__text em { display: none; }
  .callbtn { padding: 0 0.8rem; font-size: 0.8rem; }
}

@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;
  }
  .eyebrow .dot { animation: none; }
}
