/* css newsletter cpt — archive /newsletter/ + singles du CPT newsletter (chantier newsletter-web, 2026-08-24)
   + singles du CPT missive (contenus longs d'un numéro, body class single-missive, 2026-09-22).
   Contrat : le bloc @media 600px reprend les media queries .cmw-* du <head> de la maquette email
   (CMW-Media/newsletters/nl-01vX.html) — à mettre à jour si la maquette change.
   Contrat missive : chaque règle SINGLE .single-newsletter a son jumeau .single-missive, posé par
   wp/css_dup_body_class.py (lancer « check » avant tout step11 ; « apply » après toute règle ajoutée). */

/* ===== ARCHIVE : carte d'inscription ===== */
.post-type-archive-newsletter .cmw-nl-signup{
  background:#ffffff;
  border:1px solid #e3ded3;
  border-radius:12px;
  max-width:680px;
  margin:0 auto 4.5rem;
  padding:2.1rem 2.3rem 1.9rem;
  box-shadow:0 12px 32px rgba(8,54,54,.07);
}
.post-type-archive-newsletter .cmw-nl-signup-head h2{margin:.45rem 0 .4rem;}
.post-type-archive-newsletter .cmw-nl-signup-head p{margin:0 0 1.3rem;color:#5a6968;}
.post-type-archive-newsletter .cmw-nl-signup .fluentform .ff-el-group{margin-bottom:10px;}
/* Fluent Form #2 embarqué : palette CMW. Le form porte son propre style bouton
   (form.fluent_form_2 .wpf_has_custom_css.ff-btn-submit, bleu FF par défaut) :
   sélecteur volontairement plus spécifique pour l'emporter SANS toucher au form
   ni à la page /form/newsletter/. */
.post-type-archive-newsletter .cmw-nl-signup .ff-el-form-control{
  padding:14px 16px;border:1px solid rgba(0,0,0,.12);border-radius:8px;font-size:16px;
}
.post-type-archive-newsletter .cmw-nl-signup form.fluent_form_2 .ff-btn-submit,
.post-type-archive-newsletter .cmw-nl-signup form.fluent_form_2 .wpf_has_custom_css.ff-btn-submit{
  background-color:var(--cmw-primary,#0d5f5b);border-color:var(--cmw-primary,#0d5f5b);
  color:#ffffff;font-weight:600;padding:14px 24px;border-radius:8px;cursor:pointer;
  transition:background .3s ease;min-width:100%;
}
.post-type-archive-newsletter .cmw-nl-signup form.fluent_form_2 .ff-btn-submit:hover,
.post-type-archive-newsletter .cmw-nl-signup form.fluent_form_2 .wpf_has_custom_css.ff-btn-submit:hover{
  background-color:var(--cmw-secondary,#147067);border-color:var(--cmw-secondary,#147067);color:#ffffff;
}

/* ===== ARCHIVE : grille des numéros ===== */
.cmw-nl-card{display:flex;flex-direction:column;}
.cmw-nl-card img{
  width:100%;height:auto;aspect-ratio:1200/630;object-fit:cover;
  border-radius:8px;display:block;background:#EFEEE7;
}
.cmw-nl-card-date{
  color:#8a9493;font-size:.82rem;text-transform:uppercase;
  letter-spacing:.07em;margin:0;
}
.cmw-nl-card-title{margin:0;}
.cmw-nl-card-title a{text-decoration:none;color:inherit;}
.cmw-nl-card-title a:hover{color:#0d5f5b;}
.cmw-nl-card-excerpt{color:#3d4f4d;font-size:.95rem;line-height:1.55;margin:0;}

/* ===== SINGLE : fond + bandeau au-dessus de la carte email ===== */
body.single-newsletter,
.single-newsletter .site-content,
body.single-missive,
.single-missive .site-content{background-color:#EFEEE7;}
.single-newsletter .cmw-nl-single-head,
.single-missive .cmw-nl-single-head{
  max-width:640px;margin:2.8rem auto 0;padding:0 16px;text-align:center;
}
.single-newsletter .cmw-nl-single-label,
.single-missive .cmw-nl-single-label{
  font-size:11px;font-weight:600;letter-spacing:2px;text-transform:uppercase;
  color:#298f8e;margin:0 0 .5rem;
}
.single-newsletter .cmw-nl-single-title,
.single-missive .cmw-nl-single-title{
  font-family:'Cormorant Garamond',Georgia,serif;font-weight:700;
  font-size:2.3rem;line-height:1.15;color:#083636;margin:0 0 .6rem;
}
.single-newsletter .cmw-nl-single-date,
.single-missive .cmw-nl-single-date{color:#8a9493;font-size:.9rem;margin:0 0 1.1rem;}
.single-newsletter .cmw-nl-single-cta,
.single-missive .cmw-nl-single-cta{
  display:inline-block;background:#083636;color:#ffffff;border-radius:6px;
  padding:11px 24px;text-decoration:none;font-weight:600;font-size:.95rem;
}
.single-newsletter .cmw-nl-single-cta:hover,
.single-missive .cmw-nl-single-cta:hover{background:#0d5f5b;color:#ffffff;}

/* La carte email fait 600px (standard email, attribut width + style inline). Sur le WEB seulement,
   elle est élargie à 720px (essai demandé par Mathieu le 2026-09-14 : ~80-85 caractères par ligne,
   alignée sur le bandeau d'en-tête) ; l'email Brevo reste à 600. max-width:100% pour les viewports
   sous 721px on garde la table 600px de l'email et la media query 600px ci-dessous (spécificité :
   la règle 720 battrait sinon celle du mobile). */
@media screen and (min-width:721px){
  .single-newsletter .entry-content .cmw-container,
  .single-missive .entry-content .cmw-container{width:720px !important;max-width:720px !important;}
}
.single-newsletter .cmw-container img,
.single-missive .cmw-container img{border:0;height:auto;outline:none;max-width:100%;}
.single-newsletter .cmw-container a,
.single-missive .cmw-container a{color:#083636;}

/* ===== SINGLE : neutralisation des styles table du thème dans la carte email =====
   GeneratePress main.min.css pose table,td,th{border:1px solid rgba(0,0,0,.1)} et
   table{width:100%;margin:0 0 1.5em;table-layout:fixed;border-width:1px 0 0 1px} :
   liserés gris sur toutes les cellules, boutons/pilules étalés (tables sans attribut
   width forcées à 100 %), marges verticales parasites. Constaté en prod le 2026-08-31
   (preview #27121). Les styles utiles de l'email sont inline : on rend aux tables
   leur comportement natif, sans toucher aux backgrounds (bgcolor= des CTA).
   border:0 SANS !important : la spécificité suffit contre le thème (0,0,1), et les
   bordures INLINE voulues de l'email (bouton outline « En savoir plus sur ce fonds »
   border:1.5px, barre de la citation border-left:3px) doivent rester gagnantes —
   un !important ici les écraserait (vécu le 2026-08-31 : bouton devenu texte nu). */
.single-newsletter .entry-content table,
.single-newsletter .entry-content td,
.single-newsletter .entry-content th,
.single-missive .entry-content table,
.single-missive .entry-content td,
.single-missive .entry-content th{
  border:0;
  padding:0; /* le thème pose td,th{padding:8px} : une cellule de 60 px n'offrait plus que 44 px à la photo
                de signature (rendue 44x56, vu par Mathieu le 2026-09-18). L'email est en cellpadding=0,
                toutes les cellules qui veulent un padding le portent inline. */
}
.single-newsletter .entry-content table,
.single-missive .entry-content table{
  margin:0;
  table-layout:auto;
  border-collapse:separate;
  border-spacing:0;
}
.single-newsletter .entry-content table:not([width]),
.single-missive .entry-content table:not([width]){
  width:auto;
}
.single-newsletter .entry-content .cmw-container,
.single-missive .entry-content .cmw-container{
  line-height:normal; /* stoppe l'héritage de l'interligne du site dans les td sans line-height inline */
}

/* ===== SINGLE : survol des boutons de la carte (pilules) =====
   Les styles des boutons sont inline (maquette email) et un style inline ne peut pas porter de
   :hover : ces règles le font, en !important pour battre l'inline. Classes posées dans la maquette
   à partir de NL-02 (cmw-pill + variante), les numéros antérieurs n'ont pas de survol. Couleurs
   inversées (demande Mathieu, 2026-09-18) ; l'anneau intérieur (box-shadow inset) garde la forme
   visible sans changer la taille du bouton. @media (hover:hover) : pas d'état collant après un tap. */
.single-newsletter .cmw-pill,
.single-newsletter .cmw-pill a,
.single-missive .cmw-pill,
.single-missive .cmw-pill a{transition:background-color .2s ease,color .2s ease,box-shadow .2s ease;}
@media (hover:hover){
  .single-newsletter .cmw-pill--accent:hover,
  .single-missive .cmw-pill--accent:hover{background-color:#083636 !important;color:#06E0B8 !important;box-shadow:inset 0 0 0 2px #06E0B8 !important;}
  .single-newsletter .cmw-pill--accent:hover a,
  .single-missive .cmw-pill--accent:hover a{color:#06E0B8 !important;}
  .single-newsletter .cmw-pill--dark:hover,
  .single-missive .cmw-pill--dark:hover{background-color:#ffffff !important;box-shadow:inset 0 0 0 2px #083636 !important;}
  .single-newsletter .cmw-pill--dark:hover a,
  .single-missive .cmw-pill--dark:hover a{color:#083636 !important;}
  .single-newsletter .cmw-pill--outline:hover,
  .single-missive .cmw-pill--outline:hover{background-color:#083636 !important;}
  .single-newsletter .cmw-pill--outline:hover a,
  .single-missive .cmw-pill--outline:hover a{color:#ffffff !important;}
}

/* ===== SINGLE : form d'inscription embarqué en fin de carte (ancre #inscription) =====
   Mêmes recettes que la carte du hub (le form 2 porte son propre style bouton bleu FF :
   sélecteur plus spécifique pour l'emporter). Champ préremplissable par ?email=...
   ({get.email} en default value du form 2, posé le 2026-08-31). */
.single-newsletter .cmw-nl-signup-inline .fluentform .ff-el-group,
.single-missive .cmw-nl-signup-inline .fluentform .ff-el-group{margin-bottom:10px;}
.single-newsletter .cmw-nl-signup-inline .ff-el-form-control,
.single-missive .cmw-nl-signup-inline .ff-el-form-control{
  padding:14px 16px;border:1px solid rgba(0,0,0,.12);border-radius:8px;font-size:16px;
  background:#ffffff;width:100%;
}
.single-newsletter .cmw-nl-signup-inline form.fluent_form_2 .ff-btn-submit,
.single-newsletter .cmw-nl-signup-inline form.fluent_form_2 .wpf_has_custom_css.ff-btn-submit,
.single-missive .cmw-nl-signup-inline form.fluent_form_2 .ff-btn-submit,
.single-missive .cmw-nl-signup-inline form.fluent_form_2 .wpf_has_custom_css.ff-btn-submit{
  background-color:var(--cmw-primary,#0d5f5b);border-color:var(--cmw-primary,#0d5f5b);
  color:#ffffff;font-weight:600;padding:14px 24px;border-radius:8px;cursor:pointer;
  transition:background .3s ease;min-width:100%;
}
.single-newsletter .cmw-nl-signup-inline form.fluent_form_2 .ff-btn-submit:hover,
.single-newsletter .cmw-nl-signup-inline form.fluent_form_2 .wpf_has_custom_css.ff-btn-submit:hover,
.single-missive .cmw-nl-signup-inline form.fluent_form_2 .ff-btn-submit:hover,
.single-missive .cmw-nl-signup-inline form.fluent_form_2 .wpf_has_custom_css.ff-btn-submit:hover{
  background-color:var(--cmw-secondary,#147067);border-color:var(--cmw-secondary,#147067);color:#ffffff;
}

/* ===== SINGLE : media queries reprises du <head> de la maquette email ===== */
@media screen and (max-width:600px){
  .single-newsletter .cmw-container,
  .single-missive .cmw-container{width:100% !important;}
  .single-newsletter .cmw-pad,
  .single-missive .cmw-pad{padding-left:26px !important;padding-right:26px !important;}
  .single-newsletter .cmw-title,
  .single-missive .cmw-title{font-size:34px !important;line-height:40px !important;}
  .single-newsletter .cmw-stack,
  .single-missive .cmw-stack{display:block !important;width:100% !important;padding:0 !important;}
  .single-newsletter .cmw-stack-sp,
  .single-missive .cmw-stack-sp{height:28px !important;}
  .single-newsletter .cmw-util-right,
  .single-missive .cmw-util-right{text-align:left !important;padding-top:10px !important;}
}

/* ===== ARCHIVE v2 (copie du hub refondue le 2026-09-15) =====
   Hero enrichi (audience + signature), note RGPD sous le form, section « Ce que vous recevrez »
   (5 rubriques), grille des numéros auto-adaptative selon le nombre de parutions (:has), appel
   « Lire le numéro » sur chaque carte, FAQ en details/summary. Libellé du champ email du form 2
   posé en base (step8) et masqué visuellement ici : il reste lu par les lecteurs d'écran. */
.post-type-archive-newsletter .cmw-nl-hero .cmw-page-subtitle{max-width:760px;margin-left:auto;margin-right:auto;}
.post-type-archive-newsletter .cmw-nl-hero-audience{
  max-width:640px;margin:.6rem auto 0;font-family:'Outfit',sans-serif;font-size:.98rem;
  line-height:1.6;color:#5a6968;
}
.post-type-archive-newsletter .cmw-nl-hero-sig{
  display:inline-flex;align-items:center;gap:.7rem;margin-top:1.4rem;
  font-family:'Outfit',sans-serif;font-size:.9rem;color:#3d4f4d;
}
.post-type-archive-newsletter .cmw-nl-hero-sig img{width:48px;height:48px;border-radius:50%;display:block;}
.post-type-archive-newsletter .cmw-nl-hero-sig strong{color:#083636;font-weight:600;}
.post-type-archive-newsletter .cmw-nl-signup{scroll-margin-top:120px;}
.post-type-archive-newsletter .cmw-nl-signup-note{margin:.9rem 0 0;font-size:.82rem;line-height:1.5;color:#8a9493;}
/* libellé du champ email : présent dans le DOM (accessibilité), invisible à l'écran */
.post-type-archive-newsletter .cmw-nl-signup .ff-el-input--label,
.single-newsletter .cmw-nl-signup-inline .ff-el-input--label,
.single-missive .cmw-nl-signup-inline .ff-el-input--label{
  position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;
  clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0;
}
.post-type-archive-newsletter .cmw-nl-signup .ff-el-group,
.single-newsletter .cmw-nl-signup-inline .ff-el-group,
.single-missive .cmw-nl-signup-inline .ff-el-group{position:relative;}

/* sections ajoutées : même gabarit que la section numéros (padding réduit) */
.post-type-archive-newsletter .cmw-nl-section{padding-top:0;padding-bottom:0;}
.post-type-archive-newsletter .cmw-nl-divider{text-align:center;padding-top:48px !important;padding-bottom:32px !important;margin-top:32px !important;}
.post-type-archive-newsletter .cmw-nl-divider h2{margin:0;}

/* rubriques */
.post-type-archive-newsletter .cmw-nl-rubriques{
  list-style:none;margin:0 0 1rem;padding:0;display:grid;gap:1.25rem;
  grid-template-columns:repeat(5,minmax(0,1fr));
}
.post-type-archive-newsletter .cmw-nl-rubriques li{
  background:#ffffff;border:1px solid #e3ded3;border-radius:12px;padding:1.4rem 1.3rem 1.3rem;
  display:flex;flex-direction:column;gap:.45rem;
}
.post-type-archive-newsletter .cmw-nl-rubrique-num{
  font-family:'Outfit',sans-serif;font-size:.78rem;font-weight:600;letter-spacing:.14em;color:#298F8E;
}
.post-type-archive-newsletter .cmw-nl-rubriques h3{margin:0;font-size:1.25rem;}
.post-type-archive-newsletter .cmw-nl-rubriques p{margin:0;font-size:.92rem;line-height:1.55;color:#3d4f4d;}
@media (max-width:1024px){
  .post-type-archive-newsletter .cmw-nl-rubriques{grid-template-columns:repeat(2,minmax(0,1fr));}
  .post-type-archive-newsletter .cmw-nl-rubriques li:last-child{grid-column:1 / -1;}
}
@media (max-width:600px){
  .post-type-archive-newsletter .cmw-nl-rubriques{grid-template-columns:1fr;}
}

/* grille des numéros : titre et gabarit selon le nombre de cartes (1 = carte large centrée, 2 = deux colonnes) */
.post-type-archive-newsletter .cmw-nl-h-last{display:none;}
.post-type-archive-newsletter .gbp-section__inner:has(.gb-looper-a1c0de11 > li:only-child) .cmw-nl-h-last{display:inline-block;}
.post-type-archive-newsletter .gbp-section__inner:has(.gb-looper-a1c0de11 > li:only-child) h2.cmw-nl-h-last{display:block;}
.post-type-archive-newsletter .gbp-section__inner:has(.gb-looper-a1c0de11 > li:only-child) .cmw-nl-h-all{display:none;}
.post-type-archive-newsletter .gb-looper-a1c0de11:has(> li:only-child){grid-template-columns:minmax(0,720px);justify-content:center;}
.post-type-archive-newsletter .gb-looper-a1c0de11:has(> li:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr));max-width:980px;margin-left:auto;margin-right:auto;}
@media (max-width:767px){
  .post-type-archive-newsletter .gb-looper-a1c0de11:has(> li:nth-child(2):last-child){grid-template-columns:1fr;}
}
.cmw-nl-card-cta{margin-top:auto;padding-top:.35rem;font-family:'Outfit',sans-serif;font-size:.9rem;font-weight:600;}
.cmw-nl-card-cta a{color:#0d5f5b;text-decoration:none;}
.cmw-nl-card-cta a:hover{color:#298F8E;text-decoration:underline;}

/* FAQ */
.post-type-archive-newsletter .cmw-nl-faq{max-width:760px;margin:0 auto;}
.post-type-archive-newsletter .cmw-nl-faq details{
  background:#ffffff;border:1px solid #e3ded3;border-radius:10px;padding:0 1.25rem;margin-bottom:.7rem;
}
.post-type-archive-newsletter .cmw-nl-faq summary{
  cursor:pointer;list-style:none;padding:1rem 2rem 1rem 0;position:relative;
  font-family:'Outfit',sans-serif;font-weight:600;font-size:1.02rem;color:#083636;
}
.post-type-archive-newsletter .cmw-nl-faq summary::-webkit-details-marker{display:none;}
.post-type-archive-newsletter .cmw-nl-faq summary::after{
  content:"+";position:absolute;right:0;top:50%;transform:translateY(-50%);
  font-size:1.4rem;line-height:1;color:#298F8E;
}
.post-type-archive-newsletter .cmw-nl-faq details[open] summary::after{content:"\2212";}
.post-type-archive-newsletter .cmw-nl-faq details p{margin:0 0 1.1rem;font-size:.95rem;line-height:1.6;color:#3d4f4d;}
.post-type-archive-newsletter .cmw-nl-faq-cta{text-align:center;margin:2rem 0 3.5rem;}
.post-type-archive-newsletter .cmw-nl-btn{
  display:inline-block;background:var(--cmw-primary,#0d5f5b);color:#ffffff;font-family:'Outfit',sans-serif;
  font-weight:600;padding:14px 26px;border-radius:8px;text-decoration:none;transition:background .3s ease;
}
.post-type-archive-newsletter .cmw-nl-btn:hover{background:var(--cmw-secondary,#147067);color:#ffffff;}

/* ===== SINGLE missive : ce qui n'existe que sur une page de contenu (CPT missive, 2026-09-22) =====
   Bandeau (Template Contenu Missive) : le label est un lien de retour vers le numéro, href posé par le
   tag GB {{post_meta key:nl_missive_url}} (step13). En pied de carte : renvoi vers l'autre contenu du
   numéro (build_nl.py --split). */
.single-missive .cmw-nl-single-back{display:inline-block;text-decoration:none;color:#298f8e;}
.single-missive .cmw-nl-single-back:hover{text-decoration:underline;color:#0d5f5b;}
.single-missive .cmw-nl-autre-contenu{
  margin:22px 0 0;font-family:'Outfit',Helvetica,Arial,sans-serif;font-size:15px;line-height:24px;color:#5a6968;
}
.single-missive .cmw-nl-autre-contenu a{color:#298f8e;text-decoration:underline;}
.single-missive .cmw-nl-autre-contenu a:hover{color:#0d5f5b;}

/* ===== SOURCES : section « Sources » en pied des pages de contenu (générée par build_nl.py --split) =====
   Port du §12 du snippet « css investissement » #25529 (mêmes couleurs), sous les deux body classes ;
   --box-border et --cmw-reading-width y sont locales à #25529, redéclarées ici. Pas de max-width (la
   carte fait déjà 600/720 px), interligne explicite (la carte est en line-height:normal). */
.single-newsletter .sources-section,
.single-missive .sources-section{
  --box-border:rgba(15,63,60,.08);--cmw-reading-width:42rem;
  margin:0;padding-top:1.6rem;border-top:2px solid var(--box-border);
  font-family:'Outfit',Helvetica,Arial,sans-serif;line-height:1.6;
}
.single-newsletter .sources-section h2,
.single-missive .sources-section h2{
  font-family:'Outfit',Helvetica,Arial,sans-serif;font-size:1.25rem;font-weight:600;line-height:1.3;
  margin:0 0 1.5rem;padding:0;border:0;color:#64748b;
}
.single-newsletter .sources-list,
.single-missive .sources-list{list-style:none;margin:0;padding:0;}
.single-newsletter .sources-list li,
.single-missive .sources-list li{
  font-size:.9rem;line-height:1.6;margin:0 0 .85rem;padding:0;color:#718096;
}
.single-newsletter .sources-list li strong,
.single-missive .sources-list li strong{color:#083636;}
.single-newsletter .sources-list a,
.single-missive .sources-list a{color:#298F8E;text-decoration:none;word-break:break-word;}
.single-newsletter .sources-list a:hover,
.single-missive .sources-list a:hover{text-decoration:underline;}
