/* Accès Infirmières — jetons de style. Une seule source pour couleurs, typographie, espacement. */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat-variable.woff2") format("woff2-variations"),
       url("../fonts/Montserrat-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat-Italic-variable.woff2") format("woff2-variations"),
       url("../fonts/Montserrat-Italic-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Couleurs de marque — cahier de normes graphiques, édition 1, nov. 2022 */
  --ai-rouge: #ED1C29;
  --ai-rouge-fonce: #A71C24;
  --ai-encre: #030503;
  --ai-papier: #FBFAF9;
  --ai-brume: #E4E7E3;
  --ai-sauge: #5F7063;

  /* Palette secondaire (guide de marque) */
  --ai-corail: #E73446;
  --ai-mauve: #361E58;
  --ai-gris-marque: #585056;

  /* Palette tertiaire (guide de marque — fonds d'icônes) */
  --ai-magenta: #EE3E7B;
  --ai-rose: #F6A3BE;
  --ai-rose-pale: #FDE4E3;
  --ai-bleu: #14A0D2;
  --ai-orange: #FAA755;
  --ai-menthe: #7ECBB6;

  /* Couleurs fonctionnelles dérivées */
  --ai-bordure: #D8D9D3;
  --ai-focus: #030503;

  /* Typographie — Montserrat (guide de marque). CarlMarx, réservée aux
     titres avec parcimonie dans le guide, est remplacée par Montserrat en
     poids fort : ni la police ni sa licence ne nous ont été fournies, et
     le guide autorise explicitement cette substitution à défaut. */
  --ai-police-titres: "Montserrat", -apple-system, "Segoe UI", sans-serif;
  --ai-police-texte: "Montserrat", -apple-system, "Segoe UI", sans-serif;
  --ai-corps: 18px;
  --ai-corps-grand: 19px;
  --ai-interligne: 1.65;
  --ai-mesure: 68ch;

  /* Échelle d'espacement */
  --ai-espace-1: 0.5rem;
  --ai-espace-2: 1rem;
  --ai-espace-3: 1.5rem;
  --ai-espace-4: 2.5rem;
  --ai-espace-5: 4rem;
  --ai-espace-6: 6rem;

  /* Forme */
  --ai-rayon: 4px;
  --ai-rayon-grand: 12px;
  --ai-cible-tactile: 44px;

  /* Ombres — douces, teintées d'encre plutôt que de gris pur */
  --ai-ombre-douce: 0 1px 2px rgba(3, 5, 3, 0.04), 0 4px 16px rgba(3, 5, 3, 0.06);
  --ai-ombre-douce-hover: 0 2px 4px rgba(3, 5, 3, 0.05), 0 10px 28px rgba(3, 5, 3, 0.09);

  /* Transition standard — désactivée globalement sous prefers-reduced-motion */
  --ai-transition: 200ms ease;
}

@media (min-width: 768px) {
  :root {
    --ai-corps: 19px;
  }
}

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

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

body {
  margin: 0;
  background: var(--ai-papier);
  color: var(--ai-encre);
  font-family: var(--ai-police-texte);
  font-size: var(--ai-corps);
  line-height: var(--ai-interligne);
}

h1, h2, h3 {
  font-family: var(--ai-police-titres);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 var(--ai-espace-2);
  color: var(--ai-encre);
}

h1 { font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.3rem); font-weight: 800; line-height: 1.08; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); font-weight: 700; letter-spacing: normal; }

h4, h5, h6 {
  font-family: var(--ai-police-texte);
  font-weight: 700;
  margin: 0 0 var(--ai-espace-1);
}

p {
  max-width: var(--ai-mesure);
  margin: 0 0 var(--ai-espace-2);
}

ul, ol {
  max-width: var(--ai-mesure);
  margin: 0 0 var(--ai-espace-2);
  padding-left: 1.1em;
}

ul {
  list-style: none;
}

ul > li {
  position: relative;
  padding-left: 1em;
}

ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ai-rouge-fonce);
}

li {
  margin-bottom: 0.4em;
}

li > ul,
li > ol {
  margin-top: 0.4em;
}

a {
  color: var(--ai-rouge-fonce);
  transition: color var(--ai-transition);
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--ai-focus);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.tableau-scroll {
  overflow-x: auto;
  margin-block: var(--ai-espace-2);
}

table {
  border-collapse: collapse;
  width: 100%;
  max-width: var(--ai-mesure);
}

.tableau-scroll table {
  margin-block: 0;
}

th, td {
  text-align: left;
  padding: var(--ai-espace-1) var(--ai-espace-2);
  border-bottom: 1px solid var(--ai-bordure);
  vertical-align: top;
}

th {
  font-family: var(--ai-police-texte);
  font-weight: 700;
}

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