/*
 * MyE360 · Base
 * Polices locales, typographie et normalisation limitées à .mye-app et .mye-layer.
 * Aucun reset global : ORISA et /cp/admin ne sont pas touchés.
 */

/* Polices (Inter et PT Serif, licence SIL OFL 1.1, fichiers dans assets/fonts) */
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "PT Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/pt-serif-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "PT Serif"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/pt-serif-latin-700-normal.woff2") format("woff2"); }

.mye-app,
.mye-layer {
  font-family: var(--mye-font);
  font-size: var(--mye-fs-body);
  line-height: 1.5;
  color: var(--mye-text);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.mye-app {
  background: var(--mye-bg);
  min-height: 100vh;
}

.mye-app *,
.mye-app *::before,
.mye-app *::after,
.mye-layer *,
.mye-layer *::before,
.mye-layer *::after {
  box-sizing: border-box;
}

/* Corps de page autonome (prévisualisation) et sprite d'icônes */
.mye-body { margin: 0; }
.mye-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Titres et paragraphes : marges maîtrisées par les composants */
:where(.mye-app, .mye-layer) :where(h1, h2, h3, h4, p, figure, blockquote, ol, ul, dl, dd, fieldset) {
  margin: 0;
}

:where(.mye-app) :where(ol, ul) { padding: 0; list-style: none; }
.mye-app ol.mye-prose-list, .mye-app ul.mye-prose-list { padding-left: 1.25rem; list-style: revert; }
:where(.mye-app) fieldset { padding: 0; border: 0; min-width: 0; }
:where(.mye-app) legend { padding: 0; }
:where(.mye-app) :where(img, svg, video) { display: block; max-width: 100%; }
:where(.mye-app, .mye-layer) :where(button, input, select, textarea) { font: inherit; color: inherit; }
:where(.mye-app) button { cursor: pointer; }
:where(.mye-app) button:disabled { cursor: not-allowed; }
:where(.mye-app) table { border-collapse: collapse; width: 100%; }
:where(.mye-app) :where(strong, b) { font-weight: 600; }

/* Liens (source : code) */
:where(.mye-app, .mye-layer) a {
  color: var(--mye-primary);
}

:where(.mye-app, .mye-layer) a:hover {
  color: var(--mye-primary-pressed);
}

/* États masqués : l'attribut hidden l'emporte sur les classes d'affichage (exception documentée) */
.mye-app [hidden],
.mye-layer [hidden] {
  display: none !important;
}

/* Texte réservé aux lecteurs d'écran */
.mye-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Lien d'évitement */
.mye-skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: var(--mye-r-m);
  background: var(--mye-text);
  color: var(--mye-bg);
  font-weight: 600;
  text-decoration: none;
}

.mye-skip:focus {
  top: 1rem;
  color: var(--mye-bg);
}

/* Icônes : trait 1,75 et extrémités arrondies (source : code) */
.mye-i {
  flex: none;
  width: 1.375rem;
  height: 1.375rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mye-i--xs { width: 0.875rem; height: 0.875rem; stroke-width: 2.5; }
.mye-i--s { width: 1.125rem; height: 1.125rem; stroke-width: 2; }
.mye-i--m { width: 1.25rem; height: 1.25rem; stroke-width: 2; }
.mye-i--l { width: 1.625rem; height: 1.625rem; }
.mye-i--xl { width: 2rem; height: 2rem; }

/* Typographie de contenu */
.mye-h1 { font-size: var(--mye-fs-h1); line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.mye-h2 { font-size: var(--mye-fs-h2); line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
.mye-h3 { font-size: var(--mye-fs-h3); line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }
.mye-h4 { font-size: var(--mye-fs-body-l); line-height: 1.35; font-weight: 600; }
.mye-edito { font-family: var(--mye-font-serif); font-size: var(--mye-fs-edito); line-height: 1.2; font-weight: 700; }
.mye-edito--l { font-size: 2rem; line-height: 1.12; }
.mye-lead { font-size: var(--mye-fs-body-l); line-height: 1.5; }
.mye-text-2 { color: var(--mye-text-2); }
.mye-small { font-size: var(--mye-fs-small); }
.mye-caption { font-size: var(--mye-fs-caption); font-weight: 600; }
.mye-eyebrow { font-size: var(--mye-fs-caption); font-weight: 600; color: var(--mye-primary); }
.mye-num { font-variant-numeric: tabular-nums; }
.mye-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--mye-fs-small); }

/* Mouvement réduit : fondu seul (source : guide) */
@media (prefers-reduced-motion: reduce) {
  .mye-app *,
  .mye-layer * {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
