/* ============================================================
   Saloum Automobile — Cité Keur Gorgui, Dakar
   Palette: café warmth · Type: oversized display serif
   Layout: index card stack · Signature: diagonal split
   ============================================================ */

:root {
  --bg: #f4ead8;
  --bg-2: #efe1c9;
  --bg-3: #e7d7ba;
  --ink: #3a2415;
  --ink-soft: #6a5340;
  --accent: #6b1f1a;
  --accent-2: #8a2b23;
  --secondary: #5a5e3a;
  --card: #fbf5e8;
  --line: rgba(58, 36, 21, 0.22);
  --shadow: 4px 4px 0 rgba(58, 36, 21, 0.85);
  --radius: 2px;
  --pad: clamp(1.25rem, 5vw, 5rem);
  --maxw: 1180px;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.45s ease;
}

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

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

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

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

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

/* ---------- view transitions ---------- */
@view-transition { navigation: auto; }

::view-transition-old(root) {
  animation: vt-out 0.32s cubic-bezier(0.4, 0, 0.2, 1) both;
}
::view-transition-new(root) {
  animation: vt-in 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes vt-out { to { opacity: 0; transform: translateY(-14px); } }
@keyframes vt-in  { from { opacity: 0; transform: translateY(18px); } }

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

.brand {
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: var(--ink);
  margin-right: auto;
}
.brand-mark {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  background: var(--accent); color: var(--bg);
  font-family: var(--serif); font-weight: 700; font-size: 1rem;
  letter-spacing: 0.02em;
  transform: rotate(-3deg);
}
.brand-text {
  font-family: var(--serif); font-weight: 600;
  font-size: 1.05rem; line-height: 1.1;
  display: flex; flex-direction: column;
}
.brand-text em {
  font-family: var(--sans); font-style: normal;
  font-size: 0.68rem; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-soft);
  font-weight: 500;
}

.nav { display: flex; gap: 1.4rem; }
.nav a {
  color: var(--ink); text-decoration: none;
  font-size: 0.86rem; letter-spacing: 0.02em;
  padding: 0.5rem 0.1rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--accent); }

.call-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  background: var(--accent); color: var(--bg);
  text-decoration: none; font-weight: 600;
  font-size: 0.9rem; letter-spacing: 0.01em;
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 rgba(58, 36, 21, 0.8);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.call-btn:hover {
  color: var(--bg);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(58, 36, 21, 0.8);
}
.call-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #d9c98f;
  box-shadow: 0 0 0 3px rgba(217, 201, 143, 0.28);
}

/* ============================================================
   HERO — diagonal split, opposing scroll
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 9vw, 7rem) var(--pad) clamp(2rem, 5vw, 3.5rem);
  min-height: 88svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  isolation: isolate;
}

.hero-split {
  position: absolute; inset: -12% -4% -12% -4%;
  display: grid; grid-template-columns: 1fr 1fr;
  z-index: -1;
}
.hero-panel { overflow: hidden; will-change: transform; }
.hero-panel img {
  width: 100%; height: 100%; object-fit: cover;
  filter: sepia(0.32) saturate(0.85) contrast(1.02);
}
.hero-panel--a {
  clip-path: polygon(0 0, 100% 0, 78% 100%, 0 100%);
  transform: translateY(var(--shift-a, 0px));
}
.hero-panel--b {
  clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%);
  transform: translateY(var(--shift-b, 0px));
  margin-left: -22%;
}
.hero-panel--b img { filter: sepia(0.5) saturate(0.6) brightness(0.72); }

.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--bg) 55%, transparent) 0%,
    color-mix(in srgb, var(--bg) 82%, transparent) 55%,
    var(--bg) 100%);
}

.hero-inner { max-width: var(--maxw); width: 100%; margin: 0 auto; }

.eyebrow {
  font-size: 0.72rem; letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 600;
  color: var(--secondary);
  margin: 0 0 0.6rem;
}
.eyebrow--light { color: #c9b184; }

.display {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(3.4rem, 17vw, 15rem);
  line-height: 0.84;
  letter-spacing: -0.03em;
  margin: 0 0 -0.34em;
  color: var(--ink);
  position: relative;
  z-index: 2;
  text-wrap: balance;
}
.display-alt {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  padding-left: 0.06em;
}

.hero-lede {
  position: relative; z-index: 3;
  max-width: 34rem;
  margin-left: auto;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
}
.hero-lede p { margin: 0.9rem 0 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.2rem !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0.7rem 1.3rem;
  font-family: var(--sans); font-weight: 600; font-size: 0.92rem;
  text-decoration: none; border-radius: var(--radius);
  border: 1.5px solid var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn--primary {
  background: var(--accent); color: var(--bg); border-color: var(--accent);
  box-shadow: 4px 4px 0 rgba(58, 36, 21, 0.85);
}
.btn--primary:hover {
  color: var(--bg); background: var(--accent-2);
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 rgba(58, 36, 21, 0.85);
}
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }

.hero-facts {
  list-style: none; margin: clamp(2rem, 5vw, 3.5rem) auto 0;
  padding: 1rem 0 0;
  max-width: var(--maxw); width: 100%;
  display: grid; gap: 0.5rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  border-top: 1px solid var(--line);
  font-size: 0.88rem; color: var(--ink-soft);
}
.hero-facts strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: clamp(3.5rem, 9vw, 7rem) var(--pad);
  border-top: 1px solid var(--line);
}
.section > * { max-width: var(--maxw); margin-inline: auto; }

.section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head h2,
.atelier-text h2,
.horaires-grid h2,
.contact-main h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.6vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  text-wrap: balance;
}
.section-intro { max-width: 46rem; color: var(--ink-soft); margin: 0; }

/* ---------- index card stack ---------- */
.cards {
  display: grid;
  gap: clamp(1.4rem, 3vw, 2.2rem);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  padding: 0.5rem 0.25rem 1.5rem;
}

.card {
  position: relative;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem 1.3rem;
  box-shadow: var(--shadow);
  transform: rotate(-1deg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:nth-child(even) { transform: rotate(1deg); }
.card:hover {
  transform: rotate(0deg) translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(58, 36, 21, 0.85);
}

.card-hole {
  position: absolute; top: 0.85rem; left: 50%;
  transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg-2);
  border: 1.5px solid var(--ink);
  box-shadow: inset 0 1px 2px rgba(58, 36, 21, 0.35);
}

.card-num {
  font-family: var(--serif); font-size: 0.8rem;
  letter-spacing: 0.14em; color: var(--accent);
  margin: 0.4rem 0 0.5rem; font-weight: 600;
}
.card h3 {
  font-family: var(--serif); font-weight: 600;
  font-size: 1.28rem; line-height: 1.15;
  margin: 0 0 0.6rem;
}
.card p { margin: 0 0 0.9rem; font-size: 0.92rem; color: var(--ink-soft); }
.card-meta {
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem;
  padding-top: 0.8rem; margin: 0 !important;
  border-top: 1px dashed var(--line);
  font-size: 0.74rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--secondary) !important;
  font-weight: 600;
}
.cards-note {
  max-width: 46rem; margin: 0 auto;
  font-size: 0.9rem; color: var(--ink-soft);
  border-left: 3px solid var(--accent); padding-left: 1rem;
}

/* ---------- atelier ---------- */
.atelier-grid {
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
}
.atelier-text p { color: var(--ink-soft); }
.atelier-text p:first-of-type { color: var(--ink); }

.atelier-facts {
  display: grid; gap: 0.9rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 2rem 0 0; padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.atelier-facts div { margin: 0; }
.atelier-facts dt {
  font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--secondary);
  font-weight: 600;
}
.atelier-facts dd {
  margin: 0.15rem 0 0;
  font-family: var(--serif); font-size: 1.15rem; font-weight: 600;
}

.atelier-figure { margin: 0; }
.atelier-figure img {
  border: 1.5px solid var(--ink);
  box-shadow: var(--shadow);
  transform: rotate(1.2deg);
  filter: sepia(0.22) saturate(0.9);
}
.atelier-figure figcaption,
.atelier-strip figcaption {
  font-size: 0.76rem; color: var(--ink-soft);
  margin-top: 0.7rem; letter-spacing: 0.01em;
}

.atelier-strip {
  display: grid; gap: clamp(1.2rem, 3vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: clamp(2.5rem, 6vw, 4rem);
}
.atelier-strip figure { margin: 0; }
.atelier-strip img {
  border: 1.5px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(58, 36, 21, 0.7);
  filter: sepia(0.22) saturate(0.9);
}
.atelier-strip figure:nth-child(2) img { transform: rotate(-0.8deg); }
.atelier-strip figure:nth-child(3) img { transform: rotate(0.8deg); }

/* ---------- zone ---------- */
.zone-grid {
  display: grid; gap: clamp(1.6rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.zone-col h3 {
  font-family: var(--serif); font-size: 1.1rem; font-weight: 600;
  margin: 0 0 0.9rem; padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ink);
}
.zone-list { list-style: none; margin: 0; padding: 0; }
.zone-list li {
  padding: 0.42rem 0 0.42rem 1.1rem;
  position: relative; font-size: 0.92rem;
  border-bottom: 1px dashed var(--line);
}
.zone-list li::before {
  content: ""; position: absolute; left: 0; top: 0.95rem;
  width: 6px; height: 6px; background: var(--accent);
}
.zone-col--note p { font-size: 0.92rem; color: var(--ink-soft); }
.zone-phone {
  font-family: var(--serif); font-size: 1.5rem; font-weight: 600;
  margin-top: 1rem;
}
.zone-phone a { text-decoration: none; }

/* ---------- horaires ---------- */
.horaires-grid {
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: 1fr 1fr;
  align-items: start;
}
.hours {
  width: 100%; border-collapse: collapse;
  background: var(--card);
  border: 1.5px solid var(--ink);
  box-shadow: var(--shadow);
  transform: rotate(-0.6deg);
}
.hours th, .hours td {
  text-align: left; padding: 0.72rem 1.1rem;
  border-bottom: 1px dashed var(--line);
  font-size: 0.94rem;
}
.hours th { font-weight: 600; font-family: var(--serif); }
.hours td { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }
.hours .closed th, .hours .closed td { color: var(--accent); font-weight: 600; }

/* ---------- contact ---------- */
.section--contact {
  background: var(--ink);
  color: var(--bg);
}
.section--contact a { color: #e5c98f; }
.section--contact a:hover { color: #fff; }
.contact-grid {
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: 1fr 1fr; align-items: start;
}
.contact-lede { color: #d8c7ab; max-width: 32rem; }
.btn--big {
  margin-top: 1.4rem;
  background: var(--bg); color: var(--ink);
  border-color: var(--bg);
  font-size: 1.05rem; padding: 0.95rem 1.7rem;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}
.btn--big:hover { background: #fff; color: var(--ink); transform: translate(-1px, -1px); }

.contact-cards { display: grid; gap: 1rem; }
.contact-card {
  background: rgba(244, 234, 216, 0.06);
  border: 1px solid rgba(244, 234, 216, 0.28);
  padding: 1.2rem 1.3rem;
}
.contact-card h3 {
  font-family: var(--serif); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #c9b184; margin: 0 0 0.5rem;
}
.contact-card p { margin: 0 0 0.35rem; font-size: 0.95rem; }
.contact-card .muted { color: #b9a68a; font-size: 0.82rem; }

/* ---------- footer ---------- */
.footer {
  background: var(--ink); color: #cbb99d;
  padding: clamp(2rem, 5vw, 3rem) var(--pad) 2rem;
  border-top: 1px solid rgba(244, 234, 216, 0.18);
}
.footer-inner { max-width: var(--maxw); margin: 0 auto; }
.footer-brand {
  font-family: var(--serif); font-size: 1rem; color: var(--bg);
  margin: 0 0 0.4rem;
}
.footer-line { font-size: 0.85rem; margin: 0 0 1.4rem; }
.footer-line a { color: #e5c98f; }

.claim-banner {
  display: inline-block;
  font-size: 0.76rem;
  padding: 0.4rem 0.75rem;
  background: rgba(244, 234, 216, 0.08);
  border: 1px solid rgba(244, 234, 216, 0.22);
  color: #cbb99d;
  text-decoration: none;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.claim-banner:hover { color: #fff; background: rgba(244, 234, 216, 0.14); }

.attribution { font-size: 0.75rem; margin: 0; }
.attribution a { color: #a8967c; }
.muted { color: #a8967c; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .atelier-grid,
  .horaires-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .nav { display: none; }
  .hero-panel--a { clip-path: polygon(0 0, 100% 0, 62% 100%, 0 100%); }
  .hero-panel--b { clip-path: polygon(38% 0, 100% 0, 100% 100%, 0 100%); margin-left: -38%; }
}

@media (max-width: 620px) {
  .topbar { flex-wrap: wrap; gap: 0.6rem; }
  .brand-text em { display: none; }
  .call-btn { width: 100%; justify-content: center; }
  .hero { min-height: auto; padding-top: 2.5rem; }
  .display { font-size: clamp(3rem, 22vw, 6rem); margin-bottom: -0.28em; }
  .hero-lede { margin-left: 0; }
  .card, .card:nth-child(even) { transform: none; }
  .hours { transform: none; }
  .atelier-figure img { transform: none; }
}

/* ============================================================
   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;
  }
  .hero-panel--a, .hero-panel--b { transform: none !important; }
  .card, .card:nth-child(even),
  .atelier-figure img, .atelier-strip img, .hours { transform: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
