/* ============================================================
   Garage de l'évêché — feuille de style
   Palette : noir + blanc + une couleur par section
   ============================================================ */

:root {
  --noir: #0a0a0a;
  --rouge: #e10600;
  --bleu: #003c8a;
  --jaune: #f4ff33;

  --ink: #0a0a0a;
  --paper: #f5f3ee;
  --paper-2: #e9e6df;
  --rule: rgba(10, 10, 10, 0.22);
  --muted: rgba(10, 10, 10, 0.62);

  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: "Bricolage Grotesque", "JetBrains Mono", system-ui, sans-serif;

  --measure: 46ch;
  --pad: clamp(1.15rem, 4vw, 2.5rem);
}

/* Thème sombre — appliqué si l'OS le demande, ou si l'utilisateur l'a choisi */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f2efe8;
    --paper: #0d0d0d;
    --paper-2: #161616;
    --rule: rgba(242, 239, 232, 0.26);
    --muted: rgba(242, 239, 232, 0.62);
  }
}
:root[data-theme="dark"] {
  --ink: #f2efe8;
  --paper: #0d0d0d;
  --paper-2: #161616;
  --rule: rgba(242, 239, 232, 0.26);
  --muted: rgba(242, 239, 232, 0.62);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

/* Grain — texture de film, très discret */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.05;
  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;
}

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

a { color: inherit; }

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.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;
  z-index: 10000;
  background: var(--jaune);
  color: #0a0a0a;
  padding: 0.6rem 1rem;
  font-weight: 700;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ============================================================
   Barre supérieure
   ============================================================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 500;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.topbar__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.6rem var(--pad);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 1rem;
  margin-right: auto;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.topbar__nav {
  display: flex;
  gap: 0.15rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.topbar__nav a {
  text-decoration: none;
  padding: 0.55rem 0.6rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
}
.topbar__nav a:hover { border-bottom-color: var(--ink); }

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.4rem 0.7rem;
  background: transparent;
  color: inherit;
  border: 1px solid var(--rule);
  font: inherit;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.theme-toggle:hover { background: var(--paper-2); }
.theme-toggle__icon { font-size: 1rem; line-height: 1; }

.callbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.4rem 0.85rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid var(--ink);
}
.callbtn:hover { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.callbtn__label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; }
.callbtn__num { white-space: nowrap; }

/* ============================================================
   Sections — une couleur pleine par section
   ============================================================ */

.sec {
  padding: clamp(3rem, 8vw, 6rem) 0;
  position: relative;
}

.sec--noir  { background: var(--noir);  color: #f5f3ee; }
.sec--rouge { background: var(--rouge); color: #fff; }
.sec--bleu  { background: var(--bleu);  color: #f2f6ff; }
.sec--jaune { background: var(--jaune); color: #0a0a0a; }

.sec--noir  { --rule: rgba(245, 243, 238, 0.28); --muted: rgba(245, 243, 238, 0.66); }
.sec--rouge { --rule: rgba(255, 255, 255, 0.34); --muted: rgba(255, 255, 255, 0.78); }
.sec--bleu  { --rule: rgba(242, 246, 255, 0.32); --muted: rgba(242, 246, 255, 0.72); }
.sec--jaune { --rule: rgba(10, 10, 10, 0.3);     --muted: rgba(10, 10, 10, 0.66); }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

.kicker {
  margin: 0 0 1.1rem;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

/* Titre empilé, lignes décalées */
.stack {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.1rem, 7.2vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0 0 1.6rem;
  max-width: 22ch;
}
.stack span { display: block; }
.stack span:nth-child(2) { margin-left: 1.6em; }
.stack span:nth-child(3) { margin-left: -0.35em; color: var(--jaune); }
.sec--jaune .stack span:nth-child(3) { color: var(--rouge); }

h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.6rem, 4.4vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
  max-width: 26ch;
}

h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
  margin: 0;
}

.lede {
  max-width: var(--measure);
  margin: 0 0 1.8rem;
  font-size: 1.02rem;
}

.note {
  max-width: var(--measure);
  margin: 2rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  border-left: 2px solid var(--rule);
  padding-left: 0.9rem;
}
.note--tight { margin-top: 1.1rem; }

/* ============================================================
   Boutons
   ============================================================ */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 2.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.3rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  border: 2px solid currentColor;
  transition: background-color 180ms ease, color 180ms ease, translate 180ms ease;
}
.btn--solid { background: var(--jaune); color: #0a0a0a; border-color: var(--jaune); }
.btn--solid:hover { background: #fff; border-color: #fff; translate: 0 -2px; }
.btn--ghost { background: transparent; color: inherit; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); translate: 0 -2px; }

/* ============================================================
   Fiche « reçu »
   ============================================================ */

.facts {
  margin: 0;
  max-width: 44rem;
  border-top: 1px dotted var(--rule);
}

.facts__row {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.6rem 0;
  border-bottom: 1px dotted var(--rule);
  flex-wrap: wrap;
}
.facts__row dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.facts__row dd { margin: 0; text-align: right; font-weight: 600; }

.receipt {
  max-width: 52rem;
  border-top: 1px dotted var(--rule);
}

.line {
  padding: 1.35rem 0;
  border-bottom: 1px dotted var(--rule);
}

.line__head {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
}

.line__price {
  font-weight: 800;
  white-space: nowrap;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.line__desc {
  margin: 0.5rem 0 0;
  max-width: 62ch;
  font-size: 0.92rem;
}

.line__meta {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-align: right;
}

.line--plain { border-bottom: 0; }

/* ============================================================
   Prose
   ============================================================ */

.prose { max-width: 62ch; }
.prose p { margin: 0 0 1.05rem; }

.cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 3rem;
}
@media (min-width: 760px) {
  .cols { grid-template-columns: 1fr 1fr; gap: 3rem; }
}
.col h3 { margin-bottom: 0.8rem; }

.ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}
.ticks li {
  padding: 0.45rem 0 0.45rem 1.4rem;
  border-bottom: 1px dotted var(--rule);
  position: relative;
}
.ticks li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--muted);
}
.ticks--tight li { padding-top: 0.35rem; padding-bottom: 0.35rem; }

/* ============================================================
   Bande glissante (drag-to-scroll)
   ============================================================ */

.band {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  padding: 0.4rem 0 1rem;
  margin-top: 2.4rem;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.band.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}
.band.is-dragging img { pointer-events: none; }

.band__item {
  margin: 0;
  flex: 0 0 clamp(230px, 62vw, 380px);
  scroll-snap-align: start;
}

.band__item img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.08);
}

.band__item figcaption {
  margin-top: 0.5rem;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.band__hint {
  margin: 0.2rem 0 0;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ============================================================
   Avis
   ============================================================ */

.receipt--quotes { max-width: 56rem; }

.quote {
  margin: 0;
  padding: 1.4rem 0;
  border-bottom: 1px dotted var(--rule);
}
.quote p {
  margin: 0 0 0.7rem;
  max-width: 58ch;
  font-size: 1rem;
}
.quote footer {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  text-align: right;
}

/* ============================================================
   Horaires & accès
   ============================================================ */

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 820px) {
  .split { grid-template-columns: 1.1fr 1fr; gap: 3.5rem; }
}

.sub {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-family: var(--mono);
  font-weight: 600;
  margin-bottom: 1rem;
}

.hours {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.hours th,
.hours td {
  text-align: left;
  padding: 0.55rem 0;
  border-bottom: 1px dotted var(--rule);
  font-weight: 400;
}
.hours th {
  width: 8.5rem;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.hours td { text-align: right; font-weight: 600; }
.hours__closed td { color: var(--muted); font-weight: 400; }

.addr {
  font-style: normal;
  display: block;
  margin-bottom: 1.2rem;
}
.addr__line { display: block; font-size: 0.95rem; }

.phone-big {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  letter-spacing: -0.02em;
}
.phone-big a { text-decoration: none; border-bottom: 3px solid var(--jaune); }
.phone-big a:hover { color: var(--jaune); }

.map-link { margin: 1.4rem 0 0; font-size: 0.9rem; }
.map-link a { text-decoration: underline; text-underline-offset: 3px; }

.receipt--info { margin-top: 3rem; max-width: 56rem; }

/* ============================================================
   Pied de page
   ============================================================ */

.foot {
  background: var(--noir);
  color: #f5f3ee;
  padding: clamp(2.2rem, 6vw, 3.4rem) 0 2rem;
  border-top: 1px solid rgba(245, 243, 238, 0.18);
}

.foot__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px dotted rgba(245, 243, 238, 0.28);
}
@media (min-width: 700px) {
  .foot__grid { grid-template-columns: 1fr auto; align-items: end; }
}

.foot__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  margin: 0 0 0.3rem;
}
.foot__meta {
  margin: 0.15rem 0;
  font-size: 0.84rem;
  color: rgba(245, 243, 238, 0.72);
}
.foot__meta a { text-decoration: none; border-bottom: 1px solid rgba(245, 243, 238, 0.4); }

.claim-banner {
  display: inline-block;
  margin: 1.4rem 0 0.9rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.78rem;
  text-decoration: none;
  color: rgba(245, 243, 238, 0.82);
  background: rgba(245, 243, 238, 0.08);
  border: 1px solid rgba(245, 243, 238, 0.2);
}
.claim-banner:hover {
  color: #0a0a0a;
  background: var(--jaune);
  border-color: var(--jaune);
}

.attribution {
  margin: 0.4rem 0 0;
  font-size: 0.76rem;
}
.attribution a {
  color: rgba(245, 243, 238, 0.6);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 243, 238, 0.3);
}
.attribution a:hover { color: #f5f3ee; }

.muted { color: rgba(245, 243, 238, 0.6); }

/* ============================================================
   Apparition au défilement
   ============================================================ */

@keyframes fadeRise {
  from { opacity: 0; translate: 0 14px; }
  to   { opacity: 1; translate: 0 0; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .sec > .wrap {
      animation: fadeRise 420ms cubic-bezier(0.2, 0.7, 0.1, 1) both;
      animation-timeline: view();
      animation-range: entry 0% cover 22%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Petits écrans
   ============================================================ */

@media (max-width: 720px) {
  .topbar__nav { display: none; }
  .stack span:nth-child(2) { margin-left: 0.8em; }
  .stack span:nth-child(3) { margin-left: 0; }
  .line__meta { text-align: left; }
  .facts__row dd { text-align: left; }
  .hours th { width: 6.5rem; }
}

@media (max-width: 420px) {
  .callbtn__label { display: none; }
  .theme-toggle__label { display: none; }
}
