/* =============================================================================
   DOKOTERA — Reinitialisation et bases typographiques
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--ink);
  background: var(--surface-2);
  /* Raleway dessine par defaut des chiffres elzeviriens (hauteurs inegales) :
     on impose des chiffres alignes, plus lisibles sur les montants et horaires. */
  font-variant-numeric: lining-nums;
  font-feature-settings: 'lnum' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

/*
   Taille par defaut des icones en trait.

   Une <svg> avec `viewBox` mais sans dimension prend une taille intrinseque de
   300x150 px : sans cette regle, toute icone posee dans un conteneur non style
   s'affiche en geant. La taille suit celle du texte (1.25em) et reste
   surchargeable par les composants, dont les selecteurs sont plus specifiques.
*/
.icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5 {
  line-height: var(--lh-tight);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-3xl);
}
h2 {
  font-size: var(--fs-2xl);
}
h3 {
  font-size: var(--fs-xl);
}
h4 {
  font-size: var(--fs-lg);
}

p {
  text-wrap: pretty;
}

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: var(--s-6) 0;
}

/* Focus visible unifie : indispensable pour la navigation au clavier. */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

::selection {
  background: var(--brand);
  color: var(--ink);
}

/* Barre de defilement discrete. */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: var(--r-full);
  border: 3px solid transparent;
  background-clip: content-box;
}

/* --- Utilitaires ---------------------------------------------------------- */

/* `hidden` doit primer sur les display: flex/grid des composants. */
[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Lien d'evitement, revele au premier Tab. */
.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: var(--z-toast);
  background: var(--ink);
  color: var(--brand);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-sm);
  font-weight: 700;
  transition: top var(--t-base);
}
.skip-link:focus {
  top: var(--s-4);
}

.text-muted {
  color: var(--ink-500);
}
.text-dim {
  color: var(--ink-400);
}
.text-sm {
  font-size: var(--fs-sm);
}
.text-xs {
  font-size: var(--fs-xs);
}
.text-lg {
  font-size: var(--fs-lg);
}
.text-bold {
  font-weight: 700;
}
.text-semi {
  font-weight: 600;
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.text-nowrap {
  white-space: nowrap;
}
.text-success {
  color: var(--success);
}
.text-danger {
  color: var(--danger);
}
.text-warning {
  color: var(--warning);
}
.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  letter-spacing: -0.02em;
}

.uppercase-label {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--ink-400);
}

.flex {
  display: flex;
}
.flex-col {
  display: flex;
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.items-start {
  align-items: flex-start;
}
.items-end {
  align-items: flex-end;
}
.justify-between {
  justify-content: space-between;
}
.justify-center {
  justify-content: center;
}
.justify-end {
  justify-content: flex-end;
}
.flex-wrap {
  flex-wrap: wrap;
}
.flex-1 {
  flex: 1;
}
.gap-1 {
  gap: var(--s-1);
}
.gap-2 {
  gap: var(--s-2);
}
.gap-3 {
  gap: var(--s-3);
}
.gap-4 {
  gap: var(--s-4);
}
.gap-5 {
  gap: var(--s-5);
}
.gap-6 {
  gap: var(--s-6);
}

.mt-1 {
  margin-top: var(--s-1);
}
.mt-2 {
  margin-top: var(--s-2);
}
.mt-3 {
  margin-top: var(--s-3);
}
.mt-4 {
  margin-top: var(--s-4);
}
.mt-5 {
  margin-top: var(--s-5);
}
.mt-6 {
  margin-top: var(--s-6);
}
.mt-7 {
  margin-top: var(--s-7);
}
.mt-8 {
  margin-top: var(--s-8);
}
.mt-9 {
  margin-top: var(--s-9);
}
.mt-10 {
  margin-top: var(--s-10);
}
.mb-1 {
  margin-bottom: var(--s-1);
}
.mb-2 {
  margin-bottom: var(--s-2);
}
.mb-3 {
  margin-bottom: var(--s-3);
}
.mb-4 {
  margin-bottom: var(--s-4);
}
.mb-5 {
  margin-bottom: var(--s-5);
}
.mb-6 {
  margin-bottom: var(--s-6);
}
.mb-7 {
  margin-bottom: var(--s-7);
}
.mb-8 {
  margin-bottom: var(--s-8);
}
.mb-9 {
  margin-bottom: var(--s-9);
}
.mb-10 {
  margin-bottom: var(--s-10);
}

.w-full {
  width: 100%;
}
.hide {
  display: none !important;
}

@media (max-width: 720px) {
  .hide-mobile {
    display: none !important;
  }
}
@media (min-width: 721px) {
  .only-mobile {
    display: none !important;
  }
}
