.equation {
  font-family: "STIX Two Math", "Cambria Math", serif;
  font-size: clamp(1rem, 2vw, 1.4rem);
}


/* Fallback HTML/CSS */
.equation {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15em;
  white-space: nowrap;
}

/* MathML masqué par défaut */
.mathml-only {
  display: none;
}

/* CSS fallback visible par défaut */
.css-math {
  white-space: nowrap;
}

/* vecteurs */
.equation .vec {
  position: relative;
  display: inline-block;
  padding-top: 0.45em;
  font-style: italic;
}

.equation .vec::before {
  content: "";
  position: absolute;
  top: 0.08em;
  left: 0;
  width: 100%;
  border-top: 0.08em solid currentColor;
}

.equation .vec::after {
  content: "";
  position: absolute;
  top: 0.03em;
  right: -0.05em;
  border-left: 0.25em solid currentColor;
  border-top: 0.15em solid transparent;
  border-bottom: 0.15em solid transparent;
}

/* opérateurs */
.equation .op {
  margin: 0 0.25em;
}

.equation .minus {
  margin-right: 0.1em;
}

/* indices */
.equation sub {
  font-size: 0.7em;
  vertical-align: -0.4em;
}

/* Variables */
.equation .var {
  font-style: italic;
}

/* Fonctions */
.equation .func {
  font-style: normal;
}

/* enhancement */
html.mathml .mathml-only {
  display: inline;
}

html.mathml .css-only {
  display: none;
}

/* accent circonflexe */
.equation .widehat {
  position: relative;
  display: inline-block;
  padding-top: 0.6em;   /* espace pour le chapeau */
}
.equation .widehat::before {
  content: "ˆ";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(2.2);
  transform-origin: center;
  font-size: 0.9em;
  line-height: 1;
}