/* Colonne DANG du bureau (plan « DANG : la messagerie partout », lot L2).
   Composant : public/js/dang-colonne.js. Aucune classe ne contient le mot
   « overlay » (version-check.js gèle les mises à jour sinon).

   Un rail d'avatars de 68 px (maquettes, écrans 1 à 4). Repliée : il ne reste
   que la languette « ‹ DANG » au bord droit, rien ne rétrécit (--dang-w:0,
   décision D1). Déployée au survol : PAR-DESSUS le travail. Gardée ouverte :
   elle prend sa place (--dang-w:68px) et le travail se décale.

   Couleurs : UNIQUEMENT les jetons de la coquille (shell.css, --gs-*), qui
   basculent seuls en sombre — Thierry, 20/11 : la languette beige à texte brun
   (#4d3f1c, moutarde #8a6d2f en sombre) était hors de la DA de GANDALF. La
   languette est un morceau du rail : ivoire du rail, encre, chevron doré. */
@media (min-width:861px){
    body.shell-on.dang-on{--dang-w:0px}
    body.shell-on.dang-on.dang-epinglee{--dang-w:68px}
}

.dang-colonne{position:fixed;top:0;right:0;bottom:0;width:68px;z-index:100;
    transform:translateX(100%);transition:transform .18s ease,box-shadow .18s ease;
    background:var(--gs-rail-bg,#f4efe6);border-left:1px solid var(--gs-line,#e2dccf);
    color:var(--gs-ink,#241f16);font-family:inherit}
/* Déployée : au-dessus du quai (10050) pour ne pas finir sous ses vignettes,
   sous la salle d'appel (10070), les annonces et les volets entrants. */
.dang-colonne.dang-deployee{transform:none;z-index:10055;
    box-shadow:-10px 0 28px rgba(20,17,12,.14)}
body.dang-epinglee .dang-colonne{transform:none;box-shadow:none}
/* Déroulée au survol, la colonne couvrait les fenêtres de conversation du quai
   (ticket 5UmY38h8O0q9RiFh5uSV) : le quai glisse à sa gauche, du même pas
   qu'elle, et revient au bord quand elle se replie. Gardée ouverte, --dang-w
   le décale déjà (shell.css). */
@media (min-width:861px){
    body.shell-on.dang-on .gq-quai{transition:right .18s ease}
    body.shell-on.dang-on.dang-deroulee:not(.dang-epinglee) .gq-quai{right:calc(12px + 68px)}
}
@media (prefers-reduced-motion:reduce){body.shell-on.dang-on .gq-quai{transition:none}}


@media (max-width:860px){.dang-colonne{display:none}}
@media (prefers-reduced-motion:reduce){.dang-colonne{transition:none}}

/* Le bord droit (barre des tâches masquée, dang-colonne.js) : 3 px au-dessus
   des apps embarquées, qui avaleraient la souris. Avec une barre de défilement
   à droite de la page, c'est elle le bord : le capteur s'efface (dang-barre). */
.dang-bord{position:absolute;right:100%;top:0;bottom:0;width:3px}
.dang-colonne.dang-deployee .dang-bord,body.dang-epinglee .dang-bord,.dang-colonne.dang-barre .dang-bord{display:none}

/* La languette (écran 3) : le seul morceau visible replié, à mi-hauteur. */
.dang-languette{position:absolute;right:100%;top:50%;margin-top:-52px;width:20px;height:104px;padding:0;
    border:1px solid var(--gs-line-strong);border-right:0;border-radius:10px 0 0 10px;box-sizing:border-box;
    background:var(--gs-rail-bg);color:var(--gs-ink);cursor:pointer;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
    font:700 9.5px/1 Inter,system-ui,sans-serif;box-shadow:-2px 0 10px rgba(40,34,24,.12)}
.dang-languette:hover,.dang-languette:focus-visible{background:var(--gs-rail-panel-2)}
.dang-languette:focus-visible{outline:2px solid var(--gs-accent);outline-offset:1px}
.dang-chevron{font-size:13px;color:var(--gs-accent)}
.dang-mot{writing-mode:vertical-rl;letter-spacing:.12em}
/* La pastille vit DANS la languette, au-dessus du chevron, centrée sur la même
   colonne (ticket GAOIB1C9NRPaizcZWKjp) : plus de rond à cheval sur le coin.
   Taille à la mesure des 19 px utiles de la languette, « 99+ » compris. */
.dang-cnt{flex:none;min-width:15px;max-width:19px;height:15px;padding:0 1px;border-radius:8px;
    font:700 8.5px/15px Inter,system-ui,sans-serif;letter-spacing:-.05em;text-align:center;white-space:nowrap;
    background:var(--gs-crit);color:#fff;box-sizing:border-box}
.dang-cnt.hidden{display:none}
.dang-colonne.dang-deployee .dang-languette,body.dang-epinglee .dang-languette{display:none}

/* Le rail. */
.dang-rail{position:relative;height:100%;display:flex;flex-direction:column;align-items:center;gap:10px;padding:12px 0 12px}
.dang-pli{position:absolute;left:-13px;top:50%;margin-top:-26px;width:13px;height:52px;padding:0;cursor:pointer;
    background:var(--gs-rail-bg,#f4efe6);border:1px solid var(--gs-line,#e2dccf);border-right:0;border-radius:8px 0 0 8px;
    color:var(--gs-ink-dim,#7d7466);font-size:11px;line-height:1;display:flex;align-items:center;justify-content:center}
.dang-pli:hover,.dang-pli:focus-visible{background:var(--gs-rail-panel-2);color:var(--gs-ink);outline:none}
.dang-plus{display:flex;flex-direction:column;align-items:center;gap:3px;padding:0;border:0;background:none;cursor:pointer;color:inherit}
.dang-plus-rond{width:42px;height:42px;border:1.5px dashed var(--gs-ink-faint);border-radius:50%;display:flex;align-items:center;
    justify-content:center;font-size:21px;line-height:1;color:var(--gs-ink-dim);transition:background .12s}
.dang-plus:hover .dang-plus-rond,.dang-plus:focus-visible .dang-plus-rond,
.dang-colonne.dang-cherche .dang-plus-rond{background:var(--gs-accent-soft);border-style:solid;border-color:var(--gs-accent);color:var(--gs-accent)}
.dang-plus:focus-visible{outline:none}
/* La croix est un tracé, pas le caractère « + » : la police posait le glyphe
   sous le centre du rond (ticket Mqw22gNZ, 30/11). */
.dang-plus-rond .gicon{display:block;width:20px;height:20px;flex:none}
.dang-plus-mot{font:700 9.5px/1 Inter,system-ui,sans-serif;letter-spacing:.07em}
.dang-trait{width:34px;border:0;border-top:1px solid var(--gs-line,#e2dccf);margin:0;flex:none}
.dang-listes{flex:1 1 auto;min-height:0;width:100%;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;
    display:flex;flex-direction:column;align-items:center;gap:11px;padding:6px 0;scrollbar-width:none}
.dang-listes::-webkit-scrollbar{display:none}
.dang-contact{position:relative;flex:none;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:none;cursor:pointer}
.dang-contact:hover .dang-av,.dang-contact:focus-visible .dang-av{box-shadow:0 0 0 2px var(--gs-rail-bg,#f4efe6),0 0 0 4px var(--gs-line-strong)}
.dang-contact:focus-visible{outline:none}
.dang-contact.dang-sel .dang-av{box-shadow:0 0 0 2px var(--gs-rail-bg,#f4efe6),0 0 0 4px var(--gs-accent,#A8863F)}
.dang-av{width:44px!important;height:44px!important;flex:0 0 44px;border-radius:50%;object-fit:cover;font-size:14px}
.dang-av.dang-av-m{width:32px!important;height:32px!important;flex:0 0 32px;font-size:12px}
.dang-av-lettres{display:inline-flex;align-items:center;justify-content:center;background:var(--gs-panel-2,#ebe4d6)}
.dang-punaise{position:absolute;top:-5px;right:-6px;font-size:11px;line-height:1;pointer-events:none}
.dang-contact .dang-pt{position:absolute;top:-1px;right:-1px;width:12px;height:12px;border:2px solid var(--gs-rail-bg,#f4efe6);box-sizing:border-box}
.dang-contact .dang-punaise + .dang-pt{top:auto;bottom:-1px}
.dang-pt{flex:0 0 8px;width:8px;height:8px;border-radius:50%;background:var(--gs-crit)}
.dang-pt-or{background:var(--gs-accent)}
.dang-vide{color:var(--gs-ink-faint,#8a8170);font-size:18px}
.dang-bas{flex:none;display:flex;flex-direction:column;align-items:center;gap:9px}
.dang-rond{width:38px;height:38px;border:1px solid var(--gs-line,#e2dccf);border-radius:50%;background:var(--gs-panel,#fff);
    cursor:pointer;font-size:15px;line-height:1;display:flex;align-items:center;justify-content:center;color:inherit}
.dang-rond:hover,.dang-rond:focus-visible,.dang-colonne.dang-menu-on .dang-reglages{
    background:var(--gs-rail-panel-2);outline:none}
/* Le bouton « Salons » (ticket Mbck4RTzLRIi3JCkOj68) : il remplace la loupe,
   comme l'onglet 🏕️ Salons de Communications. Pastille dorée = un salon a du nouveau. */
.dang-salons{position:relative;display:flex;flex-direction:column;align-items:center;gap:3px;padding:0;border:0;
    background:none;cursor:pointer;color:inherit}
.dang-salons:focus-visible{outline:none}
.dang-salons:hover .dang-rond,.dang-salons:focus-visible .dang-rond,.dang-colonne.dang-salons-on .dang-salons .dang-rond{
    background:var(--gs-accent-soft);border-color:var(--gs-accent)}
.dang-salons-mot{font:700 9.5px/1 Inter,system-ui,sans-serif;letter-spacing:.04em}
.dang-salons .dang-pt{position:absolute;top:-1px;right:-1px;width:12px;height:12px;border:2px solid var(--gs-rail-bg);
    box-sizing:border-box;display:none}
.dang-salons.dang-nonlu .dang-pt{display:block}

/* Le nom au survol, à gauche du rail. */
.dang-nom-bulle{position:fixed;right:78px;transform:translateY(-50%);background:var(--gs-brand-earth);color:#fff;border-radius:9px;
    padding:7px 11px;font-size:12px;line-height:1.35;white-space:nowrap;pointer-events:none;display:none;z-index:2;
    box-shadow:0 6px 18px rgba(20,17,12,.22)}
.dang-nom-bulle b{display:block;font-size:13px;font-weight:650}
.dang-nom-bulle.dang-vu{display:block}

/* Le panneau « Récents / Tous les contacts » (écran 4) et le menu des réglages. */
.dang-panneau,.dang-menu{position:absolute;right:calc(100% + 8px);bottom:12px;background:var(--gs-panel,#fff);
    border:1px solid var(--gs-line,#e2dccf);border-radius:13px;box-shadow:0 10px 34px rgba(40,34,24,.22);display:none;overflow:hidden}
.dang-panneau{width:300px;max-height:min(560px,calc(100vh - 110px));flex-direction:column}
.dang-colonne.dang-cherche .dang-panneau-cherche,.dang-colonne.dang-salons-on .dang-panneau-salons{display:flex}
.dang-panneau-titre{flex:none;padding:12px 16px 0;font:700 13.5px/1.3 Inter,system-ui,sans-serif;color:var(--gs-ink)}
.dang-tous-salons{flex:none;padding:10px 16px;border:0;border-top:1px solid var(--gs-line);background:var(--gs-panel-2);
    color:var(--gs-ink-dim);font:inherit;font-size:12.5px;text-align:left;cursor:pointer}
.dang-tous-salons:hover,.dang-tous-salons:focus-visible{background:var(--gs-accent-soft);color:var(--gs-ink);outline:none}
/* Marges du panneau (ticket RKQVWwrrRG4x1imOdhBV) : la règle globale
   « input{width:100%} » de style.css collait le champ aux bords ; il garde ses
   14 px de chaque côté, et les lignes 16 px, comme les en-têtes. */
.dang-recherche{flex:none;box-sizing:border-box;width:auto;min-width:0;margin:12px 14px 10px;height:38px;padding:0 12px;
    border-radius:10px;border:1.5px solid var(--gs-accent,#A8863F);
    background:var(--gs-search-bg,#fff);color:inherit;font:inherit;font-size:13.5px}
.dang-recherche:focus{outline:2px solid color-mix(in srgb,var(--gs-accent,#A8863F) 35%,transparent);outline-offset:1px}
.dang-resultats{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
.dang-sec{background:var(--gs-panel-2);color:var(--gs-ink-dim);font:700 11.5px/1.3 Inter,system-ui,sans-serif;padding:6px 16px}
.dang-lettre{background:var(--gs-rail-bg);color:var(--gs-ink-dim);font:700 11px/1.3 Inter,system-ui,sans-serif;padding:3px 16px}
.dang-ligne{display:flex;align-items:center;gap:12px;width:100%;box-sizing:border-box;padding:7px 16px;border:0;border-bottom:1px solid var(--gs-line);
    background:none;color:inherit;font:inherit;font-size:13.5px;text-align:left;cursor:pointer}
.dang-ligne:hover,.dang-ligne:focus-visible{background:var(--gs-accent-soft,rgba(160,120,40,.12));outline:none}
.dang-ligne.dang-nonlu .dang-nom{font-weight:650}
.dang-nom{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dang-nom b{font-weight:750}
.dang-vide-liste{padding:16px;font-size:13px;color:var(--gs-ink-dim,#6b6352)}
/* « 👥 Nouveau groupe » (Thierry, 24/11) : la ligne en tête du panneau, puis le
   mode coche — « ‹ Nouveau groupe » en tête, les personnes choisies en
   pastilles sous le champ, une case ronde par nom, « Créer le groupe » en pied. */
.dang-av-groupe{display:inline-flex;align-items:center;justify-content:center;background:var(--gs-accent-soft);font-size:15px}
.dang-nouveau-groupe .dang-nom{font-weight:650}
.dang-sous{display:block;overflow:hidden;text-overflow:ellipsis;font-size:11.5px;font-weight:400;color:var(--gs-ink-dim)}
.dang-groupe-tete,.dang-choisis,.dang-groupe-pied{display:none}
.dang-colonne.dang-groupe-on .dang-groupe-tete,.dang-colonne.dang-groupe-on .dang-choisis{display:flex}
.dang-colonne.dang-groupe-on .dang-groupe-pied{display:block}
.dang-colonne.dang-groupe-on .dang-recherche{margin-top:8px}
.dang-groupe-tete{flex:none;align-items:center;gap:4px;padding:10px 14px 0 8px}
.dang-groupe-retour{flex:none;width:28px;height:28px;padding:0;border:0;border-radius:8px;background:none;cursor:pointer;
    color:var(--gs-ink-dim);font-size:20px;line-height:1;display:flex;align-items:center;justify-content:center}
.dang-groupe-retour:hover,.dang-groupe-retour:focus-visible{background:var(--gs-accent-soft);color:var(--gs-ink);outline:none}
.dang-groupe-titre{font:700 13.5px/1.3 Inter,system-ui,sans-serif;color:var(--gs-ink)}
.dang-choisis{flex:none;flex-wrap:wrap;gap:6px;max-height:92px;overflow-y:auto;padding:0 14px 10px}
.dang-choisis-vide{align-self:center;font-size:12.5px;color:var(--gs-ink-dim)}
.dang-puce{display:inline-flex;align-items:center;gap:5px;max-width:100%;min-width:0;box-sizing:border-box;padding:4px 7px 4px 10px;
    border:1px solid var(--gs-line-strong);border-radius:999px;background:var(--gs-panel-2);color:var(--gs-ink);
    font:inherit;font-size:12.5px;line-height:1.2;cursor:pointer}
.dang-puce-nom{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dang-puce-x{flex:none;font-size:15px;line-height:1;color:var(--gs-ink-dim)}
.dang-puce:hover,.dang-puce:focus-visible{border-color:var(--gs-accent);background:var(--gs-accent-soft);outline:none}
.dang-puce:hover .dang-puce-x,.dang-puce:focus-visible .dang-puce-x{color:var(--gs-ink)}
.dang-case{flex:none;margin-left:auto;width:20px;height:20px;box-sizing:border-box;border:1.5px solid var(--gs-ink-faint);border-radius:50%;
    display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;line-height:1;color:var(--gs-on-accent)}
.dang-coche-on .dang-case{background:var(--gs-accent);border-color:var(--gs-accent)}
.dang-coche-on .dang-case::after{content:'✓'}
.dang-coche-on .dang-nom{font-weight:650}
.dang-groupe-pied{flex:none;padding:10px 14px;border-top:1px solid var(--gs-line);background:var(--gs-panel)}
.dang-creer-groupe{display:block;width:100%;height:38px;border:0;border-radius:10px;cursor:pointer;
    background:var(--gs-accent);color:var(--gs-on-accent);font:inherit;font-size:13.5px;font-weight:650}
.dang-creer-groupe:hover:not(:disabled),.dang-creer-groupe:focus-visible{box-shadow:0 0 0 3px var(--gs-accent-soft);outline:none}
.dang-creer-groupe:disabled{background:var(--gs-panel-2);color:var(--gs-ink-faint);cursor:default}
.dang-menu{width:250px;padding:6px;bottom:8px}
.dang-colonne.dang-menu-on .dang-menu{display:block}
.dang-menu-item{display:flex;align-items:center;gap:8px;width:100%;padding:9px 10px;border:0;border-radius:8px;background:none;
    color:inherit;font:inherit;font-size:13.5px;text-align:left;cursor:pointer}
.dang-menu-item:hover,.dang-menu-item:focus-visible{background:var(--gs-accent-soft,rgba(160,120,40,.12));outline:none}
.dang-garder::before{content:'';width:16px;height:16px;border:1.5px solid var(--gs-ink-faint);border-radius:4px;flex:none;box-sizing:border-box}
.dang-garder[aria-checked="true"]::before{content:'✓';background:var(--gs-accent,#A8863F);border-color:var(--gs-accent,#A8863F);color:#fff;
    font-size:11px;line-height:13px;text-align:center}

/* Sombre : rien à ajouter, les jetons --gs-* de shell.css basculent seuls. */

/* L'en-tête de la coquille garde toute la largeur : le rail vit dessous (maquettes). */
.dang-colonne{top:72px}
@media (min-width:861px){
    body.shell-on.dang-on .gshell-universal-head{right:0}
    body.shell-on.dang-on .gshell-create-menu{right:73px}
}
/* Repliée : seule la languette répond, la poignée « › » du rail n'existe pas. */
.dang-colonne:not(.dang-deployee) .dang-pli{display:none}
body.dang-epinglee .dang-colonne .dang-pli{display:flex}

/* DANG au téléphone : placement « à la Facebook » — la bulle des messages en
   haut à droite avec son compteur, les notifications dans la barre du bas. */
body .gshell-topbar .tbell.dang-tel-msg,body .gshell-tabbar .gshell-tab.dang-tel-notif{display:none}
@media (max-width:860px){
    body.shell-on.dang-tel .gshell-topbar .tbell.dang-tel-msg{display:inline-grid;place-items:center}
    body.shell-on.dang-tel .gshell-tabbar .gshell-tab.dang-tel-notif{display:flex}
    body.shell-on.dang-tel #gshellTopbarBell,
    body.shell-on.dang-tel .gshell-tabbar .gshell-tab[data-gs-route="messages"]{display:none}
    body.shell-on.dang-tel .dang-tel-msg.on{color:var(--gs-accent)}
    .gshell-tab.dang-tel-notif .gshell-badges{left:calc(50% + 4px);right:auto;display:flex;gap:2px}
    .dang-tel-cnt{position:absolute;top:0;right:-4px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;
        display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;
        background:var(--gs-crit,#c0392b);color:#fff;font:700 10.5px/1 Inter,system-ui,sans-serif}
    .dang-tel-cnt.hidden{display:none}
}
