/* SignagePDF — socle commun : polices auto-hébergées, tokens, reset, composants de base. */

@font-face {
  font-family: 'Familjen Grotesk';
  src: url('/fonts/familjen-grotesk-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('/fonts/figtree-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  /* Palette : blanc 70 %, encre 25 %, rouge « antenne » 2 à 5 % (le voyant « en diffusion »). */
  --paper: #ffffff;
  --surface: #f3f4f6;
  --surface-2: #e9eaee;
  --ink: #15171c;          /* 17,9:1 sur blanc */
  --ink-2: #555b66;        /* 6,8:1 sur blanc */
  --line: #e2e4e8;
  --line-strong: #c9ccd3;
  --onair: #e5372a;        /* voyant, points, grands éléments */
  --onair-text: #d02e22;   /* texte et boutons rouges : 5,1:1 */
  --ok: #1f7a4d;
  --focus: #2457d6;

  --font-title: 'Familjen Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-text: 'Figtree', ui-sans-serif, system-ui, sans-serif;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --shadow-card: 0 1px 2px rgb(21 23 28 / 6%), 0 12px 32px -12px rgb(21 23 28 / 22%);
  --shadow-pop: 0 2px 6px rgb(21 23 28 / 8%), 0 28px 60px -20px rgb(21 23 28 / 38%);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --t-fast: 140ms;
  --t-mid: 240ms;
  --t-slow: 380ms;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--font-text);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, canvas, svg { display: block; max-width: 100%; }
picture { display: contents; } /* l'image garde la mise en page de son parent */
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--font-title); font-weight: 700; line-height: 1.08; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

/* Logo : le point du « i » est le voyant rouge de diffusion. */
.wordmark { display: inline-flex; align-items: baseline; font: 700 21px/1 var(--font-title); letter-spacing: -0.035em; color: var(--ink); text-decoration: none; }
.wordmark .i { position: relative; }
.wordmark .i::after {
  content: ''; position: absolute; left: 50%; top: -0.02em; width: 0.26em; height: 0.26em; margin-left: -0.13em;
  border-radius: 50%; background: var(--onair);
}
.wordmark .pdf { color: var(--ink-2); font-weight: 600; }

/* Boutons */
.btn {
  --bg: var(--ink); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--bg); color: var(--fg); font-weight: 650; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.btn:hover { background: #2b2e36; }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn--ghost { --bg: transparent; --fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn--ghost:hover { background: var(--surface); }
.btn--red { --bg: var(--onair-text); }
.btn--red:hover { background: #b9271d; }
.btn--small { min-height: 38px; padding: 0 16px; font-size: 15px; }
.btn svg { width: 18px; height: 18px; flex: none; }

.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--onair); box-shadow: 0 0 0 0 rgb(229 55 42 / 55%); animation: live 2s var(--ease-out) infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgb(229 55 42 / 55%); } 70%, 100% { box-shadow: 0 0 0 7px rgb(229 55 42 / 0%); } }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

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