/* =========================================================
   Simplavie : portail des aperçus
   1) Structure commune   2) Un bloc par style (thème)
   Le style actif est écrit sur <html data-theme="...">
   ========================================================= */

/* ---------- 1. Structure commune ---------- */
:root {
  --bg: #fff; --ink: #000; --muted: #4a4a4a; --error: #c8102e; --focus: #2f4bff;
  --font-display: system-ui, sans-serif; --font-body: system-ui, sans-serif;
  --mx: 50vw; --my: 30vh;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease;
}
h1, h2 { font-family: var(--font-display); margin: 0; line-height: 1.1; font-weight: 700; text-wrap: balance; }
p { margin: 0; }
input, button { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.skip { position: absolute; left: 16px; top: -100px; z-index: 100; padding: .6rem 1rem; background: #fff; color: #000; border: 2px solid #000; }
.skip:focus { top: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 60; pointer-events: none; }

.stage {
  position: relative; z-index: 1;
  width: 100%; max-width: 1160px; margin-inline: auto;
  min-height: 100vh; min-height: 100svh;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(16px, 4vw, 40px) 9rem;
  display: flex; flex-direction: column;
}
.portal { flex: 1; display: grid; gap: 2rem; align-content: center; padding-block: 2rem; }
.brand { display: inline-block; }
.brand-text span { display: inline-block; }
.brand-tag { margin-top: .5rem; }

.win { position: relative; min-width: 0; }
.win-bar { display: none; }
.win-body > * + * { margin-top: 1rem; }
.lead { max-width: 34em; font-size: 1.15rem; }
.theme-note { max-width: 34em; font-size: .95rem; color: var(--muted); }

.key h2 { font-size: 1.5rem; }
.key-form { margin-top: 1rem; }
.key-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.key-row input {
  flex: 1 1 13rem; min-width: 0; min-height: 3.25rem; padding: .7rem 1rem;
  background: #fff; color: #000; border: 2px solid currentColor; border-radius: 0;
  text-transform: uppercase; letter-spacing: .08em;
}
.key-row input::placeholder { text-transform: none; letter-spacing: 0; opacity: 1; color: var(--placeholder, #666); }
.key-row button { flex: 0 0 auto; min-height: 3.25rem; padding: .7rem 1.5rem; border: 0; font-weight: 700; }
.key-row button[disabled] { cursor: progress; opacity: .75; }
.key-help { margin-top: .75rem; font-size: .95rem; }
.key-error { margin-top: .75rem; font-weight: 600; color: var(--error); }
.key-error[hidden] { display: none !important; }

/* Barre des styles (le « dock ») */
.dock {
  position: fixed; z-index: 50; left: 50%; bottom: 16px; transform: translateX(-50%);
  max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: .5rem; padding: .4rem .4rem .4rem .9rem;
  font-family: var(--font-body);
}
.dock-label { font-size: .85rem; white-space: nowrap; }
.dock-list { display: flex; gap: .25rem; }
.dock button {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 2.75rem; padding: .35rem .8rem; border: 0; background: transparent;
  white-space: nowrap; font-size: .95rem;
}
.dock button[aria-pressed="true"] { font-weight: 700; }
.sw { width: 1rem; height: 1rem; flex: none; border-radius: 50%; }
.sw-epure  { background: linear-gradient(135deg, #fff 50%, #2f4bff 50%); box-shadow: inset 0 0 0 1.5px #000; }
.sw-papier { background: conic-gradient(#e8553d 0 33%, #f6c945 0 66%, #9fd0f0 0); box-shadow: inset 0 0 0 1.5px #1f2a44; }
.sw-soiree { background: radial-gradient(circle at 35% 35%, #d4b26a 0 28%, #101b30 32%); box-shadow: inset 0 0 0 1.5px #d4b26a; }
.sw-festif { background: conic-gradient(#ff4fa3 0 25%, #ffd43b 0 50%, #2b6bff 0 75%, #fff 0); box-shadow: inset 0 0 0 1.5px #1e1b4b; }
.sw-retro  { background: linear-gradient(#2e8b8b 0 55%, #c6c6c6 55%); border-radius: 2px; box-shadow: inset 0 0 0 1.5px #000; }
.dock-start, .dock-clock { display: none; }

@media (max-width: 640px) {
  .dock { left: 12px; right: 12px; bottom: 12px; transform: none; max-width: none; flex-direction: column; align-items: stretch; gap: .2rem; padding: .5rem; }
  .dock-label { text-align: center; font-size: .8rem; }
  .lead { font-size: 1.05rem; }
  .portal { padding-block: 1.5rem; }
  .dock-list { justify-content: space-between; }
  .dock button { flex: 1; flex-direction: column; gap: .2rem; padding: .35rem .2rem; font-size: .8rem; }
}

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


/* ---------- 2a. Style ÉPURÉ ---------- */
[data-theme="epure"] {
  --bg: #fff; --ink: #000; --muted: #4a4a4a; --accent: #2f4bff; --error: #c8102e; --focus: #2f4bff;
  --font-display: "Archivo", sans-serif; --font-body: "Archivo", sans-serif;
}
[data-theme="epure"] .brand {
  display: block; font-weight: 800; font-stretch: 125%;
  font-size: clamp(3rem, 16.2vw, 12.1rem); line-height: .8; letter-spacing: -.05em; margin-left: -.05em;
}
[data-theme="epure"] .brand-tag { margin-top: 1.25rem; padding-top: .75rem; border-top: 3px solid #000; font-weight: 600; }
[data-theme="epure"] .portal { align-content: end; gap: 0; }
@media (min-width: 900px) {
  [data-theme="epure"] .portal { grid-template-columns: 5fr 7fr; align-items: stretch; }
}
[data-theme="epure"] .intro .win-body { padding: 2rem 2rem 2rem 0; }
@media (max-width: 899px) { [data-theme="epure"] .intro .win-body { padding: 0 0 1.75rem; } [data-theme="epure"] .portal { padding-top: 2.5rem; } }
[data-theme="epure"] .intro h1 { font-size: clamp(2rem, 4.4vw, 3.5rem); letter-spacing: -.03em; line-height: 1; }
[data-theme="epure"] .key { background: var(--accent); color: #fff; padding: clamp(1.75rem, 5vw, 3.5rem); display: flex; flex-direction: column; justify-content: center; }
[data-theme="epure"] .key h2 { font-size: 1.1rem; font-weight: 600; }
[data-theme="epure"] .key-row input {
  background: transparent; color: #fff; border: 0; border-bottom: 3px solid #fff;
  font-size: clamp(1.5rem, 3.6vw, 2.5rem); font-weight: 700; padding: .3rem 0; --placeholder: rgba(255,255,255,.62);
}
[data-theme="epure"] .key-row button { background: #fff; color: var(--accent); font-size: 1.1rem; padding-inline: 2rem; }
[data-theme="epure"] .key-row button:hover { background: #000; color: #fff; }
[data-theme="epure"] .key :focus-visible { outline-color: #fff; }
[data-theme="epure"] .key-error { background: #fff; color: var(--error); padding: .6rem .9rem; }
[data-theme="epure"] .dock { background: #fff; border: 2px solid #000; }
[data-theme="epure"] .dock button[aria-pressed="true"] { background: #000; color: #fff; }


/* ---------- 2b. Style PAPIER ---------- */
[data-theme="papier"] {
  --bg: #bfdcf0; --ink: #1f2a44; --muted: #34405c; --accent: #c93f2a; --red: #e8553d;
  --yellow: #f6c945; --green: #8ccb97; --paper: #fffdf8; --error: #a3261c; --focus: #1f2a44;
  --font-display: "Shantell Sans", cursive; --font-body: "Shantell Sans", cursive;
}
[data-theme="papier"] body { font-variation-settings: "INFM" 10, "BNCE" 0; }
[data-theme="papier"] h1, [data-theme="papier"] h2 { font-weight: 800; font-variation-settings: "INFM" 100, "BNCE" 60; }
[data-theme="papier"] .fx::before {
  content: ""; position: absolute; width: min(52vw, 460px); aspect-ratio: 1; border-radius: 50%;
  top: max(-14vw, -160px); right: max(-10vw, -120px); background: var(--yellow); border: 3px solid var(--ink);
}
[data-theme="papier"] .fx::after {
  content: ""; position: absolute; width: 150vw; height: 46vh; left: -25vw; bottom: -30vh;
  border-radius: 50%; background: var(--green); border: 3px solid var(--ink);
}
[data-theme="papier"] .site-header { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
[data-theme="papier"] .brand {
  background: var(--red); color: #fff; font-weight: 800; font-variation-settings: "INFM" 100, "BNCE" 80;
  font-size: clamp(2.4rem, 7vw, 4.5rem); line-height: 1.15; padding: .05em .45em .12em;
  border: 3px solid var(--ink); border-radius: 14px 6px 18px 8px; box-shadow: 6px 6px 0 var(--ink); transform: rotate(-3deg);
}
[data-theme="papier"] .brand-tag { margin: 0; background: var(--paper); padding: .3rem .8rem; border: 2px dashed var(--ink); font-weight: 600; transform: rotate(2deg); }
[data-theme="papier"] .win {
  background: var(--paper); border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink);
  border-radius: 28px 10px 34px 12px / 12px 30px 10px 28px; padding: clamp(1.5rem, 4vw, 2.75rem);
}
[data-theme="papier"] .win::before {
  content: ""; position: absolute; top: -16px; left: 50%; width: 120px; height: 30px; margin-left: -60px;
  background: rgba(255,255,255,.6); border: 1px solid rgba(31,42,68,.3); transform: rotate(-4deg);
}
[data-theme="papier"] .intro { transform: rotate(-1.2deg); }
[data-theme="papier"] .key { background: var(--yellow); transform: rotate(1.4deg); }
@media (min-width: 900px) {
  [data-theme="papier"] .portal { grid-template-columns: repeat(12, 1fr); gap: 0; }
  [data-theme="papier"] .intro { grid-column: 1 / 8; grid-row: 1; padding-right: 8rem; }
  [data-theme="papier"] .portal { align-items: start; }
  [data-theme="papier"] .key { grid-column: 7 / 13; grid-row: 1; margin-top: 8rem; z-index: 2; }
}
[data-theme="papier"] .intro h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
[data-theme="papier"] .key h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
[data-theme="papier"] .key-row input { border: 3px solid var(--ink); border-radius: 14px 6px 16px 8px; color: var(--ink); font-weight: 700; }
[data-theme="papier"] .key-row button {
  background: var(--accent); color: #fff; border: 3px solid var(--ink); border-radius: 10px 16px 8px 14px;
  box-shadow: 4px 4px 0 var(--ink); transition: transform .1s, box-shadow .1s;
}
[data-theme="papier"] .key-row button:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
[data-theme="papier"] .key-error { background: #fff; border: 2px solid var(--error); padding: .5rem .8rem; border-radius: 8px; }
[data-theme="papier"] .dock { background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 5px 5px 0 var(--ink); }
[data-theme="papier"] .dock button { border-radius: 12px; }
[data-theme="papier"] .dock button[aria-pressed="true"] { background: var(--yellow); box-shadow: inset 0 0 0 2px var(--ink); }


/* ---------- 2c. Style SOIRÉE ---------- */
[data-theme="soiree"] {
  --bg: #101b30; --ink: #f1ebdf; --muted: #b9c0ce; --accent: #d4b26a; --line: rgba(212,178,106,.55);
  --error: #ffb4a8; --focus: #d4b26a; --font-display: "Bodoni Moda", serif; --font-body: "Jost", sans-serif;
}
[data-theme="soiree"] body { line-height: 1.7; }
[data-theme="soiree"] .fx { background: radial-gradient(720px circle at var(--mx) var(--my), rgba(212,178,106,.17), transparent 65%); }
[data-theme="soiree"] .fx::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(60deg, var(--line) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(-60deg, var(--line) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(0deg, var(--line) 0 1px, transparent 1px 29.4px);
  -webkit-mask-image: radial-gradient(300px circle at var(--mx) var(--my), #000, transparent 75%);
          mask-image: radial-gradient(300px circle at var(--mx) var(--my), #000, transparent 75%);
}
[data-theme="soiree"] .stage { text-align: center; max-width: 900px; }
[data-theme="soiree"] .brand { font-family: "Bodoni Moda", serif; font-style: italic; font-size: clamp(2.6rem, 7vw, 4.25rem); line-height: 1; color: var(--accent); }
[data-theme="soiree"] .brand-tag { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1rem; font-size: .85rem; letter-spacing: .22em; color: var(--muted); }
[data-theme="soiree"] .brand-tag::before, [data-theme="soiree"] .brand-tag::after { content: ""; width: 3rem; height: 1px; background: var(--line); }
[data-theme="soiree"] .portal { gap: 2.25rem; padding-block: 1.5rem; }
[data-theme="soiree"] .intro h1 { font-weight: 500; font-size: clamp(2.4rem, 6vw, 4.25rem); line-height: 1.02; }
[data-theme="soiree"] .lead, [data-theme="soiree"] .theme-note { margin-inline: auto; }
[data-theme="soiree"] .theme-note { font-style: italic; }
[data-theme="soiree"] .key {
  margin: 10px; padding: clamp(1.75rem, 4vw, 2.5rem) clamp(1.25rem, 5vw, 3.5rem);
  border: 1px solid var(--line); outline: 1px solid var(--line); outline-offset: 9px;
  background: rgba(16,27,48,.8);
}
[data-theme="soiree"] .key h2 { font-family: "Jost", sans-serif; font-weight: 400; font-size: .85rem; letter-spacing: .22em; color: var(--muted); }
[data-theme="soiree"] .key-row { justify-content: center; }
[data-theme="soiree"] .key-row input {
  flex: 1 1 15rem; background: transparent; color: var(--ink); border: 0; border-bottom: 1px solid var(--accent);
  text-align: center; font-family: "Bodoni Moda", serif; font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: .25em; --placeholder: #8e97a8;
}
[data-theme="soiree"] .key-row input::placeholder { letter-spacing: .05em; font-style: italic; }
[data-theme="soiree"] .key-row button { background: var(--accent); color: #101b30; font-weight: 500; letter-spacing: .08em; padding-inline: 2.25rem; transition: background-color .3s; }
[data-theme="soiree"] .key-row button:hover { background: var(--ink); }
[data-theme="soiree"] .key-help { color: var(--muted); }
[data-theme="soiree"] .dock { background: rgba(16,27,48,.92); border: 1px solid var(--line); border-radius: 999px; color: var(--ink); }
[data-theme="soiree"] .dock button { border-radius: 999px; }
[data-theme="soiree"] .dock button[aria-pressed="true"] { background: rgba(212,178,106,.18); color: var(--accent); }
@media (max-width: 640px) { [data-theme="soiree"] .dock, [data-theme="soiree"] .dock button { border-radius: 20px; } }


/* ---------- 2d. Style FESTIF ---------- */
[data-theme="festif"] {
  --bg: #ffd43b; --ink: #1e1b4b; --muted: #2f2b63; --pink: #ff4fa3; --blue: #2b6bff;
  --error: #9e0039; --focus: #1e1b4b; --font-display: "Bagel Fat One", cursive; --font-body: "Rubik", sans-serif;
}
[data-theme="festif"] body { font-weight: 500; }
[data-theme="festif"] h1, [data-theme="festif"] h2 { font-weight: 400; }
[data-theme="festif"] .fx {
  opacity: .6; background-size: 240px 240px;
  background-image:
    radial-gradient(circle at 24px 36px, var(--pink) 0 6px, transparent 7px),
    radial-gradient(circle at 170px 70px, var(--blue) 0 5px, transparent 6px),
    radial-gradient(circle at 96px 180px, #fff 0 7px, transparent 8px),
    radial-gradient(circle at 210px 210px, var(--pink) 0 4px, transparent 5px),
    radial-gradient(circle at 60px 110px, var(--ink) 0 3px, transparent 4px);
}
[data-theme="festif"] .stage { text-align: center; }
[data-theme="festif"] .brand { display: block; font-family: "Bagel Fat One", cursive; font-size: clamp(3.2rem, 13vw, 7.5rem); line-height: 1; cursor: pointer; user-select: none; }
[data-theme="festif"] .brand-text span {
  color: var(--c); -webkit-text-stroke: .025em var(--ink); text-shadow: .05em .06em 0 var(--ink);
  animation: hop .7s cubic-bezier(.3,1.6,.5,1) both; animation-delay: calc(var(--i) * 55ms);
}
[data-theme="festif"] .brand-text span:nth-child(3n+1) { --c: var(--pink); }
[data-theme="festif"] .brand-text span:nth-child(3n+2) { --c: var(--blue); }
[data-theme="festif"] .brand-text span:nth-child(3n)   { --c: #fff; }
[data-theme="festif"] .brand:hover .brand-text span { animation: wiggle .5s ease-in-out both; animation-delay: calc(var(--i) * 40ms); }
@keyframes hop { from { transform: translateY(-.6em) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes wiggle { 0%, 100% { transform: none; } 50% { transform: translateY(-.15em) rotate(-8deg); } }
[data-theme="festif"] .brand-tag { display: inline-block; margin-top: .25rem; padding: .35rem 1rem; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 700; transform: rotate(-2deg); }
[data-theme="festif"] .intro h1 { font-size: clamp(2.2rem, 6vw, 4.25rem); }
[data-theme="festif"] .lead, [data-theme="festif"] .theme-note { margin-inline: auto; }
[data-theme="festif"] .theme-note { color: var(--ink); }
[data-theme="festif"] .key {
  width: 100%; max-width: 820px; margin-inline: auto; padding: clamp(1.5rem, 4vw, 2.25rem);
  background: var(--pink); border: 4px solid var(--ink); border-radius: 44px; box-shadow: 10px 10px 0 var(--ink);
}
[data-theme="festif"] .key h2 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); color: #fff; -webkit-text-stroke: .03em var(--ink); text-shadow: 3px 3px 0 var(--ink); }
[data-theme="festif"] .key-row { justify-content: center; }
[data-theme="festif"] .key-row input { border: 4px solid var(--ink); border-radius: 999px; padding-inline: 1.5rem; font-weight: 700; }
[data-theme="festif"] .key-row button {
  background: var(--ink); color: var(--bg); border: 4px solid var(--ink); border-radius: 999px;
  font-family: "Bagel Fat One", cursive; font-weight: 400; font-size: 1.15rem; transition: transform .25s cubic-bezier(.3,1.6,.5,1);
}
[data-theme="festif"] .key-row button:hover { transform: rotate(-3deg) scale(1.05); }
[data-theme="festif"] .key-help { color: var(--ink); }
[data-theme="festif"] .key-error { display: inline-block; background: #fff; border: 3px solid var(--ink); border-radius: 20px; padding: .5rem 1rem; }
[data-theme="festif"] .dock { background: #fff; color: var(--ink); border: 4px solid var(--ink); border-radius: 999px; box-shadow: 5px 5px 0 var(--ink); }
[data-theme="festif"] .dock button { border-radius: 999px; }
[data-theme="festif"] .dock button[aria-pressed="true"] { background: var(--pink); }
@media (max-width: 640px) { [data-theme="festif"] .dock, [data-theme="festif"] .dock button { border-radius: 22px; } }


/* ---------- 2e. Style RÉTRO ---------- */
[data-theme="retro"] {
  --bg: #2e8b8b; --ink: #000; --muted: #2b2b2b; --win: #c6c6c6; --hi: #fff; --lo: #4a4a4a;
  --bar1: #1d3a8a; --bar2: #4d7fd6; --error: #9b0000; --focus: #000;
  --font-display: "Pixelify Sans", sans-serif; --font-body: Tahoma, Verdana, "Segoe UI", sans-serif;
}
[data-theme="retro"] body { font-size: 1rem; }
[data-theme="retro"] :focus-visible { outline: 2px dotted #000; outline-offset: 2px; }
[data-theme="retro"] .site-header { color: #fff; }
[data-theme="retro"] .brand { font-family: "Pixelify Sans", sans-serif; font-weight: 700; font-size: clamp(2.5rem, 8vw, 4.5rem); line-height: 1; text-shadow: 4px 4px 0 #134646; }
[data-theme="retro"] .brand-tag { font-family: "Pixelify Sans", sans-serif; font-size: 1.1rem; text-shadow: 2px 2px 0 #134646; }
[data-theme="retro"] .win { background: var(--win); padding: 3px; border: 2px solid; border-color: var(--hi) var(--lo) var(--lo) var(--hi); box-shadow: 2px 2px 0 #000; }
[data-theme="retro"] .win-bar {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 3px 3px 3px 8px;
  background: linear-gradient(90deg, var(--bar1), var(--bar2)); color: #fff;
  font-family: "Pixelify Sans", sans-serif; font-size: .95rem; user-select: none;
}
[data-theme="retro"] .win-btns { display: flex; gap: 2px; }
[data-theme="retro"] .win-btns i {
  width: 20px; height: 18px; display: grid; place-items: center; background: var(--win); color: #000;
  border: 2px solid; border-color: var(--hi) var(--lo) var(--lo) var(--hi);
  font: 700 11px/1 Tahoma, Verdana, sans-serif; font-style: normal;
}
[data-theme="retro"] .win-btns i:nth-child(1)::after { content: "_"; }
[data-theme="retro"] .win-btns i:nth-child(2)::after { content: "□"; }
[data-theme="retro"] .win-btns i:nth-child(3)::after { content: "×"; }
[data-theme="retro"] .win-body { padding: 1rem 1.25rem 1.25rem; }
[data-theme="retro"] .intro h1 { font-size: clamp(1.75rem, 4vw, 2.6rem); }
[data-theme="retro"] .key h2 { font-size: 1.35rem; }
[data-theme="retro"] .theme-note { color: #000; background: #ffffe1; border: 1px solid #000; padding: .5rem .75rem; }
[data-theme="retro"] .key-row input { border: 2px solid; border-color: var(--lo) var(--hi) var(--hi) var(--lo); font-family: Tahoma, Verdana, sans-serif; }
[data-theme="retro"] .key-row button {
  background: var(--win); color: #000; font-family: "Pixelify Sans", sans-serif; font-weight: 400; font-size: 1.05rem;
  border: 2px solid; border-color: var(--hi) var(--lo) var(--lo) var(--hi); box-shadow: 1px 1px 0 #000;
}
[data-theme="retro"] .key-row button:active { border-color: var(--lo) var(--hi) var(--hi) var(--lo); }
[data-theme="retro"] .key-error { display: flex; gap: .6rem; align-items: center; }
[data-theme="retro"] .key-error::before { content: "!"; flex: none; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; background: #c00; color: #fff; font-weight: 700; }
@media (min-width: 960px) {
  [data-theme="retro"] .portal { grid-template-columns: repeat(12, 1fr); gap: 0; align-items: start; }
  [data-theme="retro"] .intro { grid-column: 1 / 8; grid-row: 1; }
  [data-theme="retro"] .key { grid-column: 7 / 13; grid-row: 1; margin-top: 16.5rem; margin-left: 2rem; z-index: 2; }
}
@media (min-width: 960px) and (pointer: fine) {
  [data-theme="retro"] .win-bar { cursor: grab; touch-action: none; }
  [data-theme="retro"] .win.is-dragging .win-bar { cursor: grabbing; }
}
[data-theme="retro"] .dock {
  left: 0; right: 0; bottom: 0; transform: none; max-width: none; border-radius: 0; padding: 4px 6px;
  background: var(--win); color: #000; border-top: 2px solid var(--hi); box-shadow: 0 -1px 0 #888; font-family: Tahoma, Verdana, sans-serif;
}
[data-theme="retro"] .dock-start {
  display: inline-flex; align-items: center; min-height: 2.5rem; padding: .2rem .8rem;
  font-family: "Pixelify Sans", sans-serif; font-weight: 700; border: 2px solid; border-color: var(--hi) var(--lo) var(--lo) var(--hi);
}
[data-theme="retro"] .dock-label { font-size: .8rem; }
[data-theme="retro"] .dock button { min-height: 2.5rem; font-size: .9rem; border: 2px solid; border-color: var(--hi) var(--lo) var(--lo) var(--hi); }
[data-theme="retro"] .dock button[aria-pressed="true"] {
  border-color: var(--lo) var(--hi) var(--hi) var(--lo);
  background: repeating-conic-gradient(#dadada 0 25%, #fff 0 50%) 0 0 / 4px 4px;
}
[data-theme="retro"] .dock-clock { display: block; margin-left: auto; padding: .45rem .9rem; font-size: .85rem; border: 2px solid; border-color: var(--lo) var(--hi) var(--hi) var(--lo); }
@media (max-width: 640px) {
  [data-theme="retro"] .dock-start, [data-theme="retro"] .dock-clock { display: none; }
  [data-theme="retro"] .dock { padding: 6px; }
}

/* Lisibilité : petit halo jaune derrière le texte du style Festif (les pois du fond ne gênent plus) */
[data-theme="festif"] .lead, [data-theme="festif"] .theme-note { text-shadow: 0 0 3px var(--bg), 0 0 8px var(--bg), 0 0 14px var(--bg); }
