/* gestion_licences v2 — gabarit des pages de compte (interface A), complète gl-jetons.css.
   Aucun style en ligne : les pages sont servies avec une CSP default-src 'self' (TA-3). */

html.gl { min-height: 100%; }
.gl body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
.gl .page-compte { flex: 1; }

/* Utilitaires */
.gl .pile { display: flex; flex-direction: column; gap: 16px; position: relative; }
.gl .grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.gl .grille.serree { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gl .masque { display: none !important; }
.gl .texte { font-size: 14px; }
.gl .texte-2 { color: var(--texte-2); }
.gl .centre { align-items: center; text-align: center; padding-block: 48px; }
.gl .largeur-360 { max-width: 360px; }
.gl .pied .btn-lien { font-size: 13px; }
.gl .messages { display: flex; flex-direction: column; gap: 8px; }
.gl .messages:empty { display: none; }
.gl .bandeau .actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Politique du mot de passe : pictogramme selon l'état de chaque règle */
.gl .politique li svg { flex: none; }
.gl .politique li .si-ok { display: none; }
.gl .politique li.ok .si-ok { display: inline; }
.gl .politique li.ok .si-ko { display: none; }

/* Mon compte (A7) : gabarit à barre latérale de l'administration (gl-barre.css), sections empilées */
.gl .barre .logo.compte { flex-wrap: nowrap; align-items: flex-start; }
.gl .barre .logo.compte .nom { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; font-weight: 400; color: var(--texte-2); }
.gl .barre .logo.compte strong { font-size: 16px; font-weight: 700; color: var(--texte); }
.gl .barre .bas .qui span { display: block; overflow: hidden; text-overflow: ellipsis; }
.gl .avec-barre .contenu { max-width: 1040px; }
.gl .avec-barre .section { scroll-margin-top: var(--decalage-ancres, 16px); }
.gl .liste-sections { display: flex; flex-direction: column; gap: 20px; }
.gl .section-entete { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.gl .section-entete.gauche { justify-content: flex-start; }
.gl .section .titre-3.danger { color: var(--erreur); }
.gl .valeur-actuelle { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.gl .valeur-actuelle dt { font-size: 14px; color: var(--texte-2); }
.gl .valeur-actuelle dd { font-weight: 600; }
.gl .ligne-boutons { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.gl .ligne-boutons .champ { flex: 1 1 240px; max-width: 360px; }

/* Tableaux des sections */
.gl td.gras { font-weight: 600; }
.gl td .secondaire { display: block; font-size: 13px; color: var(--texte-2); font-weight: 400; }
.gl td.actions { text-align: right; white-space: nowrap; }
.gl td.actions .btn-lien { font-size: 14px; }
.gl td.actions .btn-lien.danger { color: var(--erreur); }

/* Licence, applications, états */
.gl .jauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.gl .jauge .ligne span:last-child { font-variant-numeric: tabular-nums; }
.gl .liste-apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.gl .liste-apps li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--bordure); border-radius: 8px; font-size: 14px; }
.gl .liste-apps li span { font-weight: 600; }
.gl .liste-apps a { min-height: 40px; display: inline-flex; align-items: center; }
.gl .etat-vide { border: 1px dashed var(--bordure-champ); border-radius: 8px; padding: 24px; text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.gl .etat-vide p:first-child { font-weight: 600; }
.gl .chargement { border: 1px solid var(--bordure); border-radius: 8px; padding: 24px; display: flex; flex-direction: column; gap: 10px; align-items: center; }

/* Boîte de dialogue native (confirmations, saisie d'un libellé) */
.gl dialog.modale { padding: 0; width: calc(100% - 32px); max-width: 480px; border: 1px solid var(--bordure); border-radius: 12px; background: var(--surface); color: var(--texte); box-shadow: var(--ombre); }
.gl dialog.modale::backdrop { background: oklch(0.2 0.01 80 / 0.45); }
.gl .modale > header { padding: 16px 20px; border-bottom: 1px solid var(--bordure); }
.gl .modale > .corps-modale { padding: 20px; display: flex; flex-direction: column; gap: 16px; font-size: 14px; }
.gl .modale > footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--bordure); }

/* Licences et soldes par gamme (avenant n°1) */
.gl .cartes-gammes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.gl .carte-gamme { border: 1px solid var(--bordure); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; background: var(--surface); }
.gl .carte-gamme.courante { border: 2px solid var(--accent); padding: 15px 17px; }
.gl .carte-gamme .entete-gamme { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; }
.gl .carte-gamme .entete-gamme .bloc { display: flex; flex-direction: column; gap: 2px; }
.gl .carte-gamme .entete-gamme .droite { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.gl .carte-gamme .titre-3 { font-size: 16px; }
.gl .carte-gamme .jauges { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.gl .carte-gamme .apps-titre { font-size: 13px; font-weight: 600; color: var(--texte-2); }
.gl .carte-gamme .apps { display: flex; flex-wrap: wrap; gap: 6px; }
.gl .carte-gamme .apps li { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 1px solid var(--bordure); border-radius: 8px; font-size: 13px; }
.gl .carte-gamme .apps a { font-size: 13px; }

/* Mon compte sous 768 px : la barre devient un bandeau fixe en haut, sections en ligne défilante,
   actions du bas en icônes (libellés conservés pour les lecteurs d'écran) */
@media (max-width: 767px) {
  .gl .avec-barre { flex-direction: column; }
  .gl .avec-barre .barre {
    flex: none; width: auto; height: auto; align-self: stretch; overflow: visible; z-index: 2;
    flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 4px;
    padding: 8px 8px 0; border-right: 0; border-bottom: 1px solid var(--bordure);
  }
  .gl .avec-barre .barre .logo.compte { flex: 1 1 auto; padding: 4px 8px; }
  .gl .avec-barre .barre .logo.compte .nom { flex-direction: row; align-items: baseline; gap: 6px; }
  .gl .avec-barre .barre .replier, .gl .avec-barre .barre nav svg { display: none; }
  /* L'état replié de la barre latérale ne s'applique pas au bandeau */
  .gl .avec-barre .barre.repliee .logo .nom, .gl .avec-barre .barre.repliee nav .libelle {
    position: static; width: auto; height: auto; overflow: visible; clip: auto;
  }
  .gl .avec-barre .barre .bas { order: 1; margin: 0; padding: 0; border: 0; flex-direction: row; }
  .gl .avec-barre .barre .bas .qui, .gl .avec-barre .barre .bas .libelle {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .gl .avec-barre .barre .bas a, .gl .avec-barre .barre .bas button { width: 44px; min-height: 44px; padding: 0; justify-content: center; }
  .gl .avec-barre .barre nav { order: 2; flex: 1 0 100%; flex-direction: row; overflow-x: auto; padding: 4px 0 6px; }
  .gl .avec-barre .barre nav a { white-space: nowrap; justify-content: flex-start; padding: 0 12px; }
  .gl .avec-barre .barre nav a[aria-current="location"] { box-shadow: inset 0 -3px 0 var(--accent); }
  .gl .avec-barre .contenu { padding: 20px 16px 40px; }
}
