/* ==========================================================================
   CARFIX SENEGAL — Dakar
   Palette : imprimé délavé années 70 (moutarde, avocat, ocre, terre brûlée)
   ========================================================================== */

:root {
  --bg:      #efe6d0;
  --bg-2:    #e6dabf;
  --paper:   #f6efdd;
  --ink:     #3a2f1a;
  --ink-soft:#6b5c3c;
  --a:       #a67c00;   /* moutarde */
  --b:       #6b7a3a;   /* avocat   */
  --c:       #c04e1a;   /* terre brûlée */
  --line:    rgba(58, 47, 26, 0.22);
  --line-2:  rgba(58, 47, 26, 0.10);
  --shadow:  0 1px 0 rgba(58,47,26,.08), 0 12px 30px -18px rgba(58,47,26,.45);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --spine-w: 4.5rem;
  --radius: 3px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #1c1811;
    --bg-2:    #241f16;
    --paper:   #262019;
    --ink:     #f0e6cf;
    --ink-soft:#c3b494;
    --a:       #d9a72c;
    --b:       #9aae5c;
    --c:       #e2703a;
    --line:    rgba(240, 230, 207, 0.24);
    --line-2:  rgba(240, 230, 207, 0.12);
    --shadow:  0 1px 0 rgba(0,0,0,.4), 0 14px 34px -20px rgba(0,0,0,.9);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.55vw + 0.9rem, 1.125rem);
  line-height: 1.65;
  font-variation-settings: "opsz" 20;
  text-wrap: pretty;
  overflow-x: hidden;
}

/* Grain : texture de film sur toute la page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}
@media (prefers-color-scheme: dark) {
  body::before { opacity: 0.09; }
}

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

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

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Barre de progression — élément de design, pas de chrome flottant
   -------------------------------------------------------------------------- */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 5px;
  z-index: 60;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--b), var(--a) 55%, var(--c));
  animation: fill linear both;
  animation-timeline: scroll(root block);
}
@keyframes fill { to { transform: scaleX(1); } }

/* --------------------------------------------------------------------------
   Lien d'appel collant (mobile)
   -------------------------------------------------------------------------- */
.skip-phone {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 55;
  display: block;
  padding: 0.85rem 1rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  background: var(--c);
  border-top: 1px solid rgba(0,0,0,.25);
}
.skip-phone:hover { color: var(--paper); background: #a63f12; }

/* --------------------------------------------------------------------------
   Titre vertical — colonne vertébrale du site
   -------------------------------------------------------------------------- */
.spine {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--spine-w);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
}
.spine__title {
  margin: 0;
  writing-mode: vertical-rl;
  font-size: clamp(1.1rem, 1.6vw, 1.5rem);
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  font-variation-settings: "opsz" 100;
}
.spine__sub {
  margin: 0;
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Structure générale
   -------------------------------------------------------------------------- */
main {
  margin-left: var(--spine-w);
  padding-bottom: 4.5rem;
}

section { padding-inline: var(--gutter); }

.section-title {
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: 1.1;
  margin: 0 0 1.25rem;
  font-weight: 600;
  font-variation-settings: "opsz" 90;
  letter-spacing: -0.01em;
}
.section-title::after {
  content: "";
  display: block;
  width: 4.5rem;
  height: 4px;
  margin-top: 0.9rem;
  background: var(--a);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 8% 0%, rgba(166,124,0,.16), transparent 60%),
    radial-gradient(90% 80% at 100% 100%, rgba(107,122,58,.14), transparent 62%);
}

.eyebrow {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--b);
}

.hero__name {
  margin: 0;
  font-size: clamp(2.4rem, 7.5vw, 5.2rem);
  line-height: 0.94;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
  color: var(--ink);
}

.hero__vibe {
  margin: 1.25rem 0 0;
  max-width: 34ch;
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  color: var(--ink-soft);
  font-style: italic;
}

/* Visualiseur — barres animées sous le nom */
.viz {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 46px;
  margin: 1.75rem 0 0;
}
.viz span {
  flex: 1 1 auto;
  min-width: 3px;
  height: 100%;
  background: var(--a);
  transform-origin: 50% 100%;
  transform: scaleY(0.18);
  animation: pulse 1.9s ease-in-out infinite alternate;
}
.viz span:nth-child(3n)  { background: var(--b); }
.viz span:nth-child(4n)  { background: var(--c); }
.viz span:nth-child(1)   { animation-delay: -0.05s; }
.viz span:nth-child(2)   { animation-delay: -0.35s; }
.viz span:nth-child(3)   { animation-delay: -0.62s; }
.viz span:nth-child(4)   { animation-delay: -0.18s; }
.viz span:nth-child(5)   { animation-delay: -0.88s; }
.viz span:nth-child(6)   { animation-delay: -0.44s; }
.viz span:nth-child(7)   { animation-delay: -1.12s; }
.viz span:nth-child(8)   { animation-delay: -0.26s; }
.viz span:nth-child(9)   { animation-delay: -0.74s; }
.viz span:nth-child(10)  { animation-delay: -0.10s; }
.viz span:nth-child(11)  { animation-delay: -1.30s; }
.viz span:nth-child(12)  { animation-delay: -0.52s; }
.viz span:nth-child(13)  { animation-delay: -0.96s; }
.viz span:nth-child(14)  { animation-delay: -0.22s; }
.viz span:nth-child(15)  { animation-delay: -1.05s; }
.viz span:nth-child(16)  { animation-delay: -0.40s; }
.viz span:nth-child(17)  { animation-delay: -0.68s; }
.viz span:nth-child(18)  { animation-delay: -1.22s; }
.viz span:nth-child(19)  { animation-delay: -0.14s; }
.viz span:nth-child(20)  { animation-delay: -0.82s; }
.viz span:nth-child(21)  { animation-delay: -0.30s; }
.viz span:nth-child(22)  { animation-delay: -1.16s; }
.viz span:nth-child(23)  { animation-delay: -0.58s; }
.viz span:nth-child(24)  { animation-delay: -0.06s; }
.viz span:nth-child(25)  { animation-delay: -0.90s; }
.viz span:nth-child(26)  { animation-delay: -0.48s; }
.viz span:nth-child(27)  { animation-delay: -1.26s; }
.viz span:nth-child(28)  { animation-delay: -0.34s; }

@keyframes pulse {
  0%   { transform: scaleY(0.14); }
  40%  { transform: scaleY(0.92); }
  100% { transform: scaleY(0.30); }
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.btn--call {
  background: var(--c);
  border-color: var(--c);
  color: #fff8ec;
}
.btn--call .btn__num {
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  margin-top: 0.15rem;
}
.btn--call:hover { background: #a63f12; color: #fff8ec; transform: translateY(-2px); }
.btn--ghost { color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--bg); transform: translateY(-2px); }

.hero__facts {
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.hero__facts li {
  padding-left: 1.1rem;
  position: relative;
}
.hero__facts li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 0.5rem; height: 2px;
  background: var(--a);
}
.hero__facts strong {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-right: 0.4rem;
}

.hero__figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 0.6rem;
  box-shadow: var(--shadow);
}
.hero__figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.04);
}
.hero__figure figcaption {
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Intro
   -------------------------------------------------------------------------- */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--line);
}
.intro__text p { margin: 0 0 1rem; max-width: 62ch; }

.intro__aside {
  align-self: start;
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 5px solid var(--b);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.intro__aside h3 {
  margin: 0 0 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--b);
}
.intro__aside ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
  font-size: 0.95rem;
}
.intro__aside li {
  padding-left: 1.15rem;
  position: relative;
}
.intro__aside li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.6em;
  width: 6px; height: 6px;
  background: var(--a);
  border-radius: 50%;
}
.aside-note {
  margin: 1.1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--line);
  font-size: 0.88rem;
  font-style: italic;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Menu des prestations
   -------------------------------------------------------------------------- */
.menu {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, var(--bg-2) 40%, transparent);
}
.menu__lead {
  max-width: 62ch;
  margin: 0 0 2.5rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.menu__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(2rem, 4vw, 3.25rem);
}
.menu__group h3 {
  margin: 0 0 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--ink);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-variation-settings: "opsz" 60;
}
.item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 0.7rem 0;
  border-bottom: 1px dotted var(--line);
}
.item:last-child { border-bottom: 0; }
.item__name {
  margin: 0;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.35;
}
.item__desc {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.item__price {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--c);
}

/* --------------------------------------------------------------------------
   Galerie
   -------------------------------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  padding-block: clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}
.gallery figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 0.5rem;
  box-shadow: var(--shadow);
}
.gallery img {
  width: 100%;
  aspect-ratio: 9 / 7;
  object-fit: cover;
  filter: saturate(0.8) contrast(1.05);
}
.gallery figcaption {
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Cartes horaires / adresse / téléphone
   -------------------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.25rem);
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--line);
}
.card {
  padding: 1.6rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card h3 {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--a);
}
.card--call { border-color: var(--c); border-width: 2px; }
.card--call h3 { color: var(--c); }

.hours {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.hours th, .hours td {
  text-align: left;
  padding: 0.4rem 0;
  border-bottom: 1px dotted var(--line);
  font-weight: 400;
}
.hours th { color: var(--ink-soft); }
.hours td {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.84rem;
}
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }

.card address {
  font-style: normal;
  font-size: 1.05rem;
  line-height: 1.6;
}
.card__lead { margin: 0 0 1rem; font-size: 0.95rem; color: var(--ink-soft); }
.card__note {
  margin: 1rem 0 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.phone-big {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--c);
  border-bottom: 3px solid var(--a);
  padding-bottom: 0.15rem;
}
.phone-big:hover { color: var(--a); border-color: var(--c); }

/* --------------------------------------------------------------------------
   Citation de clôture
   -------------------------------------------------------------------------- */
.quote {
  padding-block: clamp(3rem, 8vw, 6rem);
  text-align: center;
}
.quote blockquote {
  margin: 0 auto;
  max-width: 46ch;
}
.quote p {
  margin: 0 0 1.25rem;
  font-size: clamp(1.2rem, 2.6vw, 1.85rem);
  line-height: 1.4;
  font-style: italic;
  font-variation-settings: "opsz" 100;
}
.quote footer {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */
.site-footer {
  margin-left: var(--spine-w);
  padding: 2.5rem var(--gutter) 5.5rem;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.site-footer__brand {
  margin: 0 0 0.4rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.site-footer__meta {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.site-footer__meta a { color: var(--c); }

.claim-banner {
  display: inline-block;
  margin-bottom: 1.25rem;
  padding: 0.45rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink-soft);
  background: var(--line-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.claim-banner:hover { color: var(--ink); background: var(--paper); }

.attribution {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.attribution a { color: var(--ink-soft); }
.attribution a:hover { color: var(--c); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .hero__figure { order: -1; }
  .intro { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --spine-w: 0rem; }
  .spine {
    position: static;
    width: auto;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 1rem var(--gutter);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .spine__title,
  .spine__sub { writing-mode: horizontal-tb; }
  .spine__title { font-size: 1.05rem; letter-spacing: 0.16em; }
  .spine__sub { font-size: 0.6rem; letter-spacing: 0.18em; }
  main { margin-left: 0; }
  .site-footer { margin-left: 0; }
  .menu__grid { grid-template-columns: 1fr; }
  .item { grid-template-columns: 1fr; gap: 0.25rem; }
  .item__price { justify-self: start; }
  .viz { height: 34px; }
  .btn { width: 100%; align-items: center; }
}

/* --------------------------------------------------------------------------
   Mouvement réduit
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .progress { animation: none; transform: scaleX(1); }
  .viz span { animation: none; transform: scaleY(0.42); }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

/* --------------------------------------------------------------------------
   Impression
   -------------------------------------------------------------------------- */
@media print {
  .progress, .skip-phone, .spine, .viz { display: none; }
  main, .site-footer { margin-left: 0; }
  body { background: #fff; color: #000; }
  body::before { display: none; }
}
