/* Page "en construction" — atelierecycle.ch */
/* Fraunces + DM Sans (SIL OFL 1.1) — hébergées localement, licences dans fonts/ */
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans-italic.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #f4ede0;
  --paper: #fbf7ef;
  --ink: #2b2620;
  --muted: #6b6155;
  --rust: #a4452c;
  --line: #d9cdb8;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1a16;
    --paper: #25211c;
    --ink: #efe6d6;
    --muted: #b3a792;
    --rust: #d9775a;
    --line: #3d362d;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 300 1.0625rem/1.65 var(--sans);
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 3rem 1rem 2rem;
  text-align: center;
}

h1 {
  font: 600 clamp(2.4rem, 8vw, 3.6rem)/1.1 var(--serif);
  letter-spacing: -0.01em;
  margin: 1rem 0 0.25rem;
}

.badge {
  display: inline-block;
  margin: 1.5rem 0 3rem;
  padding: 0.35rem 0.9rem;
  border: 1px dashed var(--rust);
  color: var(--rust);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Intro : texte + vidéo empilés sur mobile, côte à côte sur desktop */
.intro { margin: 0 auto 5rem; }

.lead {
  max-width: 42rem;
  margin: 0 auto;
  padding: 64px 0;
  font-size: 1.15rem;
  line-height: 1.85;
}

@media (min-width: 56rem) {
  .intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    text-align: left;
  }

  .intro .video { margin: 0; }
}

/* Vidéo : miniature + bouton lecture, remplacée par le lecteur au clic */
.video { max-width: 40rem; margin: 0 auto; }

.video-play {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  background: #14110e;
}

.video-play img { display: block; width: 100%; height: 100%; object-fit: cover; }

.video-play::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 4.5rem;
  height: 4.5rem;
  transform: translate(-50%, -50%);
  background: var(--rust) url("/img/play.svg") no-repeat center / 1.6rem;
}

.video figcaption { margin-top: 0.6rem; font-size: 0.9rem; color: var(--muted); }
.video figcaption a { color: inherit; }

/* Fenêtre vidéo : 4:3 le plus grand possible, marge en haut pour la croix */
.video-dialog {
  width: min(calc(100vw - 2rem), calc((100dvh - 7rem) * 4 / 3));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  overflow: visible;
  background: #000;
}

.video-dialog::backdrop { background: rgb(20 17 14 / 0.92); }
.video-dialog .dialog-close { top: -3.25rem; right: 0; }
.video-frame iframe { display: block; width: 100%; aspect-ratio: 4 / 3; border: 0; }

/* Vélos à vendre : cartes */
.bikes { margin: 0 0 2.5rem; }
.offer { margin: 0 0 4rem; }
.bikes > h2, .offer > h2 { font: 600 1.6rem var(--serif); margin: 0 0 1rem; }

.bike-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.bike-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0 0 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.bike-card img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; margin-bottom: 0.8rem; }
.bike-card span { padding: 0 1rem; }
.bike-name { font: 600 1.25rem var(--serif); }
.bike-meta { color: var(--rust); font-weight: 600; }
.bike-count { color: var(--muted); font-size: 0.85rem; margin-top: 0.3rem; }

/* Vélos à vendre : fenêtre + slider */
body:has(dialog[open]) { overflow: hidden; }

.bike-dialog {
  width: min(56rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
}

.bike-dialog::backdrop { background: rgb(20 17 14 / 0.8); }

.slider { position: relative; background: #14110e; }

.slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.slides::-webkit-scrollbar { display: none; }

.slides img {
  flex: 0 0 100%;
  width: 100%;
  height: min(65vh, 36rem);
  object-fit: contain;
  scroll-snap-align: center;
}

.slide-prev, .slide-next, .dialog-close {
  position: absolute;
  z-index: 1;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: rgb(251 247 239 / 0.9);
  color: #2b2620;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.slide-prev, .slide-next { top: 50%; transform: translateY(-50%); }
.slide-prev { left: 0.75rem; }
.slide-next { right: 0.75rem; }
.slide-prev:disabled, .slide-next:disabled { opacity: 0.3; cursor: default; }
.dialog-close { top: 0.75rem; right: 0.75rem; z-index: 2; }

.slide-count {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.1rem 0.6rem;
  background: rgb(20 17 14 / 0.7);
  color: #fbf7ef;
  font-size: 0.85rem;
}

.dialog-body { padding: 1.25rem; }
.dialog-body h3 { font: 600 1.6rem var(--serif); margin: 0; }

/* Desktop : photos à gauche, infos à droite */
@media (min-width: 48rem) {
  .bike-dialog[open] { display: grid; grid-template-columns: 1.7fr 1fr; }
  .slides img { height: min(80vh, 40rem); }
  .dialog-body { padding: 3.5rem 1.5rem 1.5rem; }
}

.price { font: 600 1.3rem var(--serif); color: var(--rust); margin: 0.2rem 0 1rem; }

.specs {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 1rem;
  margin: 0 0 1.25rem;
  font-size: 0.97rem;
}

.specs dt { color: var(--muted); }
.specs dd { margin: 0; }

.cta {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--rust);
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
}

.cta:hover { filter: brightness(1.1); }

.services {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  text-align: left;
}

.services li {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.1rem 1.25rem;
}

.services h3 {
  font: 600 1.25rem var(--serif);
  color: var(--rust);
  margin: 0 0 0.3rem;
}

.services p { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* 6 activités : 3 colonnes sur desktop (3 + 3) */
.services-3 { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }

.contact {
  margin: 2.5rem auto 0;
  font-style: normal;
}

.contact h2 {
  font: 600 1.25rem var(--serif);
  margin: 0 0 0.5rem;
}

.contact p { margin: 0 0 0.6rem; }
.contact a { color: var(--rust); }

.soon { margin-top: 2.5rem; font-style: italic; color: var(--muted); }

footer {
  border-top: 1px solid var(--line);
  padding: 1.25rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

footer nav a {
  color: var(--ink);
  margin: 0 0.5rem;
  text-decoration: none;
}

footer nav a[aria-current] { color: var(--rust); font-weight: 600; }
footer nav a:hover { text-decoration: underline; }

/* Page 404 : un message par langue */
.not-found-list { list-style: none; padding: 0; margin: 0 auto; max-width: 32rem; }
.not-found-list li { padding: 0.9rem 0; border-top: 1px solid var(--line); }
.not-found-list a { color: var(--rust); font-weight: 600; }
