/* Planning HDJ — charte MindScaler (bleu #3552b2) + logo Maison de Santé Les Pins */
:root {
  --bleu: #3552b2;
  --bleu-fonce: #203785;
  --bleu-pale: #eef2fb;
  --orange: #f39c12;
  --vert-pins: #5f9382;
  --ocre-pins: #e3a33e;
  --fond: #f6f8fb;
  --carte: #ffffff;
  --bord: #e5e7eb;
  --texte: #1e293b;
  --muet: #64748b;
  --rouge: #dc2626;
  --rouge-pale: #fdecec;
  --vert: #15803d;
  --vert-pale: #e8f6ee;
  --ambre: #b45309;
  --ambre-pale: #fff4e0;
  --rayon: 14px;
  --ombre: 0 1px 3px rgba(15, 23, 42, .08);
  --ombre-forte: 0 12px 32px rgba(15, 23, 42, .18);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body.sans-defilement { overflow: hidden; }
[hidden] { display: none !important; }
a { color: var(--bleu); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; color: var(--bleu-fonce); }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: .98rem; margin: 1rem 0 .4rem; }
code { background: var(--bleu-pale); padding: .05rem .35rem; border-radius: 6px; font-size: .9em; }
.muet { color: var(--muet); }
.petit { font-size: .85rem; }
.pousse { flex: 1 1 auto; }
:focus-visible { outline: 3px solid rgba(53, 82, 178, .35); outline-offset: 2px; }

/* ---------- boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border: 1px solid var(--bleu); background: var(--bleu); color: #fff;
  padding: .5rem 1rem; border-radius: 999px; font: inherit; font-weight: 600; font-size: .9rem;
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--bleu-fonce); border-color: var(--bleu-fonce); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.secondaire { background: #fff; color: var(--bleu); border-color: #cdd6ee; }
.btn.secondaire:hover { background: var(--bleu-pale); border-color: var(--bleu); }
.btn.danger { background: var(--rouge); border-color: var(--rouge); }
.btn.danger:hover { background: #b91c1c; }
.btn.danger-lien { background: none; border-color: transparent; color: var(--rouge); padding-left: 0; }
.btn.danger-lien:hover { text-decoration: underline; background: none; }
.btn.lien { background: none; border: none; color: var(--bleu); padding: .3rem 0; font-weight: 600; }
.btn.lien:hover { text-decoration: underline; background: none; }
.btn.mini { padding: .2rem .65rem; font-size: .8rem; }
.btn.icone { width: 2.3rem; padding: .45rem 0; font-size: 1.2rem; line-height: 1; }
.btn.grand { padding: .8rem 1.6rem; font-size: 1rem; flex-direction: column; gap: .1rem; }
.btn.grand small { font-weight: 400; opacity: .85; font-size: .8rem; }
.btn.mindscaler { background: #fff; color: var(--bleu-fonce); border-color: #cdd6ee; }
.btn.mindscaler:hover { background: var(--bleu-pale); }
.btn.mindscaler img { width: 20px; height: 20px; object-fit: contain; }

/* ---------- formulaires ---------- */
input, select, textarea {
  font: inherit; color: var(--texte); background: #fff;
  border: 1px solid #cfd6e3; border-radius: 10px; padding: .45rem .65rem; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(53, 82, 178, .15); }
input[type=checkbox], input[type=radio] { accent-color: var(--bleu); width: 1.05rem; height: 1.05rem; }
.formulaire label, .champ { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .85rem; color: #334155; }
.formulaire label.case, label.case { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; font-size: .9rem; }
.grille2 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1.1rem; }
.grille2 .large, .grille2 p.large { grid-column: 1 / -1; }
.formulaire fieldset { border: 1px solid var(--bord); border-radius: 10px; padding: .6rem .9rem .8rem; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 0; }
.formulaire legend { font-weight: 600; font-size: .85rem; color: #334155; padding: 0 .3rem; }
.frequence { flex-direction: column; }
.frequence .case { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.frequence .case label { font-weight: 500; font-size: .9rem; color: var(--texte); }
.frequence input[type=date] { padding: .25rem .45rem; }
.en-ligne { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .7rem; margin: .6rem 0; }
.en-ligne .grandit { flex: 1 1 14rem; }
.boutons { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .4rem; }
.boutons.pied { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--bord); }
.plage { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-bottom: .45rem; width: 100%; }
.plage input[name=ps] { width: 8rem; }

/* ---------- accueil ---------- */
.accueil { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem;
  background: linear-gradient(160deg, #fff 0%, var(--bleu-pale) 100%); }
.accueil-carte { background: #fff; border: 1px solid var(--bord); border-radius: 20px; box-shadow: var(--ombre-forte);
  max-width: 560px; width: 100%; padding: 2rem; text-align: center; }
.accueil-logo { width: 100%; max-width: 360px; height: auto; margin-bottom: 1rem; }
.accueil-carte h1 { font-size: 1.6rem; margin-bottom: .6rem; }
.accueil-actions { display: flex; flex-direction: column; align-items: center; gap: .7rem; margin: 1.4rem 0; }

/* ---------- en-tête ---------- */
.bandeau-demo { background: var(--ambre-pale); color: var(--ambre); text-align: center; font-weight: 600; font-size: .85rem; padding: .35rem 1rem; }
.entete {
  position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.4rem;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--bord); padding: .55rem 1.2rem;
}
.marque { display: flex; align-items: center; gap: .9rem; color: var(--bleu-fonce); text-decoration: none !important; }
.marque img { height: 42px; width: auto; }
.marque span { border-left: 1px solid var(--bord); padding-left: .9rem; font-size: .95rem; line-height: 1.2; }
#nav { display: flex; flex-wrap: wrap; gap: .2rem; }
#nav a { padding: .4rem .8rem; border-radius: 999px; color: #475569; font-weight: 600; font-size: .9rem; text-decoration: none; }
#nav a:hover { background: var(--bleu-pale); color: var(--bleu-fonce); }
#nav a.actif { background: var(--bleu); color: #fff; }
.entete-droite { margin-left: auto; display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.qui { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--muet); font-weight: 600; }
.qui input { width: 10rem; padding: .35rem .6rem; font-size: .88rem; }
.qui.manquant input { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(243, 156, 18, .18); }
.synchro { border: none; background: none; font: inherit; font-size: .78rem; cursor: pointer; padding: .3rem .5rem; border-radius: 8px; }
.synchro.ok { color: var(--vert); }
.synchro.ok::before { content: "●"; margin-right: .3rem; }
.synchro.erreur { color: #fff; background: var(--rouge); font-weight: 700; }

/* ---------- mise en page ---------- */
.vue { max-width: 1400px; margin: 0 auto; padding: 1.2rem 1.2rem 4rem; }
.barre { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; margin-bottom: 1.1rem; }
.barre h1 { flex: 1 1 auto; }
.barre .actions, .carte-tete .actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.retour { display: inline-block; font-size: .85rem; font-weight: 600; margin-bottom: .2rem; }
.nav-date { display: flex; align-items: center; gap: .35rem; }
.nav-date input { padding: .38rem .5rem; }
.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.carte.sans-marge { padding: 0; overflow: hidden; }
.carte-tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; margin-bottom: .6rem; }
.titre-section { font-size: 1rem; margin: 0 0 .7rem; color: #334155; }
.vide { padding: 1.6rem; text-align: center; color: var(--muet); border: 1px dashed #cbd5e1; border-radius: var(--rayon); background: #fff; }
.alerte { background: var(--ambre-pale); color: #7c3d06; border-radius: 10px; padding: .55rem .8rem; margin: .6rem 0; }
.bandeau-ferme { background: #fff; border: 1px solid #f3c98b; color: #7c3d06; border-radius: var(--rayon); padding: .7rem 1rem; font-weight: 600; margin-bottom: 1rem; }

.legende { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: -.3rem 0 1rem; font-size: .82rem; color: var(--muet); }
.legende i { display: inline-block; width: .9rem; height: .9rem; border-radius: 4px; margin-right: .35rem; vertical-align: -2px; border: 1px solid rgba(0,0,0,.08); }
.pastille { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; background: var(--fond); vertical-align: -1px; border: 1px solid rgba(0,0,0,.1); flex: none; }
.badge-phase { display: inline-block; background: var(--fond); color: var(--texte); border-radius: 999px; padding: .05rem .55rem; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.badge { display: inline-block; border-radius: 999px; padding: .08rem .55rem; font-size: .74rem; font-weight: 700; white-space: nowrap; background: #eef1f5; color: #475569; }
.badge.attente { background: var(--ambre-pale); color: var(--ambre); }
.badge.annule { background: #eef1f5; color: #64748b; }
.badge.present { background: var(--vert-pale); color: var(--vert); }
.badge.absent { background: var(--rouge-pale); color: var(--rouge); }
.badge.alerte { background: var(--rouge-pale); color: var(--rouge); }

/* ---------- vue jour ---------- */
.chiffres { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-bottom: 1.2rem; }
.chiffre { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: .8rem 1rem; box-shadow: var(--ombre); }
.chiffre b { display: block; font-size: 1.7rem; color: var(--bleu); line-height: 1.1; }
.chiffre span { font-size: .82rem; color: var(--muet); }
.colonnes-jour { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1.2rem; align-items: start; }
.praticien-jour { padding: .9rem 1rem; }
.seance { padding: 0; overflow: hidden; }
.seance-corps { padding: .7rem 1rem .8rem; }
.seance.annulee .seance-tete { opacity: .5; }
.seance-tete { background: var(--fond); color: var(--texte); padding: .6rem 1rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1rem; }
.seance-tete b { display: block; font-size: 1rem; }
.seance-tete span { font-size: .8rem; opacity: .85; }
.seance-info { font-size: .85rem; align-self: center; }
.modale .seance-tete { border-radius: 10px; margin-bottom: .6rem; }
.ligne-jauge { display: flex; align-items: center; gap: .6rem; margin: .2rem 0 .4rem; }
.jauge { flex: 1 1 auto; max-width: 220px; height: .5rem; background: #e8ecf3; border-radius: 99px; overflow: hidden; }
.jauge > div { height: 100%; background: var(--vert-pins); border-radius: 99px; }
.jauge.plein > div { background: var(--orange); }
.jauge.deborde > div { background: var(--rouge); }
.places { font-size: .82rem; font-weight: 700; color: #334155; white-space: nowrap; }
.places.plein { color: var(--ambre); }
.places.deborde { color: var(--rouge); }

.lignes { list-style: none; margin: .3rem 0; padding: 0; }
.lignes li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; padding: .35rem 0; border-bottom: 1px solid #f0f2f6; }
.lignes li:last-child { border-bottom: none; }
.heure { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--bleu-fonce); min-width: 3.2rem; }
.lien-heure { background: var(--bleu-pale); border: none; border-radius: 8px; padding: .1rem .45rem; font: inherit; font-weight: 700; cursor: pointer; }
.lien-heure:hover { background: #dbe3f8; }
.rang { width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--ambre-pale); color: var(--ambre); font-size: .75rem; font-weight: 700; display: inline-grid; place-items: center; }

.statuts { display: inline-flex; border: 1px solid #d5dbe7; border-radius: 999px; overflow: hidden; }
.statut { border: none; background: #fff; font: inherit; font-size: .74rem; font-weight: 600; color: #64748b; padding: .18rem .55rem; cursor: pointer; }
.statut + .statut { border-left: 1px solid #d5dbe7; }
.statut:hover { background: #f3f5f9; }
.statut.prevu.actif { background: var(--bleu); color: #fff; }
.statut.present.actif { background: var(--vert); color: #fff; }
.statut.absent.actif { background: var(--rouge); color: #fff; }

/* ---------- vue semaine ---------- */
.grille-semaine { display: grid; grid-template-columns: repeat(5, minmax(180px, 1fr)); gap: .7rem; overflow-x: auto; padding-bottom: .4rem; }
.col-jour { display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.col-tete { display: flex; flex-direction: column; background: var(--bleu-fonce); color: #fff; border-radius: 12px; padding: .5rem .7rem; text-decoration: none !important; }
.col-tete span { font-size: .85rem; opacity: .9; }
.col-tete small { font-size: .75rem; opacity: .8; }
.col-jour.aujourdhui .col-tete { background: var(--bleu); box-shadow: 0 0 0 3px rgba(243, 156, 18, .55); }
.ferme { padding: 1.4rem .5rem; text-align: center; color: var(--muet); background: repeating-linear-gradient(-45deg, #fff, #fff 8px, #f2f4f8 8px, #f2f4f8 16px); border-radius: 12px; border: 1px solid var(--bord); }
.tuile {
  display: flex; flex-direction: column; align-items: flex-start; gap: .05rem; width: 100%; text-align: left;
  background: var(--fond); color: var(--texte); border: none; border-radius: 10px; padding: .5rem .65rem;
  font: inherit; font-size: .78rem; cursor: pointer; box-shadow: var(--ombre); transition: transform .1s, box-shadow .1s;
}
.tuile:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15, 23, 42, .15); }
.tuile b { font-size: .86rem; line-height: 1.2; }
.tuile span { opacity: .92; }
.tuile.annulee { opacity: .45; text-decoration: line-through; }
.tuile-places { margin-top: .25rem; background: #fff; color: #1e293b; border-radius: 999px; padding: 0 .5rem; font-weight: 700; opacity: 1 !important; text-decoration: none; }
.tuile-places.plein { background: #ffe6bf; color: #7c3d06; }
.tuile-places.deborde { background: #fde0e0; color: var(--rouge); }
.consults-jour { display: flex; flex-direction: column; gap: .2rem; background: #fff; border: 1px solid var(--bord); border-radius: 10px; padding: .45rem .6rem; font-size: .78rem; }

/* ---------- patients ---------- */
.filtres { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.filtres .grand { flex: 1 1 18rem; }
.tableau { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tableau th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muet); font-weight: 700; padding: .6rem .75rem; border-bottom: 1px solid var(--bord); background: #fafbfd; }
.tableau td { padding: .55rem .75rem; border-bottom: 1px solid #f0f2f6; vertical-align: middle; }
.tableau.compact td, .tableau.compact th { padding: .4rem .55rem; }
.tableau tr:last-child td { border-bottom: none; }
.tableau .num { text-align: right; font-variant-numeric: tabular-nums; }
.tableau tr.cliquable { cursor: pointer; }
.tableau tr.cliquable:hover td { background: var(--bleu-pale); }
.tableau tr.inactif td { color: #94a3b8; }
.tableau tr.ligne-annulee td { color: #94a3b8; }
.tableau tr.ligne-annulee td:nth-child(3) { text-decoration: line-through; }
.fin-ligne { white-space: nowrap; text-align: right; }
.info { display: inline-grid; place-items: center; width: 1.2rem; height: 1.2rem; border-radius: 50%; border: 1px solid #cbd5e1; color: var(--muet); font-size: .72rem; font-style: italic; font-weight: 700; cursor: help; margin-right: .3rem; vertical-align: middle; }
.fiche { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 1rem; align-items: start; }
.coord dl { display: grid; grid-template-columns: auto 1fr; gap: .45rem .9rem; margin: 0; font-size: .9rem; }
.coord dt { color: var(--muet); font-size: .8rem; font-weight: 600; padding-top: .1rem; }
.coord dd { margin: 0; overflow-wrap: anywhere; }
.historique { margin-top: 1rem; }
.historique summary { cursor: pointer; font-weight: 600; color: var(--bleu); margin-bottom: .5rem; }

/* ---------- ateliers ---------- */
.grille-ateliers { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; align-items: start; }
.atelier-groupe h2 { margin-bottom: .5rem; }
.creneau-atelier { padding: .55rem 0; border-top: 1px solid #f0f2f6; }
.ca-tete { display: flex; align-items: center; gap: .5rem; }
.mini-seances { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.mini-seance { border: 1px solid #d5dbe7; background: #fff; border-radius: 999px; font: inherit; font-size: .74rem; font-weight: 600; padding: .1rem .5rem; cursor: pointer; color: #334155; }
.mini-seance:hover { border-color: var(--bleu); color: var(--bleu); }
.mini-seance.plein { background: #ffe6bf; border-color: #f5c27a; }
.mini-seance.deborde { background: #fde0e0; border-color: #f3a5a5; }
.mini-seance.annulee, .mini-seance.ferme { color: #94a3b8; text-decoration: line-through; cursor: default; }
.bandeau-atelier { background: var(--fond); color: var(--texte); border-radius: var(--rayon); padding: .7rem 1rem; margin-bottom: 1.2rem; font-weight: 600; }
.grille-seances { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.seance-liste { margin: 0; padding: .8rem .95rem; }
.seance-liste h3 { margin: 0; font-size: .92rem; }
.seance-liste.ferme { background: #f8f9fb; }
.seance-liste.annulee { opacity: .6; }
.noms { margin: .3rem 0 0; padding-left: 1.3rem; font-size: .88rem; }

/* ---------- médecins ---------- */
.deux-colonnes { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1rem; align-items: start; }
.liste-laterale { padding: .4rem; display: flex; flex-direction: column; gap: .15rem; position: sticky; top: 80px; }
.liste-laterale a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem .65rem; border-radius: 10px; color: var(--texte); text-decoration: none; }
.liste-laterale a small { display: block; color: var(--muet); font-size: .76rem; }
.liste-laterale a:hover { background: var(--bleu-pale); }
.liste-laterale a.actif { background: var(--bleu); color: #fff; }
.liste-laterale a.actif small { color: rgba(255, 255, 255, .8); }
.liste-laterale a.inactif { opacity: .5; }
.compte { background: var(--bleu-pale); color: var(--bleu-fonce); border-radius: 999px; font-size: .75rem; font-weight: 700; padding: 0 .5rem; }
.liste-laterale a.actif .compte { background: rgba(255, 255, 255, .25); color: #fff; }
.plages { display: flex; flex-wrap: wrap; gap: .35rem; margin: .2rem 0 .8rem; }
.puce-info { background: var(--bleu-pale); color: var(--bleu-fonce); border-radius: 999px; padding: .12rem .65rem; font-size: .8rem; font-weight: 600; }
.onglets { display: flex; gap: .3rem; border-bottom: 1px solid var(--bord); margin-bottom: .6rem; }
.onglets button { border: none; background: none; font: inherit; font-weight: 600; color: var(--muet); padding: .45rem .8rem; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.onglets button.actif { color: var(--bleu); border-bottom-color: var(--bleu); }
.date-groupe { font-size: .9rem; margin: 1rem 0 .2rem; color: #334155; }

/* ---------- paramètres / aide ---------- */
.aide { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 1rem; align-items: start; }
.aide .carte { margin: 0; }
.aide p, .aide li { font-size: .92rem; }
.aide ol, .aide ul { padding-left: 1.2rem; }

/* ---------- fenêtres ---------- */
.voile { position: fixed; inset: 0; z-index: 50; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 1rem; overflow-y: auto; }
.voile.dessus { z-index: 60; align-items: center; }
.modale { background: #fff; border-radius: 16px; box-shadow: var(--ombre-forte); width: 100%; max-width: 560px; }
.modale.large { max-width: 860px; }
.modale.petite { max-width: 440px; }
.modale-tete { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.3rem .6rem; }
.modale-corps { padding: .2rem 1.3rem 1.3rem; }
.fermer { border: none; background: none; font-size: 1.7rem; line-height: 1; color: var(--muet); cursor: pointer; border-radius: 8px; padding: 0 .4rem; }
.fermer:hover { background: #f1f5f9; color: var(--texte); }
.dialogue-msg { margin-bottom: .9rem; }
.dialogue-msg ul { padding-left: 1.2rem; margin: .3rem 0 .7rem; }
.modale .boutons { justify-content: flex-end; }
.seance-resume { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.seance-resume .ligne-jauge { flex: 1 1 260px; }
.cap-seance { display: flex; align-items: center; gap: .5rem; font-size: .85rem; font-weight: 600; }
.cap-seance input { width: 4.5rem; }
#recherche-seance, #rdv-recherche { width: 100%; }
.ligne-options { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.2rem; margin: .3rem 0 .8rem; }
.choix-ateliers { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: .6rem; overflow-x: auto; }
.choix-jour h3 { margin: 0 0 .4rem; font-size: .85rem; color: var(--muet); text-transform: uppercase; letter-spacing: .04em; }
.choix-jour .tuile { margin-bottom: .4rem; }
.choix-retenu { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; margin-bottom: .6rem; }
.choix-retenu .seance-tete { width: 100%; margin-bottom: 0; }
.liste-dates { display: flex; flex-direction: column; border: 1px solid var(--bord); border-radius: 12px; overflow: hidden; }
.ligne-date { display: grid; grid-template-columns: auto 13rem minmax(8rem, 15rem) 1fr; align-items: center; gap: .3rem .8rem; padding: .5rem .8rem; border-bottom: 1px solid #f0f2f6; cursor: pointer; }
.ligne-date:last-child { border-bottom: none; }
.ligne-date:hover { background: var(--bleu-pale); }
.ligne-date.inactive { color: #94a3b8; cursor: default; background: #fafbfc; }
.ld-jauge { display: flex; align-items: center; gap: .5rem; }
.ld-note { font-size: .82rem; }
.ld-note.plein { color: var(--ambre); font-weight: 600; }
.ld-alerte { grid-column: 2 / -1; font-size: .8rem; color: #7c3d06; }
.etape { margin-bottom: 1rem; }
.etape h3 { margin-top: .3rem; }
.choisi { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin: 0; }
.puces { display: flex; flex-wrap: wrap; gap: .4rem; }
.puce { display: flex; flex-direction: column; align-items: flex-start; border: 1px solid #d5dbe7; background: #fff; border-radius: 12px; padding: .4rem .75rem; font: inherit; font-weight: 600; cursor: pointer; color: var(--texte); }
.puce small { font-weight: 400; color: var(--muet); font-size: .74rem; }
.puce:hover { border-color: var(--bleu); }
.puce.active { background: var(--bleu); border-color: var(--bleu); color: #fff; }
.puce.active small { color: rgba(255, 255, 255, .85); }
.nav-creneaux { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; font-size: .88rem; font-weight: 600; }
.creneaux { border: 1px solid var(--bord); border-radius: 12px; overflow: hidden; }
.jour-creneaux { display: grid; grid-template-columns: 7rem 1fr; gap: .6rem; align-items: center; padding: .45rem .8rem; border-bottom: 1px solid #f0f2f6; }
.jour-creneaux:last-child { border-bottom: none; }
.jc-date { font-weight: 700; font-size: .85rem; }
.creneau { display: inline-block; margin: .15rem; border: 1px solid #b9c6ea; background: var(--bleu-pale); color: var(--bleu-fonce); border-radius: 8px; padding: .2rem .55rem; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.creneau:hover:not(:disabled) { background: var(--bleu); color: #fff; border-color: var(--bleu); }
.creneau.pris { background: #f1f3f6; border-color: #e2e6ec; color: #a0a9b8; text-decoration: line-through; font-weight: 500; cursor: help; }
.creneau:disabled { opacity: .55; cursor: not-allowed; }
.manuel { margin-top: .8rem; }
.manuel summary { cursor: pointer; font-weight: 600; color: var(--bleu); }

/* ---------- messages ---------- */
.toasts { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 70; display: flex; flex-direction: column; align-items: center; gap: .5rem; pointer-events: none; width: min(560px, calc(100% - 2rem)); }
.toast { background: var(--bleu-fonce); color: #fff; padding: .6rem 1.1rem; border-radius: 12px; box-shadow: var(--ombre-forte); font-weight: 600; font-size: .9rem; transition: opacity .35s, transform .35s; text-align: center; }
.toast.erreur { background: var(--rouge); }
.toast.info { background: var(--ambre); }
.toast.sortie { opacity: 0; transform: translateY(8px); }

/* ---------- écrans étroits ---------- */
@media (max-width: 1450px) { .marque span { display: none; } }
@media (max-width: 1100px) {
  .colonnes-jour, .fiche, .deux-colonnes { grid-template-columns: minmax(0, 1fr); }
  .liste-laterale { position: static; flex-direction: row; flex-wrap: wrap; }
  .chiffres { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .vue { padding: 1rem 16px 3rem; }
  .entete { padding: .5rem 16px; }
  .marque span { display: none; }
  .entete-droite { margin-left: 0; }
  .grille2 { grid-template-columns: minmax(0, 1fr); }
  .ligne-date { grid-template-columns: auto 1fr; }
  .ld-jauge, .ld-note, .ld-alerte { grid-column: 2; }
  .tableau { display: block; overflow-x: auto; }
  .aide { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- impression ---------- */
.impression { display: none; }
@media print {
  @page { margin: 12mm; }
  body { background: #fff; font-size: 11pt; }
  body > *:not(#impression) { display: none !important; }
  .impression { display: block; color: #000; }
  .imp-tete { display: flex; align-items: center; gap: 1rem; border-bottom: 2px solid var(--bleu); padding-bottom: .5rem; margin-bottom: .8rem; }
  .imp-tete img { height: 46px; }
  .imp-tete h1 { font-size: 15pt; color: #000; }
  .imp-tete p { margin: .1rem 0 0; font-size: 9pt; color: #444; }
  .impression h2 { font-size: 12pt; margin: 1rem 0 .4rem; color: #000; }
  .impression h3 { font-size: 11pt; margin: .7rem 0 .3rem; color: #000; }
  table.imp { width: 100%; border-collapse: collapse; margin-bottom: .5rem; page-break-inside: auto; }
  table.imp th, table.imp td { border: 1px solid #999; padding: 4px 6px; text-align: left; vertical-align: top; font-size: 10pt; }
  table.imp th { background: #eee; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table.imp tr { page-break-inside: avoid; }
  table.imp td.h { white-space: nowrap; width: 1%; }
  table.imp tr.annule td { color: #888; text-decoration: line-through; }
  .case-imp { width: 4em; text-align: center; }
  .emargement td { height: 2.1em; }
  .emargement td:last-child { width: 40%; }
  .imp-semaine { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .imp-semaine h3 { font-size: 10pt; border-bottom: 1px solid #000; }
  .imp-tuile { border: 1px solid #bbb; border-left-width: 5px; padding: 3px 5px; margin-bottom: 4px; font-size: 8.5pt; page-break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .imp-tuile.annule { color: #888; text-decoration: line-through; }
}

/* ---------- séjours ---------- */
.sous-titre { margin: .15rem 0 0; font-size: .9rem; }
.liste-sejours { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.sejour { border: 1px solid var(--bord); border-radius: 10px; padding: .55rem .7rem; display: flex; flex-direction: column; gap: .15rem; }
.sejour.encours { border-color: #b9c6ea; background: var(--bleu-pale); }
.sejour.termine { color: #64748b; }
.sejour-tete { display: flex; align-items: center; gap: .5rem; }
.sejour-initial { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
@media (max-width: 700px) { .sejour-initial { grid-template-columns: 1fr 1fr; } }

/* ---------- connexion ---------- */
.connexion-carte { max-width: 720px; }
.connexion-liste { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin: 1.2rem 0 .4rem; }
.connexion-liste h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muet); margin: .6rem 0 0; }
.equipe { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.puce-equipe { border: 1px solid #cdd6ee; background: #fff; color: var(--bleu-fonce); border-radius: 999px; padding: .4rem .9rem; font: inherit; font-weight: 600; cursor: pointer; }
.puce-equipe:hover { background: var(--bleu-pale); border-color: var(--bleu); }
.puce-equipe.derniere { border-color: var(--bleu); }
.connexion-autre { justify-content: center; text-align: left; max-width: 420px; margin: .8rem auto 0; }
.utilisateur { display: flex; align-items: center; gap: .45rem; font-size: .88rem; }
.utilisateur .btn.lien { font-size: .78rem; padding: 0; }
.pastille-user { width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--bleu); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: .8rem; }

/* ---------- espaces encadrés (No Stress) ---------- */
.espace-jour { border-left: 5px solid var(--ocre-pins); }
.espace-jour .carte-tete .actions { align-items: center; }
.espace-jour .ligne-jauge { min-width: 200px; margin: 0; }
.consigne { background: var(--ambre-pale); color: #7c3d06; border-radius: 8px; padding: .05rem .5rem; font-size: .8rem; font-weight: 600; }
.tuile-espace { display: flex; justify-content: space-between; align-items: center; gap: .5rem; background: #fff; border: 1px solid #f0c98a; border-left: 5px solid var(--ocre-pins); border-radius: 10px; padding: .4rem .65rem; font-size: .8rem; color: var(--texte); text-decoration: none !important; }
.tuile-espace span { font-weight: 700; }
.tuile-espace.plein span { color: var(--ambre); }
.tuile-espace.deborde span { color: var(--rouge); }
.tuile-espace:hover { box-shadow: 0 4px 12px rgba(15, 23, 42, .12); }
.badge.espace { background: #fdecd3; color: #8a4b08; }
.btn.espace { background: #fff; color: #8a4b08; border-color: #f0c98a; }
.btn.espace:hover { background: #fdf3e3; border-color: var(--ocre-pins); }
.puce-info.plein { background: #ffe6bf; color: #7c3d06; }

/* ---------- paramètres ---------- */
.resume-reglages { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: 0; font-size: .9rem; }
.resume-reglages dt { color: var(--muet); font-weight: 600; font-size: .82rem; }
.resume-reglages dd { margin: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.phase-ligne { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; width: 100%; }
.phase-ligne input[type=color] { width: 2.6rem; height: 2.2rem; padding: .15rem; }
.phase-ligne input[name=pn] { flex: 1 1 auto; }

/* ---------- version hébergée ---------- */
.logo-ms { width: 64px; height: 64px; object-fit: contain; margin-bottom: .4rem; }
.formulaire.pile { display: flex; flex-direction: column; gap: .8rem; text-align: left; max-width: 380px; margin: 1.2rem auto .6rem; }
.formulaire.pile .btn.grand { margin-top: .3rem; }
.boutons.centre { justify-content: center; margin: 1rem 0; }
#ecran-serveur h2 { margin: .8rem 0 .4rem; }
.utilisateur .muet.petit { margin-left: .1rem; }
body.non-admin [data-admin] { display: none !important; }
.lien-demo { margin-top: 1rem; }
.bandeau-demo a { color: inherit; font-weight: 700; text-decoration: underline; margin-left: .4rem; }
.bandeau-test { background: repeating-linear-gradient(-45deg, #fde68a, #fde68a 14px, #fcd34d 14px, #fcd34d 28px); color: #78350f;
  text-align: center; font-size: .9rem; padding: .45rem 1rem; border-bottom: 1px solid #f59e0b; }
.bandeau-test b { text-transform: uppercase; letter-spacing: .06em; }
.bandeau-test a { color: #78350f; font-weight: 700; text-decoration: underline; }
.logo-texte { font-size: 1.05rem; color: var(--bleu-fonce); letter-spacing: .02em; white-space: nowrap; }
.accueil-carte .logo-texte { display: block; font-size: 1.5rem; margin-bottom: .6rem; }
body:not(.non-admin) [data-non-admin] { display: none !important; }
