/* Espace membre du Réseau GAYA — ce qui n'existe que chez lui.
   Les éléments communs (tuiles, sélecteurs, boutons, tableaux, fenêtres, formulaires) viennent du catalogue GAYA Vision
   (gaya-elements.css, référence ROUTIER Environnement) ; les couleurs, de reseau-couleurs.css (site reseaugaya.com).
   Disposition : barre latérale à gauche, en-tête collant — la « disposition latérale » de ROUTIER (sig-nav.js v1.16). */

/* ── Page de connexion (elle ne charge pas le catalogue) ── */
body.connexion { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f4f7f7; color: #2d3b3b; }
.centre { min-height: 100vh; display: grid; place-items: center; padding: 24px; box-sizing: border-box; }
.boite { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.1); padding: 30px 30px 26px; max-width: 460px; width: 100%;
  display: flex; flex-direction: column; gap: 16px; box-sizing: border-box; }
.boite h1 { margin: 0; font-size: 24px; color: #2f6d6d; }
.boite p { margin: 0; color: #474747; font-size: 14.5px; line-height: 1.55; }
.boite label { font-size: 13px; font-weight: 600; color: #474747; display: block; margin-bottom: 6px; }
.boite input[type=email] { width: 100%; box-sizing: border-box; padding: 11px 13px; font-size: 16px; font-family: inherit; border: 1px solid #ddd; border-radius: 8px; }
.boite input[type=email]:focus { outline: 2px solid #3f8d8d; outline-offset: 1px; }
.boite button { font-family: inherit; font-size: 15px; font-weight: 600; height: 42px; border: 0; border-radius: 8px; cursor: pointer; background: #2f6d6d; color: #fff; }
.boite button:hover { background: #245656; }
.boite .message { font-size: 14px; padding: 11px 13px; border-radius: 8px; background: #e3f0f0; color: #245656; }
.boite .message.alerte { background: #fdecea; color: #b71c1c; }
.boite .message .mono { display: block; margin-top: 6px; font-size: 12px; word-break: break-all; font-family: ui-monospace, Menlo, monospace; }

/* ── Cadre : barre latérale + contenu ── */
:root { --lat-l: 220px;
  --nav-fond: var(--brand); --nav-texte: #e3efef; --nav-titre: #fff; --nav-survol: rgba(255,255,255,.10); --nav-actif: rgba(255,255,255,.16);
  --nav-trait: #9fd3d3; --nav-sep: rgba(255,255,255,.18); }
html.sobre { --nav-fond: var(--sobre-fond); --nav-texte: #41454d; --nav-titre: #1d1f25; --nav-survol: var(--sobre-survol); --nav-actif: var(--sobre-actif);
  --nav-trait: var(--brand); --nav-sep: #d6e3e3; }
body.espace { padding: 0; }
.lat { position: fixed; top: 0; left: 0; bottom: 0; width: var(--lat-l); z-index: 120; display: flex; flex-direction: column; background: var(--nav-fond); color: var(--nav-texte); }
html.sobre .lat { border-right: 1px solid #dfe7e7; box-shadow: inset 4px 0 0 var(--brand); }
.lat-corps { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 12px 16px; scrollbar-width: thin; }
.lat-tete { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 6px; }
.lat-logo { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: #fff; border-radius: 10px; padding: 10px 12px;
  min-height: 64px; text-decoration: none; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
html.sobre .lat-logo { box-shadow: 0 0 0 1px #e3eaea; }
.lat-logo img { display: block; max-width: 100%; height: auto; }
.lat-logo small { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #6b6b6b; }
.lat-fermer { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border: none; border-radius: 8px;
  background: var(--nav-survol); color: var(--nav-titre); font-size: 28px; line-height: 1; cursor: pointer; }
.lat-bloc { margin-top: 12px; }
/* Rubrique : titre cliquable qui plie / déplie ses écrans (dernier état mémorisé) ; aucune icône devant les noms */
.lat-rubrique { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none;
  font-family: inherit; font-size: 13.5px; font-weight: 700; letter-spacing: .1px; color: var(--nav-titre); text-align: left; cursor: pointer; }
.lat-rubrique:hover { background: var(--nav-survol); }
.lat-rubrique .fleche { font-size: 13px; transition: transform .15s; }
.lat-rubrique[aria-expanded="false"] .fleche { transform: rotate(-90deg); }
.lat-pages { margin: 2px 0 2px 10px; }
.lat-pages[hidden] { display: none !important; }
.lat-entree { display: flex; align-items: center; min-height: 32px; padding: 6px 10px 6px 12px; border-radius: 0 6px 6px 0; font-size: 13px; line-height: 1.3;
  color: var(--nav-texte); text-decoration: none; box-shadow: inset 1px 0 0 var(--nav-sep); }
.lat-entree:hover { background: var(--nav-survol); color: var(--nav-titre); }
.lat-entree[aria-current=page] { background: var(--nav-actif); color: var(--nav-titre); font-weight: 650; box-shadow: inset 3px 0 0 var(--nav-trait); }
.lat a:focus-visible, .lat button:focus-visible { outline: 2px solid var(--nav-trait); outline-offset: 1px; }
.lat-compte { position: relative; flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px 12px; border-top: 1px solid var(--nav-sep); flex-wrap: wrap; }
.lat-ini { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  background: var(--nav-trait); color: #173636; font-size: 13px; font-weight: 700; letter-spacing: .3px; }
html.sobre .lat-ini { background: var(--brand); color: #fff; }
.lat-qui { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lat-qui b { font-size: 13px; font-weight: 650; color: var(--nav-titre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lat-qui span { font-size: 12px; color: var(--nav-texte); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lat-sortir { display: none; }
.voile { position: fixed; inset: 0; background: rgba(20,30,30,.45); z-index: 110; }
.contenu { margin-left: var(--lat-l); min-height: 100vh; }
/* En-tête collant (fil « rubrique › écran », Sobre / Couleur, Déconnexion) */
.entete { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 24px;
  background: #fff; border-bottom: 1px solid #e3eaea; box-shadow: 0 1px 2px rgba(29,31,37,.04); }
.fil { flex: 1; min-width: 0; font-size: 13px; color: #616670; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fil b { color: #1d1f25; font-weight: 650; }
.fil i { font-style: normal; margin: 0 6px; color: #a5a9b0; }
.menu-btn { display: none; }
.apparence { display: inline-flex; border: 1px solid #e1e3e8; background: #f3f4f6; border-radius: 999px; padding: 2px; flex-shrink: 0; }
.apparence button { border: 0; background: none; color: #616670; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 12px; cursor: pointer; }
.apparence button[aria-pressed="true"] { background: #fff; color: #1d1f25; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
main { max-width: 1280px; padding: 20px 24px 80px; }
main > section { display: block; }
main > section[hidden] { display: none; }
.intro { color: #555; font-size: 14px; line-height: 1.55; margin: 0 0 var(--espace-blocs); max-width: 820px; }
p.aide { font-size: 13px; color: #6b6b6b; margin: 0 0 var(--espace-titre); line-height: 1.5; }
p.aide a { color: var(--brand); font-weight: 600; }
@media (max-width: 899px) {
  .lat { transform: translateX(-100%); transition: transform .2s ease; width: min(86vw, 300px); box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .lat.ouvert { transform: none; }
  .lat-fermer { display: inline-flex; }
  .contenu { margin-left: 0; }
  .menu-btn { display: inline-flex; align-items: center; }
  .apparence, .entete #sortir { display: none; }
  .lat-sortir { display: block; width: 100%; margin-top: 6px; }
  main { padding: 16px 12px 60px; }
}

/* ── Tableaux : toujours dans un bloc blanc arrondi (comme ROUTIER) ── */
.chart-container.bloc-tableau { padding: 6px 8px 8px; }
.chart-container.bloc-tableau .tbl { border-radius: 6px; }
.ca-table td.ferme, .ca-table tr.total td { font-weight: 700; }
.ca-table tr.total td { border-top: 2px solid var(--gv-trait-chaud); border-bottom: none; }
.ca-table tr.reglee td { color: #8a8f98; }
.ca-table tr.a-moi td:first-child { box-shadow: inset 3px 0 0 var(--brand-2); }
.ca-table td.sous-seuil { color: var(--gv-ko); font-weight: 600; }
.ca-table td .sous-ligne { display: block; font-size: 11.5px; color: #888; white-space: normal; }
.ca-table td.reglements { white-space: normal; font-size: 12px; color: #616670; min-width: 170px; }
.ca-table td.barre-cell { width: 40%; min-width: 120px; vertical-align: middle; }
.barre { display: block; height: 10px; border-radius: 5px; background: var(--brand-2); min-width: 2px; }
.ca-table td .pastille { margin-left: 6px; }

/* ── Cartes des consultants ── */
.annuaire { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--espace-blocs); }
.annuaire > .vide { grid-column: 1 / -1; }
.fiche { background: #fff; border-radius: var(--gv-rayon); box-shadow: var(--gv-ombre); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px;
  cursor: pointer; border-top: 3px solid var(--brand-2); transition: box-shadow .15s, transform .15s; font-size: 14px; color: #333; }
.fiche:hover, .fiche:focus-visible { box-shadow: 0 4px 14px rgba(0,0,0,.12); outline: none; }
.fiche-tete { display: flex; align-items: center; gap: 14px; }
.fiche-tete img, .fiche-ini { width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.fiche-ini { display: inline-flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 20px; }
.fiche-tete .qui { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fiche-tete .qui b { font-size: 16.5px; color: #1d1f25; }
.fiche-tete .qui span { font-size: 13.5px; color: #555; }
.fiche-tete .qui .depuis { font-size: 12.5px; color: #888; }
.fiche .contacts { display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; }
.fiche .contacts a { color: var(--brand-dark); text-decoration: none; word-break: break-word; }
.fiche .contacts a:hover { text-decoration: underline; }
.fiche .domaines { display: flex; flex-direction: column; gap: 8px; }
.fiche .domaine b { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--brand); margin-bottom: 4px; }
.fiche .competences { display: flex; flex-wrap: wrap; gap: 5px; }
.fiche .mot { font-size: 13.5px; line-height: 1.55; color: #444; white-space: pre-line; border-top: 1px solid #eee; padding-top: 10px; margin: 0; }
.fiche .modifier { align-self: flex-start; font-size: 12.5px; font-weight: 600; color: var(--brand); }

/* ── Panneau latéral (affaire, fiche) : le modèle du catalogue, contenu propre à l'espace ── */
.panneau { width: min(760px, 94vw); }
.panneau-tete h2 { font-size: 18px; line-height: 1.3; }
.panneau-corps { overflow-y: auto; overflow-x: hidden; padding: 24px 28px 48px; display: flex; flex-direction: column; gap: var(--espace-blocs); font-size: 15px; color: #333; }
/* Sections du volet : blocs blancs arrondis, titre, contenu aéré (modèle ROUTIER) */
.volet-section { background: #fff; border-radius: var(--gv-rayon); box-shadow: var(--gv-ombre); padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; margin: 0; }
.volet-section > h3 { font-size: 15px; font-weight: 650; color: #1d1f25; margin: 0; padding-bottom: 10px; border-bottom: 1px solid #eef0f0; }
.volet-infos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px 24px; }
.volet-infos > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.volet-libelle { font-size: 12px; font-weight: 600; color: #888; }
.volet-valeur { font-size: 15px; color: #1d1f25; overflow-wrap: anywhere; }
.volet-montants { display: grid; grid-template-columns: 1fr auto; gap: 10px 24px; margin: 0; max-width: 420px; }
.volet-montants dt { color: #555; } .volet-montants dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: #1d1f25; }
.volet-flux { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-top: 1px solid #eef0f0; }
.volet-flux:first-of-type { border-top: 0; padding-top: 0; }
.volet-phrase { margin: 0; font-size: 15.5px; line-height: 1.5; color: #1d1f25; font-weight: 600; }
.volet-etat { margin: 0; font-size: 13.5px; color: #616670; }
.volet-section .champ select, .volet-section .champ input, .volet-section .champ textarea { font-size: 15px; }
.volet-actions { margin-top: 0; }
.panneau-corps .formulaire.volet-section { gap: 14px; }
.panneau-corps .carte { margin: 0; }
.resume { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 14px; background: #fff; border-radius: var(--gv-rayon); box-shadow: var(--gv-ombre); padding: 14px 18px; }
.resume dt { color: #888; } .resume dd { margin: 0; color: #1d1f25; }
.case-ligne { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: #333; cursor: pointer; }
.case-ligne input { width: 18px; height: 18px; accent-color: var(--brand); }

/* ── Ma fiche ── */
.formulaire .grille-form { margin-bottom: 4px; }
.formulaire .champ.large { grid-column: 1 / -1; }
.lecture { padding: 9px 0; font-size: 15px; font-weight: 600; color: #1d1f25; }
.etat { font-size: 13.5px; color: #616670; }
.etat.ok { color: var(--gv-ok); font-weight: 600; }
.etat.ko { color: var(--gv-ko); font-weight: 600; }
.fichiers { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 6px; }
.fichiers li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: var(--gv-fond-page); border-radius: 6px; }
.fichiers li a { font-size: 14px; color: var(--brand-dark); }

/* ── Tableau de bord : alertes, listes cliquables ── */
.carte.alerte { border-left: 4px solid var(--gv-vigilance); }
.carte h3 { font-size: 15px; font-weight: 650; color: #1d1f25; margin: 0 0 6px; }
.carte > p { font-size: 14px; color: #555; line-height: 1.55; margin: 0 0 8px; }
ul.cliquables { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.proposition { border-left: 4px solid var(--brand-2); font-size: 14px; color: #555; line-height: 1.55; }

/* ── Charte ── */
.visionneuse { width: 100%; height: 80vh; min-height: 520px; border: 0; border-radius: var(--gv-rayon); background: #fff; box-shadow: var(--gv-ombre); display: block; }
.version-texte { margin-top: var(--espace-blocs); }
.version-texte summary { cursor: pointer; color: var(--brand); font-weight: 600; padding: 6px 0; font-size: 14px; }
.charte h3.partie { font-size: 16px; color: var(--brand); margin: 6px 0 8px; }
.charte details { border-top: 1px solid #eee; padding: 2px 0; }
.charte summary { cursor: pointer; padding: 9px 0; font-weight: 600; color: #1d1f25; font-size: 14.5px; }
.charte .texte { padding: 0 0 12px 14px; display: flex; flex-direction: column; gap: 7px; font-size: 14px; color: #444; line-height: 1.55; }
.charte .texte p, .charte .texte ul { margin: 0; }
/* Choix d'UN membre (« Voir la situation de ») : même pastille que les menus à cases */
.barre-filtres label:has(select[data-unique]) { display: inline-flex; align-items: center; gap: 10px; height: var(--gv-commande-hauteur); padding: 0 6px 0 16px; background: #fff;
  border: 1px solid var(--gv-bordure); border-radius: var(--gv-commande-rayon); box-shadow: var(--gv-selecteur-ombre); font-size: 14px; font-weight: 600; color: var(--gv-texte-champ); }
.barre-filtres select[data-unique] { border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--gv-texte-doux); height: 100%; cursor: pointer; }
.barre-filtres .case-ligne { height: var(--gv-commande-hauteur); font-weight: 500; }
.barre-filtres .compte { margin-left: auto; font-size: 12.5px; color: #888; }
.ca-row-5.ca-row-auto { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.kpi-label { text-transform: none; letter-spacing: 0; font-size: 12px; }

h3.sous-titre-bloc { font-size: var(--gv-titre-bloc); font-weight: 650; color: #1d1f25; margin: var(--espace-blocs) 0 4px; }

/* Édition dans la cellule (tableau « À compléter ») */
.ca-table td.edition select, .ca-table td.edition input { min-height: 34px; font-size: 13px; padding: 4px 8px; min-width: 150px; }
.ca-table td.edition.enregistrement { opacity: .55; }
.ca-table td.edition.enregistre { box-shadow: inset 3px 0 0 var(--gv-ok); }
.ca-table td.manques { white-space: normal; } .ca-table td.manques .pastille { margin: 2px 4px 2px 0; }
.panneau-corps > form { display: flex; flex-direction: column; gap: var(--espace-blocs); }
.panneau-tete { align-items: center; }
.panneau-tete h2 { flex: 1 1 auto; min-width: 0; }
.panneau-outils { flex-shrink: 0; }

/* ── Suivi des règlements (table CA & Facturation simplifiée) ── */
.ca-table.reglements td { vertical-align: top; }
.ca-table.reglements tr.groupe td { background: var(--brand-soft); padding: 0; }
.groupe-bouton { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border: 0; background: none; font: inherit; font-size: 14px; color: #1d1f25; text-align: left; cursor: pointer; }
.groupe-bouton .fleche { font-size: 11px; transition: transform .15s; }
.groupe-bouton[aria-expanded="false"] .fleche { transform: rotate(-90deg); }
.groupe-info { color: #616670; font-weight: 400; }
.ca-table.reglements td.bloc-reg { min-width: 170px; white-space: normal; }
.bloc-montant { font-variant-numeric: tabular-nums; font-weight: 600; color: #1d1f25; }
.bloc-nom { font-size: 12px; color: #888; margin: 1px 0 4px; }
.sans-objet { color: #b5b9c0; }
select.statut { font: inherit; font-size: 13px; font-weight: 600; padding: 4px 8px; border-radius: 12px; border: 1px solid #ddd; background: #f5f5f5; min-height: 30px; cursor: pointer; }
.st-afacturer { background: #fff4c2 !important; border-color: #f0d873 !important; color: #6b5200 !important; }
.st-facture { background: #ece4ff !important; border-color: #cdbaf5 !important; color: #4b2f99 !important; }
.st-apayer { background: #ffe0ea !important; border-color: #f5b3c8 !important; color: #8a1c42 !important; }
.st-paye { background: #d9f5df !important; border-color: #a7dfb4 !important; color: #1b5e20 !important; }
.st-sansobjet { background: #e1efff !important; border-color: #b6d4f7 !important; color: #1f4f8a !important; }
.ca-table td.enregistrement { opacity: .5; } .ca-table td.enregistre { box-shadow: inset 3px 0 0 var(--gv-ok); }
.toast-annuler { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 1000; background: rgba(29,31,37,.92); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px; display: flex; gap: 14px; align-items: center; }
.toast-annuler[hidden] { display: none; }
.toast-annuler .btn-lien { color: #9fd3d3; }
.boite .logo-connexion { display: block; margin-bottom: 12px; }
.boite .petit { font-size: 13px; }
.boite .petit a { color: #2f6d6d; }
.boite input[type=password] { width: 100%; box-sizing: border-box; padding: 11px 13px; font-size: 16px; font-family: inherit; border: 1px solid #ddd; border-radius: 8px; }
.boite input[type=password]:focus { outline: 2px solid #3f8d8d; outline-offset: 1px; }
.invitation { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; max-width: 520px; }
.invitation input { flex: 1 1 280px; font: inherit; font-size: 12.5px; padding: 6px 8px; border: 1px solid var(--gv-bordure); border-radius: 6px; }
.boite[hidden], .boite [hidden] { display: none !important; }
