/* ==========================================================================
   PULP — mes parfums fruités
   Une feuille de style unique. Les fiches utilisent l'attribut HTML « popover »,
   les filtres des boutons radio + :has(). Seul « Précédent / Suivant » a un
   petit script, en bas de index.html.

   Pour changer les couleurs : modifie les variables juste en dessous.
   Pour changer la couleur d'un voyant (LED) : voir l'attribut style="--led:…"
   sur chaque carte dans index.html.
   ========================================================================== */

:root {
  --ink: #130c1d;
  --panel: #1b1228;
  --panel-hi: #241936;
  --line: #3a2b52;
  --text: #f5eff8;
  --muted: #b9abc9;

  --led: #5bf2a0; /* valeur par défaut, remplacée carte par carte */

  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-led: "Doto", "Courier New", monospace;

  --strip: linear-gradient(
    90deg,
    #ff3b5c, #cff35a, #9d6bff, #ffc53d, #ff8a3d, #ffa6d5, #ff3da8, #5bf2a0, #4dd8ff
  );

  --radius: 18px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- Base ---------------------------------------------------------------- */

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

html {
  background: var(--ink);
  color-scheme: dark;
  scroll-padding-top: 76px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Papier millimétré en fond, qui s'estompe vers le bas */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%);
}

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

h1,
h2,
h3,
p,
ul,
dl,
dd,
fieldset {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

.wrap {
  width: min(1180px, 100% - 40px);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--text);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

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

/* --- Voyant (LED) ---------------------------------------------------------- */

.led {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--led);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--led) 25%, transparent),
    0 0 12px 2px color-mix(in srgb, var(--led) 70%, transparent);
}

@media (prefers-reduced-motion: no-preference) {
  .brand .led,
  .readout .led {
    animation: breathe 2.4s ease-in-out infinite;
  }
}

@keyframes breathe {
  50% {
    opacity: 0.35;
    box-shadow: 0 0 0 2px transparent, 0 0 4px 0 color-mix(in srgb, var(--led) 40%, transparent);
  }
}

/* --- Barre du haut --------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(19 12 29 / 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.topbar::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--strip);
  box-shadow: 0 0 14px rgb(255 61 168 / 0.45);
}

.topbar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.topbar nav {
  display: flex;
  gap: 6px;
}

.topbar nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}

.topbar nav a:hover {
  color: var(--text);
  background: var(--panel-hi);
}

/* --- Boutons --------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff3b5c, #ffc53d);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 0 0 0 rgb(255 120 90 / 0);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px -4px rgb(255 120 90 / 0.55);
}

/* --- Accroche -------------------------------------------------------------- */

.hero {
  padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 88px);
}

.hero-in {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lead {
  max-width: 34em;
  margin: 22px 0 30px;
  color: var(--muted);
  font-size: 1.15rem;
}

/* Rangée de voyants : un par parfum */
.strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 40px;
}

.strip button {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.strip button::before {
  content: "";
  position: absolute;
  inset: 13px 5px;
  border-radius: 6px;
  background: var(--led);
  box-shadow: 0 0 14px 1px color-mix(in srgb, var(--led) 65%, transparent);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.strip button:hover::before,
.strip button:focus-visible::before {
  transform: scale(1.18, 1.7);
  box-shadow: 0 0 24px 4px color-mix(in srgb, var(--led) 80%, transparent);
}

.strip-label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Scanner : le flacon est « lu » par un faisceau */
.scanner {
  --c: #4dd8ff;
  position: relative;
  overflow: hidden;
  max-width: 420px;
  margin-inline: auto;
  padding: 44px 32px 108px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 38%, rgb(157 107 255 / 0.28), transparent 62%),
    var(--panel);
}

.scanner::before {
  content: "";
  position: absolute;
  inset: 14px;
  pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) top left / 20px 2px,
    linear-gradient(var(--c), var(--c)) top left / 2px 20px,
    linear-gradient(var(--c), var(--c)) top right / 20px 2px,
    linear-gradient(var(--c), var(--c)) top right / 2px 20px,
    linear-gradient(var(--c), var(--c)) bottom left / 20px 2px,
    linear-gradient(var(--c), var(--c)) bottom left / 2px 20px,
    linear-gradient(var(--c), var(--c)) bottom right / 20px 2px,
    linear-gradient(var(--c), var(--c)) bottom right / 2px 20px;
  background-repeat: no-repeat;
  opacity: 0.85;
}

.scanner img {
  width: 72%;
  margin-inline: auto;
  filter: drop-shadow(0 0 18px rgb(255 61 168 / 0.35));
}

.scanline {
  position: absolute;
  left: 0;
  right: 0;
  top: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--c), transparent);
  box-shadow: 0 0 18px 4px color-mix(in srgb, var(--c) 60%, transparent);
}

.scanline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 70px;
  background: linear-gradient(to top, color-mix(in srgb, var(--c) 22%, transparent), transparent);
}

@media (prefers-reduced-motion: no-preference) {
  .scanline {
    animation: sweep 3.6s ease-in-out infinite alternate;
  }
}

@keyframes sweep {
  from {
    top: 6%;
  }
  to {
    top: 82%;
  }
}

.readout {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgb(19 12 29 / 0.85);
}

.readout .led {
  --led: #5bf2a0;
}

.readout-words {
  position: relative;
  flex: 1;
  height: 1.5rem;
  font-family: var(--font-led);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.5rem;
  letter-spacing: 0.12em;
  color: #5bf2a0;
  text-shadow: 0 0 10px rgb(91 242 160 / 0.7);
}

.readout-words span {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.readout-words span:first-child {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .readout-words span {
    animation: word 8s steps(1, end) infinite;
  }
  .readout-words span:nth-child(1) { animation-delay: 0s; }
  .readout-words span:nth-child(2) { animation-delay: 2s; }
  .readout-words span:nth-child(3) { animation-delay: 4s; }
  .readout-words span:nth-child(4) { animation-delay: 6s; }
}

@keyframes word {
  0%   { opacity: 1; }
  25%  { opacity: 0; }
  100% { opacity: 0; }
}

/* --- Sections -------------------------------------------------------------- */

.section {
  padding: clamp(48px, 7vw, 96px) 0;
}

.section-head {
  max-width: 40em;
  margin-bottom: 32px;
}

.section-head h2,
.outro h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.section-head p {
  margin-top: 14px;
  color: var(--muted);
}

/* --- Filtres --------------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  margin-bottom: 36px;
  border: 0;
}

.filters label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.filters .led {
  --led: #5a4a73;
  box-shadow: none;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.filters b {
  font-family: var(--font-led);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--text);
}

.filters label:hover {
  color: var(--text);
  border-color: #5a4a73;
}

.filters input:checked + label {
  color: var(--text);
  border-color: #5bf2a0;
  background: color-mix(in srgb, #5bf2a0 10%, var(--panel));
}

.filters input:checked + label .led {
  --led: #5bf2a0;
  box-shadow:
    0 0 0 2px color-mix(in srgb, #5bf2a0 25%, transparent),
    0 0 12px 2px color-mix(in srgb, #5bf2a0 70%, transparent);
}

.filters input:focus-visible + label {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* --- Grille de cartes ------------------------------------------------------ */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition:
    transform 0.4s var(--ease),
    box-shadow 0.4s var(--ease),
    opacity 0.35s,
    filter 0.35s,
    border-color 0.3s;
}

.card article {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 26px 24px 24px;
}

/* Barre-voyant en haut de la carte */
.card::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: -1px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--led);
  box-shadow: 0 0 16px 2px color-mix(in srgb, var(--led) 70%, transparent);
  transition: left 0.4s var(--ease), right 0.4s var(--ease);
}

.card-cat {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-fruit {
  width: 108px;
  height: 108px;
  margin: 18px auto 14px;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--led) 45%, transparent));
  transition: transform 0.5s var(--ease), filter 0.4s;
}

.card-brand {
  color: var(--led);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-name {
  margin-top: 2px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.25;
}

.card-line {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.97rem;
}

.card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
}

.card-top > span {
  margin-right: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-top ul {
  display: contents;
}

.card-top li {
  padding: 3px 10px;
  border: 1px solid color-mix(in srgb, var(--led) 45%, var(--line));
  border-radius: 999px;
  font-size: 0.85rem;
}

/* Le bouton couvre toute la carte : un clic n'importe où ouvre la fiche */
.card-open {
  display: block;
  width: 100%;
  margin-top: auto;
  padding: 18px 0 0;
  border: 0;
  background: none;
  color: var(--text);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.card-open::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: 14px;
  background: var(--line);
}

.card-open::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.card-open:focus-visible {
  outline: none;
}

.card:has(.card-open:focus-visible) {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

/* Grossissement au survol / au focus clavier */
.card:hover,
.card:focus-within {
  z-index: 2;
  transform: translateY(-6px) scale(1.06);
  border-color: color-mix(in srgb, var(--led) 70%, var(--line));
  box-shadow:
    0 24px 50px -12px rgb(0 0 0 / 0.7),
    0 0 40px -4px color-mix(in srgb, var(--led) 45%, transparent);
}

.card:hover::before,
.card:focus-within::before {
  left: 10px;
  right: 10px;
}

.card:hover .card-fruit,
.card:focus-within .card-fruit {
  transform: scale(1.14) rotate(-4deg);
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--led) 75%, transparent));
}

/* Les voisines s'assombrissent pendant le survol (souris uniquement) */
@media (hover: hover) {
  .grid:has(.card:hover) .card:not(:hover) {
    opacity: 0.55;
  }
}

/* Filtres : les cartes hors catégorie « s'éteignent » */
.shelf:has(#f-luxe:checked) .card:not([data-cat="luxe"]),
.shelf:has(#f-niche:checked) .card:not([data-cat="niche"]),
.shelf:has(#f-grandes:checked) .card:not([data-cat="grandes"]) {
  opacity: 0.2;
  filter: grayscale(1);
  pointer-events: none;
  transform: scale(0.97);
}

/* Une carte éteinte n'est plus atteignable au clavier */
.shelf:has(#f-luxe:checked) .card:not([data-cat="luxe"]) .card-open,
.shelf:has(#f-niche:checked) .card:not([data-cat="niche"]) .card-open,
.shelf:has(#f-grandes:checked) .card:not([data-cat="grandes"]) .card-open {
  visibility: hidden;
}

/* --- Volets (pyramide olfactive) ------------------------------------------- */

.volets {
  display: flex;
  gap: 14px;
  height: 290px;
}

.volet {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--led) 16%, transparent), transparent 55%),
    var(--panel);
  cursor: default;
  transition: flex-grow 0.6s var(--ease), border-color 0.3s, box-shadow 0.4s;
}

.volet::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 22px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--led);
  box-shadow: 0 0 14px 2px color-mix(in srgb, var(--led) 70%, transparent);
}

.volet h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.1;
}

.volet-when {
  margin-top: 6px;
  color: var(--led);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.volet-body {
  width: min(30em, 100%);
  min-width: 240px;
  margin-top: 22px;
  color: var(--muted);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s, transform 0.5s var(--ease);
}

/* Par défaut, le premier volet est ouvert ; il se referme quand on en survole un autre */
.volets:not(:hover):not(:focus-within) .volet:first-child,
.volet:hover,
.volet:focus {
  flex-grow: 3.4;
  border-color: color-mix(in srgb, var(--led) 60%, var(--line));
  box-shadow: 0 0 34px -8px color-mix(in srgb, var(--led) 55%, transparent);
}

.volets:not(:hover):not(:focus-within) .volet:first-child .volet-body,
.volet:hover .volet-body,
.volet:focus .volet-body {
  opacity: 1;
  transform: none;
  transition-delay: 0.15s;
}

/* --- Conclusion ------------------------------------------------------------ */

.outro {
  text-align: center;
}

.outro h2 {
  max-width: 20em;
  margin-inline: auto;
}

.outro p {
  margin: 14px 0 28px;
  color: var(--muted);
}

/* --- Pied de page ---------------------------------------------------------- */

.footer {
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.footer p {
  max-width: 52em;
}

/* --- Fiches (tiroirs « popover ») -------------------------------------------- */

@supports selector(:popover-open) {
  .drawer {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(460px, 100%);
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 28px 28px 32px;
    overflow-y: auto;
    border: 0;
    border-left: 1px solid var(--line);
    background:
      radial-gradient(circle at 80% 0%, color-mix(in srgb, var(--led) 22%, transparent), transparent 55%),
      var(--panel);
    color: var(--text);
    box-shadow: -30px 0 60px -20px rgb(0 0 0 / 0.7);

    transform: translateX(100%);
    transition:
      transform 0.5s var(--ease),
      overlay 0.5s allow-discrete,
      display 0.5s allow-discrete;
  }

  .drawer:popover-open {
    transform: none;
  }

  @starting-style {
    .drawer:popover-open {
      transform: translateX(100%);
    }
  }

  .drawer::backdrop {
    background: rgb(10 5 18 / 0);
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
    transition:
      background-color 0.5s,
      backdrop-filter 0.5s,
      overlay 0.5s allow-discrete,
      display 0.5s allow-discrete;
  }

  .drawer:popover-open::backdrop {
    background: rgb(10 5 18 / 0.66);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }

  @starting-style {
    .drawer:popover-open::backdrop {
      background: rgb(10 5 18 / 0);
      backdrop-filter: blur(0);
    }
  }

  /* On fige la page derrière quand une fiche est ouverte */
  body:has(.drawer:popover-open) {
    overflow: hidden;
  }
}

/* Navigateur trop ancien pour « popover » : les fiches s'affichent à la suite */
@supports not selector(:popover-open) {
  .drawer {
    width: min(1180px, 100% - 40px);
    margin: 0 auto 24px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
  }
  .drawer-close,
  .drawer-nav {
    display: none;
  }
}

.drawer-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 1;
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-hi);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.drawer-close:hover {
  border-color: var(--led);
  background: color-mix(in srgb, var(--led) 14%, var(--panel-hi));
}

.drawer-fruit {
  width: 132px;
  height: 132px;
  margin: 20px 0 8px;
  filter: drop-shadow(0 0 16px color-mix(in srgb, var(--led) 65%, transparent));
}

.drawer-cat {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.drawer h3 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1.15;
}

.drawer-brand {
  margin-top: 4px;
  color: var(--led);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drawer-profile {
  margin: 18px 0 28px;
  color: var(--muted);
}

/* Pyramide : trois paliers reliés par une ligne et des voyants */
.pyramid {
  position: relative;
}

.pyramid > div {
  position: relative;
  padding: 0 0 24px 32px;
}

.pyramid > div::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--led);
  box-shadow: 0 0 14px 2px color-mix(in srgb, var(--led) 75%, transparent);
}

.pyramid > div::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 22px;
  bottom: 4px;
  width: 2px;
  background: linear-gradient(var(--led), var(--line));
}

.pyramid > div:last-child {
  padding-bottom: 0;
}

.pyramid > div:last-child::after {
  display: none;
}

.pyramid dt {
  color: var(--led);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pyramid dd {
  margin-top: 4px;
}

.drawer-note {
  margin-top: 24px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.drawer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.drawer-nav button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-hi);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.25s var(--ease);
}

.drawer-nav button:last-child {
  align-items: flex-end;
  text-align: right;
}

.drawer-nav button:hover {
  border-color: var(--led);
  transform: translateY(-2px);
}

.drawer-nav span {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.drawer-nav strong {
  font-weight: 600;
  line-height: 1.3;
}

/* --- Adaptation aux écrans moyens et petits --------------------------------- */

@media (max-width: 900px) {
  .hero-in {
    grid-template-columns: 1fr;
  }

  .scanner {
    max-width: 360px;
  }

  /* Volets empilés : tout est lisible sans survol */
  .volets {
    flex-direction: column;
    height: auto;
  }

  .volet,
  .volets:not(:hover):not(:focus-within) .volet:first-child,
  .volet:hover,
  .volet:focus {
    flex: 0 0 auto;
  }

  .volet-body {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 1rem;
  }

  .topbar nav a {
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .strip {
    gap: 2px;
  }

  .strip button {
    width: 36px;
  }

  .drawer {
    padding: 22px 20px 28px;
  }
}

/* Écrans tactiles : pas de survol, donc pas de grossissement qui reste « collé » */
@media (hover: none) {
  .card:hover {
    transform: none;
    box-shadow: none;
  }
}

/* Mouvement réduit : plus d'animation, les changements d'état restent visibles */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
