/* Appliquer t4hi-scope au conteneur éditorial, pas au body du site existant. */
.t4hi-scope {
  font-family: var(--t4hi-font-family);
  font-size: var(--t4hi-size-body);
  font-weight: var(--t4hi-weight-body);
  line-height: var(--t4hi-line-body);
  color: var(--t4hi-color-text);
  overflow-wrap: break-word;
}

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

.t4hi-scope :where(h1, h2, h3, h4, h5, h6) {
  font-family: var(--t4hi-font-family);
  color: var(--t4hi-color-primary);
  font-weight: var(--t4hi-weight-strong);
  line-height: var(--t4hi-line-heading);
  margin-block: 0 var(--t4hi-space-3);
}
.t4hi-scope h1 {
  font-size: var(--t4hi-size-h1);
  font-weight: var(--t4hi-weight-display);
  line-height: var(--t4hi-line-display);
}
.t4hi-scope h2 { font-size: var(--t4hi-size-h2); }
.t4hi-scope h3 { font-size: var(--t4hi-size-h3); }
.t4hi-scope h4 { font-size: var(--t4hi-size-h4); }
.t4hi-scope p { margin-block: 0 var(--t4hi-space-3); }
.t4hi-scope .t4hi-lead { font-size: var(--t4hi-size-lead); }
@media (max-width: 767px) {
  .t4hi-scope .t4hi-lead { line-height: 1.6; }
}
.t4hi-scope .t4hi-label {
  font-size: var(--t4hi-size-label);
  font-weight: var(--t4hi-weight-strong);
}
.t4hi-scope :where(input, textarea, select, button) { font-family: var(--t4hi-font-family); }
.t4hi-scope a:not(.button):not(.elementor-button):not([role="button"]) {
  color: var(--t4hi-color-primary);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.t4hi-scope a:not(.button):not(.elementor-button):not([role="button"]):hover {
  color: var(--t4hi-color-primary-dark);
}

.t4hi-container {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--t4hi-container-max);
  margin-inline: auto;
  padding-inline: var(--t4hi-gutter);
}
.t4hi-section { padding-block: var(--t4hi-section-space); }
.t4hi-scope :where(img, video) { max-width: 100%; height: auto; }

/* Fallback :focus conservé pour les navigateurs sans :focus-visible. */
.t4hi-scope:focus,
.t4hi-scope :focus {
  outline: var(--t4hi-focus-width) solid var(--t4hi-focus-color);
  outline-offset: var(--t4hi-focus-offset);
}
.t4hi-scope:focus-visible,
.t4hi-scope :focus-visible {
  outline: var(--t4hi-focus-width) solid var(--t4hi-focus-color);
  outline-offset: var(--t4hi-focus-offset);
  box-shadow: 0 0 0 2px var(--t4hi-color-white);
}

@media (prefers-reduced-motion: reduce) {
  /* !important limité à la préférence d'accessibilité dans le périmètre T4HI. */
  .t4hi-scope,
  .t4hi-scope *,
  .t4hi-scope *::before,
  .t4hi-scope *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
