/* Le minimum : Bootstrap fait le reste. */
/* Taille de base réduite de 25 % (16px → 12px) : Bootstrap et nos styles sont en rem, tout suit. */
html { font-size: 75%; }
body { background: #f6f7f9; }
main h1 { font-size: 1.4rem; }
.ecran-but { color: #6c757d; font-size: .875rem; margin-bottom: .75rem; }
.nav-tabs .nav-link { font-size: .9rem; }
.tab-content > .tab-pane { background: #fff; border: 1px solid #dee2e6; border-top: 0; padding: 1rem; }
.kanban { display: flex; gap: .75rem; overflow-x: auto; }
.kanban-col { min-width: 230px; flex: 1; background: #eef0f3; border-radius: .375rem; padding: .5rem; }
.kanban-carte { background: #fff; border: 1px solid #dee2e6; border-radius: .375rem; padding: .5rem; margin-bottom: .5rem; font-size: .85rem; cursor: pointer; }
.stepper { display: flex; gap: .25rem; flex-wrap: wrap; }
.stepper .etape { flex: 1; min-width: 110px; text-align: center; padding: .4rem; border-radius: .25rem; font-size: .8rem; background: #e9ecef; }
.stepper .etape.faite { background: #d1e7dd; }
.stepper .etape.courante { background: #cfe2ff; font-weight: 600; }
.stepper .etape.bloquee { background: #fff3cd; }
.carte-fictive { position: relative; height: 380px; background: #e8f0e8; border: 1px solid #ccd; border-radius: .375rem; overflow: hidden; }
.carte-fictive .pt { position: absolute; width: 12px; height: 12px; border-radius: 50%; transform: translate(-50%, -50%); border: 2px solid #fff; cursor: pointer; }
.kpi { background: #fff; border: 1px solid #dee2e6; border-radius: .375rem; padding: .75rem; }
.kpi .valeur { font-size: 1.4rem; font-weight: 600; }
.kpi .libelle { font-size: .8rem; color: #6c757d; }

/* Coquille (index.html) : rien ne défile hors du menu et de l'iframe. */
body.coquille { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.coquille-corps { flex: 1; display: flex; min-height: 0; }
.coquille-corps iframe { flex: 1; min-width: 0; border: 0; height: 100%; background: #f6f7f9; }

/* Menu latéral : un groupe par univers, chacun sa couleur (--g). */
.sidenav { width: 272px; min-width: 272px; background: #fbfbfc; border-right: 1px solid #e5e7eb; }
.sn-corps { display: flex; flex-direction: column; padding: 0; height: 100%; }
.sn-tete { padding: .75rem .75rem .5rem; border-bottom: 1px solid #eef0f3; }
.sn-filtre { position: relative; margin-bottom: .5rem; }
.sn-filtre .bi-search { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); color: #9ca3af; font-size: .8rem; }
.sn-filtre input { width: 100%; border: 1px solid #e5e7eb; border-radius: .5rem; padding: .35rem 1.8rem .35rem 1.8rem; font-size: .85rem; background: #fff; outline: none; }
.sn-filtre input:focus { border-color: #86b7fe; box-shadow: 0 0 0 .2rem rgba(13,110,253,.12); }
.sn-filtre kbd { position: absolute; right: .45rem; top: 50%; transform: translateY(-50%); font-size: .65rem; padding: .05rem .3rem; background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }
.sn-groupes { flex: 1; min-height: 0; overflow-y: auto; padding: .5rem; scrollbar-width: thin; }
.sn-groupe { margin-bottom: .35rem; border-radius: .6rem; }
.sn-groupe.contient-actif { background: color-mix(in srgb, var(--g) 5%, transparent); }
.sn-titre { display: flex; align-items: center; gap: .55rem; width: 100%; border: 0; background: none; padding: .45rem .5rem; border-radius: .6rem;
  font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #374151; }
.sn-titre:hover { background: color-mix(in srgb, var(--g) 9%, transparent); }
.sn-pastille { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: .45rem; font-size: .85rem;
  color: var(--g); background: color-mix(in srgb, var(--g) 14%, white); }
.sn-nb { font-size: .68rem; font-weight: 600; color: #6b7280; background: #f1f2f4; border-radius: 1rem; padding: 0 .45rem; letter-spacing: 0; }
.sn-chevron { font-size: .7rem; color: #9ca3af; transition: transform .2s; }
.sn-groupe.ferme .sn-chevron { transform: rotate(-90deg); }
.sn-liste { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .2s ease; }
.sn-liste > div { overflow: hidden; margin-left: 1.3rem; border-left: 2px solid color-mix(in srgb, var(--g) 25%, transparent); padding-left: .3rem; }
.sn-groupe.ferme .sn-liste { grid-template-rows: 0fr; }
.sidenav.filtre-actif .sn-groupe.ferme .sn-liste { grid-template-rows: 1fr; }
.sidenav.filtre-actif .sn-groupe.ferme .sn-chevron { transform: none; }
.sn-lien { display: flex; align-items: baseline; gap: .5rem; padding: .3rem .5rem; margin: 1px 0; border-radius: .45rem;
  font-size: .85rem; color: #374151; text-decoration: none; line-height: 1.3; }
.sn-lien:hover { background: color-mix(in srgb, var(--g, #0d6efd) 9%, transparent); color: #111827; }
.sn-code { flex: 0 0 2.2rem; font-size: .7rem; font-weight: 600; color: #9ca3af; font-variant-numeric: tabular-nums; }
.sn-lien.active { background: color-mix(in srgb, var(--g, #0d6efd) 15%, white); color: color-mix(in srgb, var(--g, #0d6efd) 75%, black); font-weight: 600; position: relative; }
.sn-lien.active::before { content: ''; position: absolute; left: calc(-.3rem - 2px); top: .3rem; bottom: .3rem; width: 2px; background: var(--g); border-radius: 2px; }
.sn-lien.active .sn-code { color: var(--g); }
.sn-accueil { align-items: center; font-weight: 500; }
.sn-accueil .bi { font-size: 1rem; color: #6b7280; width: 1.6rem; text-align: center; }
.sn-accueil.active::before { display: none; }
.sn-accueil.active .bi { color: #0d6efd; }
.sn-vide { font-size: .85rem; color: #9ca3af; text-align: center; padding: 1.5rem .5rem; }
.sn-pied { display: flex; border-top: 1px solid #eef0f3; padding: .35rem .5rem; gap: .25rem; }
.sn-pied button { flex: 1; border: 0; background: none; font-size: .75rem; color: #6b7280; padding: .3rem; border-radius: .4rem; }
.sn-pied button:hover { background: #f1f2f4; color: #111827; }

/* Bouton GLOSSAIRE : posé sur la coquille (qui ne défile pas), en bas à droite. */
.coquille-corps { position: relative; }
.glo-bouton { position: absolute; bottom: 1rem; right: 1.6rem; z-index: 10; display: inline-flex; align-items: center; gap: .45rem;
  border: 0; border-radius: 2rem; padding: .55rem 1.1rem; font-size: .95rem; font-weight: 700; letter-spacing: .08em; color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ea580c); box-shadow: 0 6px 18px rgba(234, 88, 12, .35), 0 0 0 3px rgba(255, 255, 255, .9); transition: transform .15s, box-shadow .15s; }
.glo-bouton .bi { font-size: 1.15rem; }
.glo-bouton:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(234, 88, 12, .45), 0 0 0 3px #fff; }
.glo-bouton:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }

/* Panneau du glossaire : part du bouton et monte presque jusqu'à la barre du haut, 25 % de large. */
.glo-bouton.actif { background: linear-gradient(135deg, #ea580c, #c2410c); }
.glo { position: absolute; z-index: 9; top: .75rem; bottom: 4.4rem; right: 1.6rem; width: 25%; min-width: 300px;
  display: flex; flex-direction: column; background: #fff; border: 1px solid #fed7aa; border-radius: .75rem;
  box-shadow: 0 12px 32px rgba(17, 24, 39, .18); overflow: hidden; transform-origin: bottom right; animation: glo-monte .18s ease-out; }
@keyframes glo-monte { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.glo.d-none { display: none; }
.glo-entete { display: flex; align-items: center; justify-content: space-between; padding: .6rem .9rem;
  background: #fff7ed; border-bottom: 1px solid #fed7aa; font-weight: 700; font-size: 1.05rem; color: #9a3412; }
.glo-contenu { flex: 1; overflow-y: auto; padding: 0 .9rem 1rem; scrollbar-width: thin; }
.glo-h2, .glo-h3 { position: sticky; top: 0; z-index: 1; background: #fff; margin: 0; padding: .8rem 0 .35rem; }
.glo-h2 { font-size: .95rem; font-weight: 700; color: #9a3412; border-bottom: 2px solid #fed7aa; }
.glo-h3 { font-size: .9rem; font-weight: 600; color: #c2410c; border-bottom: 1px solid #ffedd5; }
.glo-note { font-size: .85rem; color: #6b7280; margin: .4rem 0 0; }
.glo dl { margin: 0; }
.glo dt { font-weight: 400; color: #111827; margin-top: .6rem; }
.glo dd { margin: .1rem 0 0; padding-bottom: .55rem; border-bottom: 1px solid #f1f2f4; color: #4b5563; font-size: .9rem; line-height: 1.4; }
.glo code { color: #9a3412; background: #fff7ed; padding: 0 .25rem; border-radius: .2rem; }

/* Petit écran : bouton réduit à l'icône, panneau sur toute la largeur. */
@media (max-width: 575px) {
  .glo { bottom: 4rem; left: .8rem; right: .8rem; width: auto; min-width: 0; }
  .glo-bouton { bottom: .8rem; right: .8rem; padding: .6rem; font-size: 0; gap: 0; }
  .glo-bouton .bi { font-size: 1.3rem; }
}

/* Les toasts des pages s'affichent au-dessus du bouton GLOSSAIRE. */
#toasts { margin-bottom: 4rem; }
