/* =========================
   AUTO STYLE EDITORIAL – CSS COMPLET (STABLE)
========================= */

/* Couleurs globales */
:root{
  --ase-accent: #2A2850;
  --ase-orange: #f88f52;
}

/* =========================
   H2 – LIGNE SOUS LE TITRE
   -> uniquement sur les H2 Gutenberg natifs (évite doublons Spectra)
========================= */
body.single-post h2.wp-block-heading{
  position: relative !important;
  padding-bottom: 16px !important;
}

body.single-post h2.wp-block-heading::after{
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  bottom: 0 !important;

  width: 120px !important;
  height: 8px !important;
  border-radius: 999px !important;

  background-color: var(--ase-accent) !important;
  opacity: 1 !important;
}

/* =========================
   LETTRINE UNIQUE
   -> appliquée via <span class="ase-dropcap">
========================= */
body.single-post .ase-dropcap{
  float: left;
  color: var(--ase-accent);
  font-weight: 800;
  font-size: 4.6em;
  line-height: 0.9;
  padding-right: 10px;
  margin-top: 2px;
}

/* Neutralise toute lettrine globale du thème */
body.single-post p::first-letter,
body.single-post li::first-letter{
  font-size: inherit !important;
  float: none !important;
  line-height: inherit !important;
  font-weight: inherit !important;
  padding: 0 !important;
  margin: 0 !important;
  color: inherit !important;
}

/* =========================
   LISTES GUTENBERG (wp:list) – CHEVRON
========================= */
body.single-post ul.wp-block-list{
  list-style: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

/* =========================
   LISTES GUTENBERG (wp:list) – ALIGNEMENT PROPRE SUR 2 LIGNES
========================= */

body.single-post ul.wp-block-list{
  list-style: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

body.single-post ul.wp-block-list > li{
  position: relative !important;

  /* espace réservé pour l’icône */
  padding-left: 28px !important;

  /* espacement entre items */
  margin: 0.6em 0 !important;

  /* important pour que les retours à la ligne restent alignés */
  line-height: 1.55 !important;
}

body.single-post ul.wp-block-list > li::before{
  content: "›" !important;
  position: absolute !important;
  left: 10px !important;
  top: -0.05em !important;

  color: var(--ase-accent) !important;
  font-weight: 900 !important;
  font-size: 1.8em !important;
  line-height: 1 !important;
}


body.single-post ul.wp-block-list > li::before{
  content: "›" !important;
  flex: 0 0 auto !important;

  color: var(--ase-accent) !important;
  font-weight: 900 !important;
  font-size: 1.8em !important;
  line-height: 1 !important;

  margin-top: -0.05em !important;
}

/* =========================
   LISTES SPECTRA (UAGB ICON LIST) – STYLE NORMAL
========================= */
body.single-post .wp-block-uagb-icon-list{
  margin: 16px 0 !important;
}

body.single-post .wp-block-uagb-icon-list-child{
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  margin: 10px 0 !important;
}

body.single-post .wp-block-uagb-icon-list .uagb-icon-list__source-wrap{
  flex: 0 0 auto !important;
  margin-top: 2px !important;
}

body.single-post .wp-block-uagb-icon-list .uagb-icon-list__source-wrap svg{
  width: 18px !important;
  height: 18px !important;
  /* pas de fill ici : on laisse Spectra gérer ses couleurs */
}

body.single-post .wp-block-uagb-icon-list .uagb-icon-list__label{
  line-height: 1.55 !important;
  margin: 0 !important;
}

body.single-post .wp-block-uagb-icon-list .uagb-icon-list__label strong{
  font-weight: 700 !important;
}

/* =========================
   CONSEIL DE PRO (STABLE)
   -> bloc généré : core/group.ase-conseil
========================= */
body.single-post .wp-block-group.ase-conseil{
  background: #d3d3d3;
  border: 1px solid var(--ase-orange);
  border-radius: 11px;
  box-shadow: 3px 8px 12px rgba(0,0,0,0.12);
  padding: 12px 10px;
  margin: 0 0 34px 0;
  max-width: 80%;
}

body.single-post .wp-block-group.ase-conseil p{
  margin: 0 !important;
}

/* =========================
   RESUME (GUTENBERG) – AUTOMATIQUE
   IMPORTANT : ce style ne s'applique que si le PHP ajoute :
   - class ase-resume-title sur le paragraphe "Résumé..."
   - class ase-resume-list sur la liste Gutenberg qui suit
========================= */

/* Titre */
body.single-post .ase-resume-title{
  font-weight: 700;
  color: var(--ase-accent);
  margin-bottom: 8px;
  padding-left: 22px;
}

body.single-post .ase-resume-title::before{
  content: "👉 ";
}

/* Bloc liste */
body.single-post ul.wp-block-list.ase-resume-list{
  background: #f5f5f5;
  border: 1px solid var(--ase-accent);
  border-radius: 11px;

  padding: 18px 20px 18px 32px;
  margin-bottom: 40px;
  max-width: 80%;

  box-shadow: 4px 10px 16px rgba(0,0,0,0.14);
}

/* Puces orange + espace bordure -> puce */
body.single-post ul.wp-block-list.ase-resume-list > li::before{
  color: var(--ase-orange) !important;
  margin-left: 12px;
}

/* Espacement resserré uniquement pour le résumé */
body.single-post ul.wp-block-list.ase-resume-list > li{
  margin: 0.35em 0 !important;
}

/* =========================
   RESUME (SPECTRA) – OPTIONNEL
   -> Pour éviter d'impacter toutes les listes Spectra, il faut
      un wrapper .ase-resume autour (classe ajoutée dans Spectra > Avancé)
   -> Si tu ne l'utilises pas, tu peux supprimer cette section.
========================= */
body.single-post .ase-resume .wp-block-uagb-icon-list .wp-block-uagb-icon-list-child{
  margin-top: 6px !important;
  margin-bottom: 6px !important;
}

body.single-post .ase-resume .wp-block-uagb-icon-list .uagb-icon-list__source-wrap svg{
  fill: var(--ase-orange) !important;
}

/* =========================
   RESUME – BLOC ENCADRÉ + OMBRE (Gutenberg)
========================= */

/* Encadre uniquement la liste qui suit le titre "Résumé de l'article" */
body.single-post p.ase-resume-title + ul.wp-block-list{
  background: #d9d9d9;
  border: 1px solid var(--ase-accent);
  border-radius: 11px;
  padding: 18px 20px 18px 32px;
  margin: 0 0 40px 0;
  max-width: 80%;
  box-shadow: 4px 10px 16px rgba(0,0,0,0.16);
}

/* Puces orange dans le résumé */
body.single-post p.ase-resume-title + ul.wp-block-list > li::before{
  color: var(--ase-orange) !important;
}

/* Resserre un peu les items dans le résumé */
body.single-post p.ase-resume-title + ul.wp-block-list > li{
  margin: 0.35em 0 !important;
}

/* =========================
   PROTECTION SPECTRA
   -> Empêche le plugin de modifier les espacements Spectra
========================= */

/* Annule toute marge héritée sur les items Spectra */
body.single-post .wp-block-uagb-icon-list-child{
  margin: initial !important;
  padding: initial !important;
}

/* Annule tout effet de listes Gutenberg sur Spectra */
body.single-post .wp-block-uagb-icon-list li{
  margin: initial !important;
  padding: initial !important;
}

/* Annule toute pseudo-puce Gutenberg sur Spectra */
body.single-post .wp-block-uagb-icon-list li::before{
  content: none !important;
}

body.single-post .wp-block-uagb-container .wp-block-uagb-icon-list{
  margin-top: 6px !important;
}

/* =========================
   FAQ EN BAS D’ARTICLE (HTML + JSON-LD) – SANS TITRE "FAQ"
========================= */

body.single-post script[type="application/ld+json"] ~ h3,
body.single-post script[type="application/ld+json"] ~ p{
  background: #fafafa;
  margin: 0 !important;
  padding-right: 18px !important;
}

body.single-post script[type="application/ld+json"] ~ h3,
body.single-post script[type="application/ld+json"] ~ p{
  position: relative;
  border-right: 1px solid rgba(0,0,0,0.10);
  border-left: 0 !important;
  border-top: 0;
  border-bottom: 0;
}

body.single-post script[type="application/ld+json"] ~ h3::after,
body.single-post script[type="application/ld+json"] ~ p::after{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--ase-accent);
}

/* Début de carte */
body.single-post script[type="application/ld+json"] ~ h3:first-of-type{
  margin-top: 34px !important;
  border-top: 1px solid rgba(0,0,0,0.10);
  border-top-left-radius: 11px;
  border-top-right-radius: 11px;
  padding-top: 18px !important;
}

/* Fin de carte + ombre */
body.single-post script[type="application/ld+json"] ~ p:last-of-type{
  border-bottom: 1px solid rgba(0,0,0,0.10);
  border-bottom-left-radius: 11px;
  border-bottom-right-radius: 11px;
  padding-bottom: 18px !important;
  box-shadow: 4px 10px 16px rgba(0,0,0,0.12);
}

/* Questions + icône */
body.single-post script[type="application/ld+json"] ~ h3{
  color: var(--ase-accent);
  font-size: 1.05em;
  font-weight: 800;
  line-height: 1.35;

  padding-left: 42px !important;
  padding-bottom: 6px !important;
  padding-top: 14px !important;
}

body.single-post script[type="application/ld+json"] ~ h3::before{
  content: "💬";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-40%); /* descend légèrement l’icône */
  font-size: 1.05em;
  color: var(--ase-orange);
  font-weight: 900;
  opacity: 0.95;
}


/* Réponses */
body.single-post script[type="application/ld+json"] ~ p{
  padding-left: 18px !important;
  padding-top: 0 !important;
  padding-bottom: 14px !important;
  line-height: 1.6;
}

/* Séparateurs */
body.single-post script[type="application/ld+json"] ~ h3{
  border-top: 1px solid rgba(0,0,0,0.07);
}

body.single-post script[type="application/ld+json"] ~ p{
  border-bottom: 1px solid rgba(0,0,0,0.07);
}

/* Pas de séparateur avant la 1ère question */
body.single-post script[type="application/ld+json"] ~ h3:first-of-type{
  border-top: 0;
}

/* =========================
   LISTES ORDONNÉES (Gutenberg) – NUMÉROS ORANGE
========================= */

body.single-post ol.wp-block-list{
  padding-left: 1.3em !important; /* garde un alignement propre */
  margin-left: 0 !important;
}

body.single-post ol.wp-block-list > li::marker{
  color: var(--ase-orange) !important;
  font-weight: 900 !important;
}
