/* Logi Z 2.0 — feuille de style unique, sans framework ni build.
   Volontairement sobre : le soin visuel viendra avec les écrans métier. */

:root {
  --encre: #1f2937;
  --doux: #6b7280;
  --trait: #e4e8f0;
  --fond: #f6f8fb;
  --accent: #1d3a6b;
  --accent-clair: #e6f1fb;
  --vert: #2f7d4f;
  --rouge: #c2402f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--encre);
  background: var(--fond);
  line-height: 1.5;
}

/* ── Barre supérieure ─────────────────────────────────────────────────────── */
.barre {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 24px; background: #fff; border-bottom: 1px solid var(--trait);
}
.marque { font-weight: 800; font-size: 17px; color: var(--accent); text-decoration: none; }
.nav { display: flex; gap: 6px; flex: 1 1 auto; flex-wrap: wrap; }
.pilule {
  padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  color: #5a6678; text-decoration: none;
}
.pilule:hover { background: #f1f4f9; color: var(--accent); }
.pilule.actif { background: var(--accent-clair); color: #0c447c; }

.etab { display: flex; align-items: center; gap: 8px; }
.etab-libelle { font-size: 12px; font-weight: 700; color: var(--doux); text-transform: uppercase; }
.etab-select { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--trait); background: #fff; }

.compte { display: flex; align-items: center; gap: 12px; }
.compte-nom { font-size: 13px; font-weight: 700; }
.compte-nom em { display: block; font-style: normal; font-weight: 600; font-size: 11.5px; color: var(--doux); }
.lien { border: 0; background: none; color: var(--accent); font-size: 13px; cursor: pointer; text-decoration: underline; }

/* ── Structure ────────────────────────────────────────────────────────────── */
.scene { max-width: 960px; margin: 0 auto; padding: 28px 24px 60px; }
.scene.etroit, .carte.etroit { max-width: 640px; }
.scene.centre { display: grid; place-items: center; min-height: 100vh; }

.titre { margin-bottom: 18px; }
.titre span { font-size: 12px; font-weight: 800; color: var(--doux); text-transform: uppercase; letter-spacing: .04em; }
.titre h1 { margin: 2px 0 0; font-size: 24px; }

.carte {
  background: #fff; border: 1px solid var(--trait); border-radius: 14px;
  padding: 20px 22px; margin-bottom: 18px;
}
.carte h2 { margin: 0 0 12px; font-size: 16px; }
.carte h3 { margin: 20px 0 10px; font-size: 14px; color: var(--doux); }
.connexion { min-width: 340px; }

.aide { color: var(--doux); font-size: 13.5px; margin: 0 0 14px; }
.pied { text-align: center; color: var(--doux); font-size: 12px; padding: 20px; }
.pied-invite { color: var(--doux); font-size: 12px; margin-top: 16px; text-align: center; }

/* ── Formulaires ──────────────────────────────────────────────────────────── */
.formulaire { display: flex; flex-direction: column; gap: 14px; }
.formulaire label { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; font-weight: 600; }
.formulaire small { font-weight: 500; color: var(--doux); }
.paire { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .paire { grid-template-columns: 1fr; } }

input[type=text], input[type=email], input[type=password], select {
  padding: 9px 12px; border-radius: 9px; border: 1px solid var(--trait);
  font-size: 14px; font-family: inherit; background: #fff;
}
input:focus, select:focus { outline: 2px solid #b5d4f4; outline-offset: 1px; }
.case { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 600; }

.bouton {
  padding: 9px 16px; border-radius: 9px; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 700; font-family: inherit;
}
.bouton:hover { filter: brightness(1.1); }
.bouton:disabled { opacity: .4; cursor: not-allowed; }
.bouton.discret { background: #fff; color: var(--accent); border: 1px solid var(--trait); }
.bouton.danger { background: #fff; color: var(--rouge); border: 1px solid #f0c2ba; }
.bouton.danger:hover:not(:disabled) { background: #fdeeec; }

/* ── Listes et tables ─────────────────────────────────────────────────────── */
.liste { list-style: none; margin: 0 0 16px; padding: 0; }
.ligne { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--trait); flex-wrap: wrap; }
.ligne-forme { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; }
.ligne-forme input[type=text] { flex: 1 1 auto; min-width: 0; }
.creation { margin-top: 6px; }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 600; padding: 7px 0; width: 45%; }
.table td { padding: 7px 0; color: var(--doux); }
.table .ok { color: var(--vert); font-weight: 700; text-align: right; }
.table .ko { color: var(--rouge); font-weight: 700; text-align: right; }

/* ── Messages ─────────────────────────────────────────────────────────────── */
.alerte { padding: 10px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 600; margin: 0 0 14px; }
.alerte.erreur { background: #fdeeec; color: var(--rouge); }
.alerte.succes { background: #eaf5ee; color: var(--vert); }

/* ── Adaptation mobile / densité — les moniteurs travaillent sur téléphone ──── */
/* Le design d'origine pousse des titres démesurés (jusqu'à 5rem). On les ramène à une
   échelle lisible sur petit écran, et on empile la carte de commande sur une colonne. */
.vehicle-command-main strong { font-size: clamp(1.35rem, 4.5vw, 2.3rem); line-height: 1.08; letter-spacing: -0.02em; }
.vehicle-command-main span { font-size: 0.7rem; }
.vehicle-command-main small { margin-top: 8px; font-size: 13px; }
.vehicle-command-stats strong,
.vehicle-command-stats article strong { font-size: clamp(1.3rem, 5vw, 1.9rem); }

@media (max-width: 760px) {
  .vehicle-command-card { grid-template-columns: 1fr !important; gap: 12px; padding: 16px; margin-bottom: 14px; }
  .vehicle-command-main strong { font-size: clamp(1.3rem, 6.5vw, 1.9rem); }
  .vehicle-command-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .vehicle-command-stats article { padding: 12px; }
  .titre h1 { font-size: 20px; }
  .bouton { padding: 10px 14px; font-size: 14px; }
  /* Bandeau de contexte (établissement / aperçu) : plus compact, pas pleine largeur. */
  .etab, .etab.apercu-role { flex: 1 1 46%; min-width: 0; }
  .etab-select { max-width: 100%; }

  /* Historique : le tableau (jusqu'à 9 colonnes) déborde sur 375px. On le passe en CARTES empilées :
     chaque ligne devient une carte, chaque cellule « Libellé : valeur » via data-label. */
  .tableau-cartes thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .tableau-cartes, .tableau-cartes tbody, .tableau-cartes tr, .tableau-cartes td { display: block; width: auto; }
  .tableau-cartes tr { border: 1px solid var(--trait, #e6e9ef); border-radius: 12px; padding: 8px 12px; margin: 0 0 10px; background: #fff; }
  .tableau-cartes td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 5px 0; border: 0; text-align: right; }
  .tableau-cartes td::before { content: attr(data-label); font-weight: 700; color: var(--doux, #64748b); text-align: left; white-space: nowrap; }
  .tableau-cartes tr.ligne-motif { border-color: #f0c2ba; }
  .tableau-cartes tr.ligne-motif td { justify-content: flex-start; text-align: left; }
  .tableau-cartes tr.ligne-motif td::before { content: ''; }

  /* Formulaires de saisie un peu plus denses (moins de défilement sur les longs formulaires). */
  .smgr-form-grid { gap: 11px; }
  .smgr-modal-actions { margin-top: 12px; }
}

/* Masqué à l’impression (boutons d’action des rapports). */
@media print { .no-print { display: none !important; } }

/* ── Cases à cocher & boutons radio : base NETTE et alignée sur toute l'application ──
   Réinitialise le rendu grossier hérité (taille/padding) et donne une case propre, colorée
   par accent-color. Les composants qui définissent déjà leur taille/couleur (spécificité plus
   forte) gardent la main ; ceux sans style dédié héritent enfin d'un rendu soigné. */
.app-shell input[type="checkbox"],
.app-shell input[type="radio"] {
  width: 18px; height: 18px; min-width: 18px; min-height: 0;
  margin: 0; padding: 0; flex: 0 0 auto; vertical-align: middle;
  accent-color: #4a45e0; cursor: pointer; box-shadow: none;
}
.app-shell input[type="checkbox"]:disabled,
.app-shell input[type="radio"]:disabled { opacity: .55; cursor: not-allowed; }

/* Étiquette « case + libellé » sur une ligne, alignée verticalement (ex. Faute éliminatoire,
   Visible par l'élève, cases d'établissements/rôles). */
.app-shell label.case { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; line-height: 1.35; }

/* Alignement UNIVERSEL « case/radio + libellé » sur une même ligne : remplace l'empilement hérité
   des grilles de formulaire (libellé au-dessus). Ne cible que les étiquettes contenant DIRECTEMENT
   une case/radio, et épargne les interrupteurs (classe *toggle*) qui ont leur propre disposition. */
.app-shell label:not([class*="toggle"]):has(> input[type="checkbox"]),
.app-shell label:not([class*="toggle"]):has(> input[type="radio"]) {
  display: flex; align-items: center; gap: 8px; cursor: pointer; line-height: 1.35;
}

/* Compteur d'élèves sur les cartes-modules du hub Auto-école. */
.app-shell .formation-module-card { position: relative; }
.app-shell .formation-module-count {
  position: absolute; top: 12px; right: 14px;
  display: inline-flex; align-items: baseline; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  background: #16243e; color: #fff; font-weight: 800; font-size: 15px; line-height: 1;
}
.app-shell .formation-module-count small { font-size: 10px; font-weight: 700; opacity: .85; }

/* Fiche élève : bloc d'informations (lecture seule) en grille lisible. */
.app-shell .fiche-infos { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 24px; margin: 0; }
.app-shell .fiche-infos > div { display: flex; flex-direction: column; gap: 2px; }
.app-shell .fiche-infos dt { font-size: 11.5px; font-weight: 700; color: #8a93a3; text-transform: uppercase; letter-spacing: .02em; }
.app-shell .fiche-infos dd { margin: 0; font-size: 14px; color: #16243e; font-weight: 600; }
.app-shell .fiche-infos dd strong { font-size: 15px; }

/* Accueil : menu à bulles (petit, coloré). */
.app-shell .home-bubbles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 16px; margin-top: 16px; }
.app-shell .home-bubble { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 18px 10px; border-radius: 16px; background: #fff; border: 1px solid #e7ecf3; color: #16243e; font-weight: 800; font-size: 13.5px; text-align: center; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease; }
.app-shell .home-bubble:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(20,36,62,.13); }
.app-shell .home-bubble i { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%; color: #fff; background: #2f7fd1; }
.app-shell .home-bubble.t-blue i { background: #2f7fd1; }
.app-shell .home-bubble.t-green i { background: #2f9e57; }
.app-shell .home-bubble.t-indigo i { background: #4a45e0; }
.app-shell .home-bubble.t-amber i { background: #e08a1e; }
.app-shell .home-bubble.t-cyan i { background: #0e9bb8; }
.app-shell .home-bubble.t-slate i { background: #5b6b82; }
.app-shell .home-bubble.t-red i { background: #d1495b; }
.app-shell .home-bubble.t-violet i { background: #7c3aed; }
.app-shell .home-bubble.t-teal i { background: #0f9d8f; }
.app-shell .home-bubble.t-gray i { background: #64748b; }
.app-shell .home-bubble.t-dark i { background: #16243e; }

/* ── Plus de couleur : nav active, titres de page, en-têtes de cartes ── */
.app-shell .nav2-pill.is-on { background: #4a45e0; color: #fff; }
.app-shell .nav2-pill.is-on:hover { background: #3a35c8; color: #fff; }
.app-shell .nav2-pill.is-on .navx-ico { color: #fff; }
.app-shell .titre { border-left: 4px solid #4a45e0; padding-left: 13px; }
.app-shell .titre span { color: #4a45e0; }
.app-shell .carte > h2:first-child { border-left: 3px solid #4a45e0; padding-left: 9px; line-height: 1.2; }
.app-shell .section-title > span { color: #4a45e0; }
/* Onglets de disclosure (fiche élève) : sommaire en couleur de marque. */
.app-shell .showcase-disclosure > summary { color: #22336b; }
.app-shell .topbar { border-bottom: 3px solid #4a45e0; }

/* ── OCR ticket carburant : ligne de statut du pré-remplissage ──────────────── */
.app-shell .ocr-statut{margin:6px 0 0;font-size:.85rem;display:flex;align-items:center;gap:6px}
.app-shell .ocr-statut[data-ton="encours"]{color:#4a45e0}
.app-shell .ocr-statut[data-ton="encours"]::before{content:"⏳"}
.app-shell .ocr-statut[data-ton="ok"]{color:#1f9d4d}
.app-shell .ocr-statut[data-ton="ok"]::before{content:"✅"}
.app-shell .ocr-statut[data-ton="ko"]{color:#b26a00}
.app-shell .ocr-statut[data-ton="ko"]::before{content:"✍️"}

/* ── Capture webcam (PC) du ticket carburant ───────────────────────────────── */
.app-shell .carb-cam{margin-top:8px}
.app-shell .carb-cam-live video{display:block;width:360px;max-width:100%;margin:8px 0;border-radius:10px;background:#000}

/* ── Filtres du planning (moniteur / véhicule) ─────────────────────────────── */
.app-shell .pl-filtres{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px;margin:0 0 12px}
.app-shell .pl-filtres label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:700;color:#5b6b82}
.app-shell .pl-filtres select{padding:8px 10px;border:1px solid #cdd6e4;border-radius:9px;background:#fff;font-size:13px;font-weight:600;color:#16243e;min-width:180px}
.app-shell .pl-filtre-mon{display:flex;flex-direction:column;gap:4px}
.app-shell .pl-filtre-lbl{font-size:12px;font-weight:700;color:#5b6b82}
.app-shell .pl-mon-choix{display:flex;flex-wrap:wrap;gap:6px;max-width:520px}
.app-shell .pl-chk{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border:1px solid #cdd6e4;border-radius:999px;background:#fff;font-size:12px;font-weight:600;color:#16243e;cursor:pointer}
.app-shell .pl-chk:has(input:checked){border-color:#7c3aa0;background:#f4ecfa;color:#5f2d84}
.app-shell .pl-chk input{margin:0;accent-color:#7c3aa0}
.app-shell .pl-moncol-h{align-items:center;text-align:center}
.app-shell .pl-monnom{font-size:14px;line-height:1.15}
/* Cartes de séance en liste (vue jour/semaine et colonnes moniteur) : lignes empilées et lisibles. */
.app-shell .pl-daycol .pl-lesson{border-left:3px solid rgba(0,0,0,.18)}
.app-shell .pl-daycol .pl-lesson b,.app-shell .pl-daycol .pl-lesson span,.app-shell .pl-daycol .pl-lesson small,.app-shell .pl-daycol .pl-lesson em{display:block;line-height:1.3}
.app-shell .pl-daycol .pl-lesson b{font-size:12px}
.app-shell .pl-daycol .pl-lesson span{font-weight:600;font-size:12px}
.app-shell .pl-daycol .pl-lesson small{font-size:11px;opacity:.85}
.app-shell .pl-daycol .pl-lesson em{font-size:11px;font-style:italic;opacity:.9}
.app-shell .pl-dow{font-size:14px!important}
.app-shell .pl-mon-color{display:inline-block;width:11px;height:11px;border-radius:50%;flex:0 0 11px;box-shadow:0 0 0 2px rgba(255,255,255,.9),0 0 0 3px rgba(15,23,42,.12)}
.app-shell .pl-lesson{transition:transform .12s ease,box-shadow .12s ease}
.app-shell .pl-lesson:hover{transform:translateY(-1px);box-shadow:0 5px 13px rgba(15,23,42,.12)}
.app-shell .pl-mon-grid{display:grid;gap:1px;background:#dfe5ef}
.app-shell .pl-mon-grid-head{border:1px solid #dfe5ef;border-bottom:0;border-radius:14px 14px 0 0;overflow:hidden}
.app-shell .pl-mon-grid-body{border:1px solid #dfe5ef;border-radius:0 0 14px 14px;overflow:hidden}
.app-shell .pl-mon-corner,.app-shell .pl-mon-daylabel{display:flex;align-items:center;justify-content:center;gap:6px;padding:12px 8px;background:#f8fafc;color:#526078;font-weight:800;text-align:center}
.app-shell .pl-mon-daylabel{min-height:120px;flex-direction:column;text-transform:uppercase}
.app-shell .pl-mon-daylabel.is-today .pl-dom{display:grid;place-items:center;min-width:34px;height:34px;padding:0 5px;border-radius:50%;background:#5b55ef;color:#fff}
.app-shell .pl-moncol-h{display:flex!important;align-items:center;justify-content:center;gap:9px;border-top:4px solid var(--moniteur-couleur);background:#fff!important;padding:13px 10px!important}
.app-shell .pl-moncol-h{border-top-color:#cbd5e1}
.pl-type-legend{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:0 0 14px;padding:10px 14px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;color:#334155;font-size:13px}
.pl-type-legend span{display:inline-flex;align-items:center;gap:6px}.pl-type-legend i{width:12px;height:12px;border-radius:999px;display:inline-block}
.pl-lesson-slot{min-height:100px;border-left:4px solid var(--seance-couleur);background:color-mix(in srgb,var(--seance-couleur) 10%,white);border-radius:9px;z-index:1}
.pl-lesson-slot .pl-lesson{position:absolute;inset:0;display:flex;flex-direction:column;padding:7px 8px 29px;border:0!important;background:transparent!important;text-decoration:none;color:inherit;overflow:hidden}
.pl-lesson-slot .pl-lesson-edit{position:absolute;right:6px;bottom:5px;z-index:2;padding:3px 7px;border:1px solid color-mix(in srgb,var(--seance-couleur) 45%,white);border-radius:6px;background:#fff;color:#1e293b;font-size:11px;font-weight:800;text-decoration:none}
.app-shell .pl-monnom{font-size:14px;font-weight:850;color:#172033}
.app-shell .pl-mon-cell{min-height:120px;padding:10px;background:#fff}
.app-shell .pl-slot-pair{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:6px}
.app-shell .pl-slot-pair>.pl-lesson{min-width:0}
.app-shell .pl-time-day{min-height:0!important}
.app-shell .pl-day-timeline{position:relative;margin-bottom:10px;background:repeating-linear-gradient(to bottom,#fff 0,#fff calc(var(--pl-hour-height) - 1px),#e7ebf2 calc(var(--pl-hour-height) - 1px),#e7ebf2 var(--pl-hour-height))}
.app-shell .pl-day-timeline-compact{background:#fff}
.app-shell .pl-day-timeline>.pl-lesson{box-sizing:border-box;min-width:0;padding:7px 8px;z-index:1}
.app-shell .pl-btn.is-agenda{border-color:#d78a16;background:#fff4df;color:#8a5100;font-weight:800}
.app-shell .pl-btn.is-agenda:hover{background:#f7dfb3;color:#673b00}
.app-shell .pl-filtre-liste{display:flex;flex-direction:column;gap:4px;min-width:220px}
.app-shell .pl-multiselect{position:relative}
.app-shell .pl-multiselect>summary{display:flex;align-items:center;justify-content:space-between;min-height:42px;padding:9px 12px;border:1px solid #cdd6e4;border-radius:10px;background:#fff;color:#16243e;font-size:13px;font-weight:700;cursor:pointer;list-style:none}
.app-shell .pl-multiselect>summary::-webkit-details-marker{display:none}
.app-shell .pl-multiselect>summary::after{content:'▾';margin-left:14px;color:#64748b}
.app-shell .pl-multiselect[open]>summary{border-color:#655cf3;box-shadow:0 0 0 2px rgba(101,92,243,.12)}
.app-shell .pl-multiselect[open]>summary::after{content:'▴'}
.app-shell .pl-multiselect-list{position:absolute;z-index:80;top:calc(100% + 5px);left:0;width:max-content;min-width:100%;max-width:min(360px,calc(100vw - 28px));max-height:280px;overflow:auto;padding:7px;border:1px solid #dce2ec;border-radius:12px;background:#fff;box-shadow:0 14px 34px rgba(18,32,61,.16)}
.app-shell .pl-check-row{display:flex;align-items:flex-start;gap:9px;padding:9px 10px;border-radius:8px;color:#24334d;font-size:13px;font-weight:650;cursor:pointer}
.app-shell .pl-check-row:hover{background:#f2f4ff}
.app-shell .pl-check-row input{flex:0 0 auto;margin:2px 0 0;accent-color:#554bf0}
.app-shell .pl-filter-apply{align-self:flex-end}
@media(max-width:700px){.app-shell .pl-filtre-liste{width:100%;min-width:0}.app-shell .pl-multiselect-list{width:100%;max-width:100%}.app-shell .pl-filter-apply{align-self:stretch;justify-content:center}}

/* ── Agenda partagé ────────────────────────────────────────────────────────── */
.app-shell .ag-legend{display:flex;flex-wrap:wrap;gap:8px 16px;margin:0 0 12px;font-size:12px;font-weight:600;color:#3f4a5c}
.app-shell .ag-legend-item{display:inline-flex;align-items:center;gap:6px}
.app-shell .ag-dot{width:10px;height:10px;border-radius:50%;display:inline-block;flex:0 0 auto}
.app-shell .ag-head{display:grid;grid-template-columns:repeat(7,minmax(120px,1fr));min-width:840px;gap:1px;background:#eef1f7}
.app-shell .ag-head-cell{background:#f6f8fc;padding:8px 10px;font-size:12px;font-weight:700;color:#5b6b82;text-align:center}
.app-shell .ag-body{display:grid;grid-template-columns:repeat(7,minmax(120px,1fr));min-width:840px;gap:1px;background:#eef1f7}
.app-shell .ag-cell{background:#fff;min-height:104px;padding:4px 5px;display:flex;flex-direction:column;gap:3px}
.app-shell .ag-cell.is-hors{background:#fafbfd}
.app-shell .ag-cell.is-hors .ag-num{color:#c0c8d6}
.app-shell .ag-cell.is-today{box-shadow:inset 0 0 0 2px #7c3aa0}
.app-shell .ag-cell-h{display:flex;align-items:center;justify-content:space-between}
.app-shell .ag-num{font-size:12px;font-weight:700;color:#3f4a5c}
.app-shell .ag-add{width:18px;height:18px;line-height:16px;text-align:center;border-radius:6px;color:#7c3aa0;font-weight:800;text-decoration:none;opacity:0;transition:opacity .12s}
.app-shell .ag-cell:hover .ag-add{opacity:1}
.app-shell .ag-add:hover{background:#f4ecfa}
.app-shell .ag-chip{display:block;color:#fff;border-radius:6px;padding:2px 6px;font-size:11px;font-weight:600;line-height:1.3;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app-shell .ag-month-title{font-size:20px;line-height:1.35;margin-top:10px}
.app-shell .ag-chip-trigger{border:0;width:100%;text-align:left;font-family:inherit;cursor:pointer}
.app-shell .ag-chip-trigger:focus-visible{outline:3px solid rgba(37,99,235,.35);outline-offset:1px}
.app-shell .ag-event-popover{position:fixed;z-index:1200;padding:20px;background:#fff;border:1px solid #dce3ee;border-radius:16px;box-shadow:0 18px 50px rgba(15,23,42,.24);color:#172033}
.app-shell .ag-event-popover[hidden]{display:none}
.app-shell .ag-popover-close{position:absolute;top:8px;right:10px;border:0;background:transparent;color:#64748b;font-size:25px;line-height:1;cursor:pointer}
.app-shell .ag-popover-title-row{display:flex;align-items:flex-start;gap:11px;padding-right:26px}
.app-shell .ag-popover-title-row h2{font-size:20px;line-height:1.25;margin:0}
.app-shell .ag-popover-dot{width:13px;height:13px;border-radius:4px;flex:0 0 auto;margin-top:6px}
.app-shell .ag-popover-when{margin:10px 0 14px 24px;color:#475569;font-weight:700}
.app-shell .ag-popover-details{margin:0 0 16px 24px;display:grid;gap:9px}
.app-shell .ag-popover-details>div{display:grid;grid-template-columns:105px minmax(0,1fr);gap:8px}
.app-shell .ag-popover-details>div[hidden]{display:none}
.app-shell .ag-popover-details dt{font-size:12px;font-weight:800;color:#64748b}.app-shell .ag-popover-details dd{margin:0;white-space:pre-line;overflow-wrap:anywhere}
.app-shell .ag-popover-edit{margin-left:24px;display:inline-flex}
.app-shell .ag-chip-h{font-weight:800;opacity:.9;margin-right:3px}
.app-shell .ag-chip-inv{opacity:.9;margin-left:4px;font-size:10px}
.app-shell .ag-check{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:600}
.app-shell .ag-fieldset{border:1px solid #e2e6ee;border-radius:12px;padding:10px 12px;margin:0}
.app-shell .ag-fieldset legend{font-size:12px;font-weight:700;color:#5b6b82;padding:0 4px}
.app-shell .ag-choix{display:flex;flex-wrap:wrap;gap:6px}
.app-shell .ag-cats{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.app-shell .ag-cat{display:inline-flex;align-items:center;gap:6px;border:1px solid #e2e6ee;border-radius:999px;padding:4px 10px;font-size:13px;font-weight:600}
.app-shell .ag-cat-del{border:none;background:none;color:#b3261e;font-weight:800;cursor:pointer;font-size:15px;line-height:1;padding:0 2px}
.app-shell .ag-cat-form{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.app-shell .ag-cat-form input[type=text]{padding:8px 10px;border:1px solid #cdd6e4;border-radius:9px;min-width:200px}
.app-shell .ag-cat-form input[type=color]{width:44px;height:38px;padding:2px;border:1px solid #cdd6e4;border-radius:9px;background:#fff}
.app-shell .pl-check-row{flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;text-align:left!important}
.app-shell .pl-check-row input[type=checkbox],.app-shell .pl-chk input[type=checkbox]{width:auto!important;flex:0 0 auto!important;margin:0!important}
.app-shell .pl-btn.is-planning-return{background:#e0f2fe;border-color:#0284c7;color:#075985;font-weight:800}
.app-shell .pl-btn.is-planning-return:hover{background:#bae6fd}
.app-shell .ag-color-field{border:0;padding:0;margin:0;min-width:0}
.app-shell .ag-color-field legend{font-weight:700;color:#53627a;margin-bottom:8px}
.app-shell .ag-palette{display:flex;flex-wrap:wrap;gap:8px;align-items:center;min-height:48px}
.app-shell .ag-color-choice{display:inline-flex!important;align-items:center!important;justify-content:center!important;cursor:pointer}
.app-shell .ag-color-choice input{position:absolute;opacity:0;pointer-events:none}
.app-shell .ag-color-choice span{width:28px;height:28px;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 1px #cbd5e1;transition:.15s ease}
.app-shell .ag-color-choice input:checked+span{box-shadow:0 0 0 3px #172033;transform:scale(1.08)}
.app-shell .ag-event-form{grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:18px!important}
.app-shell .ag-event-form .ag-title,.app-shell .ag-event-form .ag-description{grid-column:1/-1}
.app-shell .ag-event-form .ag-meta-category{grid-column:span 3}
.app-shell .ag-event-form .ag-meta-color{grid-column:span 3}
.app-shell .ag-event-form .ag-meta-establishment{grid-column:span 4}
.app-shell .ag-event-form .ag-meta-all-day{grid-column:span 2;align-self:end;min-height:48px}
.app-shell .ag-event-form .ag-time-start,.app-shell .ag-event-form .ag-time-end,.app-shell .ag-event-form .ag-location{grid-column:span 4}
.app-shell .ag-recurrence{display:flex;flex-wrap:wrap;align-items:end;gap:14px}
.app-shell .ag-recurrence label{min-width:210px}
.app-shell .ag-field-help{margin:0 0 12px;color:#64748b;font-size:.92rem}
.app-shell .ag-team-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:0 18px}
.app-shell .ag-team-list .pl-chk{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:9px;width:100%;padding:9px 4px;border:0;border-bottom:1px solid #edf0f5;border-radius:0;background:transparent;text-align:left}
.app-shell .ag-team-list .pl-chk:has(input:checked){background:#f4f2ff;color:#3f378f}
.app-shell .ag-team-list .pl-chk input{order:0}.app-shell .ag-team-list .pl-chk span{order:1}
.app-shell .ag-tier-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.app-shell .ag-tier-heading .ag-field-help{margin:0}
.app-shell .pl-btn.is-directory{border-color:#7c3aed;background:#f5f3ff;color:#5b21b6;font-weight:800}
.app-shell .ag-tier-row{display:grid;grid-template-columns:1fr 1fr minmax(210px,1.5fr) 1fr auto;gap:10px;align-items:end;padding:12px 0;border-bottom:1px solid #e2e8f0}
.app-shell .ag-tier-row label{min-width:0}
.app-shell .ag-tier-row input{margin-top:6px;width:100%}
.app-shell .ag-tier-remove{color:#b42318;border-color:#fecaca}
.app-shell .ag-tiers>#ag-tier-add{margin-top:12px}
.app-shell .ag-palette-category{padding:8px 4px}
.app-shell .ag-directory-dialog{width:min(920px,calc(100vw - 32px));max-height:88vh;padding:22px;border:0;border-radius:18px;box-shadow:0 24px 70px rgba(15,23,42,.3);color:#172033}
.app-shell .ag-directory-dialog::backdrop{background:rgba(15,23,42,.48);backdrop-filter:blur(2px)}
.app-shell .ag-directory-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}
.app-shell .ag-directory-head h2,.app-shell .ag-directory-head p{margin:0}.app-shell .ag-directory-head p{margin-top:4px;color:#64748b}
.app-shell .ag-directory-filters{display:grid;grid-template-columns:2fr 1fr;gap:12px;margin-bottom:14px}
.app-shell .ag-directory-filters label,.app-shell .ag-contact-form label{display:flex;flex-direction:column;gap:6px;font-weight:700;color:#526078}
.app-shell .ag-directory-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:280px;overflow:auto;padding:3px;margin-bottom:14px}
.app-shell .ag-contact-row{display:flex!important;flex-direction:row!important;align-items:center!important;gap:10px;padding:10px;border:1px solid #dce3ee;border-radius:10px;background:#fff;cursor:pointer}
.app-shell .ag-contact-row:has(input:checked){border-color:#675cf1;background:#f5f3ff}
.app-shell .ag-contact-row input{width:auto!important;flex:0 0 auto;margin:0}.app-shell .ag-contact-row span{display:flex;flex-direction:column;min-width:0}.app-shell .ag-contact-row small{color:#64748b;overflow:hidden;text-overflow:ellipsis}
.app-shell .ag-contact-form{display:grid;grid-template-columns:1fr 1fr 1.5fr 1fr;gap:10px;align-items:end}.app-shell .ag-contact-form h3{grid-column:1/-1;margin:0}.app-shell .ag-contact-form .ag-contact-message{grid-column:1/-1;margin:0;color:#166534;font-weight:700}
@media(max-width:900px){.app-shell .ag-event-form .ag-meta-category,.app-shell .ag-event-form .ag-meta-color,.app-shell .ag-event-form .ag-meta-establishment,.app-shell .ag-event-form .ag-meta-all-day,.app-shell .ag-event-form .ag-time-start,.app-shell .ag-event-form .ag-time-end,.app-shell .ag-event-form .ag-location{grid-column:span 6}.app-shell .ag-tier-row{grid-template-columns:1fr 1fr}.app-shell .ag-tier-row .ag-tier-remove{grid-column:1/-1;justify-self:start}.app-shell .ag-contact-form{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.app-shell .ag-event-form{grid-template-columns:1fr!important}.app-shell .ag-event-form>*{grid-column:1!important}.app-shell .ag-tier-row{grid-template-columns:1fr}.app-shell .ag-tier-row .ag-tier-remove{grid-column:auto}.app-shell .ag-recurrence label{min-width:100%;width:100%}.app-shell .ag-tier-heading,.app-shell .ag-directory-head{align-items:stretch;flex-direction:column}.app-shell .ag-directory-filters,.app-shell .ag-directory-list,.app-shell .ag-contact-form{grid-template-columns:1fr}}
.app-shell .pl-credit-info{display:block;margin-top:6px;color:#475569;font-weight:650}
.app-shell .pl-slots{border:1px solid #dce3ee;border-radius:14px;padding:14px;background:#f8fafc;min-width:0}
.app-shell .pl-slots legend{padding:0 8px;font-weight:800;color:#172033}
.app-shell .pl-slots>p{margin:0 0 12px;color:#64748b}
.app-shell .pl-slot-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:end;padding:10px 0;border-bottom:1px solid #e2e8f0}
.app-shell .pl-slot-row label{min-width:0}
.app-shell .pl-slot-row input,.app-shell .pl-slot-row select{width:100%;margin-top:6px}
.app-shell .pl-slot-remove{grid-column:1/-1;justify-self:start;color:#b42318;border-color:#fecaca}
.app-shell #pl-slot-add{margin-top:12px}
.app-shell #pl-slots-total{display:inline-block;margin-left:14px;color:#166534}
.app-shell #pl-slots-total.is-over{color:#b42318}
@media(max-width:700px){.app-shell .pl-slot-row{grid-template-columns:1fr 1fr}.app-shell .pl-slot-remove{grid-column:1/-1;justify-self:start}.app-shell #pl-slots-total{display:block;margin:10px 0 0}}

/* ── État financier de l'élève ─────────────────────────────────────────────── */
.app-shell .fin-kpi{display:grid;grid-template-columns:repeat(3,minmax(110px,1fr));gap:12px 20px;margin:0}
.app-shell .fin-kpi dt{font-size:12px;font-weight:700;color:#6b7280}
.app-shell .fin-kpi dd{margin:2px 0 0;font-size:22px;font-weight:800;color:#16243e}
.app-shell .fin-kpi dd.is-ok{color:#1f9d4d}
.app-shell .fin-kpi dd.is-ko{color:#b3261e}
.app-shell .fin-kpi small{display:block;font-weight:600;margin-top:2px}
.app-shell .fin-form{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;margin-top:14px}
.app-shell .fin-form label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:700;color:#5b6b82}
.app-shell .fin-form input{padding:8px 10px;border:1px solid #cdd6e4;border-radius:9px;background:#fff;font-weight:600;color:#16243e}
.app-shell .fin-form input[type=number]{max-width:120px}
.app-shell .fin-form input[type=text]{min-width:220px}
.app-shell .tableau strong.is-ok{color:#1f9d4d}
.app-shell .tableau strong.is-ko{color:#b3261e}
.app-shell .fin-justif{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0}
.app-shell .fin-justif .pl-chk{cursor:pointer}

/* ── Statistiques (lot 8) ──────────────────────────────────────────────────── */
.app-shell .stats-filtre{margin:0 0 14px}
.app-shell .stats-filtre label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:700;color:#5b6b82;max-width:220px}
.app-shell .stats-filtre select{padding:8px 10px;border:1px solid #cdd6e4;border-radius:9px;background:#fff;font-weight:600}
.app-shell .stats-global{display:flex;flex-wrap:wrap;align-items:center;gap:24px}
.app-shell .stats-jauge{flex:0 0 auto;line-height:0}
.app-shell .stats-kpi{display:grid;grid-template-columns:repeat(2,minmax(120px,1fr));gap:12px 24px;margin:0}
.app-shell .stats-kpi dt{font-size:12px;font-weight:700;color:#6b7280}
.app-shell .stats-kpi dd{margin:0;font-size:24px;font-weight:800;color:#16243e}
.app-shell .stats-kpi dd.is-ok{color:#1f9d4d}
.app-shell .stats-kpi dd.is-ko{color:#b3261e}
.app-shell .stats-suivi{display:flex;flex-wrap:wrap;align-items:stretch;gap:20px}
.app-shell .stats-chart{flex:1 1 460px;min-width:0}
.app-shell .stats-legend{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:12px;font-weight:700;margin:0 0 8px}
.app-shell .stats-legend span{display:inline-flex;align-items:center;gap:6px}
.app-shell .stats-legend .lg-n{color:#7c3aa0}
.app-shell .stats-legend .lg-p{color:#8a93a3}
.app-shell .stats-svg{display:block;width:100%;height:auto;max-height:260px}
.app-shell .stats-cote{flex:0 0 210px;display:flex;flex-direction:column;gap:12px}
.app-shell .stats-cote-bloc{border:1px solid #e6eaf2;border-radius:12px;padding:10px 12px;background:#fbfcfe}
.app-shell .stats-cote-bloc>div{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.app-shell .stats-cote-bloc>div+div{margin-top:4px}
.app-shell .stats-cote-bloc span{font-size:12px;font-weight:700}
.app-shell .stats-cote-bloc strong{font-size:18px;font-weight:800}
.app-shell .stats-cote-bloc .sc-n span{color:#5b6b82}
.app-shell .stats-cote-bloc .sc-n strong{color:#7c3aa0}
.app-shell .stats-cote-bloc .sc-p span,.app-shell .stats-cote-bloc .sc-p strong{color:#9aa3b2}
@media(max-width:640px){.app-shell .stats-cote{flex-basis:100%;flex-direction:row;flex-wrap:wrap}.app-shell .stats-cote-bloc{flex:1 1 150px}}

/* ══════════════════════════════════════════════════════════════════════════
   Logo « Logi Zen » (identité maison) — pictogramme SVG + mot-symbole deux tons.
   Rendu par le helper logo_zen(). Volontairement NON préfixé .app-shell : le logo
   doit aussi s'afficher sur la page de connexion autonome (<body class="invite">).
   ══════════════════════════════════════════════════════════════════════════ */
.brand-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; line-height: 1; }
.brand-logo .lz-mark { height: var(--lz-h, 40px); width: auto; flex: 0 0 auto; display: block;
  object-fit: contain; border-radius: 8px; }
/* Mot-symbole « Logi Zen » : style d'écriture d'origine — cursive Caveat, violet, une seule teinte. */
.brand-logo .lz-word { font-family: "Caveat", "Segoe Script", "Comic Sans MS", cursive;
  font-weight: 700; font-size: calc(var(--lz-h, 40px) * 0.62); line-height: 1;
  white-space: nowrap; color: #7c3aa0; }
.brand-logo .lz-w1, .brand-logo .lz-w2 { color: #7c3aa0; }

/* Barre supérieure (staff) : le logo remplace l'ancien texte .brand-name, en ligne. */
.app-shell .showcase-brand { flex-direction: row; }
.app-shell .showcase-topbar .showcase-brand .lz-word { font-size: 24px; }

/* En-tête de l'espace élève : le logo est plus compact, au-dessus du sous-titre. */
.eleve-top-brand .brand-logo { --lz-h: 30px; gap: 8px; }
.eleve-top-brand .brand-logo .lz-word { font-size: 21px; }

/* Page de connexion : logo centré, plus généreux. */
.connexion-marque { display: flex; justify-content: center; margin: 4px 0 18px; }
.connexion-marque .brand-logo { gap: 12px; }
.connexion-marque .lz-word { font-size: 38px; }

/* Téléphone : l'en-tête complet vit dans le tiroir. Fermé, seul le bouton à trois barres reste visible. */
.navx-mobile-tools { display: none; }
@media (max-width: 700px) {
  .app-shell .showcase-topbar {
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
  }
  .app-shell .showcase-topbar-inner {
    min-height: 62px;
    padding: 8px 12px;
    flex-wrap: nowrap;
    align-items: center;
  }
  .app-shell .showcase-topbar-inner > .showcase-brand,
  .app-shell .showcase-topbar-inner > .etab,
  .app-shell .showcase-topbar-inner > .compte { display: none; }

  .app-shell .navx-mobile-tools {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    margin-bottom: 10px;
    padding: 2px 2px 16px;
    border-bottom: 1px solid var(--trait);
  }
  .app-shell .navx-mobile-tools > * { order: initial; margin: 0; }
  .app-shell .navx-mobile-tools .showcase-brand {
    display: flex;
    justify-content: flex-start;
    min-height: 0;
    padding: 0;
  }
  .app-shell .navx-mobile-tools .brand-logo { height: 44px; }
  .app-shell .navx-mobile-tools .etab,
  .app-shell .navx-mobile-tools .etab.apercu-role {
    display: flex;
    flex: 0 0 auto;
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 5px;
  }
  .app-shell .navx-mobile-tools .etab-select { width: 100%; min-height: 44px; }
  .app-shell .navx-mobile-tools .compte {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   Livret élève — compétences REMC en GRILLE DE TUILES à jauges (inspiration
   disposition Klaxo, mais jauges SVG maison — pas de carrés pleins). Surcharge
   de planning.css : cadres-cartes propres, cap coloré par compétence, jauge au
   centre. Mobile d'abord : 2 colonnes lisibles dès ~360 px.
   ══════════════════════════════════════════════════════════════════════════ */
.app-shell .remc-dashboard-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:20px;align-items:start;margin-top:10px}
.app-shell .remc-global{display:flex;min-width:0;flex-direction:column;align-items:center}
.app-shell .remc-global-gauge{width:100%;overflow:visible;text-align:center;line-height:0}
.app-shell .remc-global-gauge .jauge-remc{width:min(100%,260px);height:auto;overflow:visible}
.app-shell .remc-scale{display:flex;width:78%;justify-content:space-between;margin-top:-5px;color:#66758d;font-size:11px}
.app-shell .remc-kpis{display:grid;width:100%;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:14px}
.app-shell .remc-kpis>div{padding:10px;border-radius:10px;background:#f3f2fe;text-align:center}
.app-shell .remc-kpis strong{display:block;color:#16243e;font-size:18px}
.app-shell .remc-kpis span{display:block;margin-top:2px;color:#66758d;font-size:11px}
.app-shell .remc-competences{min-width:0}
.app-shell .remc-competences-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:10px}
.app-shell .remc-competences-head h3,.app-shell .remc-competences-head p{margin:0}
.app-shell .remc-competences-head>span{color:#66758d;font-size:12px;white-space:nowrap}
@media(max-width:820px){.app-shell .remc-dashboard-layout{grid-template-columns:1fr}.app-shell .remc-global{width:min(100%,380px);margin:0 auto}.app-shell .remc-competences{width:100%}}
.app-shell .eleve-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 2px 0 6px; }
.app-shell .eleve-app .eleve-bar {
  border-radius: 16px;
  padding: 15px 12px 13px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 9px;
  min-height: 130px;
  border: 1px solid rgba(16, 24, 40, 0.06);
  /* Le cap supérieur reprend la couleur de la compétence (currentColor = texte du bloc). */
  box-shadow: inset 0 3px 0 0 currentColor, 0 1px 2px rgba(16, 24, 40, 0.06);
}
.app-shell .eleve-bar .eleve-bar-head { min-height: 32px; align-items: center; }
.app-shell .eleve-bar .eleve-bar-head strong { font-size: 13.5px; font-weight: 800; line-height: 1.2; }
.app-shell .eleve-bar .gauge { width: 66px; }
.app-shell .eleve-app .eleve-bar:hover { box-shadow: inset 0 3px 0 0 currentColor, 0 4px 12px rgba(16, 24, 40, 0.12); }
.app-shell .eleve-app .eleve-bar.is-open { box-shadow: inset 0 0 0 2px currentColor, 0 6px 16px rgba(16, 24, 40, 0.16); }

@media (max-width: 720px) {
  .app-shell .eleve-bars { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (max-width: 420px) {
  .app-shell .eleve-bars { gap: 9px; }
  .app-shell .eleve-app .eleve-bar { min-height: 118px; padding: 13px 8px 11px; gap: 7px; }
  .app-shell .eleve-bar .gauge { width: 60px; }
  .app-shell .eleve-bar .eleve-bar-head strong { font-size: 12.5px; }
}

/* Page d'accueil : marque complète sous les raccourcis, volontairement plus basse. */
.app-shell .home-accueil{position:relative;min-height:78vh}
.app-shell .home-logo-hero{display:flex;justify-content:center;margin:-150px auto 30px;opacity:.55;pointer-events:none}
.app-shell .home-logo-hero .brand-logo{flex-direction:column;gap:14px;text-align:center}
.app-shell .home-logo-hero .lz-mark{width:min(42vw,430px);height:auto;max-height:none;border-radius:18px}
.app-shell .home-logo-hero .lz-word{font-size:clamp(36px,4.8vw,60px)}
@media(max-width:720px){.app-shell .home-logo-hero{margin-top:-24px}.app-shell .home-logo-hero .lz-mark{width:min(82vw,380px)}}
.app-shell .settings-backup-card form{align-self:end;margin:0}
.app-shell .settings-backup-card .bouton{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:max-content}
.app-shell .settings-backup-card .settings-backup-browser-note{align-self:end;max-width:420px;margin:0;font-size:11px}
.app-shell .settings-backup-history{margin-top:16px}
.app-shell .settings-backup-history-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:8px}
.app-shell .settings-backup-history-head h2{margin:0 0 4px}
.app-shell .settings-backup-history-head p{margin:0}
.app-shell .settings-backup-count{flex:0 0 auto;padding:6px 11px;border-radius:999px;background:#eef2ff;color:#4338ca;font-size:12px;font-weight:800}
.app-shell .settings-backup-live{min-height:18px;margin:5px 0;color:#147a47;font-size:12px;font-weight:700}
.app-shell .settings-backup-live.is-error{color:#b42318}
.app-shell .settings-backup-empty{margin:12px 0 0;color:#667085}
.app-shell .settings-backup-list{display:grid;gap:8px}
.app-shell .settings-backup-item{display:grid;grid-template-columns:minmax(210px,1.2fr) minmax(250px,1.4fr) minmax(175px,.8fr) auto;align-items:center;gap:14px;padding:12px;border:1px solid #e2e8f0;border-radius:12px;background:#fff}
.app-shell .settings-backup-file,.app-shell .settings-backup-depot,.app-shell .settings-backup-last{display:flex;min-width:0;flex-direction:column;gap:3px}
.app-shell .settings-backup-file strong{overflow:hidden;text-overflow:ellipsis;font-size:13px}
.app-shell .settings-backup-file span,.app-shell .settings-backup-depot>span,.app-shell .settings-backup-last>span,.app-shell .settings-backup-last small{color:#667085;font-size:11px}
.app-shell .settings-backup-depot code{overflow:hidden;text-overflow:ellipsis;padding:5px 7px;border-radius:7px;background:#f4f6fa;color:#344054;font-size:11px;white-space:nowrap}
.app-shell .settings-backup-last b{font-size:12px}
.app-shell .settings-backup-item form{margin:0}
.app-shell .settings-backup-item .bouton{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
@media(max-width:900px){.app-shell .settings-backup-item{grid-template-columns:1fr 1fr}.app-shell .settings-backup-item form{justify-self:start}}
@media(max-width:620px){.app-shell .settings-backup-history-head{flex-direction:column}.app-shell .settings-backup-item{grid-template-columns:1fr}.app-shell .settings-backup-item .bouton{width:100%;justify-content:center}}

/* ── Validation des compétences — grille interactive scorée ─────────────────── */
.app-shell .vc-head p .vc-dot-elim{display:inline-block;width:9px;height:9px;border-radius:2px;background:#e11d48;vertical-align:middle;margin:0 2px}
.app-shell .vc-section{border:1px solid #e2e6ee;border-radius:12px;margin:0 0 12px;overflow:hidden}
.app-shell .vc-section-h{display:flex;justify-content:space-between;align-items:center;gap:10px;background:#eaf4ec;padding:8px 12px;font-weight:800;font-size:13px;color:#1f5133}
.app-shell .vc-section-h .vc-sub{font-weight:700;font-style:normal;color:#3f4a5c;font-size:12px}
.app-shell .vc-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 12px;border-top:1px solid #eef1f7}
.app-shell .vc-row.vc-elim{border-left:4px solid #e11d48}
.app-shell .vc-row .vc-lib{font-size:13px;color:#16243e;min-width:0}
.app-shell .vc-row.vc-elim .vc-lib b{color:#e11d48}
.app-shell .vc-row .vc-lib b{margin-right:4px;font-weight:800}
.app-shell .vc-row .vc-lib small{display:block;color:#8a93a3;font-size:11px;margin-top:1px}
.app-shell .vc-toggle{display:inline-flex;flex:0 0 auto;border:1px solid #cdd6e4;border-radius:999px;overflow:hidden}
.app-shell .vc-toggle label{margin:0;cursor:pointer}
.app-shell .vc-toggle input{position:absolute;opacity:0;pointer-events:none}
.app-shell .vc-toggle span{display:block;padding:5px 12px;font-size:12px;font-weight:700;color:#5b6b82}
.app-shell .vc-toggle .vc-no input:checked+span{background:#fdecec;color:#b3261e}
.app-shell .vc-toggle .vc-yes input:checked+span{background:#1f9d4d;color:#fff}
.app-shell .vc-row.is-fault{background:#fff5f5}
.app-shell .vc-summary{position:sticky;bottom:0;display:flex;flex-wrap:wrap;align-items:center;gap:12px 16px;margin-top:14px;padding:12px;border:1px solid #e2e6ee;border-radius:12px;background:#fff;box-shadow:0 -4px 14px rgba(20,28,56,.06)}
.app-shell .vc-score-box{display:flex;flex-direction:column;line-height:1.1}
.app-shell .vc-score-box span{font-size:11px;font-weight:700;color:#6b7280}
.app-shell .vc-score-box strong{font-size:22px;font-weight:800;color:#16243e}
.app-shell .vc-badge{padding:6px 14px;border-radius:999px;font-weight:800;font-size:14px;background:#fdecec;color:#b3261e}
.app-shell .vc-badge.is-ok{background:#e7f7ee;color:#1f9d4d}
.app-shell .vc-badge.is-ko{background:#fdecec;color:#b3261e}
.app-shell .vc-reason{flex:1 1 220px;font-size:12px;color:#5b6b82}
.app-shell .vc-submit{margin-left:auto}
@media(max-width:640px){.app-shell .vc-row{flex-direction:column;align-items:flex-start;gap:6px}.app-shell .vc-submit{margin-left:0;width:100%}}

/* Agenda partagé avancé : vues, agendas superposés, participants et notifications. */
.app-shell .ag-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:14px;align-items:start}
.app-shell .ag-sidebar{position:sticky;top:12px;padding:14px;display:grid;gap:14px}
.app-shell .ag-filter-form{display:grid;gap:10px}.app-shell .ag-filter-form fieldset{margin:0;padding:8px;border:1px solid #dfe5ef;border-radius:10px}.app-shell .ag-filter-form legend{font-weight:800;font-size:12px}
.app-shell .ag-sidebar label{font-size:12px}.app-shell .ag-sidebar input,.app-shell .ag-sidebar select{min-height:38px}
.app-shell .ag-sidebar .pl-chk{display:flex;align-items:center;gap:7px;margin:6px 0}.app-shell .ag-sidebar .pl-chk input{min-height:0}
.app-shell .ag-new-calendar summary{cursor:pointer;font-size:12px;font-weight:800}.app-shell .ag-new-calendar form{display:grid;grid-template-columns:1fr 42px;gap:6px;margin-top:8px}.app-shell .ag-new-calendar .pl-btn{grid-column:1/-1}
.app-shell .ag-content{min-width:0;overflow-x:auto}.app-shell .ag-content .ag-grid{min-width:720px}
.app-shell .ag-period-grid{display:grid;grid-template-columns:repeat(var(--ag-days),minmax(170px,1fr));min-width:max-content;border:1px solid #dfe5ef;border-radius:14px;overflow:hidden;background:#fff}
.app-shell .ag-period-day{width:min(240px,24vw);min-height:540px;padding:10px;border-left:1px solid #e7ebf2}.app-shell .ag-period-day:first-child{border-left:0}.app-shell .ag-period-day.is-today{background:#f5f3ff}.app-shell .ag-period-day>header{display:flex;align-items:center;gap:7px;padding:4px 2px 12px}.app-shell .ag-period-day>header a{margin-left:auto}
.app-shell .ag-period-event{display:flex;width:100%;flex-direction:column;align-items:flex-start;gap:3px;margin-bottom:7px;padding:9px;border:1px solid #dfe5ef;border-left-width:4px;border-radius:10px;background:#fff;text-align:left;cursor:pointer}.app-shell .ag-period-event time,.app-shell .ag-period-event small{font-size:11px;color:#667085}
.app-shell .ag-year-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.app-shell .ag-year-month{display:flex;min-height:150px;flex-direction:column;gap:7px;text-decoration:none}.app-shell .ag-year-month>strong{font-size:18px}.app-shell .ag-year-month>span{font-size:12px;color:#667085}.app-shell .ag-year-month small{display:flex;align-items:center;gap:6px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.app-shell .ag-year-month i{width:8px;height:8px;border-radius:50%;flex:0 0 auto}
.app-shell .ag-planning-list{display:grid;gap:7px}.app-shell .ag-planning-row{display:grid;grid-template-columns:210px 10px 1fr 150px;align-items:center;gap:10px;width:100%;padding:12px;border:1px solid #dfe5ef;border-radius:11px;background:#fff;text-align:left;cursor:pointer}.app-shell .ag-planning-row i{width:10px;height:34px;border-radius:5px}.app-shell .ag-planning-row span,.app-shell .ag-planning-row time{color:#667085;font-size:12px}
.app-shell .ag-notification-badge{display:inline-grid;min-width:19px;height:19px;place-items:center;padding:0 5px;border-radius:999px;background:#dc2626;color:#fff;font-size:10px}.app-shell .ag-notification-panel{position:fixed;z-index:990;top:82px;right:18px;width:min(390px,calc(100vw - 28px));max-height:calc(100vh - 100px);overflow:auto;padding:14px;border:1px solid #dfe5ef;border-radius:15px;background:#fff;box-shadow:0 20px 60px rgba(16,24,40,.2)}.app-shell .ag-notification-panel>header{display:flex;align-items:center;justify-content:space-between}.app-shell .ag-notification-panel h2{margin:0}.app-shell .ag-notification-close{border:0;background:transparent;font-size:26px;cursor:pointer}.app-shell .ag-notification-list{display:grid;gap:6px;margin:10px 0}.app-shell .ag-notification-item{display:flex;flex-direction:column;gap:3px;padding:10px;border-radius:10px;color:#16243e;text-decoration:none;background:#f7f8fb}.app-shell .ag-notification-item.is-unread{background:#eef2ff;border-left:4px solid #5548ee}.app-shell .ag-notification-item span,.app-shell .ag-notification-item small{font-size:11px;color:#667085}
.app-shell .ag-participant-row{display:grid;grid-template-columns:minmax(180px,1fr) 130px 85px;align-items:center;gap:7px;margin-bottom:5px}.app-shell .ag-participant-row select{min-height:34px}.app-shell .ag-response{padding:4px 7px;border-radius:999px;background:#f2f4f7;color:#475467;font-size:10px;font-weight:800;text-align:center}.app-shell .ag-response.is-oui{background:#e7f7ee;color:#147a47}.app-shell .ag-response.is-non{background:#fdecec;color:#b42318}.app-shell .ag-response.is-peut_etre{background:#fff4df;color:#8a5100}
.app-shell .ag-recurrence-custom{display:flex;flex-wrap:wrap;align-items:end;gap:9px}.app-shell .ag-recurrence-days{display:flex;gap:4px}.app-shell .ag-recurrence-days label{position:relative}.app-shell .ag-recurrence-days input{position:absolute;opacity:0}.app-shell .ag-recurrence-days span{display:grid;width:32px;height:32px;place-items:center;border:1px solid #cfd7e4;border-radius:50%;cursor:pointer}.app-shell .ag-recurrence-days input:checked+span{background:#5548ee;color:#fff;border-color:#5548ee}
.app-shell .ag-attachment-existing{display:flex;align-items:center;gap:7px;margin:6px 0}.app-shell .ag-event-actions{display:flex;gap:8px;margin:10px 0}.app-shell .ag-event-actions form{margin:0}.app-shell .ag-rsvp form,.app-shell .ag-rsvp-buttons{display:flex;flex-wrap:wrap;gap:8px}.app-shell .ag-tier-row{grid-template-columns:1fr 1fr 1.5fr 1fr 130px auto}.app-shell .ag-tier-row .ag-response{align-self:end;margin-bottom:8px}
.app-shell .ag-workspace[data-ag-theme="sombre"] .ag-sidebar,.app-shell .ag-workspace[data-ag-theme="sombre"] .ag-period-grid,.app-shell .ag-workspace[data-ag-theme="sombre"] .ag-period-event,.app-shell .ag-workspace[data-ag-theme="sombre"] .ag-planning-row,.app-shell .ag-workspace[data-ag-theme="sombre"] .ag-year-month{background:#172033;color:#f5f7fb;border-color:#344054}.app-shell .ag-workspace[data-ag-theme="sombre"] .ag-period-day{border-color:#344054}.app-shell .ag-workspace[data-ag-theme="sombre"] .ag-period-day.is-today{background:#292554}.app-shell .ag-workspace[data-ag-theme="sombre"] .ag-period-event small,.app-shell .ag-workspace[data-ag-theme="sombre"] .ag-period-event time,.app-shell .ag-workspace[data-ag-theme="sombre"] .ag-planning-row span,.app-shell .ag-workspace[data-ag-theme="sombre"] .ag-planning-row time{color:#cbd5e1}
@media(prefers-color-scheme:dark){.app-shell .ag-workspace[data-ag-theme="systeme"] .ag-sidebar,.app-shell .ag-workspace[data-ag-theme="systeme"] .ag-period-grid,.app-shell .ag-workspace[data-ag-theme="systeme"] .ag-period-event,.app-shell .ag-workspace[data-ag-theme="systeme"] .ag-planning-row,.app-shell .ag-workspace[data-ag-theme="systeme"] .ag-year-month{background:#172033;color:#f5f7fb;border-color:#344054}}
@media(max-width:900px){.app-shell .ag-layout{grid-template-columns:1fr}.app-shell .ag-sidebar{position:static}.app-shell .ag-filter-form{grid-template-columns:repeat(2,minmax(0,1fr))}.app-shell .ag-filter-form fieldset{grid-column:1/-1}.app-shell .ag-year-grid{grid-template-columns:repeat(2,1fr)}.app-shell .ag-tier-row{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.app-shell .ag-filter-form,.app-shell .ag-year-grid{grid-template-columns:1fr}.app-shell .ag-planning-row{grid-template-columns:1fr 10px 1fr}.app-shell .ag-planning-row span{grid-column:3}.app-shell .ag-participant-row{grid-template-columns:1fr}.app-shell .ag-period-day{width:78vw}}

/* Agenda 2026-09-29 : commandes compactes et fiche inspirée des agendas modernes. */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.app-shell .ag-view-switch{display:flex;align-items:center;gap:3px;width:max-content;max-width:100%;margin:0 0 10px;padding:4px;border:1px solid #dfe4ec;border-radius:12px;background:#fff;overflow-x:auto}
.app-shell .ag-view-switch a{padding:8px 13px;border-radius:9px;color:#526078;font-size:12px;font-weight:750;text-decoration:none;white-space:nowrap}
.app-shell .ag-view-switch a:hover{background:#f4f6fa;color:#202b3c}.app-shell .ag-view-switch a.is-active{background:#5548ee;color:#fff;box-shadow:0 2px 7px rgba(85,72,238,.25)}
.app-shell .ag-filter-bar{display:flex;align-items:end;gap:8px;margin-bottom:10px;padding:10px;border:1px solid #e2e7ef;border-radius:13px;background:#fff}
.app-shell .ag-filter-bar label{display:grid;gap:4px;color:#667085;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.app-shell .ag-filter-bar input{min-height:38px}
.app-shell .ag-filter-date{flex:0 0 160px}.app-shell .ag-filter-days{flex:0 0 82px}.app-shell .ag-filter-search{flex:1 1 300px}.app-shell .ag-filter-search input{padding-left:38px;background-image:linear-gradient(transparent,transparent);border-radius:10px}
.app-shell .ag-filter-menu{position:relative}.app-shell .ag-filter-menu>summary{display:flex;align-items:center;min-height:38px;padding:0 13px;border:1px solid #d8dee8;border-radius:10px;background:#fff;color:#344054;font-size:12px;font-weight:800;cursor:pointer;list-style:none}.app-shell .ag-filter-menu>summary::-webkit-details-marker{display:none}
.app-shell .ag-filter-menu[open]>summary{border-color:#5548ee;box-shadow:0 0 0 3px rgba(85,72,238,.12)}.app-shell .ag-filter-menu fieldset{position:absolute;z-index:20;right:0;top:46px;width:260px;margin:0;padding:12px;border:1px solid #dfe4ec;border-radius:13px;background:#fff;box-shadow:0 18px 45px rgba(15,23,42,.16)}.app-shell .ag-filter-menu legend{font-size:12px;font-weight:850}.app-shell .ag-filter-menu .pl-chk{display:flex;align-items:center;gap:8px;padding:7px 4px;font-size:12px}
.app-shell .ag-new-calendar-inline{width:max-content;margin:0 0 12px}.app-shell .ag-new-calendar-inline>summary{color:#5548ee;font-size:12px;font-weight:800;cursor:pointer}.app-shell .ag-new-calendar-inline form{display:flex;gap:7px;margin-top:8px}.app-shell .ag-new-calendar-inline input:not([type=color]){min-width:230px}
.app-shell .ag-content{width:100%;overflow:auto;border-radius:14px}.app-shell .ag-content .ag-grid{border:1px solid #e0e5ed;border-radius:14px;overflow:hidden;background:#fff;box-shadow:0 2px 10px rgba(15,23,42,.04)}
.app-shell .ag-period-grid{width:100%;min-width:760px;grid-template-columns:repeat(var(--ag-days),minmax(150px,1fr));box-shadow:0 2px 10px rgba(15,23,42,.04)}.app-shell .ag-period-day{width:auto;min-height:500px}.app-shell .ag-period-day>header{border-bottom:1px solid #edf0f5;margin-bottom:8px}.app-shell .ag-period-day>header strong{font-size:12px;text-transform:capitalize}.app-shell .ag-period-day>header span{color:#667085;font-size:12px}
.app-shell .ag-year-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.app-shell .ag-year-month{border-color:#e2e7ef!important;box-shadow:none!important}.app-shell .ag-year-month:hover{border-color:#a9a1ff!important;box-shadow:0 7px 20px rgba(85,72,238,.1)!important;transform:translateY(-1px)}

.app-shell .planning.agenda>.carte:first-of-type{width:min(1120px,100%);margin-inline:auto;padding:24px 28px;border:1px solid #e0e5ed;border-radius:16px;background:#fff;box-shadow:0 5px 24px rgba(15,23,42,.06)}
.app-shell .ag-event-form{gap:14px 16px!important;margin-top:0!important;padding-top:0!important;border-top:0!important}.app-shell .ag-event-form label,.app-shell .ag-event-form legend{color:#596579;font-size:12px;font-weight:750}
.app-shell .ag-event-form input,.app-shell .ag-event-form select,.app-shell .ag-event-form textarea{border-color:#dce2eb;background:#fff;box-shadow:none}
.app-shell .ag-event-form input:focus,.app-shell .ag-event-form select:focus,.app-shell .ag-event-form textarea:focus{border-color:#7167ee;box-shadow:0 0 0 3px rgba(85,72,238,.1);outline:0}
.app-shell .ag-event-form .ag-title{display:block!important;min-height:0!important;margin:0 0 4px!important}.app-shell .ag-event-form .ag-title input{display:block;width:100%;height:58px!important;min-height:58px!important;padding:6px 2px!important;border:0!important;border-bottom:2px solid #dce2eb!important;border-radius:0!important;background:transparent!important;color:#182230!important;font-size:26px!important;font-weight:650;line-height:1.2}.app-shell .ag-event-form .ag-title input::placeholder{color:#8b95a7;opacity:1}.app-shell .ag-event-form .ag-title input:focus{border-color:#5548ee!important;box-shadow:none!important}
.app-shell .ag-event-form .ag-meta-category{grid-column:span 3}.app-shell .ag-event-form .ag-meta-calendar{grid-column:span 2}.app-shell .ag-event-form .ag-meta-color{grid-column:span 3}.app-shell .ag-event-form .ag-meta-establishment{grid-column:span 4}
.app-shell .ag-event-form .ag-time-start,.app-shell .ag-event-form .ag-time-end{grid-column:span 5}.app-shell .ag-event-form .ag-meta-all-day{grid-column:span 2;align-self:end;display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important;padding-bottom:13px}.app-shell .ag-event-form .ag-meta-all-day input{width:auto!important;min-height:0}
.app-shell .ag-event-form .ag-location,.app-shell .ag-event-form .ag-link{grid-column:span 6}.app-shell .ag-event-form .ag-description{margin-bottom:2px}
.app-shell .ag-event-form .ag-fieldset{padding:14px 16px;border:1px solid #e4e8ef;border-radius:13px;background:#fafbfc}.app-shell .ag-event-form .ag-fieldset>legend{padding:0 7px;color:#344054;font-size:12px;font-weight:850}
.app-shell .ag-event-form .ag-recurrence{gap:10px;background:#f8f9fc}.app-shell .ag-event-form .ag-team-list{max-height:280px;overflow:auto;background:#fff;border-radius:9px;padding:2px 10px}.app-shell .ag-event-form .ag-participant-row{border-bottom:1px solid #eef1f5;margin:0}.app-shell .ag-event-form .ag-team-list .pl-chk{border:0}
.app-shell .ag-recurrence-custom[hidden],.app-shell #ag-recurrence-fin[hidden]{display:none!important}
.app-shell .ag-event-form>.pl-btn.is-primary{grid-column:1/-1;justify-self:end;min-width:150px;min-height:42px}
.app-shell .ag-category-manager{width:min(1120px,100%);margin:16px auto 0}.app-shell .ag-category-manager>summary{padding:4px 0;color:#596579;font-size:13px;font-weight:800;cursor:pointer}.app-shell .ag-category-manager[open]>summary{margin-bottom:16px}.app-shell .ag-category-manager>summary::marker{color:#5548ee}

.app-theme-toggle{display:grid;width:40px;height:40px;place-items:center;flex:0 0 auto;border:1px solid #dfe4ec;border-radius:50%;background:#fff;color:#475467;cursor:pointer;transition:.15s ease}.app-theme-toggle:hover{background:#f3f4f8;color:#312e81}.app-theme-toggle .theme-icon{display:grid;place-items:center}.app-theme-toggle .theme-icon-sun{display:none}
html[data-theme="dark"]{color-scheme:dark;--paper:#0f172a;--panel:#172033;--panel-soft:#111827;--ink:#f8fafc;--muted:#cbd5e1;--faint:#94a3b8;--line:#334155;--line-dark:#475569}
html[data-theme="dark"] .app-theme-toggle{background:#1f2937;border-color:#475569;color:#fbbf24}html[data-theme="dark"] .app-theme-toggle .theme-icon-moon{display:none}html[data-theme="dark"] .app-theme-toggle .theme-icon-sun{display:grid}
html[data-theme="dark"] .planning{--pl-bg:#0f172a;--pl-surface:#172033;--pl-surface-2:#273449;--pl-border:#334155;--pl-border-2:#475569;--pl-text:#f8fafc;--pl-muted:#cbd5e1;--pl-soft:#94a3b8;--pl-accent:#6d5dfc;--pl-accent-soft:#24204d}
html[data-theme="dark"] body.app-shell,html[data-theme="dark"] .stage{background:#0f172a;color:#f8fafc}html[data-theme="dark"] .topbar,html[data-theme="dark"] .pied,html[data-theme="dark"] .carte,html[data-theme="dark"] .ag-view-switch,html[data-theme="dark"] .ag-filter-bar,html[data-theme="dark"] .ag-content .ag-grid,html[data-theme="dark"] .ag-period-grid,html[data-theme="dark"] .ag-period-event,html[data-theme="dark"] .ag-planning-row,html[data-theme="dark"] .ag-year-month,html[data-theme="dark"] .ag-notification-panel,html[data-theme="dark"] .ag-filter-menu>summary,html[data-theme="dark"] .ag-filter-menu fieldset,html[data-theme="dark"] .planning.agenda>.carte:first-of-type{background:#172033!important;color:#f8fafc!important;border-color:#334155!important}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#111827!important;color:#f8fafc!important;border-color:#475569!important}html[data-theme="dark"] .nav2-pill{color:#cbd5e1}html[data-theme="dark"] .nav2-pill:hover{background:#273449;color:#fff}html[data-theme="dark"] .pl-btn{background:#1f2937;border-color:#475569;color:#f8fafc}html[data-theme="dark"] .pl-btn:hover{background:#273449}html[data-theme="dark"] .pl-btn.is-primary{background:#6d5dfc;border-color:#6d5dfc;color:#fff}html[data-theme="dark"] .ag-event-form .ag-fieldset{background:#111827!important;border-color:#334155!important}html[data-theme="dark"] .ag-event-form .ag-team-list{background:#172033!important}html[data-theme="dark"] .ag-view-switch a{color:#cbd5e1}html[data-theme="dark"] .ag-view-switch a:hover{background:#273449;color:#fff}html[data-theme="dark"] .ag-view-switch a.is-active{background:#6d5dfc;color:#fff}html[data-theme="dark"] .ag-period-day{border-color:#334155}html[data-theme="dark"] .ag-period-day.is-today{background:#24204d}html[data-theme="dark"] .ag-period-event small,html[data-theme="dark"] .ag-period-event time,html[data-theme="dark"] .ag-planning-row span,html[data-theme="dark"] .ag-planning-row time{color:#cbd5e1}
@media(max-width:900px){.app-shell .ag-filter-bar{flex-wrap:wrap}.app-shell .ag-filter-date{flex:1 1 150px}.app-shell .ag-filter-search{order:3;flex-basis:100%}.app-shell .ag-year-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.app-shell .ag-event-form .ag-meta-category,.app-shell .ag-event-form .ag-meta-calendar,.app-shell .ag-event-form .ag-meta-color,.app-shell .ag-event-form .ag-meta-establishment{grid-column:span 6}.app-shell .ag-event-form .ag-time-start,.app-shell .ag-event-form .ag-time-end{grid-column:span 6}.app-shell .ag-event-form .ag-meta-all-day{grid-column:1/-1}}
@media(max-width:620px){.app-shell .ag-view-switch{width:100%}.app-shell .ag-filter-bar>*{flex:1 1 100%}.app-shell .ag-filter-bar .pl-btn{width:100%}.app-shell .ag-filter-menu fieldset{left:0;right:auto;width:min(280px,calc(100vw - 48px))}.app-shell .ag-year-grid{grid-template-columns:1fr}.app-shell .planning.agenda>.carte:first-of-type{padding:16px}.app-shell .ag-event-form .ag-meta-category,.app-shell .ag-event-form .ag-meta-calendar,.app-shell .ag-event-form .ag-meta-color,.app-shell .ag-event-form .ag-meta-establishment,.app-shell .ag-event-form .ag-time-start,.app-shell .ag-event-form .ag-time-end,.app-shell .ag-event-form .ag-location,.app-shell .ag-event-form .ag-link{grid-column:1/-1}.app-theme-toggle{width:38px;height:38px}}

/* Fiche événement : reproduction de l’ébauche validée. */
.app-shell .planning.agenda>.carte.ag-event-window{width:min(780px,100%);margin:18px auto;padding:0;overflow:hidden;border:1px solid #dce2eb;border-radius:18px;background:#fff;box-shadow:0 20px 55px rgba(23,32,51,.18)}
.app-shell .ag-event-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 20px;border-bottom:1px solid #dce2eb}.app-shell .ag-event-head h1{margin:0;font-size:20px;font-weight:500}.app-shell .ag-event-close{display:grid;width:38px;height:38px;place-items:center;border-radius:50%;color:#687386;font-size:26px;line-height:1;text-decoration:none}.app-shell .ag-event-close:hover{background:#f7f9fc;color:#172033}
.app-shell .ag-event-form{grid-template-columns:repeat(12,minmax(0,1fr));gap:14px!important;margin:0!important;padding:18px 20px 4px!important;border:0!important}
.app-shell .ag-event-form label,.app-shell .ag-event-form legend{color:#172033;font-size:14px;font-weight:500}.app-shell .ag-event-form label{gap:7px}.app-shell .ag-event-form input,.app-shell .ag-event-form select,.app-shell .ag-event-form textarea{min-height:44px;border:1px solid #dce2eb;border-radius:10px;padding:9px 11px;background:#fff;color:#172033;font-size:14px;font-weight:400}
.app-shell .ag-event-form .ag-title{grid-column:1/-1;margin:0!important}.app-shell .ag-event-form .ag-title input{height:auto!important;min-height:0!important;padding:8px 2px 12px!important;border:0!important;border-bottom:2px solid #dce2eb!important;border-radius:0!important;font-size:23px!important;font-weight:500!important}
.app-shell .ag-event-form .ag-meta-establishment{grid-column:1/-1}.app-shell .ag-event-form .ag-meta-all-day{grid-column:1/-1;display:flex!important;align-items:center!important;justify-self:start;gap:10px!important;width:fit-content;min-height:0;padding:9px 12px!important;border-radius:10px;background:#eeecff;color:#172033!important}.app-shell .ag-event-form .ag-meta-all-day input,.app-shell .ag-event-form .ag-participant-row>input[type=checkbox],.app-shell .ag-contact-row>input{width:18px;height:18px;min-height:0;padding:0;accent-color:#584be8}
.app-shell .ag-event-form .ag-date-start,.app-shell .ag-event-form .ag-time-start,.app-shell .ag-event-form .ag-date-end,.app-shell .ag-event-form .ag-time-end{grid-column:span 3}.app-shell .ag-event-form .ag-location{grid-column:span 5}.app-shell .ag-event-form .ag-description{grid-column:span 7}.app-shell .ag-event-form .ag-description textarea{min-height:82px}
.app-shell .ag-event-form .ag-fieldset{padding:14px;border:1px solid #dce2eb;border-radius:12px;background:#f7f9fc}.app-shell .ag-event-form .ag-team>legend{display:flex;width:100%;align-items:baseline;justify-content:space-between;padding:0 4px}.app-shell .ag-event-form .ag-team>legend small{color:#687386;font-size:12px;font-weight:400}.app-shell .ag-event-form .ag-team-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 14px;max-height:none;overflow:visible;padding:0;background:transparent}.app-shell .ag-event-form .ag-participant-row{display:flex!important;align-items:center;gap:9px;min-height:38px;margin:0;padding:5px 6px;border-bottom:1px solid #dce2eb;cursor:pointer}.app-shell .ag-event-form .ag-participant-row>span{font-weight:400}.app-shell .ag-event-form .ag-participant-row>small{margin-left:auto;color:#687386;font-size:12px;font-weight:400}
.app-shell .ag-directory-panel{overflow:hidden;padding:0!important;border:1px solid #dce2eb!important;border-radius:12px!important;background:#f7f9fc!important}.app-shell .ag-directory-panel>summary{display:flex;align-items:center;gap:9px;min-height:48px;padding:10px 14px;color:#172033;font-size:14px;font-weight:500;cursor:pointer;list-style:none}.app-shell .ag-directory-panel>summary::-webkit-details-marker{display:none}.app-shell .ag-directory-panel>summary small{margin-left:auto;color:#687386;font-size:12px;font-weight:400}.app-shell .ag-directory-panel>*:not(summary){margin-left:14px;margin-right:14px}.app-shell .ag-directory-panel>:last-child{margin-bottom:14px}
.app-shell .ag-directory-filters{display:flex;gap:8px;margin-bottom:9px}.app-shell .ag-directory-filters input{flex:1}.app-shell .ag-directory-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 14px;margin:0 14px!important;overflow:visible;border:0;background:transparent}.app-shell .ag-contact-row{display:flex!important;align-items:center;gap:9px!important;min-height:38px;padding:5px 6px;border-bottom:1px solid #dce2eb;cursor:pointer}.app-shell .ag-contact-row span{display:flex;min-width:0;flex:1;align-items:center;gap:8px}.app-shell .ag-contact-row strong{font-size:14px;font-weight:400}.app-shell .ag-contact-row small{margin-left:auto;color:#687386;font-size:12px;font-weight:400}.app-shell .ag-contact-form{display:grid;grid-template-columns:1fr 1fr 1.4fr auto;gap:8px;align-items:end;margin-top:12px;padding-top:12px;border-top:1px solid #dce2eb}.app-shell .ag-contact-form .ag-contact-message{grid-column:1/-1;margin:0;color:#147a47;font-size:12px}
.app-shell .ag-more-options{padding-top:5px;border:0;border-top:1px solid #dce2eb;border-radius:0;background:transparent}.app-shell .ag-more-options>summary{display:flex;align-items:center;gap:8px;min-height:42px;padding:0;color:#584be8;font-size:14px;font-weight:500;cursor:pointer;list-style:none}.app-shell .ag-more-options>summary::-webkit-details-marker{display:none}.app-shell .ag-options-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:9px 0 12px}
.app-shell .ag-option-card,.app-shell .ag-options-grid .ag-fieldset{display:grid;min-width:0;align-content:start;gap:8px;margin:0;padding:11px;border:1px solid #dce2eb;border-radius:10px;background:#fff}.app-shell .ag-group-color{grid-column:1/-1}.app-shell .ag-group-color h2{margin:0;color:#172033;font-size:14px;font-weight:500}.app-shell .ag-group-row,.app-shell .ag-color-line{display:grid;grid-template-columns:118px 1fr auto;gap:9px;align-items:center}.app-shell .ag-group-row>span,.app-shell .ag-color-line>span{color:#172033;font-size:14px;font-weight:500}.app-shell .ag-color-line{padding-top:9px;border-top:1px solid #dce2eb}.app-shell .ag-color-line small{color:#687386;font-size:12px;font-weight:400}.app-shell .ag-inline-action{border:0;background:transparent;color:#584be8;font:inherit;font-size:14px;font-weight:500;white-space:nowrap;cursor:pointer}.app-shell .ag-color-line .ag-palette{display:flex;align-items:center;gap:8px;min-height:44px}.app-shell .ag-color-choice span{width:25px;height:25px;border:3px solid #fff}.app-shell .ag-color-choice input:checked+span{box-shadow:0 0 0 3px #172033}
.app-shell .ag-recurrence-custom{display:grid;grid-template-columns:110px minmax(0,1fr);gap:8px}.app-shell .ag-event-form .ag-recurrence label{min-width:0}.app-shell .ag-recurrence-days{grid-column:1/-1;display:flex!important;flex-wrap:wrap;justify-content:flex-start;gap:6px}.app-shell .ag-event-form .ag-recurrence-days label{flex:0 0 32px;width:32px;min-width:0!important;gap:0}.app-shell #ag-recurrence-fin{grid-column:1/-1}.app-shell .ag-reminder-row{display:grid;grid-template-columns:1fr auto;gap:7px;align-items:center;margin-bottom:7px}.app-shell .ag-reminder-remove{width:38px;height:38px;min-width:38px;min-height:38px;padding:0;border-radius:9px;color:#b42318;font-size:20px}.app-shell .ag-reminders>#ag-reminder-add{justify-self:start;padding:5px 0;border:0;background:transparent;color:#584be8;font-weight:500}.app-shell .ag-options-grid .ag-attachments{grid-column:1/-1}
.app-shell .ag-form-footer{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 -20px -4px;padding:16px 20px;border-top:1px solid #dce2eb;background:#f7f9fc}.app-shell .ag-form-footer>span{color:#687386;font-size:12px}.app-shell .ag-form-actions{display:flex;gap:9px}.app-shell .ag-form-actions .pl-btn{min-height:40px;padding:8px 15px;font-weight:500}.app-shell .ag-form-actions .is-primary{min-width:0}
.app-shell .ag-category-manager{width:min(780px,100%)}
html[data-theme="dark"] .app-shell .planning.agenda>.carte.ag-event-window,html[data-theme="dark"] .app-shell .ag-option-card,html[data-theme="dark"] .app-shell .ag-options-grid .ag-fieldset{background:#182235!important;border-color:#3a465b!important}html[data-theme="dark"] .app-shell .ag-event-head,html[data-theme="dark"] .app-shell .ag-color-line,html[data-theme="dark"] .app-shell .ag-form-footer{border-color:#3a465b}html[data-theme="dark"] .app-shell .ag-form-footer,html[data-theme="dark"] .app-shell .ag-directory-panel,html[data-theme="dark"] .app-shell .ag-team{background:#111a2b!important}html[data-theme="dark"] .app-shell .ag-event-form label,html[data-theme="dark"] .app-shell .ag-event-form legend,html[data-theme="dark"] .app-shell .ag-group-color h2,html[data-theme="dark"] .app-shell .ag-group-row>span,html[data-theme="dark"] .app-shell .ag-color-line>span{color:#f8fafc}
@media(max-width:640px){.app-shell .ag-event-form .ag-date-start,.app-shell .ag-event-form .ag-time-start,.app-shell .ag-event-form .ag-date-end,.app-shell .ag-event-form .ag-time-end,.app-shell .ag-event-form .ag-location,.app-shell .ag-event-form .ag-description{grid-column:span 6}.app-shell .ag-event-form .ag-team-list,.app-shell .ag-directory-list,.app-shell .ag-options-grid,.app-shell .ag-contact-form{grid-template-columns:1fr}.app-shell .ag-group-row,.app-shell .ag-color-line{grid-template-columns:1fr}.app-shell .ag-form-footer{align-items:flex-end}}
@media(max-width:430px){.app-shell .ag-event-form .ag-date-start,.app-shell .ag-event-form .ag-time-start,.app-shell .ag-event-form .ag-date-end,.app-shell .ag-event-form .ag-time-end,.app-shell .ag-event-form .ag-location,.app-shell .ag-event-form .ag-description{grid-column:1/-1}.app-shell .ag-form-footer>span{display:none}}
/* PWA : installation, état réseau et synchronisation des débriefings. */
.pwa-install-button{appearance:none;border:1px solid #5548ee;background:#fff;color:#4338ca;border-radius:12px;padding:9px 13px;font:inherit;font-size:12px;font-weight:800;cursor:pointer;white-space:nowrap}
.pwa-install-button:hover{background:#f1f0ff}
.pwa-status{position:fixed;right:18px;bottom:18px;z-index:1000;max-width:min(420px,calc(100vw - 36px));padding:12px 16px;border-radius:14px;background:#16243e;color:#fff;font-size:13px;font-weight:700;box-shadow:0 16px 40px rgba(22,36,62,.25)}
.pwa-status.is-success{background:#147a47}.pwa-status.is-offline{background:#8a4b08}.pwa-status.is-warning{background:#9a6700}.pwa-status.is-info{background:#24477f}
@media(max-width:700px){.pwa-install-button{width:100%;margin-top:8px}.pwa-status{right:12px;bottom:12px;max-width:calc(100vw - 24px)}}

/* ══════════════════════════════════════════════════════════════════════════
   Planning — cartes de séance PLEINES (couleur = type de séance, palette à forts écarts perceptuels)
   et vue SEMAINE : jours en en-tête, puis une sous-colonne par moniteur sous chaque jour.
   ══════════════════════════════════════════════════════════════════════════ */
.app-shell .pl-lesson-slot{background:var(--seance-couleur);color:var(--seance-texte,#fff);border-left:0;box-shadow:0 1px 2px rgba(15,23,42,.2)}
.app-shell .pl-lesson-slot .pl-lesson,.app-shell .pl-lesson-slot .pl-lesson b,.app-shell .pl-lesson-slot .pl-lesson span,.app-shell .pl-lesson-slot .pl-lesson small,.app-shell .pl-lesson-slot .pl-lesson em{color:inherit}
.app-shell .pl-lesson-slot[data-type="indisponibilite"]{background-image:repeating-linear-gradient(45deg,rgba(255,255,255,.17) 0 6px,transparent 6px 12px)}
.app-shell .pl-type-legend i{border-radius:4px;width:14px;height:14px}

.app-shell .pl-wm-vide{margin:0 0 8px}
.app-shell .pl-wm{overflow-x:auto;border:1px solid var(--pl-border,#e6e9f2);border-radius:14px;background:var(--pl-surface,#fff)}
.app-shell .pl-wm-grid{display:grid;grid-template-columns:54px repeat(var(--wm-cols),minmax(96px,1fr));min-width:calc(54px + var(--wm-cols) * 96px)}
.app-shell .pl-wm-corner{position:sticky;left:0;z-index:4;display:flex;align-items:center;justify-content:center;background:var(--pl-surface-2,#f3f5fa);border-right:1px solid var(--pl-border,#e6e9f2);border-bottom:2px solid var(--pl-border-2,#d6dae6);font-size:11px;font-weight:700;color:var(--pl-muted,#626b7d)}
.app-shell .pl-wm-day{display:flex;align-items:baseline;justify-content:center;gap:7px;padding:9px 6px;background:var(--pl-surface-2,#f3f5fa);border-left:2px solid var(--pl-border-2,#d6dae6);border-bottom:1px solid var(--pl-border,#e6e9f2);color:var(--pl-text,#161a26)}
.app-shell .pl-wm-day .pl-dow{font-size:14px;font-weight:700}
.app-shell .pl-wm-day .pl-dom{font-size:13px;font-weight:600;color:var(--pl-muted,#626b7d)}
.app-shell .pl-wm-day.is-today{background:var(--pl-accent-soft,#eef0ff)}
.app-shell .pl-wm-day.is-today .pl-dom{color:var(--pl-accent,#5b5bf0);font-weight:800}
.app-shell .pl-wm-mon{display:flex;align-items:center;justify-content:space-between;gap:4px;min-width:0;padding:6px;background:var(--pl-surface,#fff);border-left:1px solid var(--pl-border,#e6e9f2);border-bottom:2px solid var(--pl-border-2,#d6dae6)}
.app-shell .pl-wm-mon.is-day-start{border-left:2px solid var(--pl-border-2,#d6dae6)}
.app-shell .pl-wm-mon-nom{display:flex;flex-direction:column;min-width:0;line-height:1.15}
.app-shell .pl-wm-mon-nom b{font-size:12px;color:var(--pl-text,#161a26);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app-shell .pl-wm-mon-nom i{font-style:normal;font-size:10.5px;letter-spacing:.02em;text-transform:uppercase;color:var(--pl-muted,#626b7d);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app-shell .pl-wm-add{flex:0 0 auto;width:20px;height:20px;display:grid;place-items:center;border:1px solid var(--pl-border-2,#d6dae6);border-radius:6px;background:var(--pl-surface,#fff);color:var(--pl-accent,#5b5bf0);font-weight:800;line-height:1;text-decoration:none}
.app-shell .pl-wm-add:hover{background:var(--pl-accent-soft,#eef0ff)}
.app-shell .pl-wm-gutter{position:sticky;left:0;z-index:3;background:var(--pl-surface-2,#f3f5fa);border-right:1px solid var(--pl-border,#e6e9f2)}
.app-shell .pl-wm-gutter span{position:absolute;right:6px;margin-top:2px;font-size:11px;font-variant-numeric:tabular-nums;color:var(--pl-muted,#626b7d)}
.app-shell .pl-wm-col{position:relative;border-left:1px solid var(--pl-grid-line,#e7ebf2);background-image:repeating-linear-gradient(to bottom,transparent 0,transparent calc(var(--pl-hour-height) - 1px),var(--pl-grid-line,#e7ebf2) calc(var(--pl-hour-height) - 1px),var(--pl-grid-line,#e7ebf2) var(--pl-hour-height))}
.app-shell .pl-wm-col.is-day-start{border-left:2px solid var(--pl-border-2,#d6dae6)}
.app-shell .pl-wm-col.is-today{background-color:color-mix(in srgb,var(--pl-accent,#5b5bf0) 6%,transparent)}
/* Cartes compactes dans les colonnes étroites : le moniteur est déjà nommé en tête de colonne. */
.app-shell .pl-wm .pl-lesson-slot{min-height:0;border-radius:7px}
.app-shell .pl-wm .pl-lesson-slot .pl-lesson{gap:0;padding:4px 5px 3px}
.app-shell .pl-wm .pl-lesson-slot .pl-lesson b{font-size:11.5px;line-height:1.2}
.app-shell .pl-wm .pl-lesson-slot .pl-lesson span,.app-shell .pl-wm .pl-lesson-slot .pl-lesson small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.2}
.app-shell .pl-wm .pl-lesson-slot .pl-lesson span{font-size:11px;font-weight:700}
.app-shell .pl-wm .pl-lesson-slot .pl-lesson small{font-size:10.5px}
.app-shell .pl-wm .pl-lesson-slot .pl-lesson small:nth-of-type(2){display:none}
.app-shell .pl-wm .pl-lesson-slot .pl-lesson-edit{right:3px;bottom:3px;padding:1px 5px;border-radius:5px;font-size:10px}
html[data-theme="dark"] .planning{--pl-grid-line:#2a3a52}
html[data-theme="dark"] .pl-type-legend{background:#172033;border-color:#334155;color:#e2e8f0}

/* Planning — type de BOÎTE (permis de l'élève : B manuelle, BA automatique, PASS passerelle).
   La couleur reste celle du type de séance ; la boîte se lit par le MOTIF de la carte et par une
   pastille M / A / P (lisible sans couleur) : manuelle = plein, automatique = hachures, passerelle = pointillés. */
.app-shell .pl-lesson-slot[data-boite="automatique"],.app-shell .pl-legend-boite[data-boite="automatique"]{background-image:repeating-linear-gradient(135deg,var(--seance-motif,rgba(255,255,255,.38)) 0 2px,transparent 2px 7px)}
.app-shell .pl-lesson-slot[data-boite="passerelle"],.app-shell .pl-legend-boite[data-boite="passerelle"]{background-image:radial-gradient(var(--seance-motif,rgba(255,255,255,.55)) 1.5px,transparent 1.7px);background-size:8px 8px}
.app-shell .pl-boite{position:absolute;bottom:3px;left:4px;z-index:2;min-width:15px;height:15px;padding:0 3px;display:grid;place-items:center;border:1px solid rgba(15,23,42,.38);border-radius:4px;background:#fff;color:#111827;font:800 9.5px/1 system-ui,sans-serif;font-style:normal;pointer-events:none}
.app-shell .pl-type-legend .pl-legend-boite{display:inline-grid;place-items:center;width:auto;min-width:18px;height:18px;padding:0 3px;box-sizing:border-box;border-radius:5px;background-color:#64748b;color:#fff;font:800 10px/1 system-ui,sans-serif;font-style:normal;--seance-motif:rgba(255,255,255,.5)}
.app-shell .pl-legend-sep{display:inline-block;width:1px;height:18px;margin:0 4px;background:var(--pl-border-2,#d6dae6)}

/* ── Masquage automatique de la barre du haut (icône dans la barre + poignée tactile) ───────────────────── */
.app-autohide-toggle{display:grid;width:40px;height:40px;place-items:center;flex:0 0 auto;border:1px solid #dfe4ec;border-radius:50%;background:#fff;color:#475467;cursor:pointer;transition:.15s ease}
.app-autohide-toggle:hover{background:#f1f0ff;border-color:#c9c6ff;color:#4a45e0}
.app-autohide-toggle[aria-pressed="true"]{background:#4a45e0;border-color:#4a45e0;color:#fff}
html[data-theme="dark"] .app-autohide-toggle{background:#1f2937;border-color:#475569;color:#cbd5e1}
html[data-theme="dark"] .app-autohide-toggle[aria-pressed="true"]{background:#6d5dfc;border-color:#6d5dfc;color:#fff}
.topbar-reveal{display:none}
html[data-topbar-auto="1"] .topbar{position:fixed;top:0;left:0;right:0;transform:translateY(-102%);transition:transform .22s ease,box-shadow .22s ease;box-shadow:none}
html[data-topbar-auto="1"].topbar-visible .topbar,html[data-topbar-auto="1"] .topbar:focus-within{transform:none;box-shadow:0 12px 32px rgba(15,23,42,.2)}
html[data-topbar-auto="1"]:not(.topbar-visible) .topbar-reveal{display:grid;place-items:center;position:fixed;top:0;left:50%;transform:translateX(-50%);z-index:29;width:60px;height:22px;padding:0;border:0;border-radius:0 0 12px 12px;background:#4a45e0;color:#fff;cursor:pointer;opacity:.78;box-shadow:0 2px 8px rgba(15,23,42,.25)}
html[data-topbar-auto="1"]:not(.topbar-visible) .topbar-reveal:hover,html[data-topbar-auto="1"]:not(.topbar-visible) .topbar-reveal:focus-visible{opacity:1}
@media (prefers-reduced-motion:reduce){html[data-topbar-auto="1"] .topbar{transition:none}}
@media print{.topbar-reveal{display:none!important}html[data-topbar-auto="1"] .topbar{display:none}}

/* Fiche élève : Informations, Séances et Livret REMC dans un même bloc, côte à côte quand la largeur le permet.
   Le livret, une fois déplié, passe sur toute la largeur pour garder ses jauges lisibles. */
.app-shell .fiche-blocs{display:flex;flex-wrap:wrap;gap:14px;align-items:flex-start}
.app-shell .fiche-blocs>.showcase-disclosure{flex:1 1 320px;min-width:0;margin:0}
.app-shell .fiche-blocs>.showcase-disclosure.fiche-bloc-large[open]{flex-basis:100%}

/* Dictée vocale (public/assets/js/dictee.js) : bouton micro sous les zones de texte libre. */
.app-shell .dictee-bar{display:flex;align-items:center;gap:10px;margin-top:6px;min-height:34px}
.app-shell .dictee-btn{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 12px;border:1px solid #dfe4ec;border-radius:999px;background:#fff;color:#475467;font:inherit;font-size:14px;font-weight:700;cursor:pointer}
.app-shell .dictee-btn:hover{background:#f1f0ff;border-color:#c9c6ff;color:#4a45e0}
.app-shell .dictee-btn.is-on{background:#dc2626;border-color:#dc2626;color:#fff;animation:dictee-pouls 1.4s ease-in-out infinite}
.app-shell .dictee-etat{font-size:13px;color:#6b7280}
html[data-theme="dark"] .app-shell .dictee-btn{background:#1f2937;border-color:#475569;color:#cbd5e1}
html[data-theme="dark"] .app-shell .dictee-btn.is-on{background:#dc2626;border-color:#dc2626;color:#fff}
html[data-theme="dark"] .app-shell .dictee-etat{color:#94a3b8}
@keyframes dictee-pouls{0%,100%{box-shadow:0 0 0 0 rgba(220,38,38,.45)}50%{box-shadow:0 0 0 7px rgba(220,38,38,0)}}
@media (prefers-reduced-motion:reduce){.app-shell .dictee-btn.is-on{animation:none}}

/* Fiche élève : heures de conduite effectuées, à côté du nombre de séances. */
.app-shell .showcase-disclosure>summary .fiche-heures{margin-left:10px;padding:2px 9px;border-radius:999px;background:#eef2ff;color:#4a45e0;font-size:13px;font-weight:700;white-space:nowrap}
html[data-theme="dark"] .app-shell .showcase-disclosure>summary .fiche-heures{background:#26305a;color:#c7d2fe}

/* Fiche élève : photos du résultat d'évaluation. */
.app-shell .eval-photos{list-style:none;margin:0 0 14px;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.app-shell .eval-photo{display:flex;flex-direction:column;gap:6px;padding:8px;border:1px solid #e4e8f0;border-radius:12px;background:#fff}
.app-shell .eval-photo img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:8px;background:#f1f5f9}
.app-shell .eval-photo-meta{display:flex;flex-direction:column;gap:2px;font-size:13px;line-height:1.3}
.app-shell .eval-photo-meta small{color:#6b7280}
.app-shell .eval-photo form{margin:0}
.app-shell .eval-upload{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;align-items:start;margin-top:6px}
.app-shell .eval-upload label{display:flex;flex-direction:column;gap:4px;font-size:14px;font-weight:600}
.app-shell .eval-upload .aide{grid-column:1/-1;margin:0}
html[data-theme="dark"] .app-shell .eval-photo{background:#172033;border-color:#334155}
html[data-theme="dark"] .app-shell .eval-photo img{background:#0f172a}
html[data-theme="dark"] .app-shell .eval-photo-meta small{color:#94a3b8}

.app-shell .showcase-disclosure>summary .fiche-heures.is-simulation{background:#ecfccb;color:#365314}
html[data-theme="dark"] .app-shell .showcase-disclosure>summary .fiche-heures.is-simulation{background:#3a4a1c;color:#d9f99d}
.app-shell .fiche-blocs>.showcase-disclosure>summary{flex-wrap:wrap;row-gap:6px}
.app-shell .showcase-disclosure>summary .fiche-heures:nth-of-type(2){margin-left:6px}

/* Fiche élève : décisions de validation des compétences, dans le bloc Évaluation. */
.app-shell .eval-valid{margin:0 0 16px;padding:12px;border:1px solid #e4e8f0;border-radius:12px;background:#f8fafc}
.app-shell .eval-valid h3{margin:0 0 8px;font-size:15px;display:flex;align-items:center;gap:6px}
.app-shell .eval-valid-liste{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.app-shell .eval-valid-liste li{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 10px;border:1px solid #e4e8f0;border-radius:10px;background:#fff}
.app-shell .eval-valid-main{display:flex;align-items:center;gap:6px 12px;flex-wrap:wrap;font-size:14px}
.app-shell .eval-valid-main small{color:#6b7280}
.app-shell .eval-valid-avis{padding:2px 10px;border-radius:999px;font-size:12.5px;font-weight:800}
.app-shell .eval-valid-avis.is-favorable{background:#e9f6ee;color:#16813d}
.app-shell .eval-valid-avis.is-defavorable{background:#fdeeec;color:#c0392b}
html[data-theme="dark"] .app-shell .eval-valid{background:#111a2c;border-color:#334155}
html[data-theme="dark"] .app-shell .eval-valid-liste li{background:#172033;border-color:#334155}
html[data-theme="dark"] .app-shell .eval-valid-main small{color:#94a3b8}
html[data-theme="dark"] .app-shell .eval-valid-avis.is-favorable{background:#17391f;color:#86efac}
html[data-theme="dark"] .app-shell .eval-valid-avis.is-defavorable{background:#4a1d1d;color:#fca5a5}

/* Créneaux de 30 minutes : carte basse (32 px) sur une seule ligne. L'heure ne passe jamais à la ligne, le type se
   tronque en premier, « Modifier » devient un crayon, la pastille de boîte reste à gauche. */
.app-shell .pl-lesson-slot.pl-court .pl-lesson{flex-direction:row;align-items:center;gap:5px;padding:2px 22px 2px 22px;flex-wrap:nowrap}
.app-shell .pl-lesson-slot.pl-court .pl-lesson b{flex:0 0 auto;white-space:nowrap;font-size:10.5px;letter-spacing:-.2px}
.app-shell .pl-lesson-slot.pl-court .pl-lesson span{flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10.5px}
.app-shell .pl-lesson-slot.pl-court .pl-lesson small,.app-shell .pl-lesson-slot.pl-court .pl-lesson em{display:none}
.app-shell .pl-lesson-slot.pl-court .pl-boite{bottom:auto;top:50%;transform:translateY(-50%);left:3px}
.app-shell .pl-lesson-slot.pl-court .pl-lesson-edit{top:50%;bottom:auto;right:3px;transform:translateY(-50%);width:16px;height:16px;padding:0;font-size:0;display:grid;place-items:center;overflow:hidden}
.app-shell .pl-lesson-slot.pl-court .pl-lesson-edit::before{content:"\270E";font-size:11px;line-height:1}

/* Débrief : actions d'en-tête (modifier la séance, voir le livret). */
.app-shell .dbf-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}

/* Agenda : panneau « Agendas » commun (agendas + planning de conduite + moniteurs), défilable si la liste est longue. */
.app-shell .ag-filter-menu .ag-filter-panel{position:absolute;z-index:20;right:0;top:46px;width:280px;max-height:min(70vh,520px);overflow:auto;padding:12px;border:1px solid #dfe4ec;border-radius:13px;background:#fff;box-shadow:0 18px 45px rgba(15,23,42,.16)}
.app-shell .ag-filter-menu .ag-filter-panel fieldset{position:static;width:auto;margin:0 0 10px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.app-shell .ag-filter-menu .ag-filter-panel fieldset:last-child{margin-bottom:0}
.app-shell .ag-filter-menu .ag-filter-conduite{padding-top:10px;border-top:1px solid #e4e8f0}
.app-shell .ag-filter-menu .ag-filter-conduite .aide{margin:8px 0 2px;font-size:12px}
html[data-theme="dark"] .app-shell .ag-filter-menu .ag-filter-panel{background:#172033;border-color:#334155;color:#f8fafc}
html[data-theme="dark"] .app-shell .ag-filter-menu .ag-filter-conduite{border-top-color:#334155}
@media(max-width:620px){.app-shell .ag-filter-menu .ag-filter-panel{left:0;right:auto;width:min(300px,calc(100vw - 48px))}}

/* Recherche spontanée dans une liste déroulante (public/assets/js/selecteur-recherche.js). */
.app-shell .sel-recherche{display:block;width:100%;min-height:44px;margin:0 0 8px;padding:0 14px;border:1px solid #cdd6e4;border-radius:14px;background:#fff;color:inherit;font:inherit;font-size:15px;box-sizing:border-box}
.app-shell .sel-recherche:focus{outline:none;border-color:#5548ee;box-shadow:0 0 0 3px rgba(85,72,238,.15)}
.app-shell select[data-recherche][size]:not([size="1"]){height:auto;padding:4px;background-image:none;border-radius:14px}
.app-shell select[data-recherche][size]:not([size="1"]) option{padding:3px 8px;border-radius:6px}
.app-shell .sel-recherche-etat{display:block;margin-top:4px;font-size:12.5px;color:#6b7280}
html[data-theme="dark"] .app-shell .sel-recherche{background:#172033;border-color:#334155;color:#f8fafc}
html[data-theme="dark"] .app-shell .sel-recherche-etat{color:#94a3b8}
