/* ============================================================
   IRIQ · Base
   Reinitialisation, typographie, focus, mouvement reduit.
   Aucune regle de composant ici.
   ============================================================ */

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

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

body {
  margin: 0;
  font-family: var(--police-texte);
  font-size: var(--ts-corps);
  line-height: var(--il-corps);
  color: var(--texte-principal);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  /* Aucun debordement horizontal, a aucune largeur. */
  overflow-x: hidden;
}

h1, h2, h3, h4, .titre {
  font-family: var(--police-titre);
  font-weight: 600;
  letter-spacing: var(--ls-titre);
  color: var(--iriq-marine-700);
  margin: 0 0 var(--e-4);
  /* Evite les debordements des titres longs sur 360 px. */
  overflow-wrap: break-word;
}
h1 { font-size: var(--ts-h1); line-height: var(--il-h1); }
h2 { font-size: var(--ts-h2); line-height: var(--il-h2); }
h3 { font-size: var(--ts-h3); line-height: var(--il-h3); }
h4 { font-size: var(--ts-h4); line-height: var(--il-h4); }

p { margin: 0 0 var(--e-4); }

a {
  color: var(--lien);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--lien-survol); text-decoration-thickness: 2px; }

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

ul, ol { margin: 0 0 var(--e-4); padding-inline-start: var(--e-5); }
li { margin-bottom: var(--e-2); }

hr { border: 0; border-top: var(--filet-fin) solid var(--bordure); }

table { border-collapse: collapse; }

/* Les champs heritent de la police et ne descendent jamais sous 16 px,
   sans quoi les navigateurs mobiles zooment a la mise au point. */
input, select, textarea, button {
  font-family: inherit;
  font-size: 1rem;
}

:focus-visible {
  outline: var(--filet-moyen) solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus-halo);
  border-radius: var(--rayon-xs);
}
.sur-sombre :focus-visible,
.section--nuit :focus-visible,
.app-lateral :focus-visible { outline-color: var(--iriq-blanc); }

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

/* ---------- Utilitaires d'accessibilite ---------- */
.visuellement-cache {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Propriete logique : le lien sort de l'ecran du bon cote quel que
   soit le sens de lecture, arabe compris. */
.lien-evitement {
  position: absolute; inset-inline-start: -9999px; top: 0;
  background: var(--iriq-marine-700); color: #fff;
  padding: var(--e-3) var(--e-4); z-index: 100; text-decoration: none;
}
.lien-evitement:focus { inset-inline-start: var(--e-4); top: var(--e-4); }

[hidden] { display: none !important; }

/* Emplacements prevus par la charte et masques tant que les certificats
   ne sont pas delivres. Note de passation, section 11. */
.emplacement-reserve { display: none; }
