/* ==========================================================================
   CGT-VIVEST — 57-newsletters.css — NEWSLETTERS (refonte-cgt, lot 15)
   --------------------------------------------------------------------------
   Balisage : assets/js/public.js —
   - #newsletters (adhérent·es) : renderMemberNewsletters,
     renderMemberNewsletterTimeline, filterMemberNewsletterList ; lecture
     showNewsletterModal (#sm-newsletter-view-modal) ; abonnement par e-mail
     cgtNlBasculerAbonnement ;
   - #admin/newsletter (gestion) : renderNewsletter, _renderNewsletterCard,
     filterNewsletterList ; rédaction openCreateNewsletterModal
     (#sm-newsletter-modal) et ses boîtes cgtNlInsererLien (#sm-link-modal),
     cgtNlInsererImage (#sm-image-modal), aperçu cgtNlApercu ; fiche
     viewNewsletter (#sm-view-newsletter-modal : chiffres de lecture, onglets
     Aperçu / Destinataires).
   Aides JS : SM.cgtNl* (pavé date, extrait, lettre, destinataires…).
   AUCUN style en ligne ni couleur en dur dans le rendu : clair et sombre
   suivent les jetons (00-tokens.css). La seule valeur en ligne est la largeur
   d'une image choisie dans l'éditeur (contenu de la newsletter, e-mail compris).

   Composition « affiche militante en 2,5D » :
   - la newsletter porte la rubrique « communiqué » (jaune) de cgt.fr — comme
     le bloc Newsletter du profil (lot 05) ; lecture = document (violet),
     abonné·es = agenda (cyan), brouillons = encre ; le ROUGE reste l'action ;
   - titres d'écran Figtree 400 + un mot en Besley italique rouge + barre 100×4 ;
   - registre = lignes papier à tranche avec un pavé date d'encre ; la dernière
     parue (adhérent·es) = affiche d'encre à filet et tranche jaunes, autocollant
     « Dernière parue » ;
   - la lettre = typographie d'article des Flash info (.cgt-flash-contenu)
     signée du logo OFFICIEL (image, jamais retapé) et de « VIVEST ».

   Composants RÉUTILISÉS (pas de doublon) : .cgt-titre-ecran, .cgt-accent,
   .cgt-libelle, .cgt-arc-en-ciel, .cgt-lecteur-ecran (10-theme) ; boutons,
   cartes .cgt-carte, champs, onglets .cgt-onglets / .sm-nl-tab (déjà listé),
   modales, .cgt-titre-modale, confirmations, états vides (30-composants) ;
   pleine page de saisie .cgt-saisie-pleine (30-composants § 22) et sections
   .cgt-adh-section / .cgt-adh-saisie (55-adherents) ; recherche, puces, pastille
   de statut, avatar mini, éditeur (.cgt-flash-redaction / -outils / -outil /
   -zone) et typographie d'article .cgt-flash-contenu (50-flash-info) ; avatar
   .cgt-msg-avatar et étiquette de rôle .cgt-msg-role (52-messagerie) ;
   rubriques [data-sup-rub] (53-support § 0) ; jauge .cgt-cpt-jauge
   (56-comptabilite, largeur posée par SM.cgtCptParts) ; interrupteur
   .cgt-interrupteur (48-profil).

   Poids : écrans neufs, sélecteurs simples ; :not(#cgt) seulement contre une
   règle plus lourde du socle (cartes, champs, modales, états vides).
   !important : aucun. Mouvement : translate / scale / rotate seulement
   (cartes, autocollant, flèche « Lire »), coupé par prefers-reduced-motion.
   Pas de color-mix(), pas de backdrop-filter, pas de :has().
   ========================================================================== */


/* ==========================================================================
   1. PAGES — conteneur, entête (titre à mot d'accent, chapo, actions)
   ========================================================================== */
.cgt-nl-page{
  display:flex;
  flex-direction:column;
  gap:26px;
  width:100%;
  max-width:1400px;
  margin:0 auto;
  padding:4px 0 12px;
  box-sizing:border-box;
  font-family:var(--police-texte);
  color:var(--texte);
}
.cgt-nl-page *, .cgt-nl-page *::before, .cgt-nl-page *::after{ box-sizing:border-box; }
.cgt-nl-page [hidden]{ display:none; }

.cgt-nl-entete{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px 28px;
}
.cgt-nl-entete-texte{ min-width:0; }
.cgt-nl-titre-ecran.cgt-titre-ecran{ margin:0; }
.cgt-nl-chapo{
  margin:14px 0 0;
  max-width:62ch;
  font-size:var(--fs-16);
  line-height:var(--lh-corps);
  color:var(--texte-2);
}
.cgt-nl-entete-actions{ display:flex; flex-wrap:wrap; gap:14px; padding-bottom:6px; }


/* ==========================================================================
   2. ADHÉRENT·ES — abonnement par e-mail + compteurs
   ========================================================================== */
.cgt-nl-haut{
  display:grid;
  grid-template-columns:minmax(0, 2fr) minmax(0, 1fr);
  align-items:stretch;
  gap:20px;
}
.cgt-nl-abo{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr) auto;
  align-items:center;
  gap:16px 18px;
  margin:0;
  padding:18px 20px 18px 18px;
}
.cgt-nl-abo.cgt-carte:not(#cgt){ border-left:6px solid var(--rub); }
.cgt-nl-abo[data-abonne="0"].cgt-carte:not(#cgt){ border-left-color:var(--filet-fort); }
.cgt-nl-abo-picto{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:48px;
  height:48px;
  font-size:20px;
  background:var(--rub-plein);
  color:var(--rub-sur);
  box-shadow:3px 3px 0 0 var(--tranche);
}
.cgt-nl-abo[data-abonne="0"] .cgt-nl-abo-picto{ background:var(--papier-3); color:var(--texte-3); }
.cgt-nl-abo-texte{ min-width:0; }
.cgt-nl-abo-titre{
  margin:0;
  font-size:var(--fs-16);
  font-weight:var(--fw-800);
  line-height:1.3;
  color:var(--texte);
}
.cgt-nl-abo-etat{
  margin:4px 0 0;
  font-size:var(--fs-14);
  line-height:var(--lh-corps);
  color:var(--texte-2);
}

/* Compteurs : composant commun .cgt-chiffre (30-composants § 23, revue finale) */


/* ==========================================================================
   3. ADHÉRENT·ES — cartes des newsletters reçues ; la dernière en affiche
   ========================================================================== */
.cgt-nl-grille{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  align-items:stretch;
  gap:22px;
  margin:0;
  padding:0;
  list-style:none;
}
.cgt-nl-carte{
  position:relative;
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  align-items:start;
  gap:18px;
  margin:0;
  padding:20px 22px 18px 20px;
  translate:0 0;
  transition:translate var(--duree-3) var(--courbe-ressort);
}
.cgt-nl-carte.cgt-carte:not(#cgt){ border-top:5px solid var(--rub); }
@media (hover: hover){
  .cgt-nl-carte.cgt-carte:not(#cgt):hover{
    translate:-2px -2px;
    box-shadow:var(--relief-1-survol);
    border-color:var(--filet-fort);
    border-top-color:var(--rub);
  }
  .cgt-nl-carte:hover .cgt-nl-carte-lire i{ translate:4px 0; }
}
.cgt-nl-carte.cgt-carte:not(#cgt):active{
  translate:2px 2px;
  box-shadow:var(--relief-filet);
  transition-duration:0ms;
}
.cgt-nl-carte-corps{ display:flex; flex-direction:column; gap:8px; min-width:0; }
.cgt-nl-carte-titre{
  margin:0;
  font-family:var(--police-texte);
  font-size:var(--fs-18);
  font-weight:var(--fw-800);
  line-height:1.3;
  letter-spacing:-.005em;
  color:var(--texte);
}
/* Le titre est un vrai bouton ; sa zone s'étend à toute la carte */
.cgt-nl-carte-lien{
  display:inline;
  margin:0;
  padding:0;
  font:inherit;
  text-align:left;
  color:inherit;
  background:none;
  border:0;
  border-radius:0;
  cursor:pointer;
  overflow-wrap:anywhere;
  -webkit-tap-highlight-color:transparent;
}
.cgt-nl-carte-lien::after{ content:""; position:absolute; inset:0; z-index:1; }
/* 3.0.0-beta.93 — « Lire » ne faisait rien, sur ordinateur comme dans l'appli (retour d'une adhérente, 23/11/2026) :
   la règle des éléments cliquables des cartes (30-composants.css, « Cartes cliquables ») donne translate:0 0 au titre,
   qui porte onclick. Un <button> transformé devient le cadre de son ::after : la zone de clic se réduisait au titre.
   (Le lien <a> des Flash info, en ligne, n'est pas transformable : pas concerné.) */
.cgt-nl-carte .cgt-nl-carte-lien[onclick]:not(#cgt){ translate:none; }
.cgt-nl-carte-lien:focus{ outline:none; }
.cgt-nl-carte-lien:focus-visible::after{ outline:3px solid var(--focus); outline-offset:4px; }
.cgt-nl-carte-extrait{
  margin:0;
  font-size:var(--fs-15);
  line-height:1.55;
  color:var(--texte-2);
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  overflow:hidden;
}
.cgt-nl-carte-pied{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:6px 16px;
  margin:4px 0 0;
  padding-top:12px;
  border-top:1px solid var(--filet);
  font-size:var(--fs-13);
  font-weight:var(--fw-600);
  color:var(--texte-3);
}
.cgt-nl-carte-lire{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:var(--fs-14);
  font-weight:var(--fw-800);
  color:var(--lien);
}
.cgt-nl-carte-lire i{ font-size:12px; translate:0 0; transition:translate var(--duree-3) var(--courbe-ressort); }

/* La dernière parue : affiche d'encre, filet et tranche jaunes, sur toute la largeur */
.cgt-nl-carte--une{
  grid-column:1 / -1;
  gap:24px;
  padding:28px 32px 24px 28px;
}
.cgt-nl-carte--une.cgt-carte:not(#cgt){
  background:var(--bande);
  color:var(--bande-texte);
  border:0;
  border-left:8px solid var(--cgt-jaune);
  box-shadow:6px 6px 0 0 var(--cgt-jaune), 12px 16px 36px 0 rgba(0,0,0,.24);
}
@media (hover: hover){
  .cgt-nl-carte--une.cgt-carte:not(#cgt):hover{
    border-color:var(--cgt-jaune);
    box-shadow:8px 8px 0 0 var(--cgt-jaune), 14px 20px 40px 0 rgba(0,0,0,.30);
  }
}
.cgt-nl-carte--une.cgt-carte:not(#cgt):active{ box-shadow:2px 2px 0 0 var(--cgt-jaune); }
.cgt-nl-carte--une .cgt-nl-carte-corps{ position:relative; z-index:1; gap:12px; }
/* Pinceau de cgt.fr (même motif que « À la une » des Flash info), en jaune, sur grand écran.
   Revue D : il reste DANS l'aplat d'encre (à -18 px, il passait sur la tranche jaune
   et mordait le fond de page : une bavure plutôt qu'un geste). */
.cgt-nl-carte--une::before{
  content:"";
  position:absolute;
  top:34px;
  right:18px;
  width:260px;
  height:48px;
  background:var(--cgt-jaune);
  opacity:.9;
  -webkit-mask-image:url("../../images/cgt/pinceau-masque.svg");
  mask-image:url("../../images/cgt/pinceau-masque.svg");
  -webkit-mask-size:100% 100%;
  mask-size:100% 100%;
  -webkit-mask-repeat:no-repeat;
  mask-repeat:no-repeat;
  transform-origin:right center;
  pointer-events:none;
}
.cgt-nl-carte--une .cgt-nl-carte-titre{
  max-width:32ch;
  font-size:clamp(1.5rem, 1.1rem + 1.3vw, 2.25rem);
  font-weight:var(--fw-900);
  line-height:1.1;
  letter-spacing:-.02em;
  color:var(--bande-texte);
}
.cgt-nl-carte--une .cgt-nl-carte-extrait{
  max-width:72ch;
  font-size:var(--fs-16);
  color:var(--bande-texte-2);
}
.cgt-nl-carte--une .cgt-nl-carte-pied{ border-top-color:rgba(255,255,255,.18); color:var(--bande-texte-2); }
.cgt-nl-carte--une .cgt-nl-carte-lire{ color:var(--t-communique-encre); }
.cgt-nl-carte--une .cgt-nl-date{ background:var(--cgt-jaune); color:var(--sur-jaune); box-shadow:4px 4px 0 0 var(--cgt-rouge); width:78px; height:78px; }
.cgt-nl-carte--une .cgt-nl-date-jour{ font-size:var(--fs-32); }
/* Autocollant « Dernière parue » */
.cgt-nl-une{
  align-self:flex-start;
  display:inline-block;
  padding:4px 10px 3px;
  background:var(--cgt-jaune);
  color:var(--sur-jaune);
  font-size:var(--fs-12);
  font-weight:var(--fw-900);
  line-height:1.3;
  letter-spacing:var(--ls-majuscules);
  text-transform:uppercase;
  box-shadow:3px 3px 0 0 var(--tranche-jaune);
  rotate:-1.5deg;
}

/* Pavé « calendrier » : jour, mois, année sur l'encre, tranche de la rubrique */
.cgt-nl-date{
  flex:none;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  width:64px;
  height:64px;
  background:var(--papier-inverse);
  color:var(--texte-inverse);
  box-shadow:3px 3px 0 0 var(--rub, var(--cgt-jaune));
  font-variant-numeric:tabular-nums;
}
.cgt-nl-date-jour{ font-size:var(--fs-24); font-weight:var(--fw-900); line-height:1; }
.cgt-nl-date-mois{ margin-top:3px; font-size:var(--fs-11); font-weight:var(--fw-800); line-height:1; letter-spacing:.06em; text-transform:uppercase; }
.cgt-nl-date-an{ margin-top:2px; font-size:10px; font-weight:var(--fw-700); line-height:1; opacity:.8; }
.cgt-nl-date--vide{ background:var(--papier-3); color:var(--texte-3); box-shadow:3px 3px 0 0 var(--tranche); font-size:var(--fs-20); }

/* Mise en évidence (lien #newsletters/<id>) : cadre jaune, sans animer l'ombre */
.cgt-nl-carte.sm-highlight:not(#cgt){
  animation:none;
  outline:4px solid var(--cgt-jaune);
  outline-offset:4px;
}

/* États vides : aucune newsletter / plus rien ne correspond */
.cgt-nl-vide:not(#cgt),
.cgt-nl-aucune:not(#cgt){ padding:32px 16px 40px; }
.cgt-nl-vide--section:not(#cgt){ padding:18px 16px 28px; }
.cgt-nl-vide p,
.cgt-nl-aucune p{ max-width:52ch; margin-left:auto; margin-right:auto; }
.cgt-nl-aucune[hidden]{ display:none; }


/* ==========================================================================
   4. LECTURE (#sm-newsletter-view-modal) — surtitre, objet, la lettre
   ========================================================================== */
.cgt-nl-lecture:not(#cgt) .sm-modal-container{ max-width:820px; }
.cgt-nl-lecture:not(#cgt) .sm-modal-header{ align-items:flex-start; padding-top:20px; padding-bottom:18px; }
.cgt-nl-lecture-tete{ flex:1 1 auto; min-width:0; }
.cgt-nl-lecture-sur{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px 14px;
  margin:0 0 8px;
}
.cgt-nl-lecture-marque{
  font-family:var(--police-accent);
  font-style:italic;
  font-weight:var(--fw-accent);
  font-size:var(--fs-16);
  line-height:1.3;
  letter-spacing:var(--ls-etiquette);
  color:var(--lien);
}
.cgt-nl-lecture-date{
  font-size:var(--fs-12);
  font-weight:var(--fw-700);
  letter-spacing:var(--ls-majuscules);
  text-transform:uppercase;
  color:var(--texte-3);
}
.sm-modal:not(#cgt) .sm-modal-header .cgt-nl-lecture-titre.cgt-titre-modale{
  font-size:clamp(1.375rem, 1.1rem + .9vw, 1.875rem);
  font-weight:var(--fw-800);
  line-height:1.2;
  letter-spacing:-.015em;
  overflow-wrap:anywhere;
}
.cgt-nl-lecture:not(#cgt) .sm-modal-body{ padding:28px 40px 32px; }
/* Aperçu de la rédaction : autocollant jaune « Aperçu » */
.cgt-nl-apercu{
  display:inline-block;
  padding:3px 9px 2px;
  background:var(--cgt-jaune);
  color:var(--sur-jaune);
  font-size:var(--fs-11);
  font-weight:var(--fw-900);
  line-height:1.3;
  letter-spacing:var(--ls-majuscules);
  text-transform:uppercase;
  box-shadow:2px 2px 0 0 var(--tranche-jaune);
  rotate:-1.5deg;
}

/* La lettre : texte (typographie d'article des Flash info) + signature */
.cgt-nl-lettre{
  display:flex;
  flex-direction:column;
  gap:32px;
  max-width:var(--largeur-lecture);
  margin:0 auto;
}
.cgt-nl-lettre-texte.cgt-flash-contenu{ font-size:1.0625rem; }
.cgt-nl-lettre-texte.cgt-flash-contenu > p:first-child{ font-size:var(--fs-18); }
.cgt-nl-lettre-vide{
  margin:0;
  padding:18px 20px;
  font-size:var(--fs-15);
  font-style:italic;
  color:var(--texte-3);
  background:var(--papier-2);
  border-left:4px solid var(--filet-fort);
}
.cgt-nl-lettre-signature{
  display:flex;
  align-items:center;
  gap:14px;
  padding-top:20px;
  border-top:4px solid var(--cgt-rouge);
  width:max-content;
  max-width:100%;
}
/* Logo officiel en autocollant : pastille blanche (règle de la charte sur fond sombre) */
.cgt-nl-lettre-logo{
  flex:none;
  display:inline-flex;
  padding:4px;
  background:var(--cgt-blanc);
  box-shadow:3px 3px 0 0 var(--tranche);
  rotate:-2deg;
}
.cgt-nl-lettre-logo img{ display:block; width:auto; height:44px; }
.cgt-nl-lettre-marque{ display:flex; flex-direction:column; gap:3px; }
.cgt-nl-lettre-nom{
  font-size:var(--fs-24);
  font-weight:var(--fw-900);
  line-height:.9;
  letter-spacing:-.01em;
  color:var(--texte);
}
.cgt-nl-lettre-sous{
  font-size:var(--fs-11);
  font-weight:var(--fw-800);
  letter-spacing:var(--ls-majuscules);
  text-transform:uppercase;
  color:var(--texte-3);
}


/* ==========================================================================
   5. GESTION — chiffres clés (tuiles à filet de rubrique), sections, registre
   ========================================================================== */
/* Chiffres clés : composant commun .cgt-chiffre (30-composants § 23, revue finale) */

/* Sections « Brouillons en cours » / « Newsletters envoyées » */
.cgt-nl-section{ display:flex; flex-direction:column; gap:16px; margin:0; }
.cgt-nl-section[hidden]{ display:none; }
.cgt-nl-section-titre{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:4px 10px;
  margin:0;
  font-family:var(--police-texte);
  font-size:var(--fs-28);
  font-weight:var(--fw-400);
  line-height:1.15;
  letter-spacing:var(--ls-accent);
  color:var(--texte);
}
.cgt-nl-section-titre .cgt-accent{ color:var(--accent-titre); }
.cgt-nl-section-nb{
  align-self:center;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:26px;
  padding:0 8px;
  font-family:var(--police-texte);
  font-size:var(--fs-14);
  font-weight:var(--fw-900);
  font-style:normal;
  letter-spacing:0;
  font-variant-numeric:tabular-nums;
  background:var(--texte);
  color:var(--papier);
  box-shadow:2px 2px 0 0 var(--cgt-rouge);
}

/* Registre : lignes papier à tranche */
.cgt-nl-registre{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin:0;
  padding:0;
  list-style:none;
}
.cgt-nl-ligne{
  display:grid;
  grid-template-columns:64px minmax(0, 1fr) minmax(0, 17rem) auto;
  grid-template-areas:"date corps stats actions";
  align-items:center;
  gap:12px 22px;
  margin:0;
  padding:14px 18px 14px 14px;
}
.cgt-nl-ligne.cgt-carte:not(#cgt){ border-left:6px solid var(--rub); }
.cgt-nl-ligne--brouillon{
  grid-template-columns:64px minmax(0, 1fr) auto;
  grid-template-areas:"date corps actions";
}
.cgt-nl-ligne > .cgt-nl-date{ grid-area:date; }
.cgt-nl-ligne--brouillon .cgt-nl-date{ box-shadow:3px 3px 0 0 var(--cgt-jaune); }
.cgt-nl-ligne-corps{ grid-area:corps; min-width:0; }
.cgt-nl-ligne-titre{
  margin:0;
  font-family:var(--police-texte);
  font-size:var(--fs-18);
  font-weight:var(--fw-800);
  line-height:1.3;
  color:var(--texte);
  overflow-wrap:anywhere;
}
.cgt-nl-ligne-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 16px;
  margin:8px 0 0;
  font-size:var(--fs-13);
  line-height:1.4;
  color:var(--texte-3);
}
.cgt-nl-ligne-meta .cgt-flash-auteur-mini{ font-size:var(--fs-13); color:var(--texte-2); }
.cgt-nl-ligne-meta .cgt-flash-statut{ font-size:var(--fs-12); padding:3px 9px; }
.cgt-nl-public{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:2px 8px;
  font-size:var(--fs-12);
  font-weight:var(--fw-800);
  line-height:1.4;
  white-space:nowrap;
  color:var(--t-communique-fort);
  background:var(--t-communique-fond);
  border:1px solid var(--t-communique);
}
.cgt-nl-public i{ font-size:11px; }

/* Statistiques d'une ligne envoyée : envoyée à · lue par · lecture (jauge) */
.cgt-nl-stats{
  grid-area:stats;
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:4px 14px;
  margin:0;
  padding:10px 14px 12px;
  background:var(--papier-2);
  border:1px solid var(--filet);
}
.cgt-nl-stat{ min-width:0; margin:0; }
.cgt-nl-stat dt{
  font-size:var(--fs-11);
  font-weight:var(--fw-800);
  line-height:1.3;
  letter-spacing:var(--ls-majuscules);
  text-transform:uppercase;
  white-space:nowrap;
  color:var(--texte-3);
}
.cgt-nl-stat dd{
  margin:2px 0 0;
  font-size:var(--fs-20);
  font-weight:var(--fw-900);
  line-height:1.1;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
  color:var(--texte);
}
.cgt-nl-stat--taux dd{ color:var(--rub-fort); }
.cgt-nl-stat-sur{ font-size:.7em; font-weight:var(--fw-800); }
.cgt-nl-stats .cgt-cpt-jauge{ grid-column:1 / -1; margin-top:6px; height:6px; }

.cgt-nl-ligne-actions{
  grid-area:actions;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}


/* ==========================================================================
   6. RÉDACTION (#sm-newsletter-modal) — pleine page de saisie commune
      (bandeau d'encre à filet jaune, sections numérotées : 30-composants § 22)
   ========================================================================== */
.cgt-nl-pleine .sm-admin-fullpage-title p{ color:var(--bande-texte-2); opacity:1; font-size:var(--fs-14); overflow-wrap:anywhere; }
.cgt-nl-pleine .sm-admin-fullpage-body{ background:var(--fond); }
.cgt-nl-pleine .sm-admin-fullpage-content.cgt-nl-saisie{ max-width:820px; }   /* = colonne du bandeau (§ 22) */

/* Titre de section + bouton « Aperçu » sur la même ligne */
.cgt-nl-section-tete{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:10px 16px;
  margin:0 0 18px;
}
.cgt-nl-section-tete .cgt-adh-section-titre{ margin:0; }
/* 3.0.0-beta.72 : « Aperçu » et « Envoyer un essai » côte à côte (à la ligne sur petit écran) */
.cgt-nl-section-actions{ display:flex; flex-wrap:wrap; gap:8px; }

/* Mot insécable dans les messages de confirmation (« e-mail » ne se coupe pas au trait d'union) */
.cgt-nl-insecable{ white-space:nowrap; }

/* Nombre d'abonné·es touché·es (sous « Destinataires ») */
.cgt-nl-destinataires.sm-admin-form-hint{
  display:flex;
  align-items:flex-start;            /* sur deux lignes, la pastille reste face à la 1re */
  gap:8px;
  font-weight:var(--fw-700);
  color:var(--texte-2);
}
.cgt-nl-destinataires::before{
  content:"";
  flex:none;
  width:10px;
  height:10px;
  margin-top:.35em;
  background:var(--t-communique);
  box-shadow:1px 1px 0 0 var(--tranche);
}
.cgt-nl-destinataires[data-vide="1"]{ color:var(--alerte-fort); }
.cgt-nl-destinataires[hidden]{ display:none; }

/* Éditeur : cadre et barre d'outils des Flash info ; la zone prend la hauteur d'une lettre */
.cgt-nl-redaction.cgt-nl-invalide{
  border-color:var(--erreur);
  box-shadow:0 0 0 3px rgba(var(--erreur-rgb), .18), var(--relief-champ);
}
.cgt-nl-zone.cgt-flash-zone{
  min-height:320px;
  max-height:60vh;
  font-size:1.0625rem;
}
.cgt-nl-zone h2{
  margin:1em 0 .4em;
  font-size:var(--fs-24);
  font-weight:var(--fw-800);
  line-height:1.25;
}
.cgt-nl-zone h2::before{
  content:"";
  display:block;
  width:40px;
  height:4px;
  margin-bottom:10px;
  background:var(--cgt-rouge);
}
.cgt-nl-zone h3{ font-size:var(--fs-20); }
.cgt-nl-zone :is(strong, b){ font-weight:var(--fw-800); }
.cgt-nl-zone img{ border:1px solid var(--filet); }
/* Groupe « Code HTML » à droite de la barre */
.cgt-nl-outils-code{ margin-left:auto; }
.cgt-nl-outils .cgt-flash-outil[aria-pressed="true"]{ background:var(--texte); color:var(--papier); }
/* Mode HTML : les outils de mise en forme sont sans effet, ils se grisent */
.cgt-nl-mode-html .cgt-nl-outils .cgt-flash-outils-groupe:not(.cgt-nl-outils-code){ opacity:.4; pointer-events:none; }
/* Style du paragraphe : liste compacte dans la barre */
.cgt-nl-outils .cgt-nl-style.cgt-nl-style:not(#cgt){
  width:auto;
  min-width:0;
  height:38px;
  min-height:0;
  margin:0;
  padding:0 34px 0 10px;
  font-size:var(--fs-14);
  font-weight:var(--fw-700);
  line-height:1;
  box-shadow:none;
  background-position:right 10px center;
}
/* Code HTML : zone monospace, cachée tant qu'on n'est pas en mode HTML (toggleHtmlMode) */
.cgt-nl-html{
  display:none;
  width:100%;
  min-height:320px;
  margin:0;
  padding:16px 18px;
  font-family:var(--police-mono);
  font-size:var(--fs-14);
  line-height:1.55;
  resize:vertical;
}
.cgt-nl-redaction .cgt-nl-html:not(#cgt){
  border:0;
  box-shadow:none;
  outline:none;
  background:var(--papier);
  color:var(--texte);
}


/* ==========================================================================
   7. BOÎTES « Insérer un lien » / « Insérer une image »
   ========================================================================== */
/* « Lien » : petite boîte centrée (.sm-modal-sm) ; « Image » : formulaire plus long,
   plein écran sur téléphone (en-tête et pied fixes, corps qui défile — socle § 18). */
.cgt-nl-outil-modale:not(#cgt) .sm-modal-container{ max-width:460px; }
.cgt-nl-televerser{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 12px;
  margin:-4px 0 18px;
}
.cgt-nl-televerser-ou{
  font-family:var(--police-accent);
  font-style:italic;
  font-weight:var(--fw-accent);
  font-size:var(--fs-16);
  color:var(--lien);
}
.cgt-nl-televerser-bouton.sm-btn{ cursor:pointer; }
/* Contrôle final : deux règles séparées. Dans une même liste, :focus-visible (absent avant
   iOS 15.4) faisait ignorer toute la règle, :focus-within compris. */
.cgt-nl-televerser input[type="file"]:focus-visible + .cgt-nl-televerser-aide{ outline:2px solid var(--focus); outline-offset:3px; }
.cgt-nl-televerser-bouton:focus-within{ outline:2px solid var(--focus); outline-offset:3px; }
.cgt-nl-televerser-aide{ font-size:var(--fs-13); color:var(--texte-indice); }
.cgt-nl-image-apercu{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin:4px 0 0;
  padding:12px;
  background:var(--papier-2);
  border:1px solid var(--filet);
}
.cgt-nl-image-apercu[hidden]{ display:none; }
.cgt-nl-image-apercu img{
  display:block;
  max-width:100%;
  max-height:160px;
  margin:0 auto;
  border:1px solid var(--filet);
  box-shadow:3px 3px 0 0 var(--tranche);
}


/* ==========================================================================
   8. FICHE D'UNE NEWSLETTER (#sm-view-newsletter-modal) — chiffres de lecture,
      onglets, aperçu « e-mail », destinataires
   ========================================================================== */
.cgt-nl-fiche .sm-admin-fullpage-content.cgt-nl-fiche-contenu{
  display:flex;
  flex-direction:column;
  gap:24px;
  max-width:1080px;
}
.cgt-nl-fiche .sm-admin-fullpage-title h1{ overflow-wrap:anywhere; }
@media (min-width: 769px){
  .cgt-nl-fiche :is(.sm-admin-fullpage-header, .sm-admin-fullpage-footer){
    padding-left:max(24px, calc((100% - 1080px) / 2));
    padding-right:max(24px, calc((100% - 1080px) / 2));
  }
}
.cgt-nl-onglets.cgt-onglets:not(#cgt){ margin:0; }
.cgt-nl-onglets .sm-nl-tab:not(#cgt){ padding:12px 20px 14px; font-size:var(--fs-16); }
.sm-nl-panel[hidden]{ display:none; }

/* Aperçu « e-mail » : en-tête Objet / À, barre 6 couleurs, la lettre */
.cgt-nl-courriel{ margin:0; padding:0; overflow:hidden; }
.cgt-nl-courriel.cgt-carte:not(#cgt){ box-shadow:var(--relief-2); }
.cgt-nl-courriel-entete{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin:0;
  padding:16px 24px;
  background:var(--papier-2);
  border-bottom:1px solid var(--filet);
}
.cgt-nl-courriel-entete > div{ display:grid; grid-template-columns:5.5rem minmax(0, 1fr); gap:12px; align-items:baseline; }
.cgt-nl-courriel-entete dt{
  font-size:var(--fs-12);
  font-weight:var(--fw-800);
  letter-spacing:var(--ls-majuscules);
  text-transform:uppercase;
  color:var(--texte-3);
}
.cgt-nl-courriel-entete dd{
  margin:0;
  font-size:var(--fs-15);
  font-weight:var(--fw-700);
  color:var(--texte);
  overflow-wrap:anywhere;
}
.cgt-nl-courriel-barre.cgt-arc-en-ciel{ max-width:none; height:6px; }
.cgt-nl-courriel .cgt-nl-lettre{ padding:36px 40px 40px; }

/* Destinataires : puces Tous / Lue / Pas encore lue, puis la liste */
.cgt-nl-dest-barre{ margin:0 0 16px; }
.cgt-nl-dests{
  display:flex;
  flex-direction:column;
  margin:0;
  padding:0;
  list-style:none;
}
.cgt-nl-dests.cgt-carte:not(#cgt){ padding:4px 0; }
.cgt-nl-dest{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr) 12rem 10rem;   /* colonnes fixes : rôles et états alignés d'une ligne à l'autre */
  align-items:center;
  gap:6px 16px;
  margin:0;
  padding:12px 20px;
  border-bottom:1px solid var(--filet);
}
.cgt-nl-dest:last-child{ border-bottom:0; }
.cgt-nl-dest[hidden]{ display:none; }
.cgt-nl-dest-texte{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.cgt-nl-dest-nom{ font-size:var(--fs-15); font-weight:var(--fw-800); color:var(--texte); overflow-wrap:anywhere; }
.cgt-nl-dest-mail{ font-size:var(--fs-13); color:var(--texte-3); overflow-wrap:anywhere; }
.cgt-nl-dest-role{ min-width:0; }
.cgt-nl-dest .cgt-flash-statut{ justify-self:end; }


/* ==========================================================================
   9. TABLETTE ET PETIT BUREAU (≤ 1200 / ≤ 1024)
   ========================================================================== */
@media (max-width: 1200px){
  .cgt-nl-ligne{
    grid-template-columns:64px minmax(0, 1fr) auto;
    grid-template-areas:
      "date corps actions"
      "date stats stats";
  }
  .cgt-nl-stats{ max-width:26rem; }
  .cgt-nl-ligne > .cgt-nl-date{ align-self:start; }   /* le pavé reste en tête de ligne */
}
@media (max-width: 1024px){
  .cgt-nl-haut{ grid-template-columns:minmax(0, 1fr); }
}


/* ==========================================================================
   10. TÉLÉPHONE (≤ 768 px)
   ========================================================================== */
@media (max-width: 768px){
  .cgt-nl-page{ gap:20px; padding:2px 0 24px; }
  .cgt-nl-chapo{ margin-top:10px; font-size:var(--fs-15); }
  .cgt-nl-entete-actions{ width:100%; padding:0 4px 0 0; }
  .cgt-nl-entete-actions .sm-btn{ flex:1 1 auto; min-height:48px; justify-content:center; }

  .cgt-nl-abo{ grid-template-columns:auto minmax(0, 1fr) auto; gap:12px 14px; padding:16px 14px 16px 14px; }
  .cgt-nl-abo-picto{ width:40px; height:40px; font-size:17px; }
  .cgt-nl-abo-titre{ font-size:var(--fs-15); }
  .cgt-nl-abo-etat{ font-size:var(--fs-13); }

  .cgt-nl-grille{ grid-template-columns:minmax(0, 1fr); gap:18px; }
  .cgt-nl-carte{ gap:14px; padding:16px 16px 14px 14px; }
  .cgt-nl-carte-titre{ font-size:1.0625rem; }
  .cgt-nl-carte-extrait{ font-size:var(--fs-14); }
  .cgt-nl-carte .cgt-nl-date{ width:56px; height:56px; }
  .cgt-nl-carte .cgt-nl-date-jour{ font-size:var(--fs-20); }
  .cgt-nl-carte--une{ grid-template-columns:minmax(0, 1fr); gap:14px; padding:22px 20px 18px 18px; }
  .cgt-nl-carte--une.cgt-carte:not(#cgt){ border-left-width:6px; box-shadow:5px 5px 0 0 var(--cgt-jaune), 8px 12px 24px 0 rgba(0,0,0,.2); }
  .cgt-nl-carte--une .cgt-nl-date{ display:none; }   /* la date reste écrite au pied */
  .cgt-nl-carte--une::before{ display:none; }        /* parcimonie : l'autocollant suffit */
  .cgt-nl-carte--une .cgt-nl-carte-titre{ font-size:1.625rem; }
  .cgt-nl-carte--une .cgt-nl-carte-extrait{ font-size:var(--fs-15); -webkit-line-clamp:4; }

  /* Lecture : plein écran (modale du socle), colonne resserrée */
  .cgt-nl-lecture:not(#cgt) .sm-modal-header{ padding-top:calc(16px + env(safe-area-inset-top, 0px)); }
  .cgt-nl-lecture:not(#cgt) .sm-modal-body{ padding:22px 18px 28px; }
  .cgt-nl-lecture:not(#cgt) .sm-modal-footer .sm-btn{ width:100%; min-height:48px; justify-content:center; }
  .cgt-nl-lettre{ gap:26px; }
  .cgt-nl-lettre-texte.cgt-flash-contenu{ font-size:var(--fs-16); }
  .cgt-nl-lettre-texte.cgt-flash-contenu > p:first-child{ font-size:1.0625rem; }

  /* Gestion */
  .cgt-nl-section-titre{ font-size:var(--fs-24); }

  .cgt-nl-ligne,
  .cgt-nl-ligne--brouillon{
    grid-template-columns:56px minmax(0, 1fr);
    grid-template-areas:
      "date corps"
      "stats stats"
      "actions actions";
    gap:14px;
    padding:14px 14px 14px 12px;
  }
  .cgt-nl-ligne--brouillon{
    grid-template-areas:
      "date corps"
      "actions actions";
  }
  .cgt-nl-ligne .cgt-nl-date{ width:56px; height:56px; }
  .cgt-nl-ligne .cgt-nl-date-jour{ font-size:var(--fs-20); }
  .cgt-nl-ligne-titre{ font-size:var(--fs-16); }
  .cgt-nl-stats{ max-width:none; }
  .cgt-nl-ligne-actions{
    justify-content:stretch;
    padding-top:12px;
    border-top:1px solid var(--filet);
  }
  .cgt-nl-ligne-actions .sm-btn:not(.sm-btn-icon){ flex:1 1 0; min-height:44px; justify-content:center; }
  .cgt-nl-ligne-actions .sm-btn.sm-btn-icon{ flex:none; width:44px; height:44px; min-width:44px; }

  /* Rédaction */
  .cgt-nl-zone.cgt-flash-zone{ min-height:260px; max-height:none; font-size:var(--fs-16); }
  /* Barre d'outils — revue D : sur une rangée qui défilait, rien ne signalait les
     outils cachés (Lien, Image, Style, Centrer) et une icône apparaissait coupée sous
     « Code HTML ». Elle passe sur DEUX rangées (trois sous 340 px) : tous les outils
     sont visibles. Les groupes se séparent par l'espace (un filet vertical en début
     de rangée ferait « bug ») ; « Code HTML » ferme la dernière rangée, à droite. */
  .cgt-nl-outils.cgt-flash-outils{
    flex-wrap:wrap;
    gap:4px 14px;
    padding:6px;
  }
  .cgt-nl-outils .cgt-flash-outils-groupe{ flex:none; }
  .cgt-nl-outils .cgt-flash-outils-groupe + .cgt-flash-outils-groupe{ padding-left:0; border-left:0; }
  .cgt-nl-outils .cgt-nl-outils-code{ margin-left:auto; }
  .cgt-nl-section-tete{ margin-bottom:16px; }

  /* Fiche */
  .cgt-nl-fiche .sm-admin-fullpage-content.cgt-nl-fiche-contenu{ gap:18px; }
  .cgt-nl-onglets .sm-nl-tab:not(#cgt){ flex:1 1 0; padding:12px 10px 14px; font-size:var(--fs-15); }
  .cgt-nl-courriel-entete{ padding:14px 16px; }
  .cgt-nl-courriel-entete > div{ grid-template-columns:3.5rem minmax(0, 1fr); gap:10px; }
  .cgt-nl-courriel .cgt-nl-lettre{ padding:24px 18px 28px; }
  .cgt-nl-dest{
    grid-template-columns:auto minmax(0, 1fr) auto;
    grid-template-areas:
      "avatar texte etat"
      "avatar role etat";
    gap:4px 12px;
    padding:12px 14px;
  }
  .cgt-nl-dest > .cgt-msg-avatar{ grid-area:avatar; }
  .cgt-nl-dest-texte{ grid-area:texte; }
  .cgt-nl-dest-role{ grid-area:role; }
  .cgt-nl-dest .cgt-flash-statut{ grid-area:etat; font-size:var(--fs-12); padding:3px 8px; }
  .cgt-nl-image-apercu img{ max-height:120px; }
}
@media (max-width: 380px){
  .cgt-nl-abo{ grid-template-columns:minmax(0, 1fr) auto; }
  .cgt-nl-abo-picto{ display:none; }
  .cgt-nl-dest .cgt-flash-statut{ white-space:normal; text-align:center; }
}


/* ==========================================================================
   11. MOUVEMENT — autocollants « Dernière parue » / « Aperçu », signature ;
       cgt-motion.js ne pose .cgt-cascade que si le mouvement est permis
   ========================================================================== */
.cgt-nl-carte--une.cgt-cascade .cgt-nl-une{
  animation:cgt-tdb-coup 380ms var(--courbe-tampon) 300ms backwards;
}
.cgt-nl-carte--une.cgt-cascade::before{
  animation:cgt-tdb-trace 700ms var(--courbe-sortie) 200ms backwards;
}
.cgt-nl-carte--une.cgt-cascade .cgt-nl-date{
  animation:cgt-tdb-coup 360ms var(--courbe-tampon) 180ms backwards;
}
@media (prefers-reduced-motion: no-preference){
  .sm-modal.active .cgt-nl-apercu{ animation:cgt-tdb-coup 380ms var(--courbe-tampon) 320ms backwards; }
  .sm-modal.active .cgt-nl-lettre-logo{ animation:cgt-tdb-coup 380ms var(--courbe-tampon) 260ms backwards; }
  .cgt-nl-fiche.active .sm-nl-panel:not([hidden]){ animation:cgt-page-entree var(--duree-4) var(--courbe-sortie) backwards; }
}
@media (prefers-reduced-motion: reduce){
  .cgt-nl-carte, .cgt-nl-carte-lire i{ transition:none; }
}

/* ==========================================================================
   3.0.0-beta.71 — Pièces jointes (PDF ou image) : liste de la rédaction
   (#cgt-nl-pj-liste, « Retirer ») et liste de lecture (.cgt-nl-lecture-pj,
   liens vers sm_newsletter_piece_jointe). Pictogramme de la rubrique
   « document » (violet), comme la lecture ; ligne papier à filet. Jetons
   seulement : clair et sombre suivent 00-tokens.css.
   ========================================================================== */
.cgt-nl-pj-liste{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:8px;
}
.cgt-nl-pj-liste:empty{ display:none; }
.cgt-nl-pj,
.cgt-nl-pj-lien{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.cgt-nl-pj{
  padding:10px 12px;
  background:var(--papier-2);
  border:1px solid var(--filet);
}
.cgt-nl-pj-lien{
  flex:1 1 auto;
  color:var(--texte);
  text-decoration:none;
}
.cgt-nl-pj--lien{ padding:0; }   /* sans :has() : ignoré par les anciens iOS */
.cgt-nl-pj-lien{ padding:10px 12px; }
.cgt-nl-pj-lien:hover,
.cgt-nl-pj-lien:focus-visible{ background:var(--papier-3); }
.cgt-nl-pj-lien:hover .cgt-nl-pj-nom{ text-decoration:underline; text-underline-offset:3px; }
.cgt-nl-pj-picto{
  flex:0 0 auto;
  display:inline-grid;
  place-items:center;
  width:34px;
  height:34px;
  background:var(--t-document);
  color:var(--t-document-sur);
  font-size:16px;
}
.cgt-nl-pj-nom{
  flex:1 1 auto;
  min-width:0;
  font-weight:var(--fw-700);
  overflow-wrap:anywhere;
}
.cgt-nl-pj-taille{
  flex:0 0 auto;
  font-size:var(--fs-12);
  color:var(--texte-3);
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.cgt-nl-pj-retirer{ flex:0 0 auto; }
.cgt-nl-pj-liste + .cgt-nl-pj-ajouter,
.cgt-nl-pj-ajouter{ margin-top:12px; }
/* Lecture : sous la lettre, séparée par un filet */
.cgt-nl-lecture-pj{
  margin-top:24px;
  padding-top:18px;
  border-top:1px solid var(--filet);
}
.cgt-nl-lecture-pj-titre{
  margin:0 0 10px;
  font-size:var(--fs-12);
  font-weight:var(--fw-800);
  letter-spacing:var(--ls-majuscules);
  text-transform:uppercase;
  color:var(--texte-3);
}
