/* ============================================================
   Planning des salles — Cobrieux
   Charte « Le Petit Coberlois » : papier crème, vert sauge, ocre, terracotta
   ============================================================ */
:root {
  --papier: #f5f4ec;
  --carte: #fffefa;
  --encre: #2f3133;
  --encre-2: #6b6d66;
  --trait: #e6dfc9;
  --trait-2: #efebdf;
  --liseré: #e5cf98;

  --sauge: #65805f;
  --sauge-fonce: #4e6849;
  --sauge-pale: #e4ead9;
  --ocre: #daae54;
  --ocre-fonce: #a57a24;
  --ocre-pale: #f8eed6;
  --terra: #b35943;
  --terra-fonce: #8f4230;
  --terra-pale: #f5e3dc;
  --rouge: #d71920;

  --titre: "Montserrat", system-ui, sans-serif;
  --texte: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  --main: "Caveat", cursive;
  --rayon: 14px;
  font-size: 16px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--papier); color: var(--encre);
  font-family: var(--texte); line-height: 1.5;
}
a { color: var(--sauge-fonce); }
h1, h2, h3 { font-family: var(--titre); font-weight: 700; color: var(--encre); letter-spacing: -.01em; }
h1 { font-size: 1.65rem; margin: 0 0 .7rem; }
h2 { font-size: 1.2rem; margin: 0 0 .8rem; }
h3 { font-size: 1.05rem; margin: 0 0 .25rem; }
code { background: var(--ocre-pale); padding: 1px 6px; border-radius: 4px; font-size: .95em; }
.main { font-family: var(--main); font-weight: 600; }

/* ---- En-tête ---- */
.bandeau { background: var(--papier); border-bottom: 1px solid var(--trait); }
.bandeau-in, .menu-in { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.bandeau-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 92px; position: relative; }
.surtitre {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ocre-fonce);
}
.surtitre strong { color: var(--sauge-fonce); }
.surtitre svg { width: 46px; height: 22px; color: var(--sauge); }
.marque { display: flex; align-items: center; gap: 14px; color: var(--encre); text-decoration: none; padding: 14px 0 10px; }
.marque img { width: 58px; height: 58px; object-fit: contain; flex: none; }
.marque .t1 { display: block; font-family: var(--titre); font-weight: 800; font-size: 1.35rem; line-height: 1.05; text-transform: uppercase; letter-spacing: .01em; }
.marque .t1 em { font-style: normal; color: var(--ocre); }
.marque .t2 { display: block; font-family: var(--main); font-size: 1.25rem; color: var(--sauge-fonce); line-height: 1.1; }
.compte { font-size: .95rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.compte a { color: var(--encre); }

.menu { background: var(--sauge); }
.menu-in { display: flex; gap: 2px; overflow-x: auto; }
.menu a {
  color: #eef2e8; text-decoration: none; padding: 11px 15px; white-space: nowrap; font-weight: 700;
  font-family: var(--titre); font-size: .88rem; border-bottom: 3px solid transparent;
}
.menu a:hover { color: #fff; background: rgba(255,255,255,.08); }
.menu a.actif { color: #fff; border-bottom-color: var(--ocre); }
.pastille { background: var(--ocre); color: var(--encre); border-radius: 99px; padding: 0 7px; font-size: .78rem; margin-left: 4px; }

.page { max-width: 1280px; margin: 0 auto; padding: 24px 16px 44px; }

/* ---- Pied ---- */
.pied { background: var(--sauge); color: #f1f4ec; margin-top: 20px; }
.pied-in { max-width: 1280px; margin: 0 auto; padding: 24px 16px; display: flex; gap: 18px 40px; flex-wrap: wrap; align-items: center; font-size: .92rem; }
.pied-in img { width: 44px; height: 44px; object-fit: contain; }
.pied strong { font-family: var(--titre); }
.pied a { color: #fff; }
.pied .horaires { background: rgba(255,255,255,.12); border-radius: 10px; padding: 8px 14px; }

/* ---- Boutons ---- */
.btn {
  display: inline-block; border: 1.5px solid var(--sauge); background: var(--sauge); color: #fff;
  font: inherit; font-family: var(--titre); font-weight: 700; font-size: .9rem;
  padding: 9px 18px; border-radius: 99px; cursor: pointer; text-decoration: none; line-height: 1.3;
}
.btn:hover { background: var(--sauge-fonce); border-color: var(--sauge-fonce); }
.btn-clair { background: var(--carte); color: var(--sauge-fonce); border-color: var(--trait); }
.btn-clair:hover { background: var(--sauge-pale); border-color: var(--sauge-pale); }
.btn-ok { background: var(--sauge); }
.btn-danger { background: var(--carte); color: var(--terra-fonce); border-color: #e4bfb3; }
.btn-danger:hover { background: var(--terra-pale); border-color: var(--terra-pale); }
.btn-petit { padding: 5px 12px; font-size: .82rem; }

/* ---- Alertes ---- */
.alerte { padding: 12px 18px; border-radius: var(--rayon); margin-bottom: 16px; border: 1px solid; }
.alerte-ok { background: var(--sauge-pale); border-color: #c8d4b9; }
.alerte-info { background: var(--ocre-pale); border-color: var(--liseré); }
.alerte-erreur { background: var(--terra-pale); border-color: #e4bfb3; color: #5c2a1e; }

/* ---- Cartes & formulaires ---- */
.carte { background: var(--carte); border: 1.5px solid var(--liseré); border-radius: var(--rayon); padding: 24px; margin-bottom: 20px; }
.etroite { max-width: 440px; margin: 20px auto; }
.moyenne { max-width: 780px; }
.discret { color: var(--encre-2); font-size: .92rem; }
.formulaire { display: grid; gap: 14px; }
.formulaire label { display: grid; gap: 5px; font-weight: 700; font-size: .93rem; }
.formulaire label small { font-weight: 400; color: var(--encre-2); }
input, select, textarea {
  font: inherit; color: inherit; padding: 9px 12px; border: 1.5px solid var(--trait); border-radius: 10px; background: #fff; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ocre); outline-offset: 1px; border-color: var(--ocre); }
input[type=checkbox] { width: auto; accent-color: var(--sauge); }
input[type=color] { padding: 2px; width: 44px; height: 38px; }
label.case.prioritaire { background: var(--terra-pale); border-radius: 10px; padding: 8px 12px; flex-wrap: nowrap; align-items: flex-start; }
label.case.prioritaire input { margin-top: 4px; }
label.case { display: flex !important; align-items: center; gap: 8px; font-weight: 400 !important; flex-wrap: wrap; }
fieldset { border: 1.5px solid var(--trait); border-radius: var(--rayon); padding: 12px 16px; margin: 0; display: grid; gap: 10px; }
legend { font-family: var(--titre); font-weight: 700; padding: 0 6px; font-size: .95rem; }
.ligne { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ligne-4 { grid-template-columns: repeat(4, 1fr); }
.grille-cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.boutons { display: flex; gap: 10px; flex-wrap: wrap; }

/* Titre avec sous-titre ocre souligné, comme dans le journal */
.titre-journal { margin-bottom: 18px; }
.titre-journal h1 { margin: 0; }
.titre-journal .sous { display: inline-block; font-family: var(--titre); font-weight: 700; color: var(--sauge-fonce); border-bottom: 2.5px solid var(--ocre); padding-bottom: 2px; }

/* ---- Connexion avec mascotte ---- */
.accueil { display: grid; grid-template-columns: minmax(0, 440px) 300px; gap: 28px; justify-content: center; align-items: end; margin: 10px auto; }
.accueil .carte { margin: 0; }
.accueil .mascotte { width: 100%; height: auto; display: block; }
.bulle {
  font-family: var(--main); font-size: 1.45rem; line-height: 1.15; color: var(--terra-fonce);
  background: var(--carte); border: 1.5px solid var(--liseré); border-radius: 18px; padding: 10px 16px; margin-bottom: 8px; position: relative;
}
.bulle::after { content: ""; position: absolute; left: 40%; bottom: -9px; width: 16px; height: 16px; background: var(--carte); border-right: 1.5px solid var(--liseré); border-bottom: 1.5px solid var(--liseré); transform: rotate(45deg); }

/* ---- Outils planning ---- */
.outils { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.nav-sem { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-sem h1 { margin: 0 0 0 12px; font-size: 1.35rem; }
.filtres { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filtres input, .filtres select { width: auto; }

.puce { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; }

.ev {
  display: flex; flex-direction: column; gap: 1px; padding: 6px 9px; border-radius: 10px; font-size: .85rem; line-height: 1.25;
  background: color-mix(in srgb, var(--c, var(--sauge)) 12%, white); border-left: 4px solid var(--c, var(--sauge));
}
.ev-h { font-weight: 700; font-variant-numeric: tabular-nums; font-size: .8rem; color: var(--encre-2); }
.ev-h em { font-weight: 700; color: var(--ocre-fonce); font-style: normal; }
.ev-t { font-family: var(--titre); font-weight: 700; font-size: .84rem; }
.ev-a { color: var(--encre-2); font-size: .8rem; font-style: italic; }
.ev-attente { background: repeating-linear-gradient(135deg, #fff, #fff 6px, var(--ocre-pale) 6px, var(--ocre-pale) 12px); border-left-style: dashed; }
.ev-bloc { background: repeating-linear-gradient(135deg, #f1efe8, #f1efe8 6px, #e7e3d8 6px, #e7e3d8 12px); border-left-color: #918a7c; color: #4a463e; }
.legende { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.ev-mini { flex-direction: row; display: inline-flex; font-weight: 700; font-size: .82rem; --c: var(--sauge); }

/* ---- Grille horaire ---- */
.titre-vue { margin-left: 12px; }
.titre-vue h1 { margin: 0; font-size: 1.35rem; }
.titre-vue .sous { display: inline-flex; align-items: center; gap: 6px; font-family: var(--titre); font-weight: 700; font-size: .9rem; color: var(--sauge-fonce); border-bottom: 2.5px solid var(--ocre); }
.bascule { display: inline-flex; background: var(--carte); border: 1.5px solid var(--trait); border-radius: 99px; padding: 3px; }
.bascule a { padding: 5px 14px; border-radius: 99px; text-decoration: none; font-family: var(--titre); font-weight: 700; font-size: .85rem; color: var(--encre-2); }
.bascule a.actif { background: var(--sauge); color: #fff; }
.consigne { margin: -6px 0 12px; color: var(--encre-2); font-size: .92rem; }

.grille-defil { overflow: auto; max-height: calc(100vh - 150px); background: var(--carte); border: 1.5px solid var(--liseré); border-radius: var(--rayon); }
.grille {
  display: grid; position: relative;
  grid-template-columns: 54px repeat(var(--nb), minmax(132px, 1fr));
  grid-template-rows: auto repeat(var(--lignes), 13px);
  min-width: calc(54px + var(--nb) * 132px);
}
.g-coin, .g-tete { position: sticky; top: 0; z-index: 5; background: var(--carte); border-bottom: 2px solid var(--liseré); grid-row: 1; }
.g-coin { grid-column: 1; left: 0; z-index: 6; }
.g-tete { border-left: 1px solid var(--trait-2); }
.g-tete a { display: flex; align-items: center; gap: 7px; padding: 10px; color: var(--encre); text-decoration: none; font-family: var(--titre); font-weight: 700; font-size: .84rem; line-height: 1.2; height: 100%; }
.g-tete a:hover { background: var(--ocre-pale); }
.g-tete .puce { background: var(--c); }
.g-tete .jnum { font-family: var(--titre); font-weight: 800; font-size: 1.6rem; color: var(--ocre); line-height: 1; }
.g-tete .jn { display: block; }
.g-tete .jm { color: var(--encre-2); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.g-tete.auj { background: var(--ocre-pale); box-shadow: inset 0 -3px 0 var(--ocre); }
.g-tete.auj .jnum { color: var(--ocre-fonce); }
.g-heure {
  grid-column: 1; position: sticky; left: 0; z-index: 3; background: var(--carte);
  font-size: .75rem; font-weight: 700; color: var(--encre-2); text-align: right; padding: 0 8px; transform: translateY(-.55em);
  border-right: 1px solid var(--trait-2);
}
.g-case { border-left: 1px solid var(--trait-2); border-top: 1px solid var(--trait-2); position: relative; z-index: 1; }
.g-case.we { background: #fbfaf4; }
.g-case.auj { background: #fffaf0; }
.g-case.passe { background: repeating-linear-gradient(135deg, transparent, transparent 5px, rgba(0,0,0,.025) 5px, rgba(0,0,0,.025) 10px); }
.g-case.libre { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.g-case.libre span { opacity: 0; font-size: .78rem; font-weight: 700; color: var(--sauge-fonce); transition: opacity .12s; }
.g-case.libre:hover { background: var(--sauge-pale); }
.g-case.libre:hover span, .g-case.libre:focus span { opacity: 1; }
.grille .ev {
  position: relative; z-index: 2; margin: 1px 3px; overflow: hidden;
  width: calc((100% - 6px) / var(--n, 1) - 2px);
  margin-left: calc(3px + (100% - 6px) * var(--couloir, 0) / var(--n, 1));
  justify-self: start; box-shadow: 0 1px 2px rgba(60, 50, 20, .08);
}
.grille .ev-court { flex-direction: row; flex-wrap: wrap; gap: 0 6px; align-items: baseline; padding: 2px 7px; }
.grille .ev-court .ev-a { display: none; }
.ev-s { font-size: .74rem; font-weight: 700; color: color-mix(in srgb, var(--c, var(--sauge)) 75%, black); text-transform: uppercase; letter-spacing: .03em; }
.grille .ev-court .ev-s { display: none; }
.grille.toutes .ev-a { display: none; }
.grille.toutes .ev { padding: 4px 7px; }
.grille.toutes .ev-t { font-size: .8rem; }
.salle-puce { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 99px; background: var(--carte); border: 1.5px solid var(--trait); font-size: .82rem; font-weight: 700; color: var(--encre); text-decoration: none; }
.salle-puce:hover { border-color: var(--c); }
.g-maintenant { position: relative; z-index: 4; border-top: 2px solid var(--rouge); pointer-events: none; }
.g-maintenant::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--rouge); }

/* ---- Séries / listes ---- */
.titre-page { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sous-titre { margin-top: 30px; }
.vide {
  color: var(--encre-2); background: var(--carte); border: 1.5px dashed var(--liseré); border-radius: var(--rayon);
  padding: 22px; text-align: center; display: flex; align-items: center; justify-content: center; gap: 16px;
}
.vide img { width: 84px; height: auto; }
.vide span { font-family: var(--main); font-size: 1.4rem; color: var(--sauge-fonce); }
.serie { background: var(--carte); border: 1.5px solid var(--liseré); border-left: 6px solid var(--c); border-radius: var(--rayon); padding: 16px 18px; margin-bottom: 14px; }
.serie-tete { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.serie p { margin: 2px 0; }
.motif { background: var(--papier); border-radius: 10px; padding: 8px 12px; margin-top: 10px !important; }
.etiquettes { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.etiq { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; white-space: nowrap; }
.etiq-en_attente { background: var(--ocre-pale); color: #7a5713; }
.etiq-validee { background: var(--sauge-pale); color: var(--sauge-fonce); }
.etiq-refusee { background: var(--terra-pale); color: var(--terra-fonce); }
.etiq-annulee { background: #ece9e1; color: #5f5a50; }
details { margin-top: 10px; }
summary { cursor: pointer; color: var(--sauge-fonce); font-weight: 700; }
.liste-creneaux { display: grid; gap: 6px; margin: 10px 0; }
.liste-creneaux .tout { font-weight: 700 !important; border-bottom: 1px solid var(--trait-2); padding-bottom: 6px; }
.conflit { color: var(--terra-fonce); font-size: .88rem; }
.decision { display: grid; gap: 10px; margin-top: 8px; }
.decision label:not(.case) { display: grid; gap: 4px; font-weight: 700; font-size: .93rem; }
.onglets { display: flex; gap: 4px; border-bottom: 2px solid var(--liseré); margin-bottom: 18px; overflow-x: auto; }
.onglets a { padding: 8px 14px; text-decoration: none; font-family: var(--titre); font-weight: 700; font-size: .9rem; color: var(--encre-2); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.onglets a.actif { color: var(--sauge-fonce); border-bottom-color: var(--ocre); }

/* ---- Tableaux ---- */
.tableau { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--carte); border: 1.5px solid var(--liseré); border-radius: var(--rayon); overflow: hidden; }
.tableau th, .tableau td { padding: 10px 12px; border-bottom: 1px solid var(--trait-2); text-align: left; vertical-align: top; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau th { background: var(--ocre-pale); font-family: var(--titre); font-size: .85rem; }
.droite { text-align: right !important; }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.actions form { margin: 0; }
tr.inactif td, .inactif { opacity: .6; }

/* ---- Salles & assos ---- */
.deux-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.ligne-edit { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.ligne-edit input[name=nom] { flex: 1; min-width: 0; }
.ligne-edit .court { width: 64px; flex: none; }
.ligne-edit.ajout { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--liseré); }

/* ---- Mobile ---- */
@media (max-width: 860px) {
  .surtitre { display: none; }
  .bandeau-in { min-height: 0; }
  .marque img { width: 46px; height: 46px; }
  .marque .t1 { font-size: 1.1rem; }
  .accueil { grid-template-columns: 1fr; }
  .accueil .mascotte-zone { order: -1; max-width: 220px; margin: 0 auto; }
  .deux-col, .ligne { grid-template-columns: 1fr; }
  .ligne-4 { grid-template-columns: 1fr 1fr; }
  .titre-vue { margin: 6px 0 0; flex-basis: 100%; }
  .grille { grid-template-columns: 44px repeat(var(--nb), minmax(112px, 1fr)); min-width: calc(44px + var(--nb) * 112px); }
  .grille-defil { max-height: 70vh; }
  .tableau, .tableau tbody, .tableau tr, .tableau td { display: block; width: 100%; }
  .tableau thead { display: none; }
  .tableau tr { border-bottom: 2px solid var(--liseré); }
  .tableau td { border: 0; padding: 4px 12px; }
  .droite { text-align: left !important; }
  .actions { justify-content: flex-start; padding-bottom: 10px !important; }
}
/* ---- Portail des activités ---- */
.bloc-asso { margin-bottom: 26px; }
.bloc-asso h2 { margin: 18px 0 10px; }
.activite .puce { display: inline-block; width: 10px; height: 10px; vertical-align: middle; }
.modif-attente { background: var(--ocre-pale); border: 1px solid var(--liseré); border-radius: 10px; padding: 10px 14px; margin-top: 10px; display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; }
.en-ligne { display: inline; margin: 0; }
.seances { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.seances li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--trait-2); }
.annuler-seance { display: flex; gap: 6px; align-items: center; margin: 0; }
.annuler-seance input { width: 200px; padding: 5px 10px; font-size: .88rem; }
.actuel { background: var(--papier); border-radius: 10px; padding: 10px 14px; }
.actuel .puce { display: inline-block; vertical-align: middle; }
.avant-apres { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.avant-apres > div { background: var(--papier); border-radius: 10px; padding: 10px 14px; }
.etiquette-aa { display: block; font-family: var(--titre); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-2); margin-bottom: 2px; }
.etiquette-aa.nouveau { color: var(--sauge-fonce); }
.avant-apres > div:last-child { background: var(--sauge-pale); }
.droits ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
[data-pour][hidden] { display: none !important; }
input[type=radio] { width: auto; accent-color: var(--sauge); }
.boutons { align-items: center; }
.serie-tete > .boutons { align-self: flex-start; }
@media (max-width: 860px) {
  .avant-apres { grid-template-columns: 1fr; }
  .annuler-seance { width: 100%; }
  .annuler-seance input { flex: 1; width: auto; }
}
/* ============================================================
   Mobile et application installée
   ============================================================ */
.onglets-bas { display: none; }
.hors-ligne { text-align: center; padding-top: 12vh; }
.hors-ligne img { display: block; margin: 0 auto 8px; width: 140px; height: auto; }
.bandeau-appli { display: flex; align-items: center; gap: 12px; background: var(--sauge-pale); border: 1px solid #c8d4b9; border-radius: var(--rayon); padding: 10px 14px; margin-bottom: 14px; }
.bandeau-appli img { width: 40px; height: 40px; border-radius: 9px; flex: none; }
.bandeau-appli p { margin: 0; flex: 1; font-size: .92rem; line-height: 1.3; }
.bandeau-appli button { background: none; border: 0; font-size: 1.4rem; line-height: 1; color: var(--encre-2); cursor: pointer; padding: 4px 6px; }
.appli-etapes { margin: 8px 0 0; padding-left: 20px; }
.liens-admin { display: grid; gap: 8px; }
.liens-admin a { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border: 1.5px solid var(--trait); border-radius: 12px; text-decoration: none; color: var(--encre); font-weight: 700; background: #fff; }
.liens-admin a::after { content: "›"; font-size: 1.3rem; color: var(--encre-2); }
[hidden] { display: none !important; }

@media (max-width: 860px) {
  body { font-size: 15.5px; }
  .page { padding: 14px 14px 28px; }
  .surtitre { display: none; }
  .bandeau-in { min-height: 0; padding: 0 14px; padding-top: env(safe-area-inset-top); }
  .marque { padding: 10px 0; gap: 10px; }
  .marque img { width: 38px; height: 38px; }
  .marque .t1 { font-size: .95rem; white-space: nowrap; }
  .marque .t2 { display: none; }
  .compte, .connecte .menu { display: none; }
  .menu:empty, .menu-in:empty { display: none; }
  .formulaire, .formulaire label, .ligne > *, fieldset { min-width: 0; }
  input, select, textarea { max-width: 100%; min-width: 0; }
  .formulaire label.case { flex-wrap: nowrap; align-items: flex-start; }
  .formulaire label.case input { margin-top: 3px; }
  .connecte { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .accueil { grid-template-columns: 1fr; }
  .accueil .mascotte-zone { order: -1; max-width: 170px; margin: 0 auto; }
  .accueil .bulle { font-size: 1.15rem; }
  .onglets-bas {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: var(--carte); border-top: 1px solid var(--trait);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -2px 10px rgba(60, 50, 20, .06);
  }
  .onglets-bas a {
    flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 2px; text-decoration: none; color: var(--encre-2); font-family: var(--titre); font-weight: 700; font-size: .68rem;
    border-radius: 12px; min-height: 52px; justify-content: center;
  }
  .onglets-bas svg { width: 24px; height: 24px; }
  .onglets-bas a.actif { color: var(--sauge-fonce); background: var(--sauge-pale); }
  .onglets-bas .ob-demande svg { background: var(--sauge); color: #fff; border-radius: 50%; padding: 4px; width: 30px; height: 30px; }
  .onglets-bas .pastille { position: absolute; top: 2px; left: 54%; font-size: .65rem; padding: 0 5px; }
  .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .btn-petit { min-height: 38px; }
  input, select, textarea, .annuler-seance input { font-size: 16px; }
  h1 { font-size: 1.35rem; }
  .carte { padding: 18px; }
  .outils { gap: 10px; margin-bottom: 12px; }
  .nav-sem { width: 100%; }
  .nav-sem .btn { padding: 8px 14px; }
  .titre-vue { margin: 6px 0 0; flex-basis: 100%; }
  .titre-vue h1 { font-size: 1.15rem; }
  .filtres { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .filtres .bascule { grid-column: 1 / -1; display: flex; }
  .filtres .bascule a { flex: 1; text-align: center; padding: 8px 10px; }
  .filtres input, .filtres select { width: 100%; }
  .consigne { font-size: .85rem; margin: 0 0 10px; }
  .grille-defil { max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); }
  .grille { grid-template-columns: 40px repeat(var(--nb), minmax(104px, 1fr)); min-width: calc(40px + var(--nb) * 104px); }
  .grille.toutes, .grille.semaine { grid-template-columns: 40px repeat(var(--nb), minmax(78px, 1fr)); min-width: calc(40px + var(--nb) * 78px); }
  .g-tete a { padding: 8px 6px; font-size: .78rem; gap: 4px; }
  .g-tete .jnum { font-size: 1.25rem; }
  .g-tete .jm { display: none; }
  .g-heure { font-size: .7rem; padding: 0 5px; }
  .grille .ev { padding: 3px 5px; font-size: .74rem; border-left-width: 3px; }
  .grille .ev-t { font-size: .74rem; }
  .grille .ev-h { font-size: .68rem; }
  .grille .ev-a { display: none; }
  .g-case.libre span { display: none; }
  .legende { gap: 6px; }
  .pied { margin-top: 10px; }
  .pied-in { padding: 16px 14px; gap: 8px 18px; font-size: .82rem; }
  .pied-in img { width: 32px; height: 32px; }
  .pied .horaires { padding: 6px 10px; }
  .serie { padding: 14px; }
  .seances li { align-items: stretch; }
}
@media (display-mode: standalone) {
  .bandeau-appli { display: none !important; }
}
@media print {
  .bandeau .compte, .menu, .filtres, .nav-sem .btn, .pied, .legende, .consigne { display: none; }
  .page { padding: 0; }
  .grille-defil { max-height: none; overflow: visible; }
}
