/* ——— Polices d'Eidos (hébergées localement) : Parkinsans pour les titres, Inter pour le texte ——— */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('/fonts/inter-v20-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url('/fonts/inter-v20-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('/fonts/inter-v20-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url('/fonts/inter-v20-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Parkinsans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('/fonts/parkinsans-v3-latin-600.woff2') format('woff2');
}

/* ——— Jetons du design system « Vibrance Clear » ——— */
:root {
  --surface: #ffffff;
  --mist: #c7d5e0;
  --ink: #32394e;
  --text-muted: #595959;
  --placeholder: #a7b3c2;
  --blue: #485bff;
  --blue-soft: #b6bdff;
  --coral: #fe6346;
  --teal: #33d3d4;
  --teal-deep: #22a2a3;
  --teal-ink: #176c6d;
  --amber: #fdb33e;
  --amber-ink: #a3650a;
  --control: #f1f4f8;
  --control-hover: #e3e9f0;
  --preview: #eef2f6;
  --track: #d9e2ea;

  /* Écran moniteur */
  --night: #0b1f4b;
  --night-deep: #06122e;
  --night-text: #e8eef7;
  --night-muted: #8fa3c0;
  --night-line: rgba(199, 213, 224, 0.08);
  --night-fill: rgba(199, 213, 224, 0.08);

  --shadow-card: 0 0 36px rgba(0, 0, 0, 0.24);
  --shadow-card-hover: 0 0 48px rgba(0, 0, 0, 0.28);
  --shadow-pill: 0 0 24px rgba(0, 0, 0, 0.12);
  --shadow-blue: 8px 10px 16px rgba(72, 91, 255, 0.2);

  --radius-tab: 24px;
  --radius-tile: 38px;
  --radius-panel: 46px;

  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'Parkinsans', 'Inter', system-ui, sans-serif;

  /* Courbes de mouvement */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Transition animée entre les pages (navigateurs compatibles) : les titres
   portant le même view-transition-name glissent d'une page à l'autre. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
  ::view-transition-group(*) {
    animation-duration: 0.6s;
    animation-timing-function: var(--ease-out);
  }
  ::view-transition-old(root) {
    animation-duration: 0.25s;
  }
  ::view-transition-new(root) {
    animation-duration: 0.45s;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

a {
  color: var(--blue);
}
a:hover {
  color: var(--ink);
}

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

svg {
  flex: none;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Fond clair à trame de points (Accueil, Pilote). */
.page-light {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--surface);
  background-image: radial-gradient(var(--mist) 1.6px, transparent 1.6px);
  background-size: 26px 26px;
}

/* ——— Composants partagés ——— */
.back-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: var(--ink);
}
.back-btn:hover {
  color: var(--blue);
}

.pill {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 6px 22px;
  background: var(--surface);
  border-radius: 999px;
  box-shadow: var(--shadow-pill);
}
.pill__label {
  font-size: 17px;
  font-weight: 400;
  color: var(--text-muted);
}
.pill__code {
  font-size: 24px;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: 0.22em;
  font-variant-numeric: tabular-nums;
}
.pill__text {
  font-size: 17px;
  font-weight: 500;
}

/* Bouton plein écran : l'icône change selon l'état. */
.fullscreen-btn .icon-collapse,
.fullscreen-btn[aria-pressed='true'] .icon-expand {
  display: none;
}
.fullscreen-btn[aria-pressed='true'] .icon-collapse {
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: var(--radius-tab);
  background: var(--blue);
  box-shadow: var(--shadow-blue);
  color: var(--surface);
  font-size: 19px;
  font-weight: 500;
  text-decoration: none;
  transition:
    transform 0.12s ease,
    filter 0.15s ease;
}
.btn:hover {
  color: var(--surface);
  filter: brightness(1.08);
}
.btn:active {
  transform: scale(0.97);
}
.btn--ghost {
  background: var(--control);
  box-shadow: none;
  color: var(--ink);
}
.btn--ghost:hover {
  color: var(--ink);
  background: var(--control-hover);
}

/* Fenêtre d'information (erreur de connexion, code introuvable…). */
.notice {
  width: min(520px, calc(100% - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}
.notice::backdrop {
  background: rgba(6, 18, 46, 0.72);
}
.notice__card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(28px, 5vw, 40px);
  background: var(--surface);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-card);
}
.notice__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
  font-weight: 600;
}
.notice__text {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 400;
  color: var(--text-muted);
}
.notice__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 6px;
}

.noscript {
  margin: 0;
  padding: 16px 24px;
  background: var(--ink);
  color: var(--surface);
  font-size: 17px;
  text-align: center;
}
