/* Pages de gestion de la secrétaire et du gérant à l'ordinateur (lots 3b à 3d, 17/11) : listes en tableau + fiche, Gestion, Caisse, Pilotage, Équipe.
   Tout est sous min-width:861px : le téléphone ne change pas. Une section par écran, délimitée par un commentaire « ===== <écran> ===== ». */
@media (min-width:861px){

  /* ===== Équipe et droits (lot 3d2) : la matrice personnes × familles de droits, la fiche de la personne à droite ===== */
  .eq-outils{justify-content:space-between}
  .eq-legende{margin:0;color:var(--muted);font-size:13px;font-weight:600;white-space:nowrap}
  th.eq-col-m,td.eq-col-m{text-align:center;padding-left:4px;padding-right:4px}
  th.eq-col-m{font-size:12px;letter-spacing:0;white-space:nowrap}
  .tf.avec-fiche .tf-nom .eq-tab-sous{max-width:170px}
  .eq-m{display:inline-block;min-width:20px;font-size:17px;font-weight:700;line-height:1}
  .eq-m-tout{color:#0e7352}
  .eq-m-partie{color:#a65400}
  .eq-m-rien{color:var(--faint);font-weight:500}
  .tf-nom .eq-tab-sous{display:block;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .tf-nom .eq-tab-sous.eq-warn{color:#a65400}
  .tf-nom .eq-tab-sous.eq-bad{color:var(--danger)}
  .eq-fiche-corps{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;align-content:start}
  .eq-fiche-corps>.vf-btn{width:auto;justify-self:start;min-height:44px}
  .eq-fiche-corps .vf-btn.eq-long{height:auto;line-height:1.25;white-space:normal}
  #app .eq-fiche-corps .eq-grp label{font-size:14.5px;font-weight:600;letter-spacing:0;color:var(--ink-2)}
  #app .eq-fiche-corps .sec-fld{font-size:16px;font-weight:700;letter-spacing:0;color:var(--ink-2)}
  .eq-fiche-pied{position:sticky;bottom:0;display:grid;gap:8px;padding:10px 14px 12px;background:var(--surface);border-top:1px solid var(--line)}
  .eq-lecture{display:inline-block;margin-left:8px;padding:1px 8px;border-radius:999px;background:var(--surface-2);color:var(--ink-2);font-size:12px;font-weight:700}

  /* ===== Journal (lot 3d2) : tableau filtrable, la ligne choisie à droite ===== */
  .jr-dates{max-width:420px;margin:0 0 14px}
  .tf-ligne td.jr-qui{max-width:360px;overflow:hidden;text-overflow:ellipsis}
  .tf-ligne td.jr-det{max-width:300px;overflow:hidden;text-overflow:ellipsis}
  .tf.avec-fiche .tf-ligne td.jr-qui{max-width:230px}
  .tf.avec-fiche .tf-ligne td.jr-det{max-width:170px}
  .tf-ligne td b{font-size:14px}
  .jr-suite{display:flex;justify-content:center;margin-top:14px}
  .jr-suite:empty{display:none}
  .jr-suite .vf-btn{width:auto;min-width:220px}
  .jr-fiche-dl{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px 14px;margin:0;font-size:14px}
  .jr-fiche-dl dt{color:var(--ink-2)}
  .jr-fiche-dl dd{margin:0;overflow-wrap:anywhere}
  .jr-fiche-dl dd.jr-multi{white-space:pre-line}

  /* ===== Identité, Reprise des données, Paramètres (lot 3d2) : formulaire ou page de lecture de 720 px, centré ===== */
  #app:has(>.page-head.pg-720),#app:has(>.reprise){max-width:calc(720px + 2*var(--marge))}
  /* Le pied « Enregistrer » d'Identité ne déborde plus de la page de 720 px (ses marges de −4 px, utiles au téléphone, le faisaient mesurer 728). */
  .id-pied{margin-left:0;margin-right:0}

/* ===== Pilotage du gérant (lot 3d1) ===== */
/* Accueil : tuiles à gauche (grille de 3 dès 1 200 px), À décider puis Trésorerie (cascade, prévision, TVA) à droite. */
.pg-accueil{grid-template-columns:minmax(0,1.25fr) minmax(0,1fr)}
.pg-accueil>.pg-droite{grid-column:2;order:2;min-width:0}
.pg-accueil>.pil-note{grid-column:1/-1}
.pg-droite>.pg-ligne-decider{margin-bottom:12px}
.pg-droite>.pg-treso{margin-bottom:0}
@media (min-width:1200px){
.pg-gauche .pv-tuiles{grid-template-columns:repeat(3,minmax(0,1fr))}
.pg-gauche .pv-tuiles>.pv-tu:last-child{grid-column:1/-1;min-height:0}
.pg-gauche .pv-tuiles>.pv-tu:last-child .pv-tu-viz{margin-top:6px}
.pg-gauche .pv-tuiles>.pv-tu[data-cle=etab]{order:2;grid-column:1/-1;min-height:0}
.pg-gauche .pv-tuiles>.pv-tu[data-cle=etab] .pv-tu-viz{margin-top:6px}
}
/* Pages du Pilotage : un seul gabarit, le graphique à gauche, le tableau à droite (blocs déplacés par pgGabarit ; filtres en tête). */
.pv-gabarit>.pv-col{min-width:0}
.pv-gabarit>.pv-col-g{grid-column:1}
.pv-gabarit>.pv-col-d{grid-column:2}
.pv-gabarit>.pv-col-seule{grid-column:1/-1}
.pv-col>.pv-trio,.pv-col>.pv-ch,.pv-col>.pg-cap-tete{margin:0 0 12px}
.pv-col>.pv-detaille{display:inline-flex;align-items:center;min-height:44px}
/* Tableau de la semaine : l'anneau des objectifs, plus grand, tient la tête de la colonne de gauche. */
.pv-gabarit .pv-sync{gap:18px;padding:18px 16px}
.pv-gabarit .pv-sync .pv-anneau{width:84px;height:84px}
/* Rentabilité : une seule carte, le graphique en cascade à gauche, les neuf lignes à droite. */
.pv-page>.pg-rent{grid-column:1/-1}
.pg-rent .pv-rent-corps{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);gap:28px;align-items:start}
.pg-rent .pv-rent-g{min-width:0}
.pg-rent .pv-rent-g .pv-wf{height:300px}
.pg-rent .pv-rent-g .pv-wf-l{margin-top:8px;font-size:12px}
.pg-rent .pv-rent-corps .pv-lg{padding:11px 0;font-size:14px}

/* ===== Gestion (lot 3c) ===== */
/* Bandeau de quatre chiffres en tête : la carte « Pilotage » du téléphone (séances, en caisse, encaissé, reste à encaisser), sur une ligne. */
.pil-carte{margin-bottom:6px;padding:16px 18px}
.pil-carte-g{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.pil-carte-g>span{padding:12px 14px}
.pil-carte-g b{font-size:22px}
/* Tuiles par quatre, avec le chiffre clé de la tuile (quand l'écran du téléphone en donne un). */
.gestion-tiles.sec-gestion{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.gestion-tiles.sec-gestion .tile{min-height:118px;padding:18px}
.tile-ch{display:flex;flex-direction:column;gap:2px;margin-top:auto;min-width:0;max-width:100%}
.tile-ch b{font:750 20px/1.2 var(--font-display);font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--ink);overflow:hidden;text-overflow:ellipsis}
.tile-ch small{font-size:12.5px;font-weight:650;color:var(--muted)}
@media (max-width:1099px){
  .gestion-tiles.sec-gestion{grid-template-columns:repeat(3,minmax(0,1fr))}
  .pil-carte-g{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* ===== Caisse et banque (lot 3c) ===== */
/* Un onglet par compte ; le relevé à gauche, le comptage du jour (ou le pointage) et les gestes à droite. */
.cb-onglets{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.cb-onglet{display:flex;flex-direction:column;align-items:flex-start;gap:1px;margin:0;min-height:48px;padding:7px 16px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);box-shadow:none;text-align:left}
.cb-onglet b{font-size:14px}
.cb-onglet small{font-size:12px;font-weight:650;color:var(--muted);font-variant-numeric:tabular-nums}
.cb-onglet:hover{background:var(--surface-2)}
.cb-onglet[aria-selected=true]{background:#00353e;border-color:#00353e;color:#fff}
.cb-onglet[aria-selected=true] small{color:#d7e6e8}
.cb-cols{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:16px;align-items:start}
.cb-releve,.cb-droite{min-width:0}
.cb-tete{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;padding:14px 18px}
.cb-tete-t{display:flex;flex-direction:column;gap:2px;min-width:0}
.cb-tete-t h2{margin:0;font-size:18px}
.cb-etat{font-size:12.5px;font-weight:700;color:var(--muted)}
.cb-etat.warn{color:var(--warning)}
.cb-tete-m{display:flex;flex-direction:column;align-items:flex-end;flex:none}
.cb-tete-m b{font:750 22px/1.2 var(--font-display);font-variant-numeric:tabular-nums;white-space:nowrap}
.cb-tete-m small{font-size:12px;font-weight:650;color:var(--muted)}
.cb-pastz{display:contents}
.cb-tableau{container-type:inline-size;min-width:0}
.cb-tableau .tf-th{padding:0 8px}
.cb-tableau .tf-tri{padding:0 8px}
.cb-tableau .tf-ligne td{padding:4px 8px}
/* Relevé étroit : tiers et référence passent sous le libellé ; large : deux colonnes. */
@container (max-width:759px){.cb-sec,.cb-ter{display:none}}
@container (min-width:760px){.cb-lib-sous{display:none}}
.cb-statique{cursor:default}
.cb-lib-t{display:flex;flex-direction:column;line-height:1.25;min-width:0}
.cb-lib-t b,.cb-lib-t small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cb-lib-t small{color:var(--muted);font-size:12px}
.cb-lib b{font-size:14px}
/* Colonnes à largeur fixe, le libellé prend le reste (coupé par une ellipsis, le titre porte le texte entier). */
.cb-tableau .tf-table{table-layout:fixed}
.cb-c-p{width:92px}.cb-c-d{width:72px}.cb-c-t{width:100px}.cb-c-r{width:120px}.cb-c-m{width:112px}
.tf-ligne td.cb-lib{overflow:hidden}
.cb-tableau .tf-ligne td{overflow:hidden;text-overflow:ellipsis}
.cb-pointe{color:#0f6b3d;font-weight:700}
.cb-apointer{color:var(--warning);font-weight:700}
.cb-entree{color:#0f6b3d}
.cb-carte{display:grid;gap:10px;margin:0 0 14px;padding:16px 18px}
.cb-carte h3{margin:0;font-size:16px}
.cb-carte .vf-btn{width:100%}
.cb-ligne{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:6px 0;border-bottom:1px solid var(--line);font-size:14px}
.cb-ligne>span:first-child{color:var(--muted)}
.cb-ligne b{text-align:right;font-variant-numeric:tabular-nums}
.cb-sous{margin:0;font-size:13px;color:var(--muted);font-weight:650}
.cb-droite .eq-fold{margin:0 0 14px}
.cb-droite .gn-gestes{margin:0 0 14px}
.cb-droite .cb-acces{margin:0 0 6px}
@media (max-width:1199px){
  .cb-cols{grid-template-columns:minmax(0,1fr)}
}

  /* ===== Fournisseurs ===== */
  .fou-rib{font-variant-numeric:tabular-nums;letter-spacing:.02em;color:var(--ink-2)}
  @container (max-width:600px){.fou-col-rib{display:none}}
  .tf-fiche .fac-fiche{display:grid;gap:12px}
  .tf-fiche .fac-fiche>*{margin:0}
  .tf-fiche .fac-bar{bottom:0;box-shadow:0 -6px 18px rgba(0,40,48,.10)}

  /* ===== Payeurs ===== */
  .pay-etat{color:var(--muted);font-size:12px;font-weight:400}
  .pay-tete .tf-fiche-nom b{overflow:visible;white-space:normal;text-overflow:clip;font-size:15px}
  #app .tf-fiche-tete .tf-modifier{flex:none!important;width:auto!important;min-height:36px;margin:0;padding:0 12px;font-size:13px}
  #app .tf-fiche-corps>.stats,#app .tf-fiche-corps>.fiche-avance,#app .tf-fiche-corps>.fiche-avance-ailleurs,#app .tf-fiche-corps>.vf-card,#app .tf-fiche-corps>.pay-fold{margin:0 0 12px}
  #app .tf-fiche-corps>.gn-info{margin:0 0 14px;padding:0 2px}
  #app .tf-fiche-corps>.gest-sec{margin:16px 0 8px}
  .tf-fiche .piece-actions{bottom:0;margin:0 -14px -16px;padding:10px 14px;background:var(--surface);border-top:1px solid var(--line)}

  /* ===== Catalogue ===== */
  .go-2l{display:flex;flex-direction:column;line-height:1.25;min-width:0}
  .go-2l b{font-size:14.5px;max-width:34ch;overflow:hidden;text-overflow:ellipsis}
  .go-2l small{color:var(--muted);font-size:12px}
  .go-bloc{display:grid;gap:8px;margin:0 0 12px;padding:12px 14px}
  .go-bloc .piece-tot b{max-width:60%;overflow-wrap:anywhere}
  .tf-fiche-corps>.vf-btn{width:100%;margin-top:4px}
  /* Les écrans Catalogue et Encaissements gardent la classe .caisse-head du téléphone (titre seul sur sa ligne) : à l'ordinateur, les boutons reviennent à droite du titre. */
  #app>.page-head.go-tete>div:first-child,#app>.page-head.go-tete:has(.sec-add)>div:first-child{flex:1 1 auto}
  .go-lbl{margin:16px 2px 6px}
  .tf-ligne .go-2l b{max-width:36ch}
  /* Colonnes que la fiche de droite redonne : masquées quand le tableau n'a plus la place (fiche ouverte, 900 px de large ou moins). */
  @container (max-width:900px){.go-etroit{display:none}}

  /* ===== Fiche d'un établissement (Gérant › Entreprise › Établissements, lot gerant-12) ===== */
  /* À partir de 1 200 px : deux colonnes (la fiche et l'équipe à gauche, véhicules, bureaux et accès à droite), sur la largeur utile du cadre
     (1 280 px au plus, `#app` d'ordinateur.css) ; la fiche n'a plus la colonne de 720 px. Au-dessous, l'écran garde sa colonne de 720 px. */
  @media (min-width:1200px){
    #app:has(>.page-head.pg-etab){max-width:calc(1280px + 2*var(--marge))}   /* plus spécifique que `#app:has(.adm-form)` (720 px) d'ordinateur-composants.css, que ce lot ne modifie pas */
    .et-grille{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 32px;align-items:start}
    .et-col{min-width:0}
    .et-grille .gest-sec:first-child{margin-top:4px}
    /* Les champs vides : une seule ligne repliable « N champs à renseigner » au bas de la fiche. */
    .et-vides{margin:4px 0 0;border-top:1px solid var(--line)}
    .et-vides>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;padding:6px 0;cursor:pointer;list-style:none;font-size:14.5px;font-weight:700;color:var(--ink-2)}
    .et-vides>summary::-webkit-details-marker{display:none}
    .et-vides>summary::after{content:'';flex:none;width:8px;height:8px;margin-right:4px;border:solid var(--ink-2);border-width:0 2px 2px 0;transform:rotate(45deg);transition:transform .15s}
    .et-vides[open]>summary::after{transform:rotate(-135deg)}
    .et-vides>summary:focus-visible{outline:2px solid var(--primary);outline-offset:2px;border-radius:6px}
    .et-vides>.et-lu:last-child{border-bottom:0}
  }
}
