/* ==========================================================================
   OméSky Store — site public.

   Principe : fond sombre et sobre, la couleur vient des projets eux-mêmes.
   Chaque catégorie porte sa teinte ; sur une fiche, cette teinte devient la
   couleur des boutons, des liens et des accents de toute la page.
   Aucun dégradé, aucun halo, aucune ombre colorée.
   ========================================================================== */

:root {
  --bg:        #131419;   /* fond de page */
  --surface:   #1b1d25;   /* cartes et panneaux */
  --surface-2: #23262f;   /* survol, champs */
  --line:      #2e323d;   /* bordures */
  --line-soft: #262a33;
  --text:      #f1f2f6;
  --text-2:    #a2a9b8;   /* texte secondaire */
  --text-3:    #6f7686;   /* mentions discrètes */

  --accent:    #ff4d6d;   /* couleur du studio, réglable en admin */
  --on-accent: #ffffff;

  /* Teinte de la page : celle du projet ou de la catégorie affichée. */
  --tint: var(--accent);

  --ok: #37d399;

  --r-lg: 14px;
  --r:    10px;
  --r-sm: 7px;

  --font: Inter, "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --gutter: 2rem;
  --measure: 70ch;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); letter-spacing: -0.03em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; letter-spacing: -0.01em; }
p  { margin: 0 0 1em; }

.wrap { width: min(1240px, 100% - calc(var(--gutter) * 2)); margin-inline: auto; }
.quiet { color: var(--text-2); }

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

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--tint);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ Actions */
.action {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .68rem 1.2rem; border-radius: var(--r-sm);
  font-size: .95rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  transition: background-color .13s ease, border-color .13s ease, color .13s ease;
}
.action:hover { background: #2b2f39; border-color: #3b414f; }

/* Le bouton qui donne le fichier prend la teinte de la page. */
.action-get {
  background: var(--tint); border-color: var(--tint); color: var(--on-accent);
}
.action-get:hover { filter: brightness(1.1); background: var(--tint); border-color: var(--tint); }

.action-small { padding: .38rem .75rem; font-size: .85rem; }
.action-quiet { background: transparent; color: var(--text-2); }
.action-quiet:hover { background: var(--surface-2); color: var(--text); }
.action-block { display: flex; width: 100%; justify-content: center; }
.action-danger { background: transparent; border-color: #5d3038; color: #ff6b7f; }
.action-danger:hover { background: #ff4d6d; border-color: #ff4d6d; color: #fff; }
.action-size { font-weight: 500; opacity: .82; }

/* ---------------------------------------------------------------- Étiquettes */
.chip {
  display: inline-flex; align-items: center; gap: .38rem;
  font-size: .8rem; font-weight: 600; color: var(--tint-own, var(--text-2));
  text-decoration: none;
}
.chip::before {
  content: ""; width: .5rem; height: .5rem; border-radius: 2px;
  background: currentColor; flex: none;
}
.chip:hover { filter: brightness(1.15); }

.label {
  display: inline-block; padding: .22rem .6rem; border-radius: 999px;
  font-size: .82rem; text-decoration: none;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2);
}
.label:hover { border-color: var(--tint); color: var(--text); }
.label.is-on { background: var(--tint); border-color: var(--tint); color: var(--on-accent); }
.labels { display: flex; flex-wrap: wrap; gap: .45rem; }

/* ------------------------------------------------------------------- En-tête */
.masthead {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.masthead-row { display: flex; align-items: center; gap: 1.8rem; padding: .85rem 0; }

.wordmark {
  font-size: 1.15rem; font-weight: 800; letter-spacing: -0.03em;
  text-decoration: none; white-space: nowrap;
}
.wordmark::first-letter { color: var(--accent); }

.masthead-nav { display: flex; gap: 1.3rem; font-size: .94rem; font-weight: 500; }
.masthead-nav a { color: var(--text-2); text-decoration: none; }
.masthead-nav a:hover, .masthead-nav a.is-here { color: var(--text); }

.masthead-search { margin-left: auto; min-width: 0; display: flex; gap: .5rem; }
.masthead-search input {
  flex: 1 1 8rem; min-width: 0; padding: .48rem .85rem;
  font: inherit; font-size: .92rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.masthead-search input::placeholder { color: var(--text-3); }
.masthead-search input:focus { outline: 0; border-color: var(--accent); }
.masthead-search button {
  flex: none; padding: .48rem .95rem; border-radius: var(--r-sm);
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
}
.masthead-search button:hover { background: #2b2f39; }
.menu-button {
  display: none; margin-left: auto; padding: .4rem .8rem; border-radius: var(--r-sm);
  font: inherit; font-weight: 600; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
}

/* ------------------------------------------------------------------ Messages */
.notices { margin-top: 1.2rem; }
.notice {
  margin: 0 0 .6rem; padding: .7rem 1rem; border-radius: var(--r-sm);
  font-size: .93rem; background: var(--surface); border-left: 3px solid var(--ok);
}
.notice-error { border-left-color: var(--accent); }
.notices-floating {
  position: fixed; top: 1rem; left: 50%; transform: translateX(-50%);
  z-index: 60; width: min(30rem, 92vw);
}
.notices-floating .notice { background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--ok); }

/* ----------------------------------------------------------- Carte de projet */
.plate {
  display: block; text-decoration: none; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line-soft);
  overflow: hidden; transition: border-color .15s ease, background-color .15s ease;
}
.plate:hover { background: var(--surface-2); border-color: var(--tint-own, var(--line)); }

.plate-art {
  position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--tint-own, var(--surface-2));
  display: grid; place-items: center;
}
.plate-art img { width: 100%; height: 100%; object-fit: cover; }
.plate-initial { font-size: 2.6rem; font-weight: 800; color: #fff; opacity: .55; }

/* La note se pose sur le visuel : la ligne du bas reste lisible. */
.plate-note {
  position: absolute; top: .6rem; right: .6rem;
  display: inline-flex; align-items: center; gap: .22rem;
  padding: .16rem .48rem .18rem; border-radius: 999px;
  font-size: .78rem; font-weight: 600; line-height: 1;
  color: #fff; background: rgba(10, 11, 15, .72);
  backdrop-filter: blur(6px);
}
.plate-note-star { color: #ffc043; font-size: .82rem; }

.plate-body {
  display: block; padding: 1.05rem 1.15rem 1.15rem;
  border-top: 1px solid var(--line-soft);
}
.plate-title {
  display: block; font-size: 1.02rem; font-weight: 600; letter-spacing: -0.015em;
  line-height: 1.3; margin-bottom: .6rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.plate:hover .plate-title { color: var(--tint-own, var(--text)); }

.plate-line {
  display: flex; align-items: center; justify-content: space-between;
  gap: .8rem; font-size: .85rem;
}
.plate-shelf {
  display: inline-flex; align-items: center; gap: .45rem;
  min-width: 0; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.plate-shelf .dot {
  width: .45rem; height: .45rem; border-radius: 50%; flex: none;
  background: var(--tint-own, var(--text-3));
}
.plate-price { flex: none; font-weight: 600; color: var(--text); }

.plates {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.4rem;
}

/* -------------------------------------------------------------- Mise en avant */
/* La grande image porte la page ; le texte est posé dessus, sur un voile net. */
.opening { padding: 1.8rem 0 0; }
.opening-card {
  /* La carte entière adopte la couleur du projet mis en avant. */
  --tint: var(--tint-own);
  position: relative; overflow: hidden;
  border-radius: 18px; border: 1px solid var(--line-soft);
  background: var(--tint-own, var(--surface));
  min-height: 340px;
}
/* Zone cliquable qui couvre le visuel, sous le texte et les boutons. */
.opening-reach { position: absolute; inset: 0; z-index: 1; }
.opening-card h1 a { text-decoration: none; }
.opening-card h1 a:hover { color: var(--tint-own); }
.opening-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.opening-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(11, 12, 16, .94) 0%, rgba(11, 12, 16, .72) 38%, rgba(11, 12, 16, .12) 78%);
}
.opening-body {
  position: relative; z-index: 2; pointer-events: none;
  padding: 2.4rem 2.2rem 2rem;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap; min-height: 340px;
}
.opening-text { max-width: 46ch; }
.opening-flag {
  display: inline-block; margin-bottom: .8rem; padding: .28rem .7rem;
  border-radius: 999px; font-size: .78rem; font-weight: 700;
  background: var(--tint-own, var(--accent)); color: #fff;
}
.opening-body h1 { margin: 0 0 .5rem; font-size: clamp(1.9rem, 4.2vw, 3rem); }
.opening-sub { margin: 0 0 1rem; color: #cfd4e0; font-size: 1.02rem; }
.opening-meta { display: flex; gap: 1.1rem; font-size: .88rem; color: var(--text-2); flex-wrap: wrap; }
.opening-get { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.opening-text a, .opening-get a { pointer-events: auto; }

/* Catalogue vide : une invitation, pas un message d'erreur. */
.opening-empty {
  padding: 4.5rem 2rem; text-align: center;
  border: 1px dashed var(--line); border-radius: 18px; margin-top: 2rem;
}
.opening-empty h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); overflow-wrap: break-word; }
.opening-empty p { color: var(--text-2); max-width: 46ch; margin-inline: auto; }

/* ------------------------------------------------------------------ Sections */
.set { padding: 3rem 0 0; }
.set-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.3rem;
}
.set-head h2 { margin: 0; }
.set-head a { font-size: .9rem; font-weight: 600; color: var(--text-2); text-decoration: none; }
.set-head a:hover { color: var(--accent); }

/* Rayons : des blocs de couleur pleine, un par catégorie. */
.shelves { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.shelf {
  position: relative; display: block; padding: 1.15rem 1.2rem 1.25rem;
  border-radius: var(--r-lg); text-decoration: none; overflow: hidden;
  background: color-mix(in srgb, var(--tint-own) 16%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--tint-own) 34%, transparent);
  transition: background-color .15s ease;
}
.shelf:hover { background: color-mix(in srgb, var(--tint-own) 28%, var(--surface)); }
.shelf-name { display: block; font-size: 1.08rem; font-weight: 700; letter-spacing: -0.015em; }
.shelf-count { display: block; font-size: .84rem; color: var(--text-2); margin-top: .1rem; }
.shelf p { margin: .5rem 0 0; font-size: .86rem; color: var(--text-2); }

/* ----------------------------------------------------------------- Catalogue */
.catalogue { padding: 2.2rem 0 4rem; }
.catalogue-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.8rem;
}
.catalogue-head h1 { margin: 0; }
.catalogue-head p { margin: .35rem 0 0; color: var(--text-2); }
.sorter { display: flex; align-items: center; gap: .6rem; font-size: .9rem; color: var(--text-2); }
.sorter select {
  padding: .45rem .8rem; border-radius: var(--r-sm); cursor: pointer;
  font: inherit; font-size: .9rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--line);
}

.catalogue-body { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 2.4rem; }
.sieve {
  position: sticky; top: 5rem; align-self: start;
  padding: 1.15rem; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line-soft); font-size: .92rem;
}
.sieve-group { padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line-soft); }
.sieve-group:last-of-type { border-bottom: 0; margin-bottom: .6rem; }
.sieve h2 { font-size: .88rem; font-weight: 600; color: var(--text-3); margin: 0 0 .55rem; }
.sieve label { display: flex; gap: .55rem; align-items: center; padding: .16rem 0; cursor: pointer; }
.sieve label:hover { color: #fff; }
.sieve input { accent-color: var(--accent); }
.sieve-search {
  width: 100%; padding: .45rem .7rem; border-radius: var(--r-sm);
  font: inherit; font-size: .9rem; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line);
}
.sieve-search:focus { outline: 0; border-color: var(--accent); }

/* Le résumé n'apparaît qu'aux largeurs où les filtres se replient. */
.sieve-fold > summary { display: none; }
.sieve-actions { margin: 0; display: flex; gap: .5rem; flex-wrap: wrap; }

.pages { display: flex; gap: .4rem; margin-top: 2.5rem; flex-wrap: wrap; }
.pages a {
  min-width: 2.3rem; padding: .35rem .6rem; text-align: center; text-decoration: none;
  font-size: .9rem; font-weight: 600; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line-soft); color: var(--text-2);
}
.pages a:hover { color: var(--text); border-color: var(--line); }
.pages a.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.nothing {
  padding: 3.5rem 2rem; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--r-lg);
}
.nothing h2 { font-size: 1.1rem; }
.nothing p { color: var(--text-2); max-width: 42ch; margin-inline: auto; }

/* --------------------------------------------------------------- Fiche projet */
.work { padding-bottom: 4rem; }
.work-hero {
  position: relative; margin-top: 1.6rem; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line-soft); background: var(--tint);
  min-height: 300px; display: flex; align-items: flex-end;
}
.work-hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.work-hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11, 12, 16, .95) 0%, rgba(11, 12, 16, .7) 42%, rgba(11, 12, 16, .1) 80%);
}
.work-head {
  position: relative; width: 100%; padding: 2.4rem 2.2rem 1.9rem;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.8rem; flex-wrap: wrap;
}
.work-head h1 { margin: .3rem 0 .4rem; font-size: clamp(1.9rem, 4.4vw, 3rem); overflow-wrap: break-word; }
.work-sub { margin: 0; color: #cfd4e0; max-width: 52ch; }
.work-get { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; }
.work-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.work-pills { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .9rem; }

.work-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.6rem; padding-top: 2.4rem; }
.work-part { margin-bottom: 2.8rem; }
.work-part > h2 { margin-bottom: 1.1rem; }
.prose { max-width: var(--measure); color: #d3d8e4; }
.prose code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .92em;
  background: var(--surface-2); padding: .08em .35em; border-radius: 4px;
}

.reel {
  aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden;
  background: #000; border: 1px solid var(--line-soft); margin-bottom: 1rem;
}
.reel iframe, .reel video { width: 100%; height: 100%; border: 0; display: block; }

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .9rem; }
.shots button {
  padding: 0; border: 1px solid var(--line-soft); border-radius: var(--r); overflow: hidden;
  background: var(--surface-2); cursor: zoom-in; display: block;
}
.shots button:hover { border-color: var(--tint); }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* Versions */
.releases { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.release {
  padding: 1.1rem 1.2rem; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line-soft);
}
.release-row { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .5rem; }
.release-no { font-weight: 700; }
.release-current {
  padding: .1rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 700;
  background: var(--tint); color: var(--on-accent);
}
.release-meta {
  margin-left: auto; display: flex; gap: 1rem; flex-wrap: wrap;
  font-size: .84rem; color: var(--text-3);
}
.release-log { margin: 0 0 .9rem; font-size: .92rem; color: var(--text-2); max-width: var(--measure); }

/* Fiche technique */
.specs { position: sticky; top: 5rem; align-self: start; display: grid; gap: 1.2rem; }
.specs-box { padding: 1.15rem 1.25rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-soft); }
.specs-box h2 { font-size: .95rem; margin-bottom: .8rem; }
.specs dl { margin: 0; font-size: .88rem; }
.specs dl > div { display: flex; justify-content: space-between; gap: 1rem; padding: .42rem 0; }
.specs dl > div + div { border-top: 1px solid var(--line-soft); }
.specs dt { color: var(--text-3); }
.specs dd { margin: 0; text-align: right; font-weight: 600; }

.near { display: grid; gap: .1rem; }
.near a { display: flex; gap: .7rem; align-items: center; padding: .5rem 0; text-decoration: none; }
.near a + a { border-top: 1px solid var(--line-soft); }
.near a:hover .near-name { color: var(--text); }
.near img, .near .thumb {
  width: 2.5rem; height: 2.5rem; flex: none; border-radius: var(--r-sm); object-fit: cover;
  background: var(--tint-own, var(--surface-2)); display: grid; place-items: center;
  font-weight: 700; color: #fff;
}
.near-name { display: block; font-size: .9rem; font-weight: 600; color: var(--text-2); }
.near-shelf { display: block; font-size: .8rem; color: var(--text-3); }

/* ---------------------------------------------------------------------- Avis */
.verdict {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2rem;
  align-items: center; padding: 1.3rem 1.4rem; margin-bottom: 1.6rem;
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-soft);
}
.verdict-score { font-size: 3rem; font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.verdict-count { font-size: .85rem; color: var(--text-3); margin-top: .2rem; }
.verdict-bars { display: grid; gap: .3rem; }
.verdict-bar { display: grid; grid-template-columns: 4.5rem 1fr 2rem; align-items: center; gap: .7rem; font-size: .82rem; color: var(--text-3); }
.verdict-bar .track { height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.verdict-bar .fill { display: block; height: 100%; background: var(--tint); border-radius: 999px; }

.stars { letter-spacing: .06em; white-space: nowrap; }
.stars .on { color: #ffc043; }
.stars .off { color: #3a3f4b; }
.stars-small { font-size: .85rem; }

.opinions { list-style: none; margin: 0 0 1.8rem; padding: 0; display: grid; gap: .8rem; }
.opinion {
  padding: 1rem 1.2rem; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line-soft); max-width: var(--measure);
}
.opinion-row { display: flex; align-items: center; gap: .7rem; margin-bottom: .4rem; }
.opinion-who { font-weight: 600; }
.opinion-when { margin-left: auto; font-size: .82rem; color: var(--text-3); }
.opinion p { margin: 0; color: var(--text-2); }

/* --------------------------------------------------------------- Formulaires */
.form-block {
  max-width: 36rem; padding: 1.4rem 1.5rem; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line-soft);
}
.form-block h3 { margin-bottom: 1rem; }
.field { margin-bottom: 1rem; }
.field label, .field .field-name { display: block; font-size: .89rem; font-weight: 600; margin-bottom: .35rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: .58rem .75rem; border-radius: var(--r-sm);
  font: inherit; font-size: .94rem; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 0; border-color: var(--tint); }
.field-pair { display: grid; grid-template-columns: 1fr auto; gap: 1.2rem; align-items: start; }
.field-note { font-size: .82rem; color: var(--text-3); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Notation : écrite à l'envers pour que le survol allume les étoiles à gauche. */
.rate { display: inline-flex; flex-direction: row-reverse; }
.rate input { position: absolute; opacity: 0; width: 0; }
.rate label { font-size: 1.7rem; line-height: 1; color: #3a3f4b; cursor: pointer; padding: 0 .05em; }
.rate input:checked ~ label, .rate label:hover, .rate label:hover ~ label { color: #ffc043; }
.rate input:focus-visible + label { outline: 2px solid var(--tint); border-radius: 4px; }

/* -------------------------------------------------------------- Visionneuse */
.viewer {
  position: fixed; inset: 0; z-index: 70; display: grid; place-content: center; gap: .9rem;
  padding: 2.5rem; background: rgba(8, 9, 12, .95);
}
.viewer[hidden] { display: none; }
.viewer img { max-width: min(1150px, 92vw); max-height: 80vh; object-fit: contain; border-radius: var(--r); }
.viewer p { margin: 0; text-align: center; color: var(--text-2); font-size: .88rem; }
.viewer button {
  position: absolute; top: 1.2rem; right: 1.4rem; padding: .35rem .8rem;
  border-radius: var(--r-sm); font: inherit; font-weight: 600; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
}

/* -------------------------------------------------------------- Page absente */
.missing { padding: 6rem 0 5rem; text-align: center; }
.missing h1 { font-size: clamp(1.9rem, 6vw, 3.4rem); overflow-wrap: break-word; }
.missing p { color: var(--text-2); max-width: 42ch; margin-inline: auto; }
.missing .work-links { justify-content: center; margin-top: 1.6rem; }

/* ----------------------------------------------------------------- Pied de page */
.colophon { margin-top: 5rem; border-top: 1px solid var(--line-soft); background: #101116; }
.colophon-row { display: grid; grid-template-columns: minmax(0, 2fr) 1fr 1fr; gap: 2.5rem; padding: 2.6rem 0 2rem; }
.colophon-brand p { margin: .6rem 0 0; max-width: 36ch; color: var(--text-3); font-size: .92rem; }
.colophon-col { display: grid; align-content: start; gap: .45rem; font-size: .92rem; }
.colophon-col h2 { font-size: .9rem; font-weight: 600; color: var(--text-3); margin: 0 0 .3rem; }
.colophon-col a { color: var(--text-2); text-decoration: none; }
.colophon-col a:hover { color: var(--text); }
.colophon-legal { padding: 1.1rem 0 2.2rem; border-top: 1px solid var(--line-soft); font-size: .84rem; color: var(--text-3); }

/* ------------------------------------------------------------------ Adaptatif */
@media (max-width: 1000px) {
  .catalogue-body, .work-body { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .sieve, .specs { position: static; }
  /* Sous 1000 px, les filtres se replient pour laisser les résultats en tête. */
  .sieve-fold > summary {
    display: block; cursor: pointer; list-style: none;
    font-size: .93rem; font-weight: 600; color: var(--text-2);
  }
  .sieve-fold > summary::-webkit-details-marker { display: none; }
  .sieve-fold > summary::after { content: " ▾"; color: var(--text-3); }
  .sieve-fold[open] > summary { margin-bottom: 1rem; }
  .sieve-fold[open] > summary::after { content: " ▴"; }
  /* La grille va sur un conteneur explicite : le contenu d'un <details>
     est encapsulé dans un bloc interne par le navigateur. */
  .sieve-inner {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 1.6rem;
  }
  .sieve-actions { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .masthead-row { flex-wrap: wrap; row-gap: .8rem; }
  .masthead-search { order: 3; flex-basis: 100%; margin-left: 0; }
}
@media (max-width: 760px) {
  :root { --gutter: 1.1rem; }
  .masthead-nav { order: 2; flex-basis: 100%; display: none; flex-direction: column; gap: .6rem; }
  .masthead-nav.is-open { display: flex; }
  .menu-button { display: block; }
  .masthead-search button { padding: .48rem .7rem; }
  .opening-body, .work-head { padding: 1.6rem 1.3rem 1.4rem; }
  .opening-body { min-height: 280px; }
  .verdict { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
  .field-pair { grid-template-columns: 1fr; }
  .colophon-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
