/* Campagnes e-mail (11/09/2026) — écrans v2. Préfixe ce- partout : rien ne
   déborde sur le reste du CRM. Couleurs tirées des jetons existants quand ils
   existent (design-tokens.css), avec un repli lisible. */

.ce-intro { margin: -8px 0 12px; }
.ce-onglets { display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--line, #d9d4cc); margin-bottom: 16px; scrollbar-width: thin; }
.ce-onglets a { flex: 0 0 auto; padding: 8px 12px; border-radius: 6px 6px 0 0; text-decoration: none;
  color: inherit; white-space: nowrap; font-size: 14px; }
.ce-onglets a.actif { background: var(--cuivre, #b8733f); color: #fff; }
.ce-barre { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin-bottom: 12px; }
.ce-champ { display: flex; flex-direction: column; gap: 4px; font-size: 13px; min-width: 180px; }
.ce-champ input, .ce-champ select, .ce-champ textarea { font: inherit; padding: 6px 8px; min-height: 36px; }
.ce-champ textarea { width: 100%; box-sizing: border-box; }
.ce-coche { display: flex; gap: 6px; align-items: center; font-size: 14px; }
.ce-form { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); align-items: end; }
.ce-bloc { margin: 0 0 16px; padding: 10px 12px; border: 1px solid var(--line, #d9d4cc); border-radius: 8px; }
.ce-bloc summary { cursor: pointer; font-weight: 600; }
.ce-h2 { font-size: 16px; margin: 18px 0 8px; }
.ce-h3 { font-size: 14px; margin: 14px 0 6px; }
.ce-vide { color: var(--ardoise, #5b6470); padding: 12px 0; }
.ce-alerte { padding: 10px 12px; border-radius: 8px; background: #fff4e5; border: 1px solid #e8b86d; margin: 8px 0; }
.ce-alerte.ce-rouge { background: #fdecec; border-color: #d98080; }
.ce-ok { color: #2e7d4f; }
.ce-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.ce-boutons { display: flex; flex-wrap: wrap; gap: 4px; }

/* État général (14/09/2026, chantier 20) : pastilles ok/attention/critique.
   Aucun équivalent générique ailleurs dans le CRM au moment de l'écrire —
   volontairement minimal, préfixé ce- comme le reste du module. */
.ce-etat { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  margin-bottom: 16px; }
.ce-etat-carte { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--line, #d9d4cc); border-radius: 8px; }
.pastille { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; margin-top: 3px; }
.pastille.p-ok { background: #2e7d4f; }
.pastille.p-att { background: #c98a1f; }
.pastille.p-stop { background: #c0392b; }
.ce-etat-carte .ce-etat-titre { font-weight: 600; font-size: 13px; }
.ce-etat-carte .ce-etat-detail { font-size: 12.5px; color: var(--ardoise, #5b6470); margin-top: 2px; }

.ce-kpis { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ce-kpi { display: flex; flex-direction: column; padding: 12px; border: 1px solid var(--line, #d9d4cc);
  border-radius: 8px; text-decoration: none; color: inherit; }
.ce-kpi-v { font-size: 22px; font-weight: 700; }
.ce-kpi-l { font-size: 13px; color: var(--ardoise, #5b6470); }
.ce-parcours { list-style: none; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.ce-parcours a { display: flex; gap: 8px; align-items: center; padding: 10px; border-radius: 8px;
  border: 1px solid var(--line, #d9d4cc); text-decoration: none; color: inherit; }
.ce-parcours strong { margin-left: auto; }
.ce-n { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--cuivre, #b8733f); color: #fff; font-size: 13px; }

.ce-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ce-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ce-table th, .ce-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line, #e6e1d9); vertical-align: top; }
.ce-table input { width: 100%; box-sizing: border-box; min-width: 120px; }
.ce-compacte td:last-child { text-align: right; font-weight: 600; }
.ce-deux { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.ce-badge, .ce-classe, .ce-conf { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px;
  background: #eef0f2; }
.ce-s-desinscrit, .ce-s-rebond, .ce-s-bloque, .ce-c-negative, .ce-conf-faible { background: #fdecec; }
.ce-s-repondu, .ce-c-positive, .ce-conf-eleve, .ce-s-valide { background: #e7f5ec; }
.ce-s-quarantaine, .ce-conf-moyen, .ce-c-question { background: #fff4e5; }
/* Réponse à classer (chantier 21-ter) : ni positive ni négative, à lire. */
.ce-c-a_trier { background: #ece8f7; }
.ce-a-classer { margin: 4px 0; padding: 6px 8px; border-left: 3px solid #6b5ca5; background: #f6f4fb; font-size: .9em; }
.ce-a-classer p { margin: 2px 0; }
.ce-trancher { display: flex; flex-wrap: wrap; gap: 6px; }
.ce-c-sans_suite { background: #eef0f2; }

.ce-cartes { display: grid; gap: 10px; }
.ce-carte { padding: 10px 12px; border: 1px solid var(--line, #d9d4cc); border-radius: 8px; }
.ce-carte header { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ce-contenu { white-space: pre-wrap; max-height: 12em; overflow: auto; }
.ce-kv { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.ce-kv span { display: inline-block; min-width: 90px; color: var(--ardoise, #5b6470); }
.ce-rapport { padding-left: 18px; }
.ce-relance { padding: 6px 0; border-top: 1px dashed var(--line, #d9d4cc); }

/* Collecte web */
.ce-alerte.ce-ok-fond { background: #e7f5ec; border-color: #8fc9a5; }
.ce-actions.ce-gauche { justify-content: flex-start; }
.ce-sous-bloc { margin-top: 10px; padding: 6px 0; border-top: 1px dashed var(--line, #d9d4cc); }
.ce-sous-bloc summary { cursor: pointer; font-size: 14px; }
.ce-adresses { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.ce-adresses li { padding: 2px 0; }
.ce-adresses a { word-break: break-all; }
.ce-coll-en_cours, .ce-adr-importee { background: #e7f5ec; }
.ce-coll-pause, .ce-adr-quarantaine { background: #fff4e5; }
.ce-coll-annulee, .ce-adr-ecartee { background: #fdecec; }
.ce-coll-terminee { background: #e3ecf7; }

/* Mobile : les tableaux deviennent des cartes, l'intitulé de colonne vient
   de data-l. Les boutons gardent 40 px de hauteur pour le doigt. */
@media (max-width: 700px) {
  .ce-table thead { display: none; }
  .ce-table, .ce-table tbody, .ce-table tr, .ce-table td { display: block; width: 100%; box-sizing: border-box; }
  .ce-table tr { border: 1px solid var(--line, #e6e1d9); border-radius: 8px; margin-bottom: 8px; padding: 4px 0; }
  .ce-table td { border: 0; padding: 4px 10px; }
  .ce-table td[data-l]::before { content: attr(data-l); display: block; font-size: 12px; color: var(--ardoise, #5b6470); }
  .ce-compacte tr { display: flex; justify-content: space-between; }
  .ce-champ { min-width: 0; width: 100%; }
  .ce-barre > * { flex: 1 1 100%; }
  .ce-onglets a { padding: 10px 12px; }
  .ce-boutons .btn, .ce-actions .btn { min-height: 40px; }
}
