/* ============================================================
   Afrique Pare-brise — Thiès
   Palette : cafe warmth (latte / café / bordeaux / olive)
   ============================================================ */

:root {
  --bg: #f4ead8;
  --bg-2: #ece0c9;
  --ink: #3a2415;
  --ink-soft: #5c4433;
  --accent: #6b1f1a;
  --secondary: #5a5e3a;
  --paper: #fbf5e9;
  --line: rgba(58, 36, 21, 0.22);
  --shadow-hard: 4px 4px 0 rgba(58, 36, 21, 0.85);
  --shadow-soft: 0 18px 40px -22px rgba(58, 36, 21, 0.55);
  --maxw: 1180px;
  --pad: clamp(1.1rem, 4vw, 3.5rem);
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

/* ---------- dark mode ---------- */
html[data-theme="dark"] {
  --bg: #1c1410;
  --bg-2: #241a14;
  --ink: #f2e6d3;
  --ink-soft: #cbb9a2;
  --accent: #e0796b;
  --secondary: #a8ac7c;
  --paper: #2a1f18;
  --line: rgba(242, 230, 211, 0.22);
  --shadow-hard: 4px 4px 0 rgba(0, 0, 0, 0.9);
  --shadow-soft: 0 18px 40px -22px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #1c1410;
    --bg-2: #241a14;
    --ink: #f2e6d3;
    --ink-soft: #cbb9a2;
    --accent: #e0796b;
    --secondary: #a8ac7c;
    --paper: #2a1f18;
    --line: rgba(242, 230, 211, 0.22);
    --shadow-hard: 4px 4px 0 rgba(0, 0, 0, 0.9);
    --shadow-soft: 0 18px 40px -22px rgba(0, 0, 0, 0.9);
    color-scheme: dark;
  }
}

/* ---------- reset ---------- */
*, *::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(--sans);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.075rem);
  line-height: 1.62;
  font-optical-sizing: auto;
  transition: background-color 420ms ease, color 420ms ease;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.05; }
p { text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--accent); color: #fff; padding: .6rem 1rem;
}
.skip:focus { left: .5rem; top: .5rem; }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1rem;
  padding: .55rem var(--pad);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  text-decoration: none; font-family: var(--serif);
  font-weight: 900; letter-spacing: -.01em; font-size: 1.05rem;
  min-height: 44px;
}
.brand-mark {
  width: 20px; height: 20px; flex: none;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 0 100%);
}
.brand-text { white-space: nowrap; }

.topnav {
  display: none; gap: 1.35rem; margin-left: auto;
  font-size: .9rem; letter-spacing: .01em;
}
.topnav a {
  text-decoration: none; padding: .55rem 0; min-height: 44px;
  display: inline-flex; align-items: center;
  border-bottom: 2px solid transparent;
}
.topnav a:hover { border-bottom-color: var(--accent); }

.topbar-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.topnav + .topbar-actions { margin-left: 0; }

.theme-toggle {
  display: inline-flex; align-items: center; gap: .4rem;
  min-height: 44px; padding: .4rem .7rem;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
  font: inherit; font-size: .82rem; cursor: pointer;
}
.theme-toggle:hover { background: var(--bg-2); }
.theme-icon { font-size: 1rem; line-height: 1; }

.call-btn {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: .5rem .95rem; border-radius: 999px;
  background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 700; font-size: .9rem; letter-spacing: .01em;
  white-space: nowrap;
}
.call-btn:hover { filter: brightness(1.12); }

@media (min-width: 900px) {
  .topnav { display: flex; }
  .topbar-actions { margin-left: 0; }
}

/* ---------- shared section furniture ---------- */
.section {
  padding: clamp(3.5rem, 9vw, 7rem) var(--pad);
  position: relative;
}
.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.eyebrow {
  font-size: .74rem; letter-spacing: .22em; text-transform: uppercase;
  margin: 0 0 .9rem; color: var(--accent); font-weight: 700;
}
.eyebrow--light { color: #e8b9a8; }
.section-title {
  font-size: clamp(2rem, 5.2vw, 3.6rem);
  margin: 0 0 1rem; letter-spacing: -.02em;
}
.section-sub { margin: 0; max-width: 54ch; opacity: .92; }

/* sections that declare a dark bg get light text */
.section--services, .section--contact { color: #f4ead8; }
.section--services .section-sub, .section--contact .section-sub { color: #e2d3bd; }
.section--zone { color: #f7f2e4; }
.section--zone .section-sub { color: #e6e3cf; }
.section--horaires { color: #f7ece4; }
.section--horaires .section-sub { color: #eccfc7; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: clamp(2.5rem, 7vw, 5rem) var(--pad) clamp(3rem, 8vw, 6rem);
  overflow: hidden;
  isolation: isolate;
}
.hero-split {
  position: absolute; inset: -10% -5% -10% -5%;
  z-index: -1; pointer-events: none;
}
.hero-panel { position: absolute; inset: 0; will-change: transform; }
.hero-panel--left {
  background: var(--bg-2);
  clip-path: polygon(0 0, 58% 0, 34% 100%, 0 100%);
}
.hero-panel--right {
  background: color-mix(in srgb, var(--secondary) 22%, var(--bg));
  clip-path: polygon(58% 0, 100% 0, 100% 100%, 34% 100%);
}
html[data-theme="dark"] .hero-panel--right,
html:not([data-theme="light"]) .hero-panel--right { }

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

.display {
  font-size: clamp(4rem, 18vw, 22rem);
  line-height: .85;
  margin: 0 0 -0.4em;
  letter-spacing: -.045em;
  font-weight: 900;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 1;
  position: relative;
  z-index: 2;
}
.display-line { display: block; }
.display-line--indent { padding-left: .12em; color: var(--accent); }

.hero-copy {
  position: relative; z-index: 3;
  max-width: 46ch;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(3px);
  padding: clamp(1rem, 3vw, 1.6rem) 0 0;
}
.lede { font-size: clamp(1rem, 1.6vw, 1.15rem); margin: 0 0 1.4rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 1.6rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .75rem 1.3rem;
  border-radius: 2px; text-decoration: none;
  font-weight: 700; font-size: .95rem; letter-spacing: .01em;
  border: 2px solid transparent;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}
.btn:hover { transform: translate(-2px, -2px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-hard); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn--light { background: #f4ead8; color: #6b1f1a; box-shadow: 4px 4px 0 rgba(0,0,0,.5); }
.btn--ghost-light { border-color: #f4ead8; color: #f4ead8; }
.btn--ghost-light:hover { background: #f4ead8; color: #3a2415; }

.hero-facts {
  display: flex; flex-wrap: wrap; gap: .5rem 1.6rem;
  font-size: .86rem; border-top: 1px solid var(--line); padding-top: 1rem;
}
.hero-facts li { display: flex; gap: .4rem; align-items: baseline; }
.hero-facts strong { font-family: var(--serif); font-size: 1rem; }

.hero-photo {
  margin: clamp(2rem, 5vw, 3.5rem) auto 0;
  max-width: var(--maxw);
  position: relative;
}
.hero-photo img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.hero-photo figcaption {
  font-size: .8rem; margin-top: .55rem; opacity: .75;
}

/* ---------- SERVICES : index card stack ---------- */
.card-stack {
  display: grid; gap: 1.4rem;
  max-width: var(--maxw); margin: 0 auto;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .card-stack { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .card-stack { grid-template-columns: repeat(3, 1fr); } }

.card {
  position: relative;
  background: var(--paper);
  color: #3a2415;
  padding: 1.5rem 1.4rem 1.3rem;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .8);
  transform: rotate(-1deg);
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.card:nth-child(even) { transform: rotate(1deg); }
.card:hover { transform: rotate(0deg) translateY(-4px); box-shadow: 6px 8px 0 rgba(0,0,0,.85); }
.card-hole {
  position: absolute; top: .85rem; right: .9rem;
  width: 14px; height: 14px; border-radius: 50%;
  background: #3a2415;
  box-shadow: inset 0 0 0 3px var(--paper);
}
.card-num {
  font-family: var(--serif); font-size: .85rem; font-weight: 700;
  letter-spacing: .18em; color: #6b1f1a; margin: 0 0 .5rem;
}
.card h3 { font-size: 1.32rem; margin: 0 0 .6rem; letter-spacing: -.01em; }
.card p { margin: 0 0 .9rem; font-size: .95rem; line-height: 1.55; }
.card-meta {
  margin: 0; padding-top: .8rem; border-top: 1px dashed rgba(58,36,21,.4);
  font-size: .82rem; font-weight: 700; letter-spacing: .02em; color: #5a5e3a;
}

/* ---------- ZONE ---------- */
.zone-grid {
  display: grid; gap: 2rem; max-width: var(--maxw); margin: 0 auto;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .zone-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) { .zone-grid { grid-template-columns: 1fr 1fr 1.15fr; } }

.zone-col h3 {
  font-size: 1.25rem; margin: 0 0 .9rem;
  padding-bottom: .5rem; border-bottom: 2px solid rgba(247,242,228,.35);
}
.zone-col li {
  padding: .42rem 0 .42rem 1.1rem;
  position: relative; font-size: .95rem;
  border-bottom: 1px solid rgba(247,242,228,.14);
}
.zone-col li::before {
  content: ""; position: absolute; left: 0; top: 1.05em;
  width: 8px; height: 8px; background: #f7f2e4;
  clip-path: polygon(0 0, 100% 0, 100% 62%, 0 100%);
}
.zone-col--note p { font-size: .95rem; }
.zone-col--note p + p { margin-top: .9rem; }

/* ---------- ATELIER ---------- */
.atelier-grid {
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  max-width: var(--maxw); margin: 0 auto;
  grid-template-columns: 1fr;
}
@media (min-width: 980px) { .atelier-grid { grid-template-columns: 1.05fr 1fr; align-items: start; } }

.atelier-text .section-title { margin-bottom: 1.2rem; }
.atelier-text p { margin: 0 0 1.1rem; }
.atelier-list { margin-top: 1.6rem; border-top: 1px solid var(--line); }
.atelier-list li {
  padding: .7rem 0; border-bottom: 1px solid var(--line);
  font-size: .92rem;
}
.atelier-list strong { font-family: var(--serif); font-weight: 600; }

.atelier-photos { display: grid; gap: 1.2rem; }
.photo-card { margin: 0; }
.photo-card img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.photo-card figcaption { font-size: .8rem; margin-top: .5rem; opacity: .78; }
.photo-card--a { transform: rotate(-.8deg); }
.photo-card--b { transform: rotate(.9deg); }
.photo-card--c { transform: rotate(-.5deg); }
@media (min-width: 620px) {
  .atelier-photos { grid-template-columns: 1fr 1fr; }
  .photo-card--a { grid-column: 1 / -1; }
}

/* ---------- HORAIRES ---------- */
.hours-wrap {
  display: grid; gap: 2rem; max-width: var(--maxw); margin: 0 auto;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) { .hours-wrap { grid-template-columns: 1.3fr 1fr; align-items: start; } }

.hours { width: 100%; border-collapse: collapse; font-size: .98rem; }
.hours th, .hours td {
  text-align: left; padding: .85rem .4rem;
  border-bottom: 1px solid rgba(247,236,228,.28);
}
.hours th { font-family: var(--serif); font-weight: 600; width: 42%; }
.hours td { font-variant-numeric: tabular-nums; }
.hours-closed td { color: #f0b9ae; }
.hours-closed th { color: #f0b9ae; }

.hours-note {
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(247,236,228,.3);
  padding: 1.5rem 1.4rem;
}
.hours-note h3 { margin: 0 0 .7rem; font-size: 1.2rem; }
.hours-note p { margin: 0 0 1.2rem; font-size: .95rem; }

/* ---------- CONTACT ---------- */
.contact-grid {
  display: grid; gap: 2rem; max-width: var(--maxw); margin: 0 auto;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }

.contact-block {
  border-top: 3px solid var(--accent);
  padding-top: 1.1rem;
}
.contact-block h3 {
  font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  font-family: var(--sans); font-weight: 700; margin: 0 0 .7rem;
  color: #e8b9a8;
}
.contact-big {
  font-family: var(--serif); font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  margin: 0 0 .6rem; letter-spacing: -.01em;
}
.contact-big a { text-decoration: none; border-bottom: 2px solid var(--accent); }
.contact-big a:hover { color: #e8b9a8; }
.contact-note { margin: 0 0 1rem; font-size: .9rem; color: #e2d3bd; }

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding: clamp(2.5rem, 6vw, 4rem) var(--pad) 2rem;
}
.footer-inner { max-width: var(--maxw); margin: 0 auto; }
.footer-brand {
  font-family: var(--serif); font-weight: 900; font-size: 1.5rem;
  margin: 0 0 .6rem; letter-spacing: -.02em;
}
.footer-line { margin: 0 0 .5rem; font-size: .92rem; }
.footer-line a { text-decoration: none; border-bottom: 1px solid var(--accent); }
.footer-line--small { font-size: .84rem; opacity: .8; max-width: 60ch; }

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

.attribution { margin: 0; font-size: .78rem; }
.attribution a { color: var(--ink-soft); text-decoration: none; }
.attribution a:hover { text-decoration: underline; }
.muted { opacity: .75; }

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

::view-transition-old(root) {
  animation: vt-out 320ms cubic-bezier(.4, 0, .2, 1) both;
}
::view-transition-new(root) {
  animation: vt-in 380ms cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes vt-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-14px); }
}
@keyframes vt-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .hero-panel { transform: none !important; }
  .card, .photo-card { transform: none !important; }
  .btn:hover { transform: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
