/* Juarts — typographie « Éditorial ».
   Remplace Mona Sans Wide, la police du gabarit Webflow d'origine :
   - les grands titres en Instrument Serif (une seule graisse, 400, et son italique) ;
   - le texte, l'interface, les petits titres et les montants en Instrument Sans
     (police variable, 400 à 700).
   Liée juste après la feuille Webflow sur chaque page Juarts. Le gabarit lit ses
   polices dans deux jetons — --core--font-family--headlines pour h1 à h6,
   --core--font-family--primary-font pour tout le reste — redéfinis ci-dessous.
   Polices auto-hébergées (fonts/google/), sous-ensembles latin et latin étendu,
   licence SIL Open Font License.

   Les études de cas MEGGA (.mg-cs) et MEGGA CRM (.crm-cs) ont leur propre
   typographie : aucune règle de ce fichier ne les touche. */

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/google/instrument-serif-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/google/instrument-serif-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/google/instrument-serif-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/google/instrument-serif-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/google/instrument-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/google/instrument-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/google/instrument-sans-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/google/instrument-sans-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --juarts--serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --juarts--sans: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --core--font-family--primary-font: var(--juarts--sans);
  --core--font-family--headlines: var(--juarts--serif);
}

/* MEGGA garde ses titres d'origine (Mona Sans), le reste de son bloc est en Helvetica. */
.mg-cs {
  --core--font-family--headlines: 'Mona Sans', sans-serif;
}

/* Tous les titres : lignes équilibrées, et jamais de gras simulé —
   Instrument Serif n'existe qu'en 400. */
:is(h1, h2, h3, h4, h5, h6):not(:is(.mg-cs, .crm-cs) *) {
  text-wrap: balance;
  font-synthesis: none;
}

/* Grands titres, en serif : h1 et h2, et tout titre en display-7 ou plus. */
:is(h1, h2):not(.display-1, .display-2, .display-3, .display-4, .display-5, .display-6):not(:is(.mg-cs, .crm-cs) *),
:is(h3, h4, h5, h6):is(.display-7, .display-8, .display-9, .display-10) {
  letter-spacing: -.01em;
}
:is(h1, h2):not(.display-1, .display-2, .display-3, .display-4, .display-5, .display-6):not(:is(.mg-cs, .crm-cs) *) .highlight,
:is(h3, h4, h5, h6):is(.display-7, .display-8, .display-9, .display-10) .highlight {
  font-style: italic;
}

/* Petits titres (cartes, formules, pied de page), en sans 600 :
   en serif, sous 36 px, ils manquent de poids. */
:is(h3, h4, h5, h6):not(.display-7, .display-8, .display-9, .display-10):not(:is(.mg-cs, .crm-cs) *),
:is(h1, h2):is(.display-1, .display-2, .display-3, .display-4, .display-5, .display-6):not(:is(.mg-cs, .crm-cs) *) {
  --core--font-family--headlines: var(--juarts--sans);
  font-weight: 600;
  letter-spacing: -.01em;
}

/* Montants et chiffres clés (CHF 1'490, 500+), en sans 600. */
:is(div, span, p):is(.display-7, .display-8, .display-9, .display-10).strong {
  font-weight: 600;
}

/* Texte courant en 400 : en 500, chaque paragraphe pesait. */
:is(p, li):not(.strong):not(:is(.mg-cs, .crm-cs) *) {
  font-weight: 400;
}

/* Échelle des grands titres : Instrument Serif est étroite, elle prend
   environ un quart de taille de plus que Mona Sans pour peser autant. */
:is(h1, h2, h3, h4, h5, h6).display-9 { font-size: 76px; line-height: 1; }
:is(h1, h2, h3, h4, h5, h6).display-8 { font-size: 58px; line-height: 1.04; }
:is(h1, h2, h3, h4, h5, h6).display-7 { font-size: 42px; line-height: 1.08; }
.rich-text h2 { font-size: 38px; line-height: 1.12; }

@media screen and (max-width: 991px) {
  :is(h1, h2, h3, h4, h5, h6).display-9 { font-size: 68px; }
  :is(h1, h2, h3, h4, h5, h6).display-8 { font-size: 50px; }
  :is(h1, h2, h3, h4, h5, h6).display-7 { font-size: 36px; }
  .rich-text h2 { font-size: 34px; }
}
@media screen and (max-width: 767px) {
  :is(h1, h2, h3, h4, h5, h6).display-9 { font-size: 58px; }
  :is(h1, h2, h3, h4, h5, h6).display-8 { font-size: 40px; }
  :is(h1, h2, h3, h4, h5, h6).display-7 { font-size: 34px; }
  .rich-text h2 { font-size: 32px; }
}
@media screen and (max-width: 479px) {
  :is(h1, h2, h3, h4, h5, h6).display-9 { font-size: 44px; }
  :is(h1, h2, h3, h4, h5, h6).display-8 { font-size: 40px; }
  :is(h1, h2, h3, h4, h5, h6).display-7 { font-size: 32px; }
  .rich-text h2 { font-size: 30px; }
}

/* Le titre d'accueil : chaque page le règle déjà en ligne
   (<style id="juarts-bg-fafafa">, avec !important), d'où le !important ici. */
h1.display-10.strong {
  font-size: clamp(2.9rem, 10.6vw, 5.5rem) !important;
  line-height: .98 !important;
}
/* Les titres d'article sont longs : un cran en dessous. */
.hero.blog-post h1.display-10.strong {
  font-size: clamp(2.5rem, 7.2vw, 4.4rem) !important;
  line-height: 1.02 !important;
}
