/* ═══ Tableau de bord sur ordinateur : tout tient dans la page ═══════════════
   Chargé APRÈS style-00.css, actif seulement à partir de 1024 px de large :
   le téléphone garde exactement sa mise en page.
   - largeur qui suit l'écran (plus de cadre fixe de 1200 px) ;
   - haut de page compacté (en-tête, barre de boutons, Affiliation) ;
   - grille calée sur la hauteur restante : ev-bureau.js choisit le nombre de
     colonnes et la hauteur des rangées (classe .ev-bureau-ok sur .menu) ;
   - contenu des tuiles proportionnel à la tuile (unités cq*).
   Retour arrière : retirer la ligne <link> et la ligne <script> d'index.html. */
@media (min-width: 1024px) {
  :root {
    --ev-gap: clamp(10px, 1.6vh, 20px);
    --ev-marge: clamp(40px, 7vw, 110px); /* ≥ largeur du bouton d'aide flottant */
  }
  #contentContainer.container {
    max-width: none;
    width: 100%;
    padding: clamp(6px, 1.2vh, 16px) var(--ev-marge) 0;
  }

  /* — En-tête : une ligne fine — */
  #contentContainer .header {
    padding: 4px 0 clamp(6px, 1vh, 12px);
    margin-bottom: clamp(6px, 1vh, 12px);
    gap: 12px;
    flex-wrap: nowrap;
    align-items: center;
  }
  #contentContainer .header h1 {
    font-size: clamp(1.25rem, 0.7rem + 1.3vw, 2.6rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #contentContainer .header-left { min-width: 0; }
  #contentContainer #systemVersionDisplay {
    position: static;
    top: auto;
    right: auto;
    align-self: center;
    flex-shrink: 0;
  }
  #contentContainer .logout-button { padding: 8px 14px; }

  /* — Barre de boutons — */
  #contentContainer .section-nav {
    margin-bottom: var(--ev-gap);
    padding: 6px;
    gap: 8px;
  }
  #contentContainer .section-nav button {
    padding: 7px 14px;
    font-size: clamp(.82rem, .7rem + .25vw, 1rem);
  }

  /* — Affiliation : barre affinée — */
  /* ≥ 18 px : les pastilles des tuiles (top:-10px) ne doivent pas mordre sur la bannière */
  #contentContainer .affil-bar-wrapper { margin-bottom: max(var(--ev-gap), 18px); }
  #contentContainer .affil-collapsed-bar { height: 42px; }
  #contentContainer .affil-bar-icon { width: 28px; height: 28px; font-size: .85rem; }

  /* — Grille — */
  #contentContainer .menu {
    gap: var(--ev-gap);
    margin-bottom: var(--ev-gap);
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  #contentContainer .menu.ev-bureau-ok {
    grid-template-columns: repeat(var(--ev-cols, 4), minmax(0, 1fr));
    grid-auto-rows: var(--ev-row-h, 150px);
  }
  #contentContainer .menu.ev-bureau-ok > .menu-item {
    container-type: size;
    min-height: 0;
    height: 100%;
    padding: clamp(8px, 6cqh, 22px) clamp(10px, 5cqw, 22px);
    justify-content: center;
  }
  #contentContainer .menu.ev-bureau-ok > .menu-item > i {
    --ev-ico: clamp(30px, min(29cqh, 16cqw), 76px);
    width: var(--ev-ico);
    height: var(--ev-ico);
    font-size: calc(var(--ev-ico) * .44);
    border-radius: calc(var(--ev-ico) * .26);
    margin-bottom: clamp(4px, 5cqh, 14px);
  }
  #contentContainer .menu.ev-bureau-ok > .menu-item > h2 {
    font-size: clamp(.88rem, min(6cqw, 12cqh), 1.75rem);
    margin-bottom: clamp(2px, 3cqh, 8px);
    line-height: 1.25;
  }
  #contentContainer .menu.ev-bureau-ok > .menu-item > h2 small {
    font-size: .62em;
  }
  #contentContainer .menu.ev-bureau-ok > .menu-item > .item-stats,
  #contentContainer .menu.ev-bureau-ok > .menu-item > p {
    font-size: clamp(.72rem, min(4.2cqw, 8.4cqh), 1.25rem);
    min-height: 0;
    margin-top: clamp(2px, 2cqh, 8px);
    padding-top: clamp(3px, 3cqh, 10px);
    line-height: 1.35;
    width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  /* Tuile basse (petit écran, zoom avant) : titre et chiffres sur une ligne chacun. */
  @container (max-height: 140px) {
    #contentContainer .menu.ev-bureau-ok > .menu-item > h2 {
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
    }
  }
  @container (max-height: 118px) {
    #contentContainer .menu.ev-bureau-ok > .menu-item > .item-stats,
    #contentContainer .menu.ev-bureau-ok > .menu-item > p { -webkit-line-clamp: 1; }
  }

}

/* Grands écrans (ou zoom arrière) : les barres du haut grandissent avec la page. */
@media (min-width: 1800px) {
  #contentContainer .section-nav,
  #contentContainer .affil-collapsed-bar,
  #contentContainer .logout-button,
  #contentContainer #systemVersionDisplay { zoom: 1.2; }
}
@media (min-width: 2300px) {
  #contentContainer .section-nav,
  #contentContainer .affil-collapsed-bar,
  #contentContainer .logout-button,
  #contentContainer #systemVersionDisplay { zoom: 1.45; }
}

/* « PROPULSÉ PAR EVISIONS » retiré du tableau de bord (ordinateur et téléphone),
   le 08/11/2026 : les promoteurs savent déjà qu'ils sont sur EVISIONS, et la
   mention gênait la marque blanche (FAI, marques). Elle reste sur les portails
   et les pages de vente. Pour la remettre : supprimer cette règle. */
body > footer { display: none !important; }
