/* =====================================================================
   1000 Questions — Charte v2 « L'Oculus de l'Aurore »
   STYLES PAR DÉFAUT : titre, intertitres, texte courant

   Un même fichier pour l'éditeur Gutenberg et pour le site :
   - dans l'éditeur, tout est rattaché à .editor-styles-wrapper ;
   - sur le site, au module Divi « Contenu de l'article » (.et_pb_post_content),
     sans réglage à faire dans Divi ; la classe mq-corps et .entry-content
     restent prises en charge.
   Les variables de couleur viennent de 1000q-couleurs.css.
   ===================================================================== */

/* ---------- Fond et texte courant ---------- */
.editor-styles-wrapper,
:is(.mq-corps, .et_pb_post_content.et_pb_module),
.entry-content {
  font-family: Figtree, "Helvetica Neue", Arial, sans-serif;
  font-size: 19px;
  line-height: 32px;
  color: var(--mq-encre, #1C2A27);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}
.editor-styles-wrapper { background: var(--mq-ivoire, #F8F2E7); }

/* Figtree, police de référence : imposée à tous les textes de l'éditeur,
   au-dessus des styles par défaut de WordPress (police système). */
.editor-styles-wrapper.editor-styles-wrapper,
.editor-styles-wrapper p,
.editor-styles-wrapper li,
.editor-styles-wrapper td,
.editor-styles-wrapper th,
.editor-styles-wrapper figcaption,
.editor-styles-wrapper .wp-block-button__link {
  font-family: Figtree, "Helvetica Neue", Arial, sans-serif;
}

/* Colonne de lecture de 720 px dans l'éditeur, comme sur le site */
.editor-styles-wrapper .is-root-container,
.editor-styles-wrapper .wp-block-post-title {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.editor-styles-wrapper .is-root-container > .alignwide { max-width: 920px; }
.editor-styles-wrapper .is-root-container > .alignfull { max-width: none; }

.editor-styles-wrapper p,
:is(.mq-corps, .et_pb_post_content.et_pb_module) p,
.entry-content p {
  font-size: 19px;
  line-height: 32px;
  margin: 0 0 22px;
}

/* ---------- Titre de l'article (H1) ---------- */
.editor-styles-wrapper .wp-block-post-title,
.editor-styles-wrapper .editor-post-title__input,
.mq-titre-article,
:is(.mq-corps, .et_pb_post_content.et_pb_module) h1,
.entry-content h1 {
  font-family: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  font-weight: 600;
  font-size: 64px;
  line-height: 1.04;
  color: var(--mq-cedre, #1E4A42);
  text-align: center;
  text-wrap: balance;
  margin: 0 auto 24px;
  font-variant-numeric: lining-nums;
}
.editor-styles-wrapper .wp-block-post-title em,
:is(.mq-corps, .et_pb_post_content.et_pb_module) h1 em { font-style: italic; }

/* ---------- Intertitres ---------- */
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4,
:is(.mq-corps, .et_pb_post_content.et_pb_module) h2, :is(.mq-corps, .et_pb_post_content.et_pb_module) h3, :is(.mq-corps, .et_pb_post_content.et_pb_module) h4,
.entry-content h2, .entry-content h3, .entry-content h4 {
  font-family: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  font-weight: 600;
  color: var(--mq-cedre, #1E4A42);
  text-wrap: balance;
  font-variant-numeric: lining-nums;
  padding: 0;
}

/* Un intertitre ne se place jamais à côté d'une lettrine */
.editor-styles-wrapper h2, .editor-styles-wrapper h3,
:is(.mq-corps, .et_pb_post_content.et_pb_module) h2,
:is(.mq-corps, .et_pb_post_content.et_pb_module) h3,
.entry-content h2, .entry-content h3 { clear: both; }

/* H2 : intertitre principal, numéroté 01, 02, 03… */
.editor-styles-wrapper h2,
:is(.mq-corps, .et_pb_post_content.et_pb_module) h2,
.entry-content h2 {
  font-size: 36px;
  line-height: 1.12;
  margin: 48px 0 18px;
  scroll-margin-top: 96px;
}
.editor-styles-wrapper .is-root-container,
:is(.mq-corps, .et_pb_post_content.et_pb_module),
.entry-content { counter-reset: mq-h2; }

.editor-styles-wrapper .is-root-container > h2.wp-block-heading:not(.mq-sans-numero),
:is(.mq-corps, .et_pb_post_content.et_pb_module) h2.wp-block-heading:not(.wp-block-group *):not(.mq-sans-numero),
.entry-content > h2.wp-block-heading:not(.mq-sans-numero) {
  counter-increment: mq-h2;
}
.editor-styles-wrapper .is-root-container > h2.wp-block-heading:not(.mq-sans-numero)::before,
:is(.mq-corps, .et_pb_post_content.et_pb_module) h2.wp-block-heading:not(.wp-block-group *):not(.mq-sans-numero)::before,
.entry-content > h2.wp-block-heading:not(.mq-sans-numero)::before {
  content: counter(mq-h2, decimal-leading-zero);
  display: inline-block;
  margin-right: 14px;
  vertical-align: 0.35em;
  font-family: Figtree, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--mq-ocre, #9A5A12);
}

/* H3 : sous-intertitre, sans numéro */
.editor-styles-wrapper h3,
:is(.mq-corps, .et_pb_post_content.et_pb_module) h3,
.entry-content h3 {
  font-size: 26px;
  line-height: 1.2;
  margin: 36px 0 12px;
}

/* H4 : surtitre en capitales (Figtree) */
.editor-styles-wrapper h4,
:is(.mq-corps, .et_pb_post_content.et_pb_module) h4,
.entry-content h4 {
  font-family: Figtree, "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mq-ocre, #9A5A12);
  margin: 32px 0 8px;
}

/* ---------- Chapeau (style « Chapeau » à appliquer au premier paragraphe) ---------- */
.editor-styles-wrapper p.is-style-mq-chapeau,
:is(.mq-corps, .et_pb_post_content.et_pb_module) p.is-style-mq-chapeau,
.entry-content p.is-style-mq-chapeau {
  font-size: 21px;
  line-height: 33px;
  color: var(--mq-gris, #4C5A55);
}

/* ---------- Lettrine (option native « Lettrine » du paragraphe) ---------- */
.editor-styles-wrapper p.has-drop-cap:not(:focus)::first-letter,
:is(.mq-corps, .et_pb_post_content.et_pb_module) p.has-drop-cap::first-letter,
.entry-content p.has-drop-cap::first-letter {
  float: left;
  margin: 6px 10px 0 0;
  font-family: "Cormorant Garamond", Garamond, serif;
  font-weight: 600;
  font-size: 76px;
  line-height: 0.8;
  color: var(--mq-cedre, #1E4A42);
  text-transform: none;
}

/* ---------- Liens, listes, images ---------- */
.editor-styles-wrapper a,
/*:is(.mq-corps, .et_pb_post_content.et_pb_module) a,*/
.entry-content a {
  color: var(--mq-terre-cuite, #AC4E26);
  text-decoration: underline;
  text-underline-offset: 3px;
}
:is(.mq-corps, .et_pb_post_content.et_pb_module) a:hover,
.entry-content a:hover { color: var(--mq-cedre, #1E4A42); }

/* ---------- Listes à puces et numérotées ----------
   Une seule règle pour les trois variantes : la couleur des puces et du
   texte vient de variables que les encadrés redéfinissent.
     1. Corps du texte  : tesselle ocre, sous-niveau anneau sauge profond
     2. Encadré (lin)   : tesselle terre cuite, sous-niveau anneau ocre
     3. Repères (cèdre) : tesselle miel, texte ivoire, sous-niveau anneau sauge
   (variables redéfinies dans 1000q-blocs.css) */
.editor-styles-wrapper ul.wp-block-list,
.editor-styles-wrapper ol.wp-block-list,
:is(.mq-corps, .et_pb_post_content.et_pb_module) ul.wp-block-list, :is(.mq-corps, .et_pb_post_content.et_pb_module) ol.wp-block-list,
.entry-content ul.wp-block-list, .entry-content ol.wp-block-list {
  list-style: none;
  margin: 0 0 22px;
  padding: 0 0 0 30px;
}
.editor-styles-wrapper .wp-block-list li,
:is(.mq-corps, .et_pb_post_content.et_pb_module) .wp-block-list li,
.entry-content .wp-block-list li {
  position: relative;
  margin: 0 0 10px;
  color: var(--mq-liste-texte, inherit);
}
.editor-styles-wrapper .wp-block-list li::marker,
:is(.mq-corps, .et_pb_post_content.et_pb_module) .wp-block-list li::marker,
.entry-content .wp-block-list li::marker { content: none; }

/* Puce de 1er niveau : une tesselle (petit carré arrondi incliné) */
.editor-styles-wrapper ul.wp-block-list > li::before,
:is(.mq-corps, .et_pb_post_content.et_pb_module) ul.wp-block-list > li::before,
.entry-content ul.wp-block-list > li::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 0.62em;
  top: calc(0.5lh - 4px);
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--mq-puce, var(--mq-ocre, #9A5A12));
  transform: rotate(45deg);
}
/* Puce de 2e niveau : un anneau */
.editor-styles-wrapper .wp-block-list .wp-block-list,
:is(.mq-corps, .et_pb_post_content.et_pb_module) .wp-block-list .wp-block-list,
.entry-content .wp-block-list .wp-block-list { margin: 10px 0 0; padding-left: 26px; }
.editor-styles-wrapper ul.wp-block-list ul.wp-block-list > li::before,
:is(.mq-corps, .et_pb_post_content.et_pb_module) ul.wp-block-list ul.wp-block-list > li::before,
.entry-content ul.wp-block-list ul.wp-block-list > li::before,
.editor-styles-wrapper ol.wp-block-list ul.wp-block-list > li::before,
:is(.mq-corps, .et_pb_post_content.et_pb_module) ol.wp-block-list ul.wp-block-list > li::before,
.entry-content ol.wp-block-list ul.wp-block-list > li::before {
  left: -20px;
  top: 0.58em;
  top: calc(0.5lh - 3.5px);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--mq-puce-2, var(--mq-sauge-profond, #5B8574));
  transform: none;
}

/* Liste numérotée : 01, 02, 03… en Figtree SemiBold */
.editor-styles-wrapper ol.wp-block-list,
:is(.mq-corps, .et_pb_post_content.et_pb_module) ol.wp-block-list,
.entry-content ol.wp-block-list { counter-reset: mq-ol; padding-left: 38px; }
.editor-styles-wrapper ol.wp-block-list > li,
:is(.mq-corps, .et_pb_post_content.et_pb_module) ol.wp-block-list > li,
.entry-content ol.wp-block-list > li { counter-increment: mq-ol; }
.editor-styles-wrapper ol.wp-block-list > li::before,
:is(.mq-corps, .et_pb_post_content.et_pb_module) ol.wp-block-list > li::before,
.entry-content ol.wp-block-list > li::before {
  content: counter(mq-ol, decimal-leading-zero);
  position: absolute;
  left: -38px;
  top: 0;
  font-family: Figtree, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.74em;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: inherit;
  color: var(--mq-puce-texte, var(--mq-ocre, #9A5A12));
  font-variant-numeric: lining-nums tabular-nums;
}

.editor-styles-wrapper .wp-block-image img,
:is(.mq-corps, .et_pb_post_content.et_pb_module) .wp-block-image img,
.entry-content .wp-block-image img { border-radius: 14px; }
.editor-styles-wrapper .wp-block-image figcaption,
.editor-styles-wrapper .wp-element-caption,
:is(.mq-corps, .et_pb_post_content.et_pb_module) .wp-element-caption,
.entry-content .wp-element-caption {
  margin-top: 10px;
  font-size: 14px;
  line-height: 22px;
  color: var(--mq-gris, #4C5A55);
  text-align: left;
}

/* Séparateur : filet miel court */
.editor-styles-wrapper .wp-block-separator,
:is(.mq-corps, .et_pb_post_content.et_pb_module) .wp-block-separator,
.entry-content .wp-block-separator {
  border: 0;
  border-top: 2px solid var(--mq-miel, #D9A441);
  width: 72px;
  margin: 40px auto;
  opacity: 1;
}

/* ---------- Mobile ---------- */
@media (max-width: 520px) {
  :is(.mq-corps, .et_pb_post_content.et_pb_module), .entry-content,
  :is(.mq-corps, .et_pb_post_content.et_pb_module) p, .entry-content p { font-size: 17px; line-height: 28px; }
  .mq-titre-article, :is(.mq-corps, .et_pb_post_content.et_pb_module) h1, .entry-content h1 { font-size: 40px; }
  :is(.mq-corps, .et_pb_post_content.et_pb_module) h2, .entry-content h2 { font-size: 28px; }
  :is(.mq-corps, .et_pb_post_content.et_pb_module) h3, .entry-content h3 { font-size: 23px; }
  :is(.mq-corps, .et_pb_post_content.et_pb_module) p.is-style-mq-chapeau, .entry-content p.is-style-mq-chapeau { font-size: 18px; line-height: 29px; }
}

/* Exposants et indices : ne pas agrandir la ligne (ex. « Ier siècle ») */
.editor-styles-wrapper sup, .editor-styles-wrapper sub,
:is(.mq-corps, .et_pb_post_content.et_pb_module) sup, :is(.mq-corps, .et_pb_post_content.et_pb_module) sub,
.entry-content sup, .entry-content sub { line-height: 0; }
