/* Charte iLinkiZ (lot 7, D90 ; système de design v2 du lot 10, D120) : une seule feuille pour l'espace client et
   l'administration. Blanc dominant, noir #171717 pour le texte et la structure, rouge #E50914 pour les actions et la
   sélection. Titres en Bricolage Grotesque, texte en Inter. Valeurs alignées sur `charte.ts` (contrastes AA testés).
   Les composants du système (icônes, menus, panneaux, tableaux, graphiques...) sont dans `systeme.css`. */
:root {
  --iz-blanc: #ffffff;
  --iz-fond: #fafafa;
  --iz-surface: #f2f2f2;
  --iz-noir: #171717;
  --iz-gris: #595959;
  --iz-bord: #e5e5e5;
  --iz-bord-champ: #8c8c8c;
  --iz-rouge: #e50914;
  --iz-rouge-fonce: #b20710;
  --iz-rouge-doux: #fdecec;
  --iz-succes: #1a7f37;
  --iz-succes-doux: #e8f5ec;
  --iz-attention: #8a5a00;
  --iz-attention-doux: #fdf5e1;
  --iz-police-titres: 'Bricolage Grotesque Variable', 'Bricolage Grotesque', system-ui, sans-serif;
  --iz-police-corps: 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Lot 10 : échelle d'espacements (base 4 px). */
  --iz-e-1: 4px;
  --iz-e-2: 8px;
  --iz-e-3: 12px;
  --iz-e-4: 16px;
  --iz-e-5: 20px;
  --iz-e-6: 24px;
  --iz-e-8: 32px;
  --iz-e-10: 40px;
  --iz-e-12: 48px;

  /* Rayons : petit (pastilles, champs), moyen (boutons, cartes), grand (panneaux), plein (pilules). */
  --iz-rayon-xs: 6px;
  --iz-rayon-petit: 8px;
  --iz-rayon: 12px;
  --iz-rayon-grand: 16px;
  --iz-rayon-plein: 999px;

  /* Ombres douces : anneau d'un pixel + diffusion, du plus discret au plus élevé. */
  --iz-anneau: 0 0 0 1px rgb(23 23 23 / 8%);
  --iz-ombre-1: 0 0 0 1px rgb(23 23 23 / 7%), 0 1px 2px rgb(23 23 23 / 5%);
  --iz-ombre: 0 0 0 1px rgb(23 23 23 / 6%), 0 1px 2px rgb(23 23 23 / 4%), 0 4px 12px rgb(23 23 23 / 4%);
  --iz-ombre-2: 0 0 0 1px rgb(23 23 23 / 6%), 0 4px 8px rgb(23 23 23 / 5%), 0 12px 32px rgb(23 23 23 / 8%);
  --iz-ombre-3: 0 0 0 1px rgb(23 23 23 / 8%), 0 16px 48px rgb(23 23 23 / 18%);
  --iz-voile: rgb(23 23 23 / 32%);

  /* Gris intermédiaires (survol, séparateurs, textes tertiaires sur blanc). */
  --iz-survol: #f5f5f5;
  --iz-trait: #ededed;

  /* Transitions courtes, coupées si l'utilisateur préfère moins d'animations. */
  --iz-duree: 160ms;
  --iz-courbe: cubic-bezier(0.2, 0, 0, 1);

  --iz-cible: 44px;
  --iz-anneau-focus: 0 0 0 2px var(--iz-blanc), 0 0 0 4px var(--iz-noir);
  color-scheme: light;
}
@media (prefers-reduced-motion: reduce) {
  :root {
    --iz-duree: 0ms;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--iz-blanc);
  color: var(--iz-noir);
}
body {
  font-family: var(--iz-police-corps);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}
@media (min-width: 900px) {
  body {
    font-size: 15px;
  }
}
h1,
h2,
h3 {
  font-family: var(--iz-police-titres);
  color: var(--iz-noir);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 6px;
}
h2 {
  font-size: 19px;
  font-weight: 650;
  margin: 28px 0 12px;
}
h3 {
  font-size: 16px;
  font-weight: 650;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
@media (min-width: 900px) {
  h1 {
    font-size: 30px;
  }
}
a {
  color: var(--iz-noir);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--iz-duree) var(--iz-courbe);
}
a:hover {
  color: var(--iz-rouge-fonce);
}
:focus-visible {
  outline: 2px solid var(--iz-noir);
  outline-offset: 2px;
  border-radius: 4px;
}
input,
select,
textarea,
button {
  font: inherit;
}
input[type='text'],
input[type='email'],
input[type='password'],
input[type='search'],
input[type='url'],
input[type='number'],
input[type='date'],
input[type='time'],
input:not([type]),
select,
textarea {
  min-height: var(--iz-cible);
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--iz-bord-champ);
  border-radius: var(--iz-rayon-petit);
  background: var(--iz-blanc);
  color: var(--iz-noir);
  font-size: 16px;
  transition:
    border-color var(--iz-duree) var(--iz-courbe),
    box-shadow var(--iz-duree) var(--iz-courbe);
}
input:hover,
select:hover,
textarea:hover {
  border-color: var(--iz-noir);
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--iz-noir);
  box-shadow: 0 0 0 3px rgb(23 23 23 / 12%);
}
@media (min-width: 900px) {
  input[type='text'],
  input[type='email'],
  input[type='password'],
  input[type='search'],
  input[type='url'],
  input[type='number'],
  input[type='date'],
  input[type='time'],
  input:not([type]),
  select,
  textarea {
    min-height: 40px;
    font-size: 15px;
  }
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
input[type='checkbox'],
input[type='radio'] {
  width: 18px;
  height: 18px;
  accent-color: var(--iz-rouge);
}
::selection {
  background: var(--iz-rouge-doux);
  color: var(--iz-noir);
}

/* Lien d'évitement (clavier, lecteurs d'écran). */
.iz-evitement {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--iz-noir);
  color: var(--iz-blanc);
  padding: 10px 14px;
  border-radius: var(--iz-rayon-petit);
}
.iz-evitement:focus {
  left: 8px;
  color: var(--iz-blanc);
}
.iz-masque {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Boutons : principal rouge, secondaire blanc cerné, danger rouge foncé, discret sans contour. Icône possible. */
.iz-bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--iz-cible);
  padding: 0 18px;
  border-radius: var(--iz-rayon-petit);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition:
    background-color var(--iz-duree) var(--iz-courbe),
    border-color var(--iz-duree) var(--iz-courbe),
    box-shadow var(--iz-duree) var(--iz-courbe),
    color var(--iz-duree) var(--iz-courbe),
    transform var(--iz-duree) var(--iz-courbe);
}
.iz-bouton svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.iz-bouton:active:not(:disabled) {
  transform: translateY(1px);
}
.iz-bouton:focus-visible {
  outline: none;
  box-shadow: var(--iz-anneau-focus);
}
.iz-bouton:disabled,
.iz-bouton[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
}
@media (min-width: 900px) {
  .iz-bouton {
    min-height: 38px;
    padding: 0 16px;
    font-size: 14px;
  }
}
.iz-bouton-principal {
  background: var(--iz-rouge);
  border-color: var(--iz-rouge);
  color: var(--iz-blanc);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 18%),
    0 1px 2px rgb(178 7 16 / 30%);
}
.iz-bouton-principal:hover:not(:disabled) {
  background: var(--iz-rouge-fonce);
  border-color: var(--iz-rouge-fonce);
  color: var(--iz-blanc);
}
.iz-bouton-secondaire {
  background: var(--iz-blanc);
  border-color: #d4d4d4;
  color: var(--iz-noir);
  box-shadow: 0 1px 2px rgb(23 23 23 / 6%);
}
.iz-bouton-secondaire:hover:not(:disabled) {
  background: var(--iz-survol);
  border-color: var(--iz-bord-champ);
  color: var(--iz-noir);
}
.iz-bouton-noir {
  background: var(--iz-noir);
  border-color: var(--iz-noir);
  color: var(--iz-blanc);
}
.iz-bouton-noir:hover:not(:disabled) {
  background: #2e2e2e;
  color: var(--iz-blanc);
}
.iz-bouton-danger {
  background: var(--iz-blanc);
  border-color: #f0b8bb;
  color: var(--iz-rouge-fonce);
}
.iz-bouton-danger:hover:not(:disabled) {
  background: var(--iz-rouge-doux);
  border-color: var(--iz-rouge-fonce);
  color: var(--iz-rouge-fonce);
}
.iz-bouton-discret {
  background: transparent;
  color: var(--iz-noir);
  padding: 0 10px;
}
.iz-bouton-discret:hover:not(:disabled) {
  background: var(--iz-survol);
  color: var(--iz-noir);
}
.iz-bouton-large {
  width: 100%;
}
.iz-bouton-petit {
  min-height: 34px;
  padding: 0 12px;
  font-size: 14px;
  border-radius: var(--iz-rayon-xs);
}
@media (min-width: 900px) {
  .iz-bouton-petit {
    min-height: 30px;
    font-size: 13px;
  }
}
.iz-bouton-icone {
  padding: 0;
  width: var(--iz-cible);
}
@media (min-width: 900px) {
  .iz-bouton-icone {
    width: 38px;
  }
  .iz-bouton-icone.iz-bouton-petit {
    width: 30px;
  }
}

/* Carte : surface blanche cernée d'un anneau, ombre très légère. */
.iz-carte {
  background: var(--iz-blanc);
  border: 0;
  border-radius: var(--iz-rayon);
  padding: var(--iz-e-4);
  box-shadow: var(--iz-ombre);
}
@media (min-width: 900px) {
  .iz-carte {
    padding: var(--iz-e-5);
  }
}

/* Badge d'état : couleur ET libellé (jamais la couleur seule). */
.iz-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px 8px;
  border-radius: var(--iz-rayon-xs);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
  border: 1px solid transparent;
  font-variant-numeric: tabular-nums;
}
.iz-badge-neutre {
  background: var(--iz-surface);
  color: var(--iz-noir);
}
.iz-badge-succes {
  background: var(--iz-succes-doux);
  color: var(--iz-succes);
}
.iz-badge-attention {
  background: var(--iz-attention-doux);
  color: var(--iz-attention);
}
.iz-badge-erreur {
  background: var(--iz-rouge-doux);
  color: var(--iz-rouge-fonce);
}
.iz-badge-action {
  background: var(--iz-rouge);
  color: var(--iz-blanc);
}
.iz-badge-contour {
  background: var(--iz-blanc);
  border-color: var(--iz-bord);
  color: var(--iz-noir);
}

/* Champ. */
.iz-champ {
  display: grid;
  gap: 6px;
}
.iz-champ-libelle {
  font-weight: 600;
  font-size: 14px;
}
.iz-champ-aide {
  color: var(--iz-gris);
  font-size: 13.5px;
}
.iz-champ-erreur {
  color: var(--iz-rouge-fonce);
  font-size: 13.5px;
  font-weight: 600;
}

/* Message vide (simple) ; la version illustrée est `.iz-etat-vide` (systeme.css). */
.iz-vide {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 24px 20px;
  border: 1px dashed #cfcfcf;
  border-radius: var(--iz-rayon);
  background: var(--iz-fond);
}
.iz-vide p {
  margin: 0;
}
.iz-vide-titre {
  font-family: var(--iz-police-titres);
  font-size: 17px;
  font-weight: 650;
}
.iz-vide-texte {
  color: var(--iz-gris);
}

/* Chargement. */
.iz-chargement {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--iz-gris);
}
.iz-chargement-roue {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--iz-bord);
  border-top-color: var(--iz-rouge);
  animation: iz-tourne 0.8s linear infinite;
}
@keyframes iz-tourne {
  to {
    transform: rotate(360deg);
  }
}

/* Toast en place : retour d'action en haut du contenu (la version flottante est `.iz-toasts`). */
.iz-toast {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--iz-rayon-petit);
  border: 0;
  box-shadow: var(--iz-ombre-1);
  background: var(--iz-blanc);
  font-weight: 500;
  font-size: 14.5px;
}
.iz-toast::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: currentColor;
}
.iz-toast ul {
  margin: 6px 0 0;
  padding-left: 18px;
  font-weight: 400;
}
.iz-toast-succes {
  color: var(--iz-noir);
  background: var(--iz-succes-doux);
  box-shadow: inset 0 0 0 1px rgb(26 127 55 / 18%);
}
.iz-toast-succes::before {
  background: var(--iz-succes);
}
.iz-toast-erreur {
  color: var(--iz-noir);
  background: var(--iz-rouge-doux);
  box-shadow: inset 0 0 0 1px rgb(178 7 16 / 20%);
}
.iz-toast-erreur::before {
  background: var(--iz-rouge-fonce);
}
.iz-toast-info {
  color: var(--iz-noir);
  background: var(--iz-fond);
  box-shadow: inset 0 0 0 1px var(--iz-bord);
}
.iz-toast-info::before {
  background: var(--iz-noir);
}

/* En-tête de page. */
.iz-entete {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  margin: 0 0 24px;
}
.iz-aide {
  margin: 0;
  color: var(--iz-gris);
  max-width: 62ch;
}
.iz-entete-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Filtres et tris : pastilles cliquables (liens) et sélecteurs alignés. */
.iz-filtres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  margin: 0 0 16px;
}
.iz-filtres .iz-champ {
  flex: 1 1 150px;
  gap: 4px;
  font-size: 12.5px;
  color: var(--iz-gris);
}
.iz-filtres select {
  min-height: 40px;
  font-size: 14px;
}
.iz-filtres .iz-bouton {
  min-height: 40px;
}
@media (min-width: 900px) {
  .iz-filtres .iz-champ {
    flex: 0 1 190px;
  }
}
.iz-pastilles {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  margin: 0 0 16px;
  scrollbar-width: none;
}
.iz-pastilles a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--iz-bord);
  border-radius: var(--iz-rayon-plein);
  color: var(--iz-noir);
  background: var(--iz-blanc);
  text-decoration: none;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  transition:
    background-color var(--iz-duree) var(--iz-courbe),
    border-color var(--iz-duree) var(--iz-courbe);
}
.iz-pastilles a:hover {
  background: var(--iz-survol);
  color: var(--iz-noir);
}
.iz-pastilles a[aria-current='page'],
.iz-pastilles a[aria-current='true'] {
  background: var(--iz-noir);
  border-color: var(--iz-noir);
  color: var(--iz-blanc);
  font-weight: 600;
}
.iz-discret {
  color: var(--iz-gris);
  font-size: 14px;
}
.iz-chiffres {
  font-variant-numeric: tabular-nums;
}

/* Accès d'application : cartes et formulaires lisibles sur téléphone. */
.iz-pile {
  display: grid;
  gap: var(--iz-espace-4, 1rem);
  min-width: 0;
}
.iz-pile fieldset {
  min-width: 0;
  border: 1px solid var(--iz-bordure, #dedede);
  border-radius: 0.75rem;
  padding: 1rem;
}
