/* ==========================================================================
   Base : reset raisonne, typographie, accessibilite
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--fpt-font);
  font-size: var(--fpt-fs);
  line-height: var(--fpt-lh);
  font-weight: var(--fpt-fw);
  color: var(--fpt-text);
  background: var(--fpt-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { line-height: var(--fpt-lh-tight); font-weight: var(--fpt-fw-b); margin: 0 0 var(--fpt-3); }
h1 { font-size: var(--fpt-h1); letter-spacing: -.012em; }
h2 { font-size: var(--fpt-h2); }
h3 { font-size: var(--fpt-h3); }
p  { margin: 0 0 var(--fpt-3); }
p:last-child { margin-bottom: 0; }

a { color: var(--fpt-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg, video { max-width: 100%; height: auto; }
svg { flex-shrink: 0; }

code, pre, kbd {
  font-family: var(--fpt-font-mono);
  font-size: .875em;
}
code {
  background: var(--fpt-surface-2);
  border: 1px solid var(--fpt-border);
  border-radius: var(--fpt-radius-sm);
  padding: .1em .38em;
}

hr { border: 0; border-top: 1px solid var(--fpt-border); margin: var(--fpt-5) 0; }

/* --- focus visible, jamais supprime --- */

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--fpt-primary);
  outline-offset: 2px;
  border-radius: var(--fpt-radius-sm);
}

/* --- lien d'evitement --- */

.fpt-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: var(--fpt-3) var(--fpt-4);
  background: var(--fpt-surface);
  color: var(--fpt-text);
  border: 1px solid var(--fpt-border);
  border-radius: 0 0 var(--fpt-radius) 0;
  box-shadow: var(--fpt-shadow-lg);
}
.fpt-skip-link:focus { left: 0; }

/* --- utilitaire lecteur d'ecran --- */

.screen-reader-text, .fpt-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus {
  position: static !important;
  width: auto; height: auto;
  clip: auto; clip-path: none;
}

/* --- utilitaires --- */

.fpt-muted { color: var(--fpt-muted); }
.fpt-small { font-size: var(--fpt-fs-sm); }
.fpt-strong { font-weight: var(--fpt-fw-b); }
.fpt-num { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.fpt-ta-r { text-align: right; }
[hidden] { display: none !important; }
