/* UDCShare v2 — base : remise à zéro légère, typographie, mise en page. Jetons : tokens.css (design/tokens.json). */

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--font-line-height);
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: clip; /* clip et non hidden : ne coupe pas les menus déroulants */
}

h1, h2, h3, h4 { margin: 0 0 var(--space-3); line-height: var(--font-line-height-tight); font-weight: var(--font-weight-bold); }
h1 { font-size: var(--font-size-2xl); letter-spacing: -0.015em; }
h2 { font-size: var(--font-size-xl); letter-spacing: -0.01em; }
h3 { font-size: var(--font-size-lg); }
h4 { font-size: var(--font-size-base); }
@media (min-width: 48rem) {
  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }
}

p { margin: 0 0 var(--space-4); }
small, .v2-text-sm { font-size: var(--font-size-sm); }
.v2-muted { color: var(--color-text-muted); }

a { color: var(--color-link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

img, svg { max-width: 100%; height: auto; }
svg { flex-shrink: 0; }

:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-sm); }

.v2-container { width: 100%; max-width: var(--size-content); margin-inline: auto; padding-inline: var(--space-4); }
.v2-narrow { max-width: var(--size-narrow); }
.v2-stack > * + * { margin-top: var(--space-4); }
.v2-section { padding-block: var(--space-6); }

.v2-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.v2-skip-link { position: absolute; left: var(--space-2); top: -100px; z-index: 100; background: var(--color-surface); padding: var(--space-3); }
.v2-skip-link:focus { top: var(--space-2); }

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

/* Téléphones et tablettes tactiles : tout champ de saisie fait au moins 16 px, sinon iOS zoome la page au toucher.
   !important car des feuilles plus spécifiques (chat, fenêtres modales, pages d'envoi) fixaient 13–14 px. Le zoom manuel
   (pincement) reste permis : le viewport n'est jamais bloqué. */
@media (hover: none) and (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]),
  select, textarea {
    font-size: max(16px, 1em) !important;
    font-size: max(var(--udc-input-min, 16px), 1em) !important;
  }
}

/* ── Système de design UDCShare (densité régulière, inspirée des consoles type Render) ──
   Une seule échelle : 12 / 13 / 14 / 15 px pour l'interface, 17 / 20 / 24 / 32 px pour les titres.
   Téléphone : le texte courant passe à 16 px (lisible, et pas de zoom automatique d'iOS sur les champs).
   Écran tactile : les cibles gardent 44 px minimum ; souris : 36–40 px, comme une console d'ordinateur. */
@media (max-width: 47.99rem) { :root { --font-size-base: 1rem; } }
@media (pointer: coarse) { :root { --size-tap: 44px; --size-control: 40px; } }

/* Libellé de section : petites capitales espacées en police à chasse fixe (ex. « INTÉGRATIONS »). */
.v2-eyebrow, .v2-label-mono {
  display: inline-flex; align-items: center; gap: var(--space-2);
  margin: 0 0 var(--space-2); color: var(--color-text-muted);
  font-family: var(--font-family-mono); font-size: var(--font-size-xs); font-weight: var(--font-weight-medium);
  letter-spacing: var(--font-tracking-label); text-transform: uppercase; line-height: 1.4;
}
/* Icônes : 16 px dans le texte et les boutons, 18 px dans les menus. Trait fin, couleur du texte. */
.v2-ico { width: var(--size-icon); height: var(--size-icon); flex: none; }
.v2-ico--lg { width: var(--size-icon-lg); height: var(--size-icon-lg); }
/* Liste de navigation façon console : icône + libellé, groupes titrés. */
.v2-navlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.v2-navlist a, .v2-navlist button {
  display: flex; align-items: center; gap: var(--space-3); width: 100%;
  min-height: var(--size-tap); padding: 0 var(--space-3); border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--color-text); font: inherit; font-size: var(--font-size-control);
  text-decoration: none; text-align: left; cursor: pointer;
}
.v2-navlist svg { width: var(--size-icon-lg); height: var(--size-icon-lg); color: var(--color-text-muted); flex: none; }
.v2-navlist a:hover, .v2-navlist button:hover { background: var(--color-surface-2); }
.v2-navlist a[aria-current="page"] { background: var(--color-brand-soft); color: var(--color-text); }
.v2-navlist a[aria-current="page"] svg { color: var(--color-brand); }
/* Tableau clé / valeur (ex. « CRÉÉ · il y a 5 mois »). */
.v2-kv { display: grid; grid-template-columns: minmax(7rem, 40%) 1fr; margin: 0; font-size: var(--font-size-control); }
.v2-kv dt, .v2-kv dd { margin: 0; padding: var(--space-2) 0; border-bottom: 1px solid var(--color-border); }
.v2-kv dt { color: var(--color-text-muted); font-family: var(--font-family-mono); font-size: var(--font-size-xs); letter-spacing: var(--font-tracking-label); text-transform: uppercase; align-self: center; }


/* Densité desktop : afficher davantage de contenu sans réduire le texte sur mobile. */
@media (min-width: 64rem) {
  html { zoom: 0.95; }
}
