/* Pages « calendrier » hors atelier (03/12/2026, P1-3 : ascenseurs inutiles, vide, bandeaux géants, mise en page non plein écran).
   Chargée APRÈS le CSS propre de chaque page (index.html, formation.html, foyer.html, admin.html : ?v=20261203f). Aucun moteur touché.
   Chaque page a sa classe de <body> : pg-formation, pg-foyer, pg-admin ; la bibliothèque est la page d'accueil (#chalet-calendrier-app).
   Règle d'ensemble : UN seul défilement (celui de la page), jamais de hauteur fixe ; le contenu occupe la largeur utile de 1366 à 2560 px. */

/* ---------- Barre de navigation (navbar.js, partagée) : cibles de 44 px dans la barre de 48 px ---------- */
.pro-nav :is(a.pro-link,a.pro-brand,button.pro-logout){min-height:44px}

/* ---------- Bibliothèque (page d'accueil connectée) ---------- */
/* Le bandeau d'accueil « Imaginez, créez… » (194 px) répète l'en-tête et le titre « Ma bibliothèque » : retiré de l'affichage (comme dans l'atelier). */
html body #chalet-calendrier-app .intro{display:none!important}
/* Cartes de ~300 px : toute la bibliothèque tient sur un écran, quelle que soit la largeur (3 colonnes géantes de 607 px avant). */
html body #chalet-calendrier-app #libraryCards{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))!important;gap:16px!important;align-items:stretch}
html body #chalet-calendrier-app:not([data-ui-atelier]) .shell{padding-bottom:20px!important}
html body #chalet-calendrier-app #newCalendarCard{min-height:0}
/* Le fond dégradé appartient à #chalet-calendrier-app : il va jusqu'en bas de l'écran (avant : une cassure nette sous les cartes quand la page est courte). 49 px = barre de navigation. */
html body #chalet-calendrier-app:not([data-ui-atelier]){min-height:calc(100dvh - 49px)}
@media (max-width:980px){html body #chalet-calendrier-app:not([data-ui-atelier]){min-height:calc(100dvh - 62px)}}
/* sélecteur de langue : cible de 44 px */
html body #chalet-calendrier-app label.language-control{min-height:44px;align-items:center}
html body #chalet-calendrier-app label.language-control select{min-height:44px}

/* ---------- Formation ---------- */
body.pg-formation .layout{min-height:calc(100dvh - 49px)}   /* barre 48 px + filet 1 px (avant : 100vh - 44 px = 5 px de trop = barre de page) */
body.pg-formation .main{padding:28px 32px 36px}
body.pg-formation .lead{max-width:80ch}
body.pg-formation .card p{max-width:90ch}
body.pg-formation video{aspect-ratio:16/9;height:auto;max-height:min(68dvh,640px)}
body.pg-formation .nav-footer{margin-top:20px;padding-top:16px}
@media (min-width:901px){
  /* colonne des leçons : reste visible pendant la lecture, jamais plus haute que l'écran ; fond blanc jusqu'en bas */
  body.pg-formation .layout{background:linear-gradient(90deg,#fff 0 329px,#e6ecea 329px 330px,transparent 330px)}
  body.pg-formation .sidebar{position:sticky;top:0;align-self:start;max-height:100dvh;overflow-y:auto;overscroll-behavior:contain;border-right:0;background:transparent}
}
@media (min-width:1700px){ body.pg-formation .main{max-width:1180px} }
@media (max-width:900px){
  body.pg-formation .layout{min-height:0}
  body.pg-formation .sidebar{border-right:0;border-bottom:1px solid #e6ecea;padding:14px 16px}
  body.pg-formation .main{padding:20px 16px 28px}
  body.pg-formation h1{font-size:24px}
  body.pg-formation .card{padding:18px}
}
/* cibles de 44 px */
body.pg-formation :is(.nav-footer button,.lessons-head button){min-height:44px}
body.pg-formation .lessons-head button{padding:0 8px}
body.pg-formation .search-box input{min-height:44px}
body.pg-formation .module-head,body.pg-formation .lesson-item{min-height:44px}
body.pg-formation .lesson-item{align-items:center}
body.pg-formation summary{min-height:44px;display:flex;align-items:center}
body.pg-formation .cta-btn{min-height:44px;display:inline-flex;align-items:center}
/* pastille « leçon terminée » : même dessin (18 px), zone cliquable de 44 px */
body.pg-formation .check-circle{position:relative;width:44px;height:44px;margin:-13px;border:0!important;background:none!important;flex:none}
body.pg-formation .check-circle::before{content:"";position:absolute;left:13px;top:13px;width:18px;height:18px;box-sizing:border-box;border:1.5px solid #94a3b8;border-radius:50%}
body.pg-formation .check-circle.done::before{border-color:#b3363c;background:#fff5f5}
/* contrastes (WCAG AA 4,5:1) */
body.pg-formation .course-author,body.pg-formation .lessons-head,body.pg-formation .lessons-head button{color:#3d6b60}
body.pg-formation .progress-count{color:#47655e}
body.pg-formation .lesson-item.active,body.pg-formation .check-circle.done{color:#b3363c}
body.pg-formation .nav-footer button.complete-btn{background:#bd3a32}
body.pg-formation .nav-footer button.complete-btn.is-done{background:#0f766e}
body.pg-formation .eyebrow{color:#0b6b63}
body.pg-formation .cta-btn{background:#0f766e}
body.pg-formation .topbar a.btn{background:#0f766e}

/* ---------- Foyer (lecture des créations d'un autre membre) ---------- */
body.pg-foyer .container{max-width:1360px;margin:20px auto;padding:0 20px}
body.pg-foyer .card{margin-bottom:0}
body.pg-foyer .liste{grid-template-columns:repeat(auto-fill,minmax(min(100%,420px),1fr))}
@media (max-width:560px){ body.pg-foyer .container{margin:12px auto;padding:0 12px} }

/* ---------- Administration ---------- */
body.pg-admin .container{max-width:1560px;margin:20px auto;padding:0 20px}
body.pg-admin .card{padding:20px;margin-bottom:20px}
body.pg-admin .btn{min-height:44px;padding:0 14px;font-size:13px}
body.pg-admin :is(input[type=text],input[type=email],input[type=password],input[type=number]){min-height:44px;font-size:14px}
body.pg-admin #signupToggle{flex:none;width:28px!important;height:28px!important}
body.pg-admin label:has(#signupToggle){min-height:44px}
body.pg-admin th,body.pg-admin td{padding:10px}
body.pg-admin code{overflow-wrap:anywhere}
body.pg-admin #usersTable input[type=email]{width:260px!important}   /* l'adresse n'est plus coupée */
body.pg-admin #calsTable td a:not(.btn){display:inline-flex;align-items:center;min-height:44px}
@media (min-width:1100px){
  /* sauvegardes et inscriptions côte à côte ; tableaux sur toute la largeur */
  body.pg-admin .container{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}
  body.pg-admin .container>.card{margin:0}
  body.pg-admin .container>.card:nth-child(n+3){grid-column:1/-1}
}
@media (max-width:900px){
  /* tableaux : une fiche par ligne (avant : défilement horizontal dans la carte) */
  body.pg-admin :is(#usersTable,#calsTable){min-width:0!important;display:block}
  body.pg-admin :is(#usersTable,#calsTable) thead{display:none}
  body.pg-admin :is(#usersTable,#calsTable) :is(tbody,tr,td){display:block}
  body.pg-admin :is(#usersTable,#calsTable) tr{border:1px solid #e2e8f0;border-radius:12px;padding:10px 12px;margin-bottom:12px}
  body.pg-admin :is(#usersTable,#calsTable) td{border:0;padding:6px 0}
  body.pg-admin :is(#usersTable,#calsTable) td::before{display:block;margin-bottom:2px;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#64748b}
  body.pg-admin #usersTable td:nth-child(1)::before{content:"Nom"}
  body.pg-admin #usersTable td:nth-child(2)::before{content:"Email"}
  body.pg-admin #usersTable td:nth-child(3)::before{content:"Espace"}
  body.pg-admin #usersTable td:nth-child(4)::before{content:"Crédits"}
  body.pg-admin #usersTable td:nth-child(5)::before{content:"Statut"}
  body.pg-admin #usersTable td:nth-child(6)::before{content:"Dernière connexion"}
  body.pg-admin #calsTable td:nth-child(1)::before{content:"Titre"}
  body.pg-admin #calsTable td:nth-child(2)::before{content:"Créateur"}
  body.pg-admin #calsTable td:nth-child(3)::before{content:"Statut"}
  body.pg-admin #calsTable td:nth-child(4)::before{content:"Vues"}
  body.pg-admin #calsTable td:nth-child(5)::before{content:"Lien public"}
  body.pg-admin #usersTable :is(td input[type=text],td input[type=email],td input[type=number]){width:100%!important}
  body.pg-admin #usersTable input[type=email]{width:100%!important}
  body.pg-admin #usersTable td input[type=number]{max-width:160px}
  /* fiche compacte : 2 colonnes (nom/espace, crédits/statut), e-mail, connexion et actions sur toute la largeur */
  body.pg-admin #usersTable tr{display:grid;grid-template-columns:1fr 1fr;column-gap:12px}
  body.pg-admin #usersTable td:is(:nth-child(2),:nth-child(6),:nth-child(7)){grid-column:1/-1}
  body.pg-admin #usersTable td:nth-child(4) input{max-width:none}
  body.pg-admin #usersTable td:nth-child(1){grid-column:1;grid-row:1}
  body.pg-admin #usersTable td:nth-child(5){grid-column:2;grid-row:1}
  body.pg-admin #usersTable td:nth-child(2){grid-row:2}
  body.pg-admin #usersTable td:nth-child(2) br{display:none}
  body.pg-admin #calsTable tr{display:grid;grid-template-columns:1fr 1fr;column-gap:12px}
  body.pg-admin #calsTable td:is(:nth-child(1),:nth-child(5),:nth-child(6)){grid-column:1/-1}
  body.pg-admin .container{margin:12px auto;padding:0 12px}
  body.pg-admin .card{padding:16px}
}

/* Retours de Gaétan 03/12/2026 : pastille « Mon espace · email » supprimée (doublon avec la barre du haut) ; cartes cliquables ; « Un nouveau calendrier ? » sur une seule ligne. */
html body #ch-cloud-status[data-etat="identite"]{display:none!important}
html body #chalet-calendrier-app #libraryCards article.tile{cursor:pointer}
html body #chalet-calendrier-app #libraryCards article.tile .tile-actions{cursor:default}
html body #chalet-calendrier-app #newCalendarCard h3{white-space:nowrap;font-size:clamp(17px,1.5vw,22px)!important;line-height:1.2}
html body #chalet-calendrier-app #newCalendarCard{padding-left:12px;padding-right:12px}
