/* Barre du bas sur mobile : Accueil · Calendrier · Équipes · Applis (ajoutée à chaque page par le serveur ; masquée sur ordinateur) */
@view-transition{navigation:auto}
/* changement de page : aucun fondu (il laissait voir l'ancienne page à travers l'en-tête et la barre du bas) — la nouvelle page remplace l'ancienne d'un coup, l'en-tête et la barre restent opaques */
/* en-tête noir des applis (bureau) : même traitement que l'en-tête mobile et la barre d'applis, il ne clignote plus d'une page à l'autre */
header.top,header.hd{view-transition-name:csef-top}
::view-transition-group(root),::view-transition-group(csef-hd),::view-transition-group(csef-ab),::view-transition-group(csef-top){animation-duration:0s}
::view-transition-old(root),::view-transition-old(csef-hd),::view-transition-old(csef-ab),::view-transition-old(csef-top){animation:none;opacity:0}
::view-transition-new(root),::view-transition-new(csef-hd),::view-transition-new(csef-ab),::view-transition-new(csef-top){animation:none;opacity:1;mix-blend-mode:normal}
#csef-ab,#csef-sh,#csef-bk,#csef-dk{display:none}
@media (max-width:720px){
  :root{--abh:calc(58px + env(safe-area-inset-bottom,0px))}
  html{padding-bottom:var(--abh)!important}
  #csef-ab{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:2003;background:#000;border-top:1px solid #2a2a2a;padding:6px 4px env(safe-area-inset-bottom,0px);height:var(--abh);box-sizing:border-box;view-transition-name:csef-ab}
  #csef-ab a,#csef-ab button{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:0;background:none;color:#9fb0be;font:600 11px/1 "Barlow Condensed","Arial Narrow",sans-serif;letter-spacing:.08em;text-transform:uppercase;text-decoration:none;cursor:pointer;padding:0;-webkit-tap-highlight-color:transparent}
  #csef-ab svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
  #csef-ab [aria-current="page"]{color:#fff}
  #csef-ab [aria-current="page"]::after{content:"";width:20px;height:3px;border-radius:2px;background:#b6000c;margin-top:1px}
  #csef-ab :focus-visible{outline:2px solid #fff;outline-offset:-3px}
  a.bt.band[href="/"],a.hdhome,a.mh[href="/"]{display:none!important}
  .wkbtn,body.hasmine .minebtn{bottom:calc(var(--abh) + var(--pbar-h,0px))!important;padding-bottom:12px!important}
  body.hasgbtn .wkbtn,body.hasgbtn.hasmine .minebtn{bottom:calc(var(--abh) + var(--pbar-h,0px) + var(--gbtn-h,46px))!important}
  .toast{bottom:calc(var(--abh) + 14px)!important}.syncpill{bottom:calc(var(--abh) + 12px)!important}.pbar{bottom:var(--abh)!important}.gbtn:not([hidden]){bottom:var(--abh)!important}

  #csef-bk{display:block;position:fixed;inset:0;z-index:2001;background:rgba(0,0,0,.55);animation:csef-fade .18s ease-out}
  #csef-bk[hidden],#csef-sh[hidden]{display:none}
  #csef-sh{display:flex;flex-direction:column;position:fixed;left:0;right:0;bottom:0;z-index:2002;background:#f4f6f8;color:#14222e;border-radius:22px 22px 0 0;padding:8px 14px calc(var(--abh) + 12px);max-height:84vh;overflow:hidden;box-shadow:0 -10px 40px rgba(0,0,0,.35);font-family:Barlow,Arial,sans-serif;animation:csef-up .22s cubic-bezier(.2,.8,.2,1)}
  #csef-sh .gr{width:42px;height:5px;border-radius:3px;background:#c4ced8;margin:0 auto 12px}
  #csef-sh h2{margin:0 2px 12px;font:700 22px/1 "Barlow Condensed","Arial Narrow",sans-serif;letter-spacing:.03em;text-transform:uppercase}
  #csef-sh .sc{overflow:auto;flex:1 1 auto;min-height:0;-webkit-overflow-scrolling:touch}
  #csef-sh .gr,#csef-sh h2,#csef-sh .ft{flex:none}
  #csef-sh .g{display:grid;grid-template-columns:1fr 1fr;gap:10px}
  #csef-sh .t{display:flex;flex-direction:column;gap:6px;min-height:92px;padding:12px;border-radius:14px;background:#fff;border:1px solid #dde3e9;color:inherit;text-decoration:none;box-shadow:0 1px 2px rgba(20,34,46,.05);-webkit-tap-highlight-color:transparent}
  #csef-sh .t:active{background:#eef1f4;transform:scale(.985)}
  #csef-sh .t .ch{width:34px;height:34px;border-radius:10px;background:#000;color:#fff;display:grid;place-items:center;flex:none}
  #csef-sh .t:nth-child(4n+1) .ch,#csef-sh .t:nth-child(4n+2) .ch{background:#b6000c}
  #csef-sh .t svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
  #csef-sh .t b{font:700 17px/1.05 "Barlow Condensed","Arial Narrow",sans-serif;letter-spacing:.02em;text-transform:uppercase}
  #csef-sh .t small{font:500 12px/1.25 Barlow,Arial,sans-serif;color:#5a6a77}
  #csef-sh .ft{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px;padding-top:12px;border-top:1px solid #d6dde4}
  #csef-sh .ft a,#csef-sh .ft button{flex:1 1 0;min-width:110px;display:inline-flex;align-items:center;justify-content:center;gap:7px;height:42px;border-radius:10px;border:1px solid #c4ced8;background:#fff;color:#14222e;font:700 14px/1 "Barlow Condensed","Arial Narrow",sans-serif;letter-spacing:.07em;text-transform:uppercase;text-decoration:none;cursor:pointer}
  #csef-sh .ft svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
  #csef-sh .ft .pr{background:#000;border-color:#000;color:#fff}
  #csef-sh p{margin:8px 2px 0;color:#5a6a77;font-size:14px}
  /* panneau « Gérer » plein écran : il s'arrête au-dessus de la barre du bas (sinon Enregistrer/Annuler restent cachés dessous) */
  html .mg,html body>.dlg,html body>.overlay,html body>.ov{bottom:var(--abh)}
  html body>.dlg>div,html body>.overlay>div{max-height:calc(100dvh - var(--abh) - 32px)}
  html.csef-kb body>.dlg>div,html.csef-kb body>.overlay>div{max-height:calc(var(--vvh,100dvh) - 32px)}
  /* clavier ouvert : plus de barre du bas ni de boutons flottants ; les fenêtres suivent la zone visible */
  html.csef-kb{--abh:0px}
  html.csef-kb #csef-ab,html.csef-kb #csef-ns,html.csef-kb #csef-nb,html.csef-kb .wkbtn,html.csef-kb .minebtn,html.csef-kb .gbtn,html.csef-kb #csef-sh,html.csef-kb #csef-bk{display:none!important}
  html.csef-kb .ov,html.csef-kb .qe-ov,html.csef-kb .mg,html.csef-kb body>.dlg,html.csef-kb body>.overlay{top:var(--vvt,0px);bottom:auto;height:var(--vvh,100%)}
  html.csef-kb .ov .dlg{max-height:calc(var(--vvh,100vh) - 12px)}
}

/* fenêtre « sections de l'appli » (mobnav.js) */
@media (max-width:720px){
  #csef-nb{display:block;position:fixed;inset:0;z-index:2004;background:rgba(0,0,0,.55);animation:csef-fade .18s ease-out}
  #csef-ns{display:flex;flex-direction:column;position:fixed;left:0;right:0;bottom:0;z-index:2005;background:#f4f6f8;color:#14222e;border-radius:22px 22px 0 0;padding:8px 14px calc(14px + env(safe-area-inset-bottom,0px));max-height:86vh;overflow:auto;box-shadow:0 -10px 40px rgba(0,0,0,.35);font-family:Barlow,Arial,sans-serif;animation:csef-up .22s cubic-bezier(.2,.8,.2,1)}
  #csef-nb[hidden],#csef-ns[hidden]{display:none}
  #csef-ns .gr{width:42px;height:5px;border-radius:3px;background:#c4ced8;margin:0 auto 12px;flex:none}
  #csef-ns .lab{margin:0 2px 8px;font:700 13px/1 "Barlow Condensed",sans-serif;letter-spacing:.14em;text-transform:uppercase;color:#566573}
  #csef-ns .chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
  #csef-ns .chips a{display:inline-flex;align-items:center;height:42px;padding:0 14px;border-radius:999px;background:#fff;border:1px solid #c4ced8;color:#14222e;text-decoration:none;font:700 15px/1 "Barlow Condensed",sans-serif;letter-spacing:.06em;text-transform:uppercase}
  #csef-ns .chips a.all{background:#000;border-color:#000;color:#fff}
  #csef-ns h2{margin:0 2px 8px;font:700 22px/1 "Barlow Condensed",sans-serif;letter-spacing:.03em;text-transform:uppercase}
  #csef-ns .rows{display:flex;flex-direction:column;gap:6px}
  #csef-ns .rows button{display:flex;align-items:center;gap:10px;min-height:52px;padding:8px 14px;border-radius:14px;border:1px solid #dde3e9;background:#fff;color:#14222e;text-align:left;font:700 18px/1.1 "Barlow Condensed",sans-serif;letter-spacing:.03em;text-transform:uppercase;cursor:pointer;-webkit-tap-highlight-color:transparent}
  #csef-ns .rows button .t{flex:1;min-width:0}
  #csef-ns .rows button .bd{min-width:30px;height:26px;padding:0 8px;border-radius:999px;background:#fbe3e5;color:#8f0009;display:grid;place-items:center;font:700 15px/1 "Barlow Condensed",sans-serif}
  #csef-ns .rows button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;color:#b6000c;flex:none}
  #csef-ns .rows button.on{border:2px solid #b6000c;padding:7px 13px}
  #csef-ns :focus-visible{outline:3px solid #b6000c;outline-offset:2px}
}
@media (max-width:720px) and (prefers-color-scheme:dark){
  #csef-ns{background:#0e161e;color:#e6edf3}#csef-ns .gr{background:#34475a}
  #csef-ns .chips a,#csef-ns .rows button{background:#16212b;border-color:#2a3846;color:#e6edf3}#csef-ns .chips a.all{background:#e6edf3;color:#14222e;border-color:#e6edf3}
  #csef-ns .lab{color:#93a3b1}#csef-ns .rows button .bd{background:#4a1519;color:#ffd6d9}
}
@keyframes csef-up{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}
@keyframes csef-fade{from{opacity:0}to{opacity:1}}
@media (max-width:720px) and (prefers-color-scheme:dark){
  #csef-sh{background:#0e161e;color:#e6edf3}#csef-sh .gr{background:#34475a}
  #csef-sh .t{background:#16212b;border-color:#2a3846}#csef-sh .t:active{background:#1d2a36}#csef-sh .t small{color:#93a3b1}
  #csef-sh .ft{border-top-color:#2a3846}#csef-sh .ft a,#csef-sh .ft button{background:#16212b;border-color:#2a3846;color:#e6edf3}#csef-sh .ft .pr{background:#e6edf3;color:#14222e;border-color:#e6edf3}
}
@media (prefers-reduced-motion:reduce){#csef-sh,#csef-bk{animation:none}::view-transition-group(*){animation-duration:0s}}
@media print{#csef-ab,#csef-sh,#csef-bk,#csef-ns,#csef-nb{display:none!important}}

/* Ordinateur, administrateurs seulement : barre d'applis fixe en bas (ajoutée par le serveur) pour passer d'une appli à l'autre sans repasser par l'accueil */
@media (min-width:721px){
  :root{--dkh:76px}
  html:has(#csef-dk){padding-bottom:var(--dkh)}
  /* la barre a toujours la largeur de la fenêtre (barre de défilement comprise) : ses boutons ne bougent plus d'une page à l'autre selon qu'elle a un ascenseur ou non */
  #csef-dk{display:flex;position:fixed;left:0;right:auto;width:100vw;bottom:0;z-index:30;height:var(--dkh);box-sizing:border-box;background:#0b0b0b;border-top:3px solid #b6000c;padding:6px 18px;gap:2px;justify-content:safe center;overflow-x:auto;scrollbar-width:none;view-transition-name:csef-ab}
  #csef-dk::-webkit-scrollbar{display:none}
  #csef-dk a{flex:1 1 0;min-width:62px;max-width:84px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border-radius:10px;color:#aab6c1;text-decoration:none;font:600 11px/1 "Barlow Condensed","Arial Narrow",sans-serif;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap}
  #csef-dk a:hover{background:#1c1c1c;color:#fff}
  #csef-dk a[aria-current="page"]{background:#b6000c;color:#fff}
  #csef-dk a:focus-visible{outline:2px solid #fff;outline-offset:-3px}
  #csef-dk a{position:relative}
  #csef-dk .dkb{position:absolute;top:2px;right:calc(50% - 22px);min-width:17px;height:17px;padding:0 4px;box-sizing:border-box;border-radius:9px;background:#e30613;color:#fff;font:700 11px/17px "Barlow Condensed",Arial,sans-serif;letter-spacing:0;text-align:center;font-style:normal;box-shadow:0 0 0 2px #0b0b0b}
  #csef-dk a[aria-current="page"] .dkb{background:#fff;color:#b6000c;box-shadow:0 0 0 2px #b6000c}
  #csef-dk svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  html:has(#csef-dk) :is(.pbar,.gbtn:not([hidden])){bottom:var(--dkh)!important}
  html:has(#csef-dk) :is(.toast,.syncpill){bottom:calc(var(--dkh) + 14px)!important}
  html:has(#csef-dk) .mg{bottom:var(--dkh)}
}
@media print{#csef-dk{display:none!important}}
