/* Barre latérale gauche (js/volet.js) : seule navigation d'AURYVO Business sur ordinateur, même dessin que la console.
   Passe 2 (consignes des associés) : sur un gris distinct de la toile ; retour au dessin de l'ancienne barre — élément ouvert
   sur fond gris doux en rectangle arrondi (10 px), texte encre, jamais de pilule noire ; symboles ronds monochromes ;
   compteurs sobres (gris), rouges seulement pour l'urgent. Téléphone : barre d'onglets en bas. */
.cs-volet { display: none; }
@media (min-width: 821px) {
  body.ab-volet { --volet-l: 264px; padding-left: var(--volet-l); }
  body.ab-volet.volet-pret { transition: padding-left .28s var(--ease-out, ease); }      /* pas d'animation au chargement */
  body.ab-volet.volet-rail { --volet-l: 72px; }
  body.ab-volet .topbar, body.ab-volet .rail, body.ab-volet .subnav { display: none !important; }
  body.ab-volet .shell { grid-template-columns: minmax(0, 1fr); }
  body.ab-volet .main { padding: 30px 36px 70px; }
  body.ab-volet .cs-volet { display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; width: var(--volet-l); z-index: 40;
    background: var(--panel); border-right: 1px solid var(--line); padding: 20px 14px 16px; }
  body.ab-volet.volet-pret .cs-volet { transition: width .28s var(--ease-out, ease), box-shadow .28s, border-radius .28s, padding .28s; }
  /* aperçu (écran étroit, ouvert par le bouton) : par-dessus la page, rien ne bouge dessous */
  body.ab-volet.volet-rail.volet-apercu .cs-volet { width: 264px; box-shadow: var(--sh-float); border-radius: 0 var(--r-xl) var(--r-xl) 0; border-right-color: transparent; }
}

/* ---------- bouton du haut : réduire / agrandir (symbole « barre latérale ») ---------- */
.cs-v-bascule { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3);
  cursor: pointer; flex-shrink: 0; transition: background .15s, color .15s; }
.cs-v-bascule:hover, .cs-v-bascule:focus-visible { color: var(--ink); background: var(--survol); }
.cs-v-bascule svg { width: 19px; height: 19px; }

/* ---------- RAIL : les symboles seuls, à leur place ; les libellés reviennent dans l'aperçu ---------- */
@media (min-width: 821px) {
  body.volet-rail:not(.volet-apercu) .cs-volet { padding: 18px 12px 14px; }
  body.volet-rail:not(.volet-apercu) .cs-v-tete { position: relative; flex-direction: column; height: auto; gap: 8px; padding: 0; }
  /* comme ChatGPT : au survol du logo, le bouton « agrandir » prend sa place (au toucher, il est déjà là, invisible) */
  body.volet-rail:not(.volet-apercu) .cs-v-bascule { position: absolute; top: 2px; left: 50%; width: 36px; height: 36px; margin-left: -18px; z-index: 1;
    opacity: 0; transition: opacity .15s, background .15s, color .15s; }
  body.volet-rail:not(.volet-apercu) .cs-v-marque { height: 40px; transition: opacity .15s; }
  body.volet-rail:not(.volet-apercu) .cs-v-tete:has(.cs-v-marque:hover, .cs-v-bascule:hover, .cs-v-bascule:focus-visible) .cs-v-bascule { opacity: 1; color: var(--ink); background: var(--survol); }
  body.volet-rail:not(.volet-apercu) .cs-v-tete:has(.cs-v-marque:hover, .cs-v-bascule:hover, .cs-v-bascule:focus-visible) .cs-v-marque { opacity: 0; }
  body.volet-rail:not(.volet-apercu) .cs-v-marque b,
  body.volet-rail:not(.volet-apercu) .cs-v-lib, body.volet-rail:not(.volet-apercu) .cs-v-chev,
  body.volet-rail:not(.volet-apercu) .cs-v-pages, body.volet-rail:not(.volet-apercu) .cs-v-qui,
  body.volet-rail:not(.volet-apercu) .cs-v-act span { display: none; }
  body.volet-rail:not(.volet-apercu) .cs-v-marque { justify-content: center; }
  body.volet-rail:not(.volet-apercu) .rc-loupe-volet { margin: 0; }
  body.volet-rail:not(.volet-apercu) .cs-v-actions { grid-template-columns: 1fr; justify-items: center; gap: 8px; margin: 14px 0 12px; }
  body.volet-rail:not(.volet-apercu) .cs-v-act { width: 40px; height: 40px; padding: 0; border-radius: 50%; }      /* icône seule : un cercle */
  body.volet-rail:not(.volet-apercu) .cs-v-act .sym { width: 18px; height: 18px; }
  body.volet-rail:not(.volet-apercu) .cs-v-liste { align-items: center; gap: 4px; scrollbar-width: none; }
  body.volet-rail:not(.volet-apercu) .cs-v-seul, body.volet-rail:not(.volet-apercu) .cs-v-groupe > button {
    position: relative; width: 44px; height: 44px; flex-shrink: 0; padding: 0; justify-content: center; border-radius: 12px; }
  body.volet-rail:not(.volet-apercu) .cs-v-groupe { display: flex; justify-content: center; }
  body.volet-rail:not(.volet-apercu) .cs-v-groupe.courant > button { background: var(--nav-actif); }      /* la rubrique en cours reste repérable */
  body.volet-rail:not(.volet-apercu) .cs-v-liste .cs-pastille { position: absolute; top: 3px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px;
    font-size: 10px; box-shadow: 0 0 0 2px var(--panel); }
  body.volet-rail:not(.volet-apercu) .cs-v-pied { justify-content: center; }
  body.volet-rail:not(.volet-apercu) .cs-v-moi { flex: none; padding: 4px; border-radius: 50%; }
}
/* libellés qui reviennent dans l'aperçu : en fondu, sans à-coup */
@media (min-width: 821px) and (prefers-reduced-motion: no-preference) {
  body.volet-apercu .cs-v-lib, body.volet-apercu .cs-v-marque b, body.volet-apercu .cs-v-qui, body.volet-apercu .cs-v-act span { animation: volet-fondu .22s .06s both; }
}
@keyframes volet-fondu { from { opacity: 0; } to { opacity: 1; } }

/* ---------- en-tête : logo et repli sur une ligne ---------- */
.cs-v-tete { display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 2px 0 10px; }
.cs-v-marque { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.cs-v-marque b { font-family: var(--display); font-size: 14.5px; letter-spacing: .3em; }
.cs-v-marque .logo-sym { width: 24px; height: 24px; margin: 0; }
.cs-v-tag { align-self: flex-start; margin: 12px 0 16px 10px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; line-height: 1;
  font-size: 11px; font-weight: 600; padding: 5px 9px; border-radius: 8px; background: transparent; color: var(--ink-3); border: 1px solid var(--line-2); letter-spacing: .01em; }

/* ---------- Sophystia : champ blanc en rectangle arrondi (portrait, invite, raccourci) ---------- */
.cs-v-cherche { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; height: 42px; padding: 0 7px 0 7px; border: 0; border-radius: var(--pill);
  background: var(--card); color: var(--ink-3); font: 500 13.5px var(--text); cursor: pointer; text-align: left; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(16, 24, 40, .05);
  transition: color .15s, box-shadow .15s; }
.cs-v-cherche img { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; box-shadow: none; }
.cs-v-cherche span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-v-cherche kbd { height: 26px; display: inline-flex; align-items: center; padding: 0 9px; border: 0; border-radius: 7px; background: var(--card-3); color: var(--ink-3);
  font: 600 11px var(--text); flex-shrink: 0; }
.cs-v-cherche:hover { color: var(--ink-2); box-shadow: 0 0 0 1px var(--line-2), var(--sh-card); }

/* ---------- deux raccourcis égaux : rectangles arrondis blancs à filet fin ---------- */
.cs-v-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; }
.cs-v-act { display: flex; align-items: center; justify-content: center; gap: 7px; height: 36px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--card);
  color: var(--ink-2); font: 600 13px var(--text); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.cs-v-act:hover { background: var(--card-2); color: var(--ink); border-color: var(--ink-3); }
.cs-v-act .sym { width: 16px; height: 16px; }
body.lecture-seule .cs-v-actions { display: none; }

/* ---------- rubriques : la page ouverte sur fond gris doux (rectangle arrondi), texte encre ---------- */
.cs-v-liste { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
.cs-v-seul, .cs-v-groupe > button { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 10px 0 12px; border: 0; border-radius: 10px; background: none;
  color: var(--ink-2); font: 600 14px var(--text); text-align: left; text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.cs-v-seul > span:first-child, .cs-v-groupe > button span:first-child { flex: 1; min-width: 0; }
.cs-v-lib { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-v-seul:hover, .cs-v-groupe > button:hover { background: var(--survol); color: var(--ink); }
.cs-v-seul.on, .cs-v-seul.on:hover { background: var(--nav-actif); color: var(--ink); font-weight: 700; }
.cs-v-groupe.courant > button { color: var(--ink); font-weight: 700; }
.cs-v-chev { width: 15px; height: 15px; color: var(--ink-3); transition: transform .2s var(--ease-out, ease); flex-shrink: 0; }
.cs-v-groupe.ouvert .cs-v-chev { transform: rotate(90deg); }
/* symboles ronds monochromes */
.cs-v-liste .sym { width: 20px; height: 20px; flex-shrink: 0; color: var(--ink-3); transition: color .15s; }
.cs-v-seul:hover .sym, .cs-v-groupe > button:hover .sym, .cs-v-groupe.courant > button .sym { color: var(--ink); }
.cs-v-seul.on .sym { color: var(--ink); }
/* sous-pages en menu déroulant, alignées sous le libellé de la rubrique */
.cs-v-pages { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s var(--ease-out, ease); }
.cs-v-groupe.ouvert .cs-v-pages { grid-template-rows: 1fr; }
.cs-v-pages > div { overflow: hidden; display: flex; flex-direction: column; gap: 1px; padding-left: 21px; }   /* le rail passe sous le symbole de la rubrique */
.cs-v-groupe.ouvert .cs-v-pages > div { padding-top: 2px; padding-bottom: 6px; }
.cs-v-pages a { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 19px; border: 0; border-left: 2px solid var(--line); border-radius: 0 10px 10px 0;
  color: var(--ink-2); font-size: 13.5px; font-weight: 600; text-decoration: none; transition: background .15s, color .15s; }
.cs-v-pages a span:first-child { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-v-pages a:hover { background: var(--survol); color: var(--ink); }
.cs-v-pages a.on, .cs-v-pages a.on:hover { background: var(--nav-actif); color: var(--ink); font-weight: 700; border-left-color: var(--ink); }   /* rail d'encre, comme l'ancienne barre */

/* ---------- compteurs sobres : gris ; rouge seulement pour l'urgent (factures en retard) ---------- */
.cs-v-liste .cs-pastille { flex: 0 0 auto; display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: var(--pill);
  background: var(--card-3); color: var(--ink-2); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.cs-v-liste .cs-pastille.urgent { background: var(--danger); color: #fff; }
.cs-v-seul.on .cs-pastille:not(.urgent), .cs-v-pages a.on .cs-pastille:not(.urgent) { background: var(--card); color: var(--ink); }

/* ---------- pied : le compte ---------- */
.cs-v-pied { position: relative; display: flex; align-items: center; gap: 6px; padding: 12px 0 0; margin-top: 8px; border-top: 1px solid var(--line); }
.cs-v-moi { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; border: 0; border-radius: 12px; background: none; color: var(--ink);
  cursor: pointer; text-align: left; transition: background .15s; }
.cs-v-moi:hover { background: var(--survol); }
.cs-v-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--black); color: var(--on-black); font-size: 12px; font-weight: 800; flex-shrink: 0; }
.cs-v-qui { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.cs-v-qui b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-v-qui small { font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-v-reglages { flex-shrink: 0; padding: 8px 12px; border-radius: var(--pill); color: var(--ink-2); font: 600 13px var(--text); text-decoration: none; }
.cs-v-reglages:hover, .cs-v-reglages.on { background: var(--survol); color: var(--ink); }
.cs-v-pied .menu { top: auto; bottom: 58px; left: 0; right: auto; width: 268px; transform-origin: bottom left; }
@media (prefers-reduced-motion: reduce) { body.ab-volet, .cs-volet, .cs-v-pages, .cs-v-chev, .cs-v-bascule, .cs-v-marque { transition: none !important; } }
