/* 14/10/2026 · Mails v3, l'ergonomie de Gmail dans la DA des applications (maquette validée par François : « là c'est excellent !!! »).
   Référence : ~/fransou-enligne-12oct/maquettes/mails-14oct/mails-v3.html. Tout est sous .gm-page : aucune autre page n'est touchée.
   Couleurs : les jetons en place (--cm-text, --cm-muted, --cm-cyan, --cm-amber, --vert), rien d'inventé. */
.gm-page .gm { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 28px; margin-top: 18px; align-items: start; }
.gm-page .gm-nav { position: sticky; top: 18px; display: flex; flex-direction: column; gap: 2px; }
.gm-page .gm-nav .plein { align-self: flex-start; margin-bottom: 18px; display: inline-flex; align-items: center; gap: 8px; }
.gm-page .gm-nav-l { display: flex; align-items: center; gap: 14px; height: 40px; padding: 0 14px; border-radius: 20px; font-size: 15px; color: var(--cm-text); text-decoration: none; }
.gm-page .gm-nav-l svg { color: var(--cm-muted); flex: none; }
.gm-page .gm-nav-l .n { margin-left: auto; font-size: 13px; color: var(--cm-muted); font-variant-numeric: tabular-nums; }
.gm-page .gm-nav-l.on { background: rgba(143,221,217,.14); font-weight: 650; }
.gm-page .gm-nav-l.on svg, .gm-page .gm-nav-l.on .n { color: var(--cm-cyan); }
.gm-page .gm-nav-l:not(.on):hover { background: rgba(255,255,255,.04); }
.gm-page .gm-boites { margin-top: 26px; padding: 0 14px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--cm-muted); }
.gm-page .gm-boites .etiq { margin-bottom: 2px; }
.gm-page .gm-boites div { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gm-page .gm-boites div span { overflow: hidden; text-overflow: ellipsis; }
.gm-page .gm-boites i { width: 7px; height: 7px; border-radius: 50%; background: var(--vert); flex: none; }
.gm-page .gm-boites i.lit { background: var(--cm-amber); }
.gm-page .gm-boites a { color: var(--cm-cyan); text-decoration: none; font-weight: 600; margin-top: 2px; }

/* la barre au-dessus de la liste */
.gm-page .gm-main { min-width: 0; }
.gm-page .gm-outils { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 8px 0 6px; color: var(--cm-muted); font-size: 13px; }
.gm-page .gm-outils .compte { margin-left: auto; }
.gm-page .gm-ic { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--cm-muted); background: none; border: 0; padding: 0; cursor: pointer; flex: none; }
.gm-page .gm-ic:hover { background: rgba(255,255,255,.07); color: var(--cm-text); }
.gm-page .gm-ic[disabled] { opacity: .3; pointer-events: none; }
.gm-page .gm-lea { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--cm-muted); padding: 2px 14px 12px; line-height: 1.45; }
.gm-page .gm-lea b { color: var(--cm-text); font-weight: 600; }
.gm-page .gm-lea a, .gm-page .gm-lea button.lien { color: var(--cm-cyan); text-decoration: none; font-weight: 600; white-space: nowrap; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.gm-lea-av { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: #e6e9ea; background: radial-gradient(circle at 30% 30%, #2b3b44, #101a20); border: 1px solid rgba(143,221,217,.6); flex: none; }

/* retrouver un mail, discret, comme la recherche de Gmail */
.gm-page .gm-cherche { display: flex; align-items: center; gap: 8px; height: 36px; width: min(340px, 40%); margin: 0 0 0 6px !important; padding: 0 12px !important; border-radius: 18px !important; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); color: var(--cm-muted); box-shadow: none; }
.gm-page .gm-cherche:focus-within { border-color: rgba(143,221,217,.45); }
.gm-page .gm-cherche input, .gm-page.mc-page #mails-q { flex: 1; min-width: 0; height: 34px; min-height: 0; border: 0 !important; background: none !important; padding: 0 !important; font-size: 14px; color: var(--cm-text); outline: none !important; box-shadow: none !important; }

/* les catégories, comme les onglets de Gmail : seulement celles que le tri sait remplir */
.gm-page .gm-cats { display: flex; gap: 2px; border-bottom: 1px solid rgba(255,255,255,.07); overflow-x: auto; scrollbar-width: none; }
.gm-page .gm-cats::-webkit-scrollbar { display: none; }
.gm-page .gm-cat { flex: none; height: 46px; padding: 0 14px; font-size: 14.5px; color: var(--cm-muted); border: 0; border-bottom: 3px solid transparent; border-radius: 10px 10px 0 0; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; background: none; cursor: pointer; font-family: inherit; }
.gm-page .gm-cat .n { font-size: 12.5px; color: var(--cm-muted); opacity: .8; font-variant-numeric: tabular-nums; }
.gm-page .gm-cat.on { color: var(--cm-text); font-weight: 650; border-bottom-color: var(--cm-cyan); }
.gm-page .gm-cat:not(.on):hover { color: var(--cm-text); }

/* la liste : une ligne par mail, toute la largeur */
.gm-page .gm-l { display: grid; grid-template-columns: 200px minmax(0, 1fr) 92px; gap: 18px; align-items: center; height: 52px; padding: 0 14px; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 15px; color: var(--cm-muted); cursor: pointer; position: relative; text-decoration: none; }
.gm-page .gm-l .qui { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--cm-text); }
.gm-page .gm-l.nonlu .qui, .gm-page .gm-l.nonlu .obj { font-weight: 700; }
.gm-page .gm-l .gm-txt { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-page .gm-l .obj { color: var(--cm-text); }
.gm-page .gm-l .ext { color: var(--cm-muted); }
.gm-page .gm-l .h { text-align: right; font-size: 13.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gm-page .gm-l.nonlu .h { color: var(--cm-text); font-weight: 600; }
.gm-page .gm-l .gm-pji { color: var(--cm-muted); vertical-align: -3px; margin-left: 6px; }
.gm-page .gm-l.courant { box-shadow: inset 3px 0 0 var(--cm-cyan); }
.gm-page .gm-l.part { opacity: .35; transition: opacity .2s; }
.gm-page .gm-puce { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; font-weight: 600; margin-right: 8px; vertical-align: 1px; color: var(--cm-cyan); background: rgba(143,221,217,.1); border: 0; font-family: inherit; cursor: pointer; }
.gm-page .gm-puce.ambre { color: var(--cm-amber); background: rgba(230,188,135,.12); }
.gm-page .gm-puce.gris { color: var(--cm-muted); background: rgba(255,255,255,.06); }
.gm-page .gm-puce:hover { box-shadow: inset 0 0 0 1px currentColor; }
.gm-page .gm-actions { display: none; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); gap: 2px; }
.gm-page .gm-actions .gm-ic { color: var(--cm-text); }
@media (hover: hover) and (pointer: fine) {
  .gm-page .gm-l:hover { background: rgba(255,255,255,.04); }
  .gm-page .gm-l:hover .gm-actions, .gm-page .gm-l.courant .gm-actions { display: flex; }
  .gm-page .gm-l:hover .h, .gm-page .gm-l.courant .h { visibility: hidden; }
}
.gm-page .gm-sep { padding: 22px 14px 8px; font-size: 13px; font-weight: 600; color: var(--cm-muted); border-bottom: 1px solid rgba(255,255,255,.07); }
.gm-page .gm-rien { padding: 48px 14px; text-align: center; color: var(--cm-muted); font-size: 15px; line-height: 1.6; }
.gm-page .gm-rien b { display: block; color: var(--cm-text); font-size: 17px; margin-bottom: 4px; }
.gm-page .gm-ini { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; color: #e6e9ea; background: radial-gradient(circle at 30% 30%, #2b3b44, #101a20); border: 1px solid rgba(255,255,255,.14); flex: none; }

/* le choix d'une catégorie : petit menu au bureau, feuille au téléphone */
.gm-feuille { position: fixed; z-index: 60; width: 270px; background: #17242c; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 12px 6px 6px; box-shadow: 0 22px 50px rgba(0,0,0,.5); display: flex; flex-direction: column; }
.gm-feuille b { font-size: 13.5px; color: var(--cm-muted, #aabac0); font-weight: 600; padding: 0 10px 8px; line-height: 1.4; }
.gm-feuille button { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 10px; border-radius: 10px; font-size: 15px; color: var(--cm-text, #f1f2ef); text-align: left; background: none; border: 0; cursor: pointer; font-family: inherit; }
.gm-feuille button:hover { background: rgba(255,255,255,.06); }
.gm-feuille button.on { background: rgba(143,221,217,.14); font-weight: 650; color: var(--cm-cyan, #8fddd9); }
.gm-toast { position: fixed; left: 40px; bottom: 90px; z-index: 61; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: #f1f2ef; color: #0d171c; font-size: 15px; box-shadow: 0 18px 40px rgba(0,0,0,.4); max-width: calc(100vw - 32px); }
.gm-toast .gm-lea-av { border-color: #0d171c; }
.gm-toast button { color: #0b5f5b; font-weight: 700; background: none; border: 0; padding: 0; margin-left: 6px; font: inherit; font-weight: 700; cursor: pointer; }

/* la lecture : à la place de la liste */
.gm-page .gm-lec { max-width: 860px; }
.gm-page .gm-lec-outils { display: flex; align-items: center; gap: 4px; height: 44px; color: var(--cm-muted); font-size: 13px; }
.gm-page .gm-lec-outils .compte { margin-left: auto; margin-right: 4px; }
.gm-page .gm-lec h1 { font-size: 26px; font-weight: 700; color: var(--cm-text); line-height: 1.3; margin: 10px 0 12px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.gm-page .gm-lec h1 .gm-puce { vertical-align: 5px; margin-left: 10px; }
.gm-page .gm-lec .gm-lea { padding: 0 0 22px; font-size: 15px; align-items: flex-start; }
.gm-page .gm-lec .gm-lea > span:last-child { min-width: 0; }
.gm-page .gm-de { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.gm-page .gm-de b { font-size: 15.5px; color: var(--cm-text); }
.gm-page .gm-de .mail { font-size: 13.5px; color: var(--cm-muted); margin-left: 6px; overflow-wrap: anywhere; }
.gm-page .gm-de .pour { display: block; font-size: 13.5px; color: var(--cm-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-page .gm-de time { font-size: 13.5px; color: var(--cm-muted); white-space: nowrap; }
.gm-page .gm-texte { margin: 18px 0 0 54px; font-size: 16px; line-height: 1.65; color: var(--cm-text); max-width: 680px; white-space: pre-wrap; overflow-wrap: anywhere; }
.gm-page .gm-replie { color: var(--cm-muted); font-size: 15px; line-height: 1.6; white-space: normal; }
.gm-page .gm-replie button { color: var(--cm-cyan); font-weight: 600; white-space: nowrap; background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer; }
.gm-page .gm-pjs { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 0 54px; }
.gm-page .gm-pjc { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 8px 6px 8px; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); font-size: 14px; color: var(--cm-text); }
.gm-page .gm-pjc .t { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--cm-amber); background: rgba(230,188,135,.12); flex: none; }
.gm-page .gm-pjc small { color: var(--cm-muted); font-size: 12.5px; }
.gm-page .gm-pjc .creux { height: 32px; padding: 0 14px; font-size: 13.5px; margin-left: 6px; }
.gm-page .gm-repondre { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 26px 0 0 54px; }
.gm-page .gm-repondre .creux { display: inline-flex; align-items: center; gap: 8px; }
.gm-page .gm-prets { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 !important; }
.gm-page .gm-ou { color: var(--cm-muted); font-size: 13.5px; }
.gm-page .gm-prets .filtre { height: 34px; font-size: 14px; padding: 0 16px; }

/* la réponse, sous le mail, comme Gmail */
.gm-page .gm-rep { margin: 28px 0 0 54px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; padding: 14px 18px 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 18px 40px rgba(0,0,0,.25); }
.gm-page .gm-rep-tete { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--cm-muted); min-width: 0; }
.gm-page .gm-rep-tete b { color: var(--cm-text); }
.gm-page .gm-rep-tete .depuis { margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gm-page .gm-rep textarea { width: 100%; resize: vertical; min-height: 205px; border: 0 !important; background: none !important; padding: 4px 0; font: 400 16px/1.7 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif; color: var(--cm-text); outline: none; box-shadow: none !important; }
.gm-page .gm-rep-pied { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gm-page .gm-rep-pied .note { color: var(--cm-muted); }
.gm-page .gm-rep-pied .plein[disabled] { opacity: .45; }
.gm-page .gm-envoye { color: var(--vert); font-weight: 600; }

/* le chat : une barre fine en bas, toujours là */
.gm-page .gm-chat { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(640px, calc(100vw - 32px)); display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 6px 0 10px; border-radius: 24px; background: rgba(23,36,44,.92); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 16px 40px rgba(0,0,0,.35); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); z-index: 50; margin: 0; }
.gm-page .gm-chat input { flex: 1; min-width: 0; height: 40px; border: 0 !important; background: none !important; font-size: 15px; color: var(--cm-text); outline: none; padding: 0 !important; box-shadow: none !important; }
.gm-page .gm-chat .go { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--cm-amber); color: #1a1409; flex: none; border: 0; cursor: pointer; padding: 0; }
.gm-page .gm-demo { text-align: center; font-size: 12.5px; color: var(--cm-muted); margin-top: 36px; }
.gm-page .gm-pied { height: 96px; }

/* l'état sans boîte */
.gm-page .gm-vide { max-width: 460px; margin: 70px auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.gm-page .gm-vide h2 { font-size: 24px; font-weight: 700; color: var(--cm-text); }
.gm-page .gm-vide p { font-size: 16px; line-height: 1.6; color: var(--cm-muted); }
.gm-page .gm-vide .gestes { justify-content: center; flex-wrap: wrap; margin-top: 8px; }

@media (min-width: 761px) { .gm-page .gm-l .gm-ini, .gm-page .gm-l .ext-tel { display: none; } }
@media (max-width: 760px) {
  .gm-page { padding: 0 14px 110px; }
  .gm-page .tete-action .gestes { display: none; }
  .gm-page .gm { grid-template-columns: minmax(0, 1fr); margin-top: 6px; gap: 0; }
  .gm-page .gm-nav { position: static; flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 8px; }
  .gm-page .gm-nav::-webkit-scrollbar { display: none; }
  .gm-page .gm-nav .plein, .gm-page .gm-boites { display: none; }
  .gm-page .gm-nav-l { flex: none; height: 36px; padding: 0 14px; border: 1px solid rgba(255,255,255,.12); font-size: 14px; gap: 8px; }
  .gm-page .gm-nav-l svg { display: none; }
  .gm-page .gm-nav-l .n { margin-left: 2px; }
  .gm-page .gm-outils { display: none; }
  .gm-page .gm-lea { padding: 6px 0 12px; font-size: 14px; align-items: flex-start; }
  .gm-page .gm-l { grid-template-columns: 38px minmax(0, 1fr) auto; grid-template-rows: auto auto auto; column-gap: 12px; row-gap: 1px; height: auto; padding: 12px 0; }
  .gm-page .gm-actions { display: none !important; }
  .gm-page .gm-l .gm-ini { grid-row: 1 / 4; width: 38px; height: 38px; font-size: 13px; align-self: start; }
  .gm-page .gm-l .qui { grid-column: 2; grid-row: 1; font-size: 15.5px; }
  .gm-page .gm-l .h { grid-column: 3; grid-row: 1; visibility: visible !important; }
  .gm-page .gm-l .gm-txt { grid-column: 2 / 4; grid-row: 2; white-space: nowrap; }
  .gm-page .gm-l .gm-txt .ext { display: none; }
  .gm-page .gm-l .ext-tel { display: block; grid-column: 2 / 4; grid-row: 3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; color: var(--cm-muted); }
  .gm-page .gm-sep { padding: 18px 0 8px; }
  .gm-page .gm-rien { padding: 36px 0; }
  .gm-page .gm-lec h1 { font-size: 22px; margin-top: 8px; }
  .gm-page .gm-texte, .gm-page .gm-pjs, .gm-page .gm-prets, .gm-page .gm-repondre, .gm-page .gm-rep { margin-left: 0 !important; }
  .gm-page .gm-prets { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; }
  .gm-page .gm-prets .filtre { flex: none; }
  .gm-page .gm-ou { display: none; }
  .gm-page .gm-rep { padding: 12px 14px; }
  .gm-page .gm-rep textarea { min-height: 150px; }
  .gm-page .gm-rep-pied .note, .gm-page .gm-rep-tete .depuis { display: none; }
  .gm-page .gm-rep-pied .plein { margin-left: auto; }
  .gm-page .gm-chat { bottom: 12px; }
  .gm-page .gm-cats { margin: 0 -14px; padding: 0 8px; }
  .gm-page .gm-cat { height: 42px; font-size: 14px; padding: 0 10px; }
  .gm-page .gm-replie { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .gm-page .gm-lec-outils .compte { display: none; }
  .gm-page.en-lecture .gm-nav { display: none; }
  .gm-page .gm-de .mail { display: none; }
  .gm-page .gm-de time { align-self: start; font-size: 13px; }
  .gm-page .gm-l .gm-pji { display: none; }
  .gm-feuille { left: 8px !important; right: 8px; top: auto !important; bottom: 8px; width: auto; border-radius: 22px; padding: 18px 10px 10px; }
  .gm-feuille button { height: 46px; font-size: 15.5px; }
  .gm-toast { left: 12px; right: 12px; bottom: 72px; font-size: 14.5px; }
}

/* le chat de la page est la barre du bas : la bulle ronde n'a pas de sens ici ; le brouillon reste une feuille sans cadre au focus */
body:has(.gm-page) #fransou-lateral, body:has(.gm-page) #fi-conversations, body:has(.gm-page) .citation { display: none !important; }
.gm-page .gm-rep textarea:focus, .gm-page .gm-rep textarea:focus-visible, .gm-page .gm-chat input:focus, .gm-page .gm-chat input:focus-visible { outline: none !important; box-shadow: none !important; border: 0 !important; }
.gm-page .gm-rep:focus-within { border-color: rgba(143,221,217,.45); }

/* le harnais du marketing compose aussi /mails (classe mc-page, attendue par ses bancs) : l'écran v3 garde ses propres mesures, celles de la maquette */
.gm-page.mc-page { max-width: none; overflow-wrap: normal; }
.gm-page.mc-page .haut { margin-bottom: 28px; padding-bottom: 24px; }
.gm-page.mc-page > .tete-action { margin: 6px 0 0 !important; align-items: flex-end; gap: 20px; }
.gm-page.mc-page > .tete-action .titre { font-size: 30px !important; line-height: 34.5px; letter-spacing: -0.9px; max-width: 860px; }
body.cm-active .gm-page.mc-page .plein, body.cm-active .gm-page.mc-page .creux { border-radius: 22px; font-size: 15px; }
body.cm-active .gm-page.mc-page .plein { border: 0; box-shadow: none; }
body.cm-active .gm-page.mc-page .creux { border: 1px solid rgba(255,255,255,.14); }
body.cm-active .gm-page.mc-page .filtre { font-size: 14px; border: 1px solid rgb(53,69,77); color: rgb(241,242,239); background: rgba(23,36,44,.72); }
.gm-page.mc-page .gestes { gap: 10px; }
.gm-page.mc-page .filtres { gap: 8px; margin-bottom: 0; }
.gm-page.mc-page #mail-reponse { margin: 28px 0 0 54px; padding: 14px 18px 14px; border-radius: 18px; }
.gm-page.mc-page #mail-brouillon { min-height: 205px; width: 100%; margin-top: 0; padding: 4px 0 !important; font: 400 16px/1.7 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif; }
@media (max-width: 760px) {
  .gm-page.mc-page #mail-reponse { margin-left: 0; padding: 12px 14px; }
  .gm-page.mc-page #mail-brouillon { min-height: 150px; }
}
