/* Cadre de l'interface ordinateur de Pereoo School (lot 1, 16/11/2026 ; maquette cadre-ordinateur.html validée par Mahonri).
   Règle absolue : le téléphone ne bouge pas. Tout est sous @media (min-width:861px), le seuil que le code utilise déjà.
   Chargé après style.css et equipe.css (index.html). Rien ici ne touche une classe propre au Workshop.
   Contenu : 1 barre latérale (240 px, rail de 72 px de 861 à 1 199 px et sur le planning), 2 barre du haut de 64 px,
   3 largeurs, 7 densité de bureau, 8 consultatif, gestion en cadre. */
@media (min-width:861px){

/* ——— Mesures communes ——— */
:root{--lat:240px;--haut:64px;--marge:clamp(16px,3vw,40px);--fs-md:14px;--fs-xl:26px}
@media (max-width:1199px){:root{--lat:72px}}
body.plan-pleine{--lat:72px}   /* planning pleine largeur : le code du planning pose cette classe ; le rail passe à 72 px à toutes les largeurs */

/* ——— 1 · Barre latérale ——— */
.shell{grid-template-columns:var(--lat) minmax(0,1fr)}
.sidebar{padding:18px 12px;gap:2px}
.sidebar .brand{gap:0;padding:4px 10px 6px;margin:0;border-bottom:0}
.sidebar .brand img,.sidebar .brand small{display:none}
.sidebar .brand::before{content:"Pereoo School";font:750 19px/1.25 var(--font-display);letter-spacing:-.01em;color:#fff}
.sidebar .nav-label{margin:0 0 8px;padding:0 10px 14px;border-bottom:1px solid rgba(255,255,255,.1);font-size:12px;font-weight:650;letter-spacing:.12em;color:var(--accent)}
.sidebar .side-bell,.sidebar .side-site,.sidebar .space-hint{display:none}   /* cloche, établissement et « Mon compte » vivent dans la barre du haut */
.nav-item{min-height:38px;padding:8px 10px;gap:11px;font-size:14px}
.nav-subitem{min-height:32px;padding:6px 10px;font-size:13px}
.nav-count{background:#c92a2a;color:#fff}   /* compteurs rouges */
.nav-group{margin:14px 10px 4px;font-size:11px}
.nav-sub.always{margin-bottom:4px}

/* Rail : icônes seules, nom en infobulle (title posé par app.js), compteur en pastille sur l'icône. */
@media (max-width:1199px){
.sidebar{padding:14px 8px}
.sidebar .brand{align-items:center;padding:4px 0 8px}
.sidebar .brand::before{content:"P";display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--accent);color:var(--brand);font:800 20px/1 var(--font-display)}
.sidebar .nav-label{display:none}
.nav-item{justify-content:center;padding:9px 0;position:relative}
.nav-item>span:not(.nav-count){display:none}
.nav-item .chev{display:none}
.nav-count{position:absolute;top:1px;right:6px;min-width:17px;margin:0;padding:0 4px;line-height:17px;font-size:10.5px}
.nav-sub{margin:2px 0;padding:0;border-left:0}
.nav-subitem{padding:7px 0}
.nav-group{height:1px;margin:8px 12px;padding:0;font-size:0;background:rgba(255,255,255,.14)}
.sidebar .space-switch{display:none}
.topbar .topbar-space select{display:block;width:auto;margin:0;padding:6px 28px 6px 10px;font-size:13px;font-weight:650;background-color:var(--navy-2);color:#fff;border:1px solid var(--navy-3);border-radius:999px}
}
body.plan-pleine .sidebar{padding:14px 8px}
body.plan-pleine .sidebar .brand{align-items:center;padding:4px 0 8px}
body.plan-pleine .sidebar .brand::before{content:"P";display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--accent);color:var(--brand);font:800 20px/1 var(--font-display)}
body.plan-pleine .sidebar .nav-label{display:none}
body.plan-pleine .nav-item{justify-content:center;padding:9px 0;position:relative}
body.plan-pleine .nav-item>span:not(.nav-count){display:none}
body.plan-pleine .nav-item .chev{display:none}
body.plan-pleine .nav-count{position:absolute;top:1px;right:6px;min-width:17px;margin:0;padding:0 4px;line-height:17px;font-size:10.5px}
body.plan-pleine .nav-sub{margin:2px 0;padding:0;border-left:0}
body.plan-pleine .nav-subitem{padding:7px 0}
body.plan-pleine .nav-group{height:1px;margin:8px 12px;padding:0;font-size:0;background:rgba(255,255,255,.14)}
body.plan-pleine .sidebar .space-switch{display:none}
body.plan-pleine .topbar .topbar-space select{display:block;width:auto;margin:0;padding:6px 28px 6px 10px;font-size:13px;font-weight:650;background-color:var(--navy-2);color:#fff;border:1px solid var(--navy-3);border-radius:999px}

/* ——— 2 · Barre du haut (64 px, collante) ——— */
.topbar{display:flex;align-items:center;gap:12px;position:fixed;top:0;left:var(--lat);right:0;height:var(--haut);z-index:40;padding:0 var(--marge);
  background:color-mix(in srgb,var(--bg) 94%,transparent);backdrop-filter:blur(6px);color:var(--ink);border-bottom:1px solid var(--line);box-shadow:none}
.topbar-brand{display:none}
.topbar-title{flex:1 1 0;min-width:0;padding:0;border:0;color:var(--ink);font:650 14px var(--font);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-espace="Gérant"] .topbar-title::before,body[data-espace="Secrétaire"] .topbar-title::before,body[data-espace="Moniteur"] .topbar-title::before,body[data-espace="Élève"] .topbar-title::before{color:var(--muted);font-weight:600}
body[data-espace="Gérant"] .topbar-title::before{content:"Gérant  ›  "}
body[data-espace="Secrétaire"] .topbar-title::before{content:"Secrétaire  ›  "}
body[data-espace="Moniteur"] .topbar-title::before{content:"Moniteur  ›  "}
body[data-espace="Élève"] .topbar-title::before{content:"Élève  ›  "}
.topbar-recherche{flex:0 1 460px;display:flex;align-items:center;gap:8px;height:40px;padding:0 12px;background:#fff;border:1px solid var(--line-2);border-radius:12px;color:var(--muted);margin:0}
.topbar-recherche[hidden]{display:none}
.topbar-recherche:focus-within{border-color:var(--primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 18%,transparent)}
.topbar-recherche svg{width:17px;height:17px;flex:none}
.topbar-recherche input[type=search]:not([type=checkbox]):not([type=radio]){flex:1;min-width:0;width:auto;height:100%;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;outline:none;font:inherit;font-size:14px;color:var(--ink)}
.topbar-recherche kbd{flex:none;font:700 12px var(--font);border:1px solid var(--line-2);border-bottom-width:2px;border-radius:6px;padding:1px 6px;color:var(--ink-2);background:#fff}
.topbar-site,.topbar-bell,.topbar-space{flex:none;display:flex;align-items:center;gap:8px;margin:0}
.topbar-site[hidden],.topbar-space:empty{display:none}
.topbar-space select{display:none}   /* le sélecteur d'espace du téléphone ; à l'ordinateur, la barre latérale porte le choix */
.topbar .bell-btn{width:40px!important;height:40px!important}
.topbar .bell-dot{background:#c92a2a!important}   /* l'orange est réservé au consultatif */
.topbar .compte-btn{width:44px;height:44px;margin:0}
.topbar .compte-rond{width:40px;height:40px;font-size:14px}
.page-head>.compte-btn-tete{display:none}   /* le rond de la barre du haut remplace celui de l'en-tête du Gérant */
body:not(.auth):not(.focus-mode) .main{padding-top:var(--haut)}

/* Notifications : le bandeau pleine largeur devient un menu sous la cloche (app.js l'y range à l'ordinateur). */
.notif-menu{position:fixed;z-index:60;width:440px;max-width:calc(100vw - 32px);max-height:calc(100vh - 96px);overflow:auto;background:#fff;color:var(--ink);border:1px solid var(--line);border-radius:14px;box-shadow:0 10px 30px rgba(0,0,0,.22)}
.notif-menu[hidden]{display:none}
.notif-menu-tete{padding:14px 16px 10px;font-size:15px}
.notif-menu #notif-bar{padding:0 12px 8px;gap:8px}
.notif-menu .notif p,.notif-menu .notif>div{flex:1 1 180px;min-width:0}
.notif-menu-vide{display:none;margin:0;padding:4px 16px 16px;color:var(--muted)}
.notif-menu-corps:has(>#notif-bar[hidden])~.notif-menu-vide{display:block}
.notif-menu .notif-menu-pied{display:block;width:100%;margin:0;padding:12px 16px;border:0;border-top:1px solid var(--line);border-radius:0 0 14px 14px;background:transparent;color:var(--primary-ink);text-align:left}
.notif-menu .notif-menu-pied:hover{background:var(--primary-soft)}

/* ——— 3 · Largeurs : 1 280 px pour une page de travail, 720 px pour une page de lecture, 960 px pour l'élève ——— */
#app{max-width:calc(1280px + 2*var(--marge));padding-left:var(--marge);padding-right:var(--marge)}
#app:has(.adm),#app:has(>.page-head.compte-head){max-width:calc(720px + 2*var(--marge))}
body[data-espace="Élève"]:not(.focus-mode) #app{max-width:calc(960px + 2*var(--marge))}
body[data-espace="Élève"]:not(.focus-mode) .eg-page{max-width:none}   /* les pages Mon code et Ma conduite remplissent la colonne de 960 px */
body.plan-pleine #app{max-width:none}   /* planning : toute la largeur disponible (exception validée le 16/11) */


/* ——— 7 · Densité de bureau : texte 14 px (--fs-md plus haut), titres 26 px, boutons de 38 px ——— */
body:not(.focus-mode) #app>.page-head h1{font-size:26px}
button{padding-top:8px;padding-bottom:8px;line-height:1.45}   /* le bouton de base : 38 px ; les boutons à classe gardent leur taille */

/* ——— 8 · Consultatif : le bandeau orange en haut de la zone de contenu ——— */
.consult-bar{position:fixed;top:0;left:var(--lat);right:0;z-index:45;height:40px;font-size:14px}
body.consult .topbar{top:40px}
body.consult:not(.auth):not(.focus-mode) .main{padding-top:calc(var(--haut) + 40px)}
body.consult .sidebar{top:0;height:100vh}
body.focus-mode .consult-bar,body.auth .consult-bar{left:0}
body.focus-mode.consult .main,body.auth.consult .main{padding-top:40px}

/* Les éléments collants du haut de page se posent sous la barre du haut (et sous le bandeau consultatif). */
html{scroll-padding-top:calc(var(--haut) + 8px)}
#app>.retour-ent{top:var(--haut)}
body.consult #app>.retour-ent{top:calc(var(--haut) + 40px)}
.bulk-bar{top:calc(var(--haut) + 8px)}
.fiche-nav,.fiche-side,.grid-main>.launcher{top:calc(var(--haut) + 16px)}

/* ——— Gestion en cadre : l'iframe prend toute la zone de contenu, sans double défilement ——— */
.studio-frame{height:calc(100vh - var(--haut))}
body.consult .studio-frame{height:calc(100vh - var(--haut) - 40px)}
#app.embed-page:has(.auto-back) .studio-frame{height:calc(100vh - var(--haut) - 64px)}
body.consult #app.embed-page:has(.auto-back) .studio-frame{height:calc(100vh - var(--haut) - 64px - 40px)}
}

/* Composants du lot 2 : l’en-tête du tableau et la fiche collante se posent sous la barre du haut (et sous le bandeau consultatif). */
@media (min-width:861px){
body{--tf-haut:var(--haut)}
body.consult{--tf-haut:calc(var(--haut) + 40px)}
}
