/* Kehren — direction artistique reprise du site Wix */
@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/playfair-display-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #000000;
  --text: #f0f4ff;
  --muted: #afb5ca;
  --accent: #998abe;
  --violet: #34167d;
  --violet-deep: #1a0b3f;
  --line: rgba(240, 244, 255, 0.14);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --maxw: 1180px;
  --gutter: clamp(16px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 5% 0%, var(--violet) 0%, var(--bg) 420px);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
main { flex: 1; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--text); color: var(--bg); padding: 8px 12px; z-index: 100; }

/* En-tête */
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 40px;
  padding-bottom: 40px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-size: 18px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle at 50% 18%, #ffffff 0%, #e9e6f2 38%, #6e6a80 72%, #1b1824 100%);
  box-shadow: 0 0 24px rgba(153, 138, 190, 0.35);
  flex: none;
}
.nav { display: flex; gap: clamp(24px, 6vw, 120px); }
.nav a { text-decoration: none; transition: color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }

/* Typo */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }
h1 { font-size: clamp(34px, 5vw, 45px); line-height: 1.1; }
.lead { font-size: clamp(18px, 2.2vw, 22px); text-align: center; max-width: 30em; margin: clamp(48px, 9vw, 96px) auto clamp(64px, 11vw, 140px); }
.prose p { margin: 0 0 1.6em; }

/* Grille de cartes (accueil, collections) */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 34px); max-width: 1010px; margin: 0 auto; }
.card { position: relative; display: block; aspect-ratio: 1; overflow: hidden; text-decoration: none; background: #111; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, filter .4s ease; }
.card::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.18); transition: background .3s; }
.card-title {
  position: absolute; inset: 0; z-index: 1;
  display: grid; place-items: center; padding: 16px; text-align: center;
  font-family: var(--serif); font-size: 24px; line-height: 1.3; color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}
.card:hover img, .card:focus-visible img { transform: scale(1.04); }
.card:hover::after, .card:focus-visible::after { background: rgba(26, 11, 63, 0.45); }
.card--reveal .card-title { opacity: 0; transition: opacity .3s; }
.card--reveal:hover .card-title, .card--reveal:focus-visible .card-title { opacity: 1; }
.card--reveal::after { background: rgba(0, 0, 0, 0); }
@media (hover: none) {
  .card--reveal .card-title { opacity: 1; align-items: end; justify-items: start; font-size: 18px; }
  .card--reveal::after { background: linear-gradient(to top, rgba(0,0,0,.6), transparent 50%); }
}

/* Page collection */
.back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; text-decoration: none; margin: 32px 0 40px; }
.back:hover { color: var(--accent); }
.collection-head { text-align: center; margin-bottom: clamp(40px, 6vw, 72px); }
.collection-head p { max-width: 34em; margin: 28px auto 0; font-size: 16px; }

/* Page projet */
.project-head { max-width: 760px; margin: clamp(32px, 6vw, 80px) auto clamp(48px, 7vw, 88px); }
.details { display: flex; flex-wrap: wrap; gap: 16px 96px; margin: 48px 0 40px; }
.details dt { font-family: var(--serif); font-size: 18px; margin-bottom: 8px; }
.details dd { margin: 0; font-size: 14px; }
.project-head .desc { font-size: 16px; max-width: 34em; margin: 0; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 36px); max-width: 900px; margin: 0 auto; align-items: center; }
.gallery figure { margin: 0; }
.gallery .wide { grid-column: 1 / -1; }
.gallery button { all: unset; cursor: zoom-in; display: block; width: 100%; }
.gallery button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.gallery img, .gallery video { width: 100%; height: auto; background: #111; }
.next { display: flex; justify-content: flex-end; max-width: 900px; margin: 72px auto 0; }
.next a { font-family: var(--serif); font-size: 22px; text-decoration: none; display: inline-flex; align-items: center; gap: 12px; }
.next a:hover { color: var(--accent); }

/* À propos */
.about { display: grid; grid-template-columns: 1fr 1.6fr 1.4fr; gap: clamp(24px, 4vw, 64px); align-items: start; margin-top: clamp(32px, 6vw, 80px); }
.about .prose { max-width: 26em; }
.about h2 { font-size: 40px; margin: 56px 0 24px; }
.about .portrait img { width: 100%; height: auto; }

/* Pages légales */
.legal { max-width: 720px; margin: clamp(32px, 6vw, 80px) auto 0; }
.legal h1 { margin-bottom: 40px; }
.legal h2 { font-size: 24px; margin: 40px 0 12px; }
.legal p, .legal li { font-size: 16px; color: var(--muted); }

/* Pied de page */
.site-footer { margin-top: clamp(80px, 12vw, 160px); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; padding-top: 32px; padding-bottom: 40px; font-size: 14px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 16px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer p { margin: 0; }
.to-top { width: 40px; height: 40px; display: grid; place-items: center; }

/* Visionneuse */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.94); display: none; align-items: center; justify-content: center; padding: 56px 16px; }
.lightbox.open { display: flex; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--text); cursor: pointer; padding: 12px; font: 32px/1 var(--sans); }
.lightbox button:hover { color: var(--accent); }
.lb-close { top: 8px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* Mobile */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .site-header .wrap { padding-top: 24px; padding-bottom: 24px; }
  .nav { gap: 24px; }
  .grid, .gallery { grid-template-columns: minmax(0, 1fr); }
  .card-title { font-size: 22px; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .about h2 { font-size: 32px; margin-top: 32px; }
  .details { gap: 16px 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card img { transition: none; }
}
