/* ==========================================================================
   Emailing de Roger sur le Mac au style d'Apple (carte systeme 583, etape 7) : emailing-mac.jsx. Rendu seulement sous la
   barre neuve du Mac (?barre). Meme architecture que l'Emailing du Mac d'aujourd'hui (emailing-view.jsx) : la liste (etats,
   projets, Registre, Nouvelle campagne, une carte par projet, une case par campagne), la fenetre d'une campagne (Details,
   Contacts, Boites, Test boites), les Parametres d'une campagne.
   Roger ne pose pas html.a-app : la base des briques est posee ici sur .emm et, tant que l'ecran est la (html.emm-html), sur
   les fenetres rendues dans <body> (fenetre d'une campagne, feuilles, menus, popovers, alertes, bandeau) ; 1rem = 13, le
   corps de macOS, par html.bm-mac (la barre). Les blocs de l'iPhone repris tels quels (roger-emailing.css, prefixe re-)
   prennent ici les mesures du Mac : marges a 0 dans la colonne (--a-marge), cartes rayon 12.
   Jetons --a-* seulement ; Papier le jour, Encre la nuit (prefers-color-scheme, apple.css).
   ========================================================================== */

/* fond Papier sur toute la zone de contenu, sans halo (Tito 27/11 : "sans") */
html.emm-html .app-scroll{background:var(--a-fond)}
html.emm-html .app-scroll::before{display:none}

/* ---------- base (l'ecran et ses fenetres rendues dans <body>) ---------- */
.emm,html.emm-html :is(.emm-fen-r,.a-feuille-r,.a-menu-r,.a-pop,.a-alerte-hote,.a-bandeau-hote){color:var(--a-t1);font-family:var(--a-police);
  font-size:1rem;line-height:1.294;letter-spacing:0;font-feature-settings:"kern";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
.emm{min-height:100%;background:var(--a-fond);-webkit-user-select:none;user-select:none}
:where(.emm,.emm-fen-r,html.emm-html .a-feuille-r,html.emm-html .a-pop) *,:where(.emm,.emm-fen-r,html.emm-html .a-feuille-r,html.emm-html .a-pop) *::before,
:where(.emm,.emm-fen-r,html.emm-html .a-feuille-r,html.emm-html .a-pop) *::after{box-sizing:border-box;-webkit-user-drag:none}
:where(.emm,.emm-fen-r,html.emm-html .a-feuille-r,html.emm-html .a-pop,html.emm-html .a-menu-r) :where(button,input,textarea,label,select){font-family:inherit;color:inherit;letter-spacing:inherit}
:where(.emm,.emm-fen-r,html.emm-html .a-feuille-r,html.emm-html .a-pop) :where(button){cursor:default}
:where(.emm,.emm-fen-r,html.emm-html .a-feuille-r,html.emm-html .a-pop) a{color:inherit;text-decoration:none}
:where(.emm,.emm-fen-r,html.emm-html .a-feuille-r,html.emm-html .a-pop) :where(input,textarea){-webkit-user-select:text;user-select:text}
:is(.emm,.emm-fen-r) :focus{outline:none}
:is(.emm,.emm-fen-r) :focus-visible{outline:3px solid color-mix(in srgb,var(--a-bleu) 55%,transparent);outline-offset:1px}
:is(.emm,.emm-fen-r) :where(input:not([type=checkbox],[type=radio]),textarea):focus-visible{outline:none}
.emm-pousse{flex:1 1 auto}
.emm-vert{color:color-mix(in srgb,var(--a-vert) 72%,var(--a-t1))}
.emm-rouge{color:var(--a-rouge)}
.emm-pale{color:var(--a-t2)}
.emm-pt{flex:none;display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--c,currentColor)}
/* un bouton capsule qui ouvre quelque chose reste marque tant que c'est ouvert */
:is(.emm,.emm-fen-r) .a-btn.a-on,:is(.emm,.emm-fen-r) .a-rond.a-on{background:var(--a-remplir3)}
.emm-attente{display:flex;justify-content:center;padding:96px 0}
.emm-attente--p{padding:14px 0}
.emm-frais{margin:0 4px 8px;text-align:right;color:var(--a-t2);font-size:.846rem}
/* petit bouton-symbole (menu d'une campagne, Renommer) */
.emm-ib{flex:none;display:grid;place-items:center;width:26px;height:26px;border:0;margin:0;padding:0;border-radius:7px;background:none;
  color:var(--a-t2);font-size:1rem;transition:background-color var(--a-duree-courte)}
.emm-ib:active{background:var(--a-remplir3)}
.emm-ib:disabled{opacity:.4}

/* ---------- segmentes de 28 (barre d'outils du Mac) : etats et projets, onglets d'une fenetre ; le nombre en gris ---------- */
.emm-seg.a-seg{height:28px;border-radius:14px}
.emm-seg .a-seg-pastille{border-radius:12px}
.emm-seg .a-seg-b{border-radius:12px;padding:0 14px}
.emm-seg .a-seg-b > .a-coupe{display:inline-flex;align-items:baseline;gap:6px;overflow:visible}
.emm-seg .a-seg-b b{font-weight:600;color:var(--a-t2);font-variant-numeric:tabular-nums}
.emm-seg .a-seg-b.a-on b{color:var(--a-t1)}
/* bouton menu du Mac (Registre) : le libelle puis le chevron */
.emm-menu-b > .sf{order:2;font-size:.7rem;color:var(--a-t2)}

/* ---------- la liste : colonne de 1200 (le tableau d'aujourd'hui), marges de 24 ---------- */
.emm-page{max-width:1248px;margin:0 auto;padding:18px 24px 96px}
.emm-outils{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-bottom:18px}
.emm .emm-outils > .a-btn{height:28px;padding:0 12px}

/* une carte (groupe insere du Mac : rayon 12, lisere d'un demi-point), son titre DANS la carte */
.emm-carte{position:relative;border-radius:12px;background:var(--a-carte);box-shadow:0 0 0 .5px var(--a-filet-fort),0 1px 2px rgba(17,17,17,.04);
  overflow:hidden;isolation:isolate}
.emm-pj + .emm-pj{margin-top:18px}
.emm-vide-c{padding:28px 0}
.emm-pj-t{display:flex;align-items:center;gap:9px;padding:13px 16px 11px;font-size:1.154rem;font-weight:700;letter-spacing:-.2px}
.emm-pj-t .na-lg{width:22px;height:22px;border-radius:6px}
.emm-pj-t .na-lg--mono{font-size:13px}
.emm-pj-nom{flex:1 1 auto;min-width:0;overflow-wrap:anywhere}
.emm-pj-n{flex:none;color:var(--a-t2);font-size:1rem;font-weight:400;font-variant-numeric:tabular-nums}
/* les campagnes en grille, filets entre les cases */
.emm-grille{display:grid;grid-template-columns:repeat(auto-fill,minmax(440px,1fr));margin:0 -1px -1px 0;border-top:1px solid var(--a-filet)}

/* ---------- une campagne : nom et etat, progression, Mail | Formulaire, pied ---------- */
.emm-camp{--a-vif:var(--a-cours);display:flex;flex-direction:column;gap:13px;min-width:0;padding:13px 16px 13px;background:var(--a-carte);
  border-right:1px solid var(--a-filet);border-bottom:1px solid var(--a-filet);transition:background-color .2s}
.emm-camp:active:not(:has(button:active)){background:var(--a-appui);transition:none}
.emm-camp--off{pointer-events:none}
.emm-camp-l1{display:flex;align-items:center;gap:10px;min-width:0}
.emm-camp-nom{flex:1 1 auto;min-width:0;font-size:1.077rem;font-weight:600;letter-spacing:-.15px;overflow-wrap:anywhere}
.emm-camp-l1 .re-etat{font-size:.923rem}
.emm-camp-l1 .emm-ib{margin:-3px -6px -3px -2px}
.emm-prog{display:flex;flex-direction:column;gap:6px}
/* une jauge : libelle et "fait / total" sur une ligne, la barre dessous */
.emm-j{display:flex;flex-direction:column;gap:5px;min-width:0}
.emm-jl{display:flex;justify-content:space-between;align-items:baseline;gap:8px;color:var(--a-t2);font-size:.923rem;font-variant-numeric:tabular-nums}
.emm-jl--fort{font-weight:600}
.emm-jv{white-space:nowrap}
.emm-jv b{color:var(--a-t1);font-weight:600}
.emm-jv small{color:var(--a-t2);font-size:inherit;font-weight:400}
.emm-canaux{display:grid;grid-template-columns:minmax(0,1fr);gap:14px 26px}
.emm-canaux--2{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.emm-canal{display:flex;flex-direction:column;gap:9px;min-width:0}
.emm-fini{opacity:.5}
.emm-canal-t{display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-weight:600}
.emm-canal-t small{color:var(--a-t2);font-size:.846rem;font-weight:400}
.emm-camp-pied{display:flex;flex-wrap:wrap;align-items:center;gap:4px 16px;padding-top:10px;border-top:1px solid var(--a-filet);
  color:var(--a-t2);font-size:.923rem;font-variant-numeric:tabular-nums}
.emm-camp-pied b{color:var(--a-t1);font-weight:600}
.emm-camp-pied b.emm-vert{color:color-mix(in srgb,var(--a-vert) 72%,var(--a-t1))}
.emm-camp-pied b.emm-rouge{color:var(--a-rouge)}
.emm-camp-fin{margin-left:auto}

/* ---------- les menus de l'ecran (actions, Registre, filtres des contacts) ---------- */
.re-menu-f .a-menu-l{padding-top:2px;padding-bottom:2px}
.re-mi{display:inline-flex;align-items:center;gap:8px}
.re-mi b{margin-left:6px;color:var(--a-t2);font-weight:500;font-variant-numeric:tabular-nums}
.a-menu-l.a-actif .re-mi b{color:inherit}

/* ---------- fenetre centree (une campagne, une boite) : la feuille centree des briques, sous les surfaces (z 78) ---------- */
.emm-fen-r{position:fixed;inset:0;z-index:78;pointer-events:none}
.emm-fen-r > *{pointer-events:auto}
.emm-fen-r.a-on .a-feuille--centre{opacity:1;transform:translate(-50%,-50%)}
.a-feuille.a-feuille--centre.emm-fen{--a-marge:0px;width:min(760px,calc(100vw - 48px));max-height:calc(100vh - 48px);display:flex;flex-direction:column;
  overflow:hidden;touch-action:auto}
.a-feuille.a-feuille--centre.emm-fen-c{height:min(820px,calc(100vh - 48px))}

.emm-f-tete{flex:none;display:flex;flex-direction:column;align-items:flex-start;gap:12px;padding:16px 20px 14px;border-bottom:1px solid var(--a-filet)}
.emm-f-l1{align-self:stretch;display:flex;align-items:flex-start;gap:12px}
.emm-f-qui{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:4px}
.emm-f-nom{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px}
.emm-f-nom > span:first-child{font-size:1.308rem;line-height:1.25;font-weight:700;letter-spacing:-.2px;overflow-wrap:anywhere}
.emm-f-plein{color:var(--a-t2);font-size:.923rem;overflow-wrap:anywhere}
.emm-f-corps{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px 20px 24px}

/* Details : des cases par bloc (vue d'ensemble, Mail, Formulaire) */
.emm-details{display:flex;flex-direction:column;gap:20px}
.emm-bloc{display:flex;flex-direction:column;gap:8px}
.emm-bloc-t{display:flex;align-items:center;gap:7px;margin:0 2px;font-size:1.077rem;font-weight:700;letter-spacing:-.15px}
.emm-bloc-t .sf{font-size:1rem}
.emm-tuiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.emm-tu{display:flex;flex-direction:column;gap:2px;min-width:0;padding:9px 12px 10px;border-radius:10px;background:var(--a-carte);
  box-shadow:0 0 0 .5px var(--a-filet-fort)}
.emm-tu-l{color:var(--a-t2);font-size:.923rem}
.emm-tu-v{font-size:1.231rem;line-height:1.3;font-weight:600;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.emm-tu-v.emm-vert{color:color-mix(in srgb,var(--a-vert) 72%,var(--a-t1))}
.emm-tu-s{color:var(--a-t2);font-size:.846rem;line-height:1.3}

/* une boite d'envoi : en-tete (retour ou fermer, adresse, connexion, etat), onglets, cases et lignes */
.emm-bx{display:flex;flex-direction:column;align-items:stretch;gap:14px}
.emm-bx > .emm-seg{align-self:flex-start}
.emm-bx-t{display:flex;align-items:center;gap:12px}
.emm-bx-qui{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:3px}
.emm-bx-nom{font-size:1.154rem;font-weight:700;overflow-wrap:anywhere}
.emm-bx-etat{display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px;color:var(--a-t2);font-size:.923rem}
.emm-bx-actif{display:inline-flex;align-items:center;gap:6px}
.emm-kvs{border-radius:12px;background:var(--a-carte);box-shadow:0 0 0 .5px var(--a-filet-fort);overflow:hidden}
.emm-kv{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:34px;padding:6px 12px}
.emm-kv + .emm-kv,.emm-bx-c + .emm-bx-c{border-top:1px solid var(--a-filet)}
.emm-kv > span:first-child{flex:none;color:var(--a-t2)}
.emm-kv > span:last-child{min-width:0;text-align:right;overflow-wrap:anywhere}
.emm-kv-pas{display:inline-flex;align-items:center;gap:12px;font-variant-numeric:tabular-nums}
.emm-bx-c{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;padding:9px 12px}
.emm-bx-cn{flex:1 1 220px;min-width:0;font-weight:600;overflow-wrap:anywhere}
.emm-bx-cp{display:flex;flex-wrap:wrap;gap:6px}
.emm-bx-cp .emm-pt{width:6px;height:6px;margin-right:2px;background:currentColor}
.emm-bx-a{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.emm-bx-a--sep{padding-top:14px;border-top:1px solid var(--a-filet)}

/* un contact : popover du Mac cale sur sa ligne */
.emm-pop.a-pop{width:440px;max-width:min(440px,calc(100vw - 16px))}
.emm-ct{display:flex;flex-direction:column;gap:8px;max-height:min(520px,calc(100vh - 160px));overflow-y:auto;overscroll-behavior:contain}
.emm-ct-s{color:var(--a-t2);font-size:.923rem;overflow-wrap:anywhere}
.emm-ct-t{margin-top:4px;color:var(--a-t2);font-size:.846rem;font-weight:600}
.emm-ct-b{padding:8px 10px;border-radius:8px;background:var(--a-carte2);overflow-wrap:anywhere;-webkit-user-select:text;user-select:text}
.emm-ct-m{white-space:pre-wrap;line-height:1.45}
.emm-ct-a{display:flex;justify-content:flex-end;margin-top:4px}

/* ---------- les Parametres : la colonne d'Apple ---------- */
.emm-col{--a-marge:0px;max-width:908px;margin:0 auto;padding:14px 24px 96px}
.emm-p-haut{margin-bottom:12px}
.emm .emm-p-haut .a-btn{height:28px;padding:0 12px 0 8px}
.emm-p-tete{padding:14px 16px 16px}
.emm-p-l1{display:flex;align-items:flex-start;gap:12px}
.emm-p-qui{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:6px}
.emm-p-nom{display:flex;align-items:center;gap:6px}
.emm-p-nom > span{min-width:0;font-size:1.308rem;line-height:1.25;font-weight:700;letter-spacing:-.2px;overflow-wrap:anywhere}
.emm-p-etat{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px}
.emm-pa-violet{--a-pa-c:var(--a-violet)}
.emm-pa-violet .emm-pt{width:6px;height:6px;background:var(--a-violet)}
.emm-p-tete .re-canaux{margin-top:14px}
.emm-p-onglets{margin:18px 0 14px}
.emm-p-corps{padding-bottom:8px}

/* ---------- les blocs de l'iPhone repris ici (roger-emailing.css) : mesures du Mac ----------
   Dans l'ecran, la fenetre et les feuilles ouvertes depuis l'Emailing du Mac (html.emm-html) : controles de 24 a 28, lignes de
   36, cartes rayon 12, segmentes a la largeur de leurs libelles, boutons du bas a droite (l'action principale au bout). */
:is(.emm,.emm-fen) .re-carte{border-radius:12px;box-shadow:0 0 0 .5px var(--a-filet-fort)}
:is(.emm,.emm-fen) .re-carte > * + *::after{left:12px;right:12px}
html.emm-html :is(.re-filtres){align-items:flex-start;margin-top:0}
html.emm-html .re-filtres--sous{margin-top:12px}
html.emm-html .re-filtres .a-seg{height:28px;border-radius:14px}
html.emm-html .re-filtres .a-seg-b{border-radius:12px;padding:0 14px}
html.emm-html .re-cherche{margin-top:12px}
html.emm-html .re-cherche .a-rech{max-width:360px}
html.emm-html .re-filtre{height:28px;border-radius:14px;font-size:.923rem;letter-spacing:0}
html.emm-html .re-filtre.a-on{background:var(--a-remplir3)}
html.emm-html .re-ligne{min-height:36px;padding:8px 12px 9px;gap:10px}
html.emm-html .re-ligne-s{font-size:.923rem;letter-spacing:0}
html.emm-html .re-puces{margin-top:2px}
/* une ligne de contact : l'adresse a gauche, ses etiquettes a droite, le detail dessous (le tableau d'aujourd'hui) */
html.emm-html .re-ligne-c:has(> .re-puces){flex-direction:row;flex-wrap:wrap;align-items:center;column-gap:12px;row-gap:2px}
html.emm-html .re-ligne-c:has(> .re-puces) > .re-ligne-t{flex:1 1 240px;min-width:0}
html.emm-html .re-ligne-c:has(> .re-puces) > .re-puces{order:1;margin:0}
html.emm-html .re-ligne-c:has(> .re-puces) > .re-ligne-s{order:2;flex:1 1 100%}
html.emm-html .re-canal{height:28px;border-radius:14px}
html.emm-html .re-canal-b{height:28px;padding:0 12px;font-size:1rem;letter-spacing:0}
html.emm-html .re-canal-x{height:28px;width:24px}
html.emm-html .re-nb{width:56px;height:24px;margin:0;padding:0 6px;border-radius:6px;font-size:1rem;text-align:right}
html.emm-html .re-plage .re-nb{width:48px}
html.emm-html .re-jours{justify-content:flex-start;gap:6px}
html.emm-html .re-jour{width:28px;height:28px;font-size:.923rem}
html.emm-html .re-puce{height:24px;min-width:28px;padding:0 10px;border-radius:12px;font-size:.923rem}
html.emm-html .re-chip{height:24px;padding:0 10px;border-radius:12px}
html.emm-html .re-ico{width:24px;height:24px;font-size:1rem}
html.emm-html .re-bas{display:flex;justify-content:flex-end;gap:8px}
html.emm-html .re-bas--2{flex-direction:row-reverse;justify-content:flex-start}
html.emm-html .re-bas .a-btn{height:28px;min-height:28px;padding:0 14px;white-space:nowrap}
html.emm-html .re-actions .a-btn,html.emm-html .re-selrow .a-btn{height:24px}
:is(.emm,.emm-fen) .a-sect{margin-left:2px;margin-right:2px}
/* texte de 10 au moins sur le Mac (separateur des blocs, "Enregistre") */
html.emm-html :is(.re-sep-b,.re-fait){font-size:.846rem}

/* survol (souris seulement) : decor, jamais une information */
@media (hover:hover) and (pointer:fine){
  .emm-camp:hover{background:color-mix(in srgb,var(--a-appui) 50%,var(--a-carte))}
  .emm-ib:hover{background:var(--a-remplir2);color:var(--a-t1)}
}
@media (prefers-reduced-motion:reduce){
  .emm-camp{transition:none}
}
