/* ==========================================================================
   SecréIA, site de l'entreprise
   Monde : le logiciel des années 90 en version épurée (fenêtres, menus,
   biseaux, pixel art), aux couleurs du logo et en Mona Sans.
   ========================================================================== */

/* ---------- Police (auto-hébergée, variable 200–900) ---------- */
@font-face {
  font-family: "Mona Sans";
  src: url("../fonts/mona-sans-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Mona Sans";
  src: url("../fonts/mona-sans-latin-ext.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Jetons ---------- */
:root {
  color-scheme: light;

  /* Matière : le dialogue gris froid et ses biseaux */
  --face: #D4D7DB;
  --face-hover: #DDE0E4;
  --face-back: #C9CDD2;
  --hl: #FFFFFF;
  --light: #E9EBEE;
  --shadow: #868A8F;
  --dark: #0A0A0A;
  --well: #FFFFFF;

  /* Encre */
  --ink: #0A0A0A;
  --ink-2: #44484E;
  --ink-hint: #6A6E75;
  --on-dark-2: #B4B8BE;
  --disabled: #868A8F;
  --bar-inactive: #6B6F75;

  /* Le bleu du logo : agir, progresser, sélectionner */
  --sky: #B5DEFB;
  --sky-hover: #C8E7FC;
  --sky-press: #9ED2F7;
  --sky-pale: #DDEFFD;
  --sky-tint: #EEF6FD;
  --sky-dither: #9FD0F4;

  /* Biseaux de 2 px */
  --raised: inset -1px -1px 0 var(--dark), inset 1px 1px 0 var(--hl), inset -2px -2px 0 var(--shadow), inset 2px 2px 0 var(--light);
  --sunken: inset 1px 1px 0 var(--shadow), inset -1px -1px 0 var(--hl), inset 2px 2px 0 var(--dark), inset -2px -2px 0 var(--light);
  --pressed: inset 1px 1px 0 var(--dark), inset -1px -1px 0 var(--hl), inset 2px 2px 0 var(--shadow), inset -2px -2px 0 var(--light);
  --field: inset 1px 1px 0 var(--shadow), inset -1px -1px 0 var(--hl);

  --font: "Mona Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --titlebar-h: 3rem;
  --menubar-h: 2.75rem;
  --header-h: calc(var(--titlebar-h) + var(--menubar-h));
  --banner-w: clamp(12rem, 16vw, 19rem);
  --pad-l: clamp(1rem, 3vw, 3.5rem);
  --pad-r: clamp(1rem, 1.6vw, 2.5rem);
  --inner-x: clamp(1rem, 4vw, 4.5rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--face);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.5;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: var(--sky); color: var(--ink); }
[hidden] { display: none !important; }

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

.skip {
  position: absolute;
  left: .75rem;
  top: -4rem;
  z-index: 100;
  padding: .75rem 1rem;
  background: var(--sky);
  box-shadow: var(--raised);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: .75rem; }

main > section { position: relative; }
main > section:focus { outline: none; }

/* ---------- Typo ---------- */
.display {
  margin: 0;
  font-weight: 900;
  font-size: clamp(2.5rem, .5rem + 4.6vw, 4.875rem);
  line-height: .92;
  letter-spacing: -0.04em;
  word-spacing: .08em;
}
.display--md {
  font-size: clamp(2.1rem, .6rem + 3.1vw, 3.75rem);
  line-height: .98;
  letter-spacing: -0.04em;
  word-spacing: .06em;
  text-wrap: balance;
}
.title {
  margin: 0;
  font-weight: 900;
  font-size: clamp(2rem, 1.1rem + 2.5vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  word-spacing: .06em;
  text-wrap: balance;
}
.lede {
  max-width: 58ch;
  font-size: clamp(1.0625rem, .98rem + .3vw, 1.25rem);
  color: var(--ink-2);
  text-wrap: pretty;
}

/* ---------- En-tête : barre de titre + barre de menus ---------- */
.appbar { position: sticky; top: 0; z-index: 30; }

.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--titlebar-h);
  padding: 0 .5rem 0 1rem;
  background: var(--dark);
  color: var(--hl);
}
.titlebar__title {
  display: flex;
  align-items: center;
  gap: .625rem;
  min-width: 0;
  font-weight: 750;
  font-size: clamp(1.0625rem, .95rem + .45vw, 1.375rem);
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
}
.titlebar__title > span { overflow: hidden; text-overflow: ellipsis; }
.titlebar__icon { flex: none; width: 32px; height: 28px; image-rendering: pixelated; }
.titlebar__sub { flex: 0 1 auto; margin-left: -.25rem; font-weight: 450; color: var(--on-dark-2); }
.titlebar__buttons { display: flex; gap: .375rem; flex: none; }
.tbtn {
  display: grid;
  place-items: center;
  width: 2.125rem;
  height: 1.875rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--face);
  color: var(--ink);
  box-shadow: var(--raised);
  cursor: pointer;
}
.tbtn svg { width: 12px; height: 12px; fill: currentColor; shape-rendering: crispEdges; }
.tbtn:hover { background: var(--face-hover); }
.tbtn:active { box-shadow: var(--pressed); }
.tbtn:active svg { transform: translate(1px, 1px); }
.tbtn:focus-visible { outline: 2px dotted var(--hl); outline-offset: 2px; }

.menubar {
  position: relative;
  display: flex;
  align-items: center;
  gap: .25rem;
  height: var(--menubar-h);
  padding: 0 .5rem 0 .625rem;
  background: var(--face);
  border-bottom: 1px solid var(--shadow);
  box-shadow: 0 1px 0 var(--hl);
}
.menubar__list {
  display: flex;
  align-items: center;
  gap: .125rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.menubar__list a {
  display: block;
  padding: .35rem .8rem;
  font-size: 1.0625rem;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
}
.menubar__list a:hover { background: var(--sky); }
.menubar__list a[aria-current="true"] { box-shadow: var(--field); background: var(--sky-tint); font-weight: 750; }
.menubar__list a:focus-visible { outline: 1px dotted var(--ink); outline-offset: -3px; }
.menubar__cta { margin-left: auto; }
.menubar__toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  min-height: 2.125rem;
  padding: .25rem .8rem;
  border: 0;
  border-radius: 0;
  background: var(--face);
  box-shadow: var(--raised);
  font-weight: 650;
  cursor: pointer;
}
.menubar__toggle::after {
  content: "";
  width: 14px;
  height: 8px;
  background: url("../icons/fleche-bas.svg") center / 14px 8px no-repeat;
  image-rendering: pixelated;
}
.menubar__toggle[aria-expanded="true"] { box-shadow: var(--pressed); }
.menubar__toggle:focus-visible { outline: 1px dotted var(--ink); outline-offset: -5px; }

/* ---------- Boutons ---------- */
.btn {
  --btn-face: var(--face);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 3.375rem;
  min-width: 10.5rem;
  padding: .5rem 1.5rem;
  border: 0;
  border-radius: 0;
  background: var(--btn-face);
  color: var(--ink);
  box-shadow: var(--raised);
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { --btn-face: var(--face-hover); }
.btn:active {
  box-shadow: var(--pressed);
  padding: calc(.5rem + 1px) calc(1.5rem - 1px) calc(.5rem - 1px) calc(1.5rem + 1px);
}
/* Le bouton par défaut : cadre noir de plus */
.btn--default { box-shadow: 0 0 0 1px var(--dark), var(--raised); }
.btn--default:active { box-shadow: 0 0 0 1px var(--dark), var(--pressed); }
.btn--primary { --btn-face: var(--sky); font-weight: 800; letter-spacing: -0.01em; }
.btn--primary:hover { --btn-face: var(--sky-hover); }
.btn--primary:active { --btn-face: var(--sky-press); }
.btn--big { min-height: 3.75rem; padding-inline: 2rem; font-size: 1.25rem; }
.btn--small { min-height: 2.125rem; min-width: 0; padding: .25rem 1rem; font-size: 1rem; }
.btn--small:active { padding: calc(.25rem + 1px) calc(1rem - 1px) calc(.25rem - 1px) calc(1rem + 1px); }
.btn:disabled { --btn-face: var(--face); color: var(--disabled); text-shadow: 1px 1px 0 var(--hl); cursor: default; }

/* Focus clavier : le rectangle pointillé + le cadre noir */
.btn:focus-visible { outline: none; box-shadow: 0 0 0 1px var(--dark), var(--raised); }
.btn:focus-visible::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dotted var(--ink);
  pointer-events: none;
}

/* ---------- Accueil et Contact : bandeau pixel + contenu ---------- */
.hero {
  display: grid;
  grid-template-columns: var(--banner-w) minmax(0, 1fr);
  min-height: calc(100svh - var(--header-h));
}

.banner {
  position: relative;
  overflow: hidden;
  background: var(--sky-pale);
  border-right: 2px solid var(--hl);
  box-shadow: 1px 0 0 var(--shadow);
}
.banner__art {
  position: absolute;
  top: 0;
  left: 50%;
  width: 504px;
  height: 1029px;
  max-width: none;
  transform: translateX(-50%);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.hero__content {
  min-width: 0;
  padding: clamp(1rem, 1.6vw, 1.75rem) var(--pad-r) clamp(2rem, 4vw, 3.5rem) var(--pad-l);
}
.hero__brand {
  --logo-h: clamp(4.25rem, 6.9vw, 6.75rem);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: .5rem clamp(1.25rem, 2vw, 2rem);
  margin-bottom: clamp(1.25rem, 1.8vw, 1.75rem);
}
.hero__logo {
  height: var(--logo-h);
  width: auto;
  /* le PNG garde 10 % de marge transparente : on l'annule pour aligner le logo visible */
  margin: calc(var(--logo-h) * -.1) 0 calc(var(--logo-h) * -.1) calc(var(--logo-h) * -.1);
}
.hero__tagline {
  padding-bottom: .15em;
  font-size: clamp(1rem, .9rem + .4vw, 1.375rem);
  color: var(--ink-2);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.92fr) minmax(17rem, 1fr);
  gap: clamp(1.25rem, 2vw, 2.5rem);
  align-items: start;
}
.hero__main .display { margin-bottom: clamp(1rem, 1.8vw, 1.6rem); }
.hero__main .lede { margin-bottom: clamp(1.25rem, 1.9vw, 1.75rem); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .875rem 1rem; margin-bottom: clamp(1.5rem, 2.4vw, 2.25rem); }

/* Puits blanc enfoncé */
.well {
  margin: 0;
  padding: clamp(1rem, 1.6vw, 1.5rem) clamp(1rem, 1.8vw, 1.75rem);
  border: 0;
  background: var(--well);
  box-shadow: var(--sunken);
  min-width: 0;
}
.well__title {
  margin: 0 0 .9rem;
  padding: 0;
  font-weight: 800;
  font-size: clamp(1.25rem, 1rem + .7vw, 1.625rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Les trois tâches */
.tasks__list { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.tasks__list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: center; }
.tasks__list strong { display: block; font-weight: 750; font-size: clamp(1.125rem, 1rem + .4vw, 1.375rem); letter-spacing: -0.015em; line-height: 1.25; }
.tasks__list li > span > span { display: block; font-size: clamp(.98rem, .94rem + .15vw, 1.0625rem); color: var(--ink-2); }
.tick {
  flex: none;
  width: 2rem;
  height: 2rem;
  background: var(--sky) url("../icons/coche.svg") center / 24px 24px no-repeat;
  box-shadow: var(--sunken);
}
.tasks__list li { align-items: start; }

/* ---------- Fenêtres ---------- */
.window {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 4px;
  background: var(--face);
  box-shadow: var(--raised);
}
.window__bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  padding: .35rem .5rem;
  background: var(--bar-inactive);
  color: var(--hl);
  font-size: 1.0625rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.window__bar svg { width: 24px; height: 24px; flex: none; fill: currentColor; shape-rendering: crispEdges; }
.window.is-active .window__bar, .window--dialog .window__bar { background: var(--dark); }
.window__meta { margin-left: auto; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.window__body {
  flex: 1;
  margin: 4px 0 0;
  padding: 1rem 1.1rem;
  background: var(--well);
  box-shadow: var(--sunken);
  font-size: 1rem;
  line-height: 1.45;
}
.window__status {
  margin-top: 4px;
  padding: .3rem .6rem;
  box-shadow: var(--field);
  font-size: .92rem;
  color: var(--ink-2);
}
.window__wait { color: var(--ink-2); }

/* Fenêtre d'appel de l'accueil */
.window--call { position: sticky; top: calc(var(--header-h) + 1rem); }
.window--call .window__body { min-height: 19.5rem; }

.transcript { display: grid; align-content: start; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.window__body.transcript { margin-top: 4px; padding: 1rem 1.1rem; }
.transcript li { display: grid; grid-template-columns: 4.75rem minmax(0, 1fr); gap: .6rem; }
.transcript li.window__wait { display: block; }
.transcript .who { align-self: start; font-weight: 800; }
.transcript .who--ia { justify-self: start; padding: 0 .3rem; background: var(--sky); }
.caret::after {
  content: "";
  display: inline-block;
  width: .55em;
  height: 1.05em;
  margin-left: 1px;
  vertical-align: -.15em;
  background: var(--ink);
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.checklog { display: grid; gap: .3rem; margin: 0; padding: 0; list-style: none; }
.window--call .checklog:not(:empty) { margin-top: 1rem; padding-top: .8rem; border-top: 1px dotted var(--shadow); }
.checklog li { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.checklog svg { width: 24px; height: 24px; flex: none; fill: var(--ink); }

/* ---------- Sections intérieures ---------- */
.section {
  border-top: 1px solid var(--shadow);
  box-shadow: inset 0 1px 0 var(--hl);
}
.pagehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.75rem, 3.6vw, 3.25rem) var(--inner-x);
  background: var(--well);
  border-bottom: 1px solid var(--shadow);
  box-shadow: 0 1px 0 var(--hl);
}
.pagehead__text { max-width: 60rem; }
.pagehead__desc { margin-top: .9rem; max-width: 60ch; color: var(--ink-2); text-wrap: pretty; }
.pagehead__icon {
  flex: none;
  width: 96px;
  height: 96px;
  padding: 12px;
  /* tuile bleu ciel tramée en damier, cadre en relief */
  background: repeating-conic-gradient(var(--sky-dither) 0 25%, var(--sky) 0 50%) 0 0 / 4px 4px;
  box-shadow: var(--raised);
  fill: var(--ink);
  shape-rendering: crispEdges;
}
.pagebody {
  max-width: 100rem;
  padding: clamp(2rem, 4vw, 3.75rem) var(--inner-x) clamp(3rem, 6vw, 5.5rem);
}
.section__note {
  max-width: 100rem;
  margin-top: calc(clamp(3rem, 6vw, 5.5rem) * -1 + 1rem);
  padding: 0 var(--inner-x) clamp(2.5rem, 5vw, 4rem);
  font-size: .98rem;
  color: var(--ink-2);
}

/* Services : trois fenêtres au contenu différent */
.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
  align-items: start;
}
.service__lead { margin-bottom: 1rem; font-size: 1.0625rem; }

.listview { width: 100%; border-collapse: collapse; font-size: .95rem; }
.listview caption { padding-bottom: .4rem; font-weight: 700; text-align: left; }
.listview th {
  padding: .35rem .55rem;
  background: var(--face);
  box-shadow: var(--raised);
  font-size: .9rem;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}
.listview td { padding: .5rem .55rem; border-bottom: 1px dotted var(--shadow); vertical-align: top; }
.listview tbody tr:first-child td { background: var(--sky); }
.listview td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 0 .4rem; box-shadow: var(--field); background: var(--sky-tint); font-size: .85rem; font-weight: 700; white-space: nowrap; }

.record { display: grid; align-content: start; gap: .5rem; margin: 0; }
.record > div {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: .5rem;
  padding: .15rem .25rem .45rem;
  border-bottom: 1px dotted var(--shadow);
}
.record > .window__wait { display: block; padding: 0; border: 0; }
.record dt { font-size: .92rem; font-weight: 700; color: var(--ink-2); }
.record dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.record > div.is-new { background: var(--sky); }

/* Démo : onglets + panneau */
.tabs {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 2px;
  margin: 0;
  padding: 0 0 0 .5rem;
  border: 0;
  min-width: 0;
}
.tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: 4px;
  padding: .55rem 1rem .5rem;
  background: var(--face-back);
  box-shadow: inset 1px 1px 0 var(--hl), inset -1px 0 0 var(--dark), inset 2px 2px 0 var(--light), inset -2px 0 0 var(--shadow);
  font-weight: 600;
  cursor: pointer;
}
.tab:hover { background: var(--face-hover); }
.tab input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.tab svg { width: 24px; height: 24px; flex: none; fill: currentColor; shape-rendering: crispEdges; }
.tab:has(input:checked) {
  z-index: 2;
  margin-top: 0;
  margin-bottom: -2px;
  padding: .7rem 1.1rem .75rem;
  background: var(--face);
  font-weight: 800;
}
.tab:has(input:checked) svg { background: var(--sky); box-shadow: 0 0 0 3px var(--sky); }
.tab:has(input:focus-visible) span { outline: 1px dotted var(--ink); outline-offset: 3px; }
.tabpanel {
  padding: clamp(1.25rem, 2.5vw, 2rem);
  background: var(--face);
  box-shadow: var(--raised);
}
.tabpanel__intro { max-width: 70ch; margin-bottom: 1.25rem; color: var(--ink-2); }

.install__label { margin-bottom: .75rem; font-weight: 750; font-size: clamp(1.125rem, 1rem + .4vw, 1.375rem); letter-spacing: -0.01em; }
.install__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .25rem 1.5rem;
  margin-top: .6rem;
  font-size: 1rem;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.install__windows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
  margin: clamp(1.5rem, 3vw, 2.25rem) 0;
}
.install__windows .window__body { min-height: 19rem; }
.install.is-running { cursor: progress; }
.install__foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1.5rem;
}
.log__list { min-height: 11rem; }

.mail__field {
  display: flex;
  gap: .5rem;
  padding-bottom: .4rem;
  margin-bottom: .4rem;
  border-bottom: 1px solid var(--light);
  font-size: .98rem;
}
.mail__field > span:first-child { flex: none; min-width: 3.5rem; font-weight: 700; }
.mail__text { margin-top: .8rem; white-space: pre-line; }
.mail__sent {
  display: flex;
  align-items: center;
  gap: .35rem;
  width: fit-content;
  margin-top: 1rem;
  padding: .2rem .55rem .2rem .3rem;
  background: var(--sky);
  font-weight: 750;
}
.mail__sent svg { width: 24px; height: 24px; fill: currentColor; }

/* Barres de progression en blocs entiers */
.progress {
  --block: 22px;
  --gap: 4px;
  position: relative;
  height: 2.375rem;
  padding: 5px;
  background: var(--well);
  box-shadow: var(--sunken);
}
.progress__fill {
  --b: var(--block);
  display: block;
  width: 0;
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--sky) 0 var(--b), transparent var(--b) calc(var(--b) + var(--gap)));
}
.progress--large { --block: 26px; height: 3.25rem; padding: 6px; }

/* Fonctionnement : une fenêtre posée sur un bureau tramé */
.section--desk {
  display: grid;
  place-items: center;
  padding: clamp(3rem, 7vw, 6.5rem) var(--inner-x);
  background: repeating-conic-gradient(var(--sky-dither) 0 25%, var(--sky) 0 50%) 0 0 / 4px 4px;
}
.window--setup { width: min(100%, 58rem); }
.setup {
  margin-top: 4px;
  padding: clamp(1.5rem, 3.4vw, 2.75rem);
  background: var(--face);
}
.setup__intro { margin-top: .75rem; font-size: clamp(1.0625rem, .98rem + .3vw, 1.25rem); color: var(--ink-2); }
.setup__steps { display: grid; gap: 1.4rem; margin: 2rem 0 2.25rem; padding: 0; list-style: none; }
.setup__steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.setup__steps strong { display: block; font-weight: 800; font-size: clamp(1.2rem, 1rem + .6vw, 1.5rem); letter-spacing: -0.02em; line-height: 1.2; }
.setup__steps li > span > span { display: block; margin-top: .2rem; color: var(--ink-2); }
.keycap {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  background: var(--sky);
  box-shadow: var(--raised);
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}
.setup__actions { display: flex; justify-content: flex-end; padding-top: 1.5rem; border-top: 1px solid var(--shadow); box-shadow: inset 0 1px 0 var(--hl); }

/* Pourquoi : tableau avant / avec */
.readme__table { padding: 3px; overflow-x: auto; }
.readme__table table { width: 100%; border-collapse: collapse; font-size: 1.0625rem; }
.readme__table th {
  padding: .6rem .9rem;
  background: var(--face);
  box-shadow: var(--raised);
  font-weight: 750;
  text-align: left;
}
.readme__table th:last-child { background: var(--sky); }
.readme__table td { padding: 1rem .9rem; vertical-align: top; border-bottom: 1px solid var(--light); }
.readme__table td:first-child { width: 52%; color: var(--ink-2); }
.readme__table td:last-child { font-weight: 650; }
.readme__table tr:last-child td { border-bottom: 0; }

/* ---------- Contact ---------- */
.hero--contact { border-top: 1px solid var(--shadow); box-shadow: inset 0 1px 0 var(--hl); }
.contact { align-self: start; padding-top: clamp(2rem, 4vw, 3.5rem); }
.contact .display--md { margin-bottom: 1rem; max-width: 20ch; }
.regform { max-width: 52rem; margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.regform__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.5rem; }
.field { min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field > label { display: block; margin-bottom: .35rem; font-weight: 700; }
.field__opt { font-weight: 400; color: var(--ink-2); }
.input {
  display: block;
  width: 100%;
  min-height: 3.125rem;
  padding: .65rem .85rem;
  border: 0;
  border-radius: 0;
  background: var(--well);
  box-shadow: var(--sunken);
  font-size: 1.0625rem;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
}
.input::placeholder { color: var(--ink-hint); }
.input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.input[aria-invalid="true"] { outline: 2px dotted var(--ink); outline-offset: 2px; }
textarea.input { min-height: 6.5rem; resize: vertical; }
.selectwrap { position: relative; display: block; }
.select { padding-right: 3.25rem; cursor: pointer; }
.selectwrap::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  bottom: 2px;
  width: 2.25rem;
  background: var(--face) url("../icons/fleche-bas.svg") center / 14px 8px no-repeat;
  box-shadow: var(--raised);
  image-rendering: pixelated;
  pointer-events: none;
}
.field__error {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .45rem;
  font-size: .98rem;
  font-weight: 650;
}
.field__error svg { width: 24px; height: 24px; flex: none; fill: currentColor; }
.regform__hp { position: absolute; left: -9999px; }
.regform__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.75rem; }
.regform__note { font-size: 1rem; color: var(--ink-2); }
.regform__alert {
  display: flex;
  gap: .75rem;
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--well);
  box-shadow: var(--sunken);
  font-weight: 600;
}
.regform__alert svg { width: 24px; height: 24px; flex: none; fill: currentColor; }
.contact__done .display--md:focus { outline: none; }
.done__box { display: flex; align-items: center; gap: 1rem; max-width: 40rem; margin: 1.75rem 0 2rem; font-weight: 600; }
.done__box svg { width: 48px; height: 48px; flex: none; fill: var(--ink); }

/* ---------- Barre d'état (pied de page) ---------- */
.statusbar {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: var(--face);
  border-top: 1px solid var(--shadow);
  box-shadow: inset 0 1px 0 var(--hl);
}
.statusbar__cell {
  padding: .5rem .8rem;
  box-shadow: var(--field);
  font-size: .95rem;
  color: var(--ink-2);
  white-space: nowrap;
}
.statusbar__cell--grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.statusbar a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }

/* ---------- Dialogue « Quitter » ---------- */
.window--dialog:not([open]) { display: none; }
.window--dialog {
  width: min(34rem, calc(100vw - 2rem));
  padding: 4px;
  border: 0;
  background: var(--face);
  color: var(--ink);
  box-shadow: var(--raised);
}
/* l'écran se trame à 50 %, comme à l'arrêt d'un vieil ordinateur */
.window--dialog::backdrop {
  background: repeating-conic-gradient(rgb(10 10 10 / .55) 0 25%, transparent 0 50%) 0 0 / 2px 2px;
}
.dialog__body { display: flex; gap: 1rem; padding: 1.5rem 1.25rem .5rem; }
.dialog__icon { width: 48px; height: 48px; flex: none; fill: var(--ink); }
.dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .75rem; padding: 1.25rem; }
.dialog__actions .btn { min-width: 9rem; }

/* ---------- Bulle d'information ---------- */
.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  max-width: min(26rem, calc(100vw - 2rem));
  padding: .8rem 1rem;
  background: var(--well);
  border: 1px solid var(--dark);
  font-size: 1rem;
  font-weight: 600;
}

/* ---------- Adaptatif ---------- */
@media (max-width: 1099px) {
  .hero__grid { grid-template-columns: 1fr; }
  .window--call { position: static; max-width: 40rem; }
  .window--call .window__body { min-height: 0; }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services .window:last-child { grid-column: 1 / -1; }
  .install__windows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .install__windows .window:last-child { grid-column: 1 / -1; }
}

@media (max-width: 899px) {
  .menubar__toggle { display: inline-flex; }
  .menubar__list {
    position: absolute;
    top: 100%;
    left: .5rem;
    z-index: 5;
    display: none;
    flex-direction: column;
    align-items: stretch;
    min-width: min(18rem, calc(100vw - 1rem));
    padding: 4px;
    background: var(--face);
    box-shadow: var(--raised);
  }
  .menubar__list.is-open { display: flex; }
  .menubar__list a { padding: .7rem 1rem; font-size: 1.125rem; }
}

@media (max-width: 759px) {
  :root { --titlebar-h: 2.75rem; --menubar-h: 3rem; }
  body { font-size: 1.0625rem; }
  .titlebar { padding-left: .75rem; }
  .titlebar__sub { display: none; }
  .tbtn { width: 2rem; height: 1.75rem; }

  .hero { grid-template-columns: 1fr; min-height: 0; }
  .banner { height: 9rem; border-right: 0; border-bottom: 2px solid var(--hl); box-shadow: 0 1px 0 var(--shadow); }
  .banner__art { top: 0; width: 432px; height: 144px; }
  .hero__content { padding: 1.25rem 1rem 2.5rem; }
  .hero__brand { --logo-h: 4.5rem; }
  .display { font-size: clamp(2rem, 9.6vw, 3.25rem); }
  .display--md { font-size: clamp(1.9rem, 8.4vw, 2.6rem); }
  .hero__actions .btn { flex: 1 1 100%; }
  .contact { padding-top: 1.25rem; }

  .pagehead { padding: 1.5rem 1rem; }
  .pagehead__icon { display: none; }
  .pagebody { padding: 1.5rem 1rem 3rem; }
  .section__note { margin-top: -2rem; padding: 0 1rem 2.5rem; }
  .services { grid-template-columns: 1fr; }
  .services .window:last-child { grid-column: auto; }
  .listview { font-size: .9rem; }
  .tabs { padding-left: 0; }
  .tab { flex: 1 1 calc(50% - 2px); padding: .55rem .6rem .5rem; font-size: .98rem; }
  .tab:has(input:checked) { padding: .55rem .6rem .5rem; margin-top: 4px; margin-bottom: 0; }
  .tabpanel { padding: 1rem; }
  .install__windows { grid-template-columns: 1fr; }
  .install__windows .window:last-child { grid-column: auto; }
  .install__windows .window__body { min-height: 0; }
  .install__foot { grid-template-columns: 1fr; }
  .install__foot .btn { justify-self: start; }
  .record > div { grid-template-columns: 1fr; gap: 0; }
  .section--desk { padding: 2.5rem .75rem; }
  .setup { padding: 1.25rem; }
  .keycap { width: 2.75rem; height: 2.75rem; font-size: 1.4rem; }
  .setup__actions .btn { width: 100%; }
  .regform__grid { grid-template-columns: 1fr; }
  .regform__actions .btn { width: 100%; }

  .statusbar { flex-wrap: wrap; }
  .statusbar__cell--grow { flex-basis: 100%; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret::after { animation: none; }
}

@media (forced-colors: active) {
  .btn, .tbtn, .tab, .tabpanel, .window, .well, .input, .progress { border: 1px solid CanvasText; }
  .progress__fill { background: Highlight; }
}
