/* Lucien — Proprietary License
   Copyright (c) 2025 DrRiddler. All rights reserved.
   SPDX-License-Identifier: LicenseRef-Lucien-Proprietary */

/* =========================================================
   STYLELUCIEN.CSS — Lucien Design System (Structure, Layout & Composants)

   Les fichiers de thème (light-mode.css, dark-mode.css) ne définissent
   que des TOKENS (--clr-*, --surface-*, --clr-border…).
   Les composants ci-dessous (l-btn, pill, chip) s'en servent : ils
   s'adaptent donc automatiquement au thème.

   CONVENTION DES COMPOSANTS
   ┌──────────────────────────────┬──────────────────────────────┐
   │ Rôle                         │ Composant                    │
   ├──────────────────────────────┼──────────────────────────────┤
   │ Déclencher une ACTION        │ .l-btn   (section 07)        │
   │ AFFICHER une info / un état  │ .pill    (section 08)        │
   │ CHOISIR / filtrer / cocher   │ .chip    (section 08b)       │
   └──────────────────────────────┴──────────────────────────────┘
   Couleurs communes : blue · green · orange · red
   (+ alias sémantiques pour les pills : info · success · warning · fail)

   Table des sections :
   01. 🎚️ Fonts
   02. 🧱 Tokens STRUCTURE & Échelle géométrique
   03. 🧭 Base & Layout général
   04. 👋 Accueil / Welcome
   05. 🧩 Helpers Lucien & Alignements
   06. 🖼️ Images, logos & loader
   07. 🔘 Boutons d'action (.l-btn)
   08. 💊 Pills — informations (.pill)
   08b. 🏷️ Chips — choix & filtres (.chip)
   09. 🔔 Pastilles & Badges
   10. 🃏 Lucien Design System — Cards (Structure)
   11. 🧾 Formulaires & Contrôles (Structure)
   12. 📊 Tables & Tableaux de données (Structure)
   13. 📱 Mobile: table → cards (auto)
   14. 🧭 Navigation & Sidebar (Desktop & Mobile Capsule Adaptative)
   15. 👩‍🏫 Classes & Équipes pédagogiques
   16. 📅 Calendrier (FullCalendar) & Planning
   17. 🥗 Demi-pension & Tableaux spécifiques
   18. 🧩 Grilles & Utilitaires de disposition
   19. 📱 Login Page (Structure)
   20. 📷 Scanner & Outils métier
   21. ✨ Système d'icônes vectorielles
   22. 🤖 Widget Assistant Lucien
   23. ♿ Accessibilité — mouvement réduit
========================================================= */

/* =========================================================
   01. 🎚️ Fonts
   ========================================================= */
@font-face {
  font-family: "Parkinsans";
  src: local("Parkinsans Light"), local("Parkinsans-Light"), url("Parkinsans-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Parkinsans";
  src: local("Parkinsans Regular"), local("Parkinsans"), url("Parkinsans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Parkinsans";
  src: local("Parkinsans Medium"), local("Parkinsans-Medium"), url("Parkinsans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Parkinsans";
  src: local("Parkinsans SemiBold"), local("Parkinsans-SemiBold"), url("Parkinsans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Parkinsans";
  src: local("Parkinsans Bold"), local("Parkinsans-Bold"), url("Parkinsans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Parkinsans";
  src: local("Parkinsans ExtraBold"), local("Parkinsans-ExtraBold"), url("Parkinsans-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   02. 🧱 Tokens STRUCTURE & Échelle géométrique
   ========================================================= */
:root {
  --ff-main: "Parkinsans", system-ui, -apple-system, sans-serif;
  --sidebar-width: 96px;

  /* Échelle d'arrondis */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 999px;

  /* Structure des cartes */
  --l-card-radius: var(--radius-lg);

  /* Flou & Transparence */
  --pill-blur: 10px;

  /* Anneau de focus */
  --focus-outline-width: 2px;
  --focus-outline-offset: 2px;

  /* Navigation mobile capsule */
  --bn-h: 70px;
  --bn-gap: 16px;
  --bn-pad-x: 10px;
  --bn-pad-y: 6px;
  --bn-side: 12px;

  /* --- Tokens des composants (surchargeables par un thème) --- */
  --comp-neutral: #64748b;          /* couleur des pills sans variante  */
  --comp-tint: 12%;                 /* intensité du fond teinté          */
  --comp-tint-hover: 22%;           /* fond teinté au survol (chips)     */
  --comp-border: 26%;               /* intensité de la bordure teintée   */
  --chip-checked-bg: var(--clr-dark, #111);    /* chip neutre cochée    */
  --chip-checked-fg: var(--clr-white, #fff);
}

/* =========================================================
   03. 🧭 Base & Layout général
   ========================================================= */
html {
  background: var(--surface-0, #f9f9f9);
}

html:has(body.dark-mode) {
  background: #0b0f14 !important;
}

html, body {
  height: 100%;
  min-height: 100%;
}

body {
  font-family: var(--ff-main) !important;
  font-size: 1.05rem;
  line-height: 1.5;
  position: relative;
  z-index: 0;
  margin: 0;
}

main, main.container, .page-transition {
  background: transparent;
}

* {
  transition:
    color .2s ease,
    background-color .2s ease,
    transform .2s ease,
    box-shadow .2s ease,
    border-color .2s ease;
}

h1 { font-weight: 800; letter-spacing: -0.02em; }
h2 { font-weight: 750; letter-spacing: -0.015em; }
h3, h4, h5, h6 { font-weight: 700; }

a:focus-visible,
button:focus-visible {
  outline-width: var(--focus-outline-width);
  outline-style: solid;
  outline-offset: var(--focus-outline-offset);
}

.footer-page {
  text-align: center;
  margin-top: 2rem;
  padding: 1rem 0;
  font-size: .85rem;
}

@media (min-width: 768px) {
  body:not(.login-page) .l-main-content {
    margin-left: var(--sidebar-width) !important;
    width: calc(100% - var(--sidebar-width)) !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
    display: block !important;
    max-width: none !important;
  }
}

@media (max-width: 767.98px) {
  .l-main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 1rem !important;
  }
}

body .ML__keyboard,
body .ML__popover {
  z-index: 3000 !important;
}

/* =========================================================
   04. 👋 Accueil / Welcome
   (Les styles des bentos sont dans bento.css)
   ========================================================= */
.welcome-message h5 {
  font-size: 1.25rem;
}

.home-icon {
  height: 4rem;
  width: 4rem;
  transition: transform .2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.home-icon:hover {
  transform: scale(1.08);
}

/* =========================================================
   05. 🧩 Helpers Lucien & Alignements
   ========================================================= */
.l-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.l-inline {
  display: inline-flex;
  align-items: center;
}

.l-ellipsis {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.l-col-actions {
  width: 220px;
  min-width: 220px;
  white-space: nowrap;
}

.l-col-wide {
  max-width: 420px;
}

.l-sticky {
  position: sticky;
  top: var(--sticky-top-offset, 96px);
  z-index: 5;
}

/* =========================================================
   06. 🖼️ Images, logos & loader
   ========================================================= */
.img-lucien {
  display: block;
  margin: 0 auto;
  width: auto;
  height: auto;
  max-width: 30rem;
  min-width: 10rem;
  max-height: 12rem;
  margin-top: .25rem;
}

.logo-titre img {
  max-width: 120px !important;
}

#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .6s ease;
}
#splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.logo-loader {
  animation: zoomIn 1s ease-out, bounce-fade 1.2s ease-in-out;
  max-width: 70%;
  height: auto;
}

@keyframes zoomIn {
  0% { transform: scale(.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes bounce-fade {
  0% { transform: scale(.95); opacity: 0; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

body.fade-in {
  opacity: 0;
  transition: opacity .5s ease-in-out;
}
body.fade-in.visible { opacity: 1; }
.page-transition { animation: fadeInUp .4s ease-out; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   07. 🔘 Boutons d'action (.l-btn)
   ---------------------------------------------------------
   RÔLE : déclencher une action (enregistrer, modifier, supprimer…)

   <button class="l-btn l-btn-green">Enregistrer</button>
   <a class="l-btn l-btn-red l-btn-sm" href="…">Supprimer</a>

   Couleurs : l-btn-blue (défaut) · l-btn-green · l-btn-orange
              l-btn-red · l-btn-light (neutre foncé)
   Styles   : (défaut = doux, fond teinté)
              l-btn-solid  → fond plein, pour l'action principale
              l-btn-ghost  → sans fond, pour les actions secondaires
   Tailles  : l-btn-sm · l-btn-md · l-btn-lg · l-btn-block
   États    : :disabled ou .is-disabled
   ========================================================= */

/* --- Boutons Bootstrap (compatibilité) --- */
.btn {
  font-weight: 600;
  font-size: 1.05rem;
  font-family: var(--ff-main);
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.9rem 1.4rem;
  font-size: 1.2rem;
  border-radius: var(--radius-md);
}

.btn-outline-primary:hover {
  transform: scale(1.03);
}

.btn-custom {
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}

a.btn-custom-red,
a.btn-custom-green,
a.btn-custom-blue,
a.btn-custom-orange {
  text-decoration: none;
}
a.btn-custom-red:hover,
a.btn-custom-green:hover,
a.btn-custom-blue:hover,
a.btn-custom-orange:hover {
  text-decoration: none;
  opacity: .95;
  transform: scale(1.01);
}

/* --- Composant Lucien --- */
.l-btn {
  --btn-c: var(--clr-blue, #107ba7);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.6rem 1.2rem;
  font-family: var(--ff-main);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;

  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in oklab, var(--btn-c) 25%, transparent);
  background: color-mix(in oklab, var(--btn-c) 10%, var(--surface-1, #fff));
  color: var(--btn-c);

  transition:
    background-color .2s cubic-bezier(0.4, 0, 0.2, 1),
    color .2s ease,
    border-color .2s ease,
    transform .2s ease,
    box-shadow .2s ease;
}

.l-btn:hover {
  background: var(--btn-c);
  color: var(--clr-white, #fff);
  border-color: var(--btn-c);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -2px color-mix(in srgb, var(--btn-c) 30%, transparent);
}

.l-btn:active {
  transform: translateY(0) scale(0.98);
}

.l-btn:focus-visible {
  outline: var(--focus-outline-width) solid var(--btn-c);
  outline-offset: var(--focus-outline-offset);
}

.l-btn:disabled,
.l-btn.is-disabled {
  opacity: .5;
  pointer-events: none;
  box-shadow: none;
}

/* Couleurs */
.l-btn-blue   { --btn-c: var(--clr-blue, #107ba7); }
.l-btn-green  { --btn-c: var(--clr-green, #259893); }
.l-btn-orange { --btn-c: var(--clr-orange, #f5a311); }
.l-btn-red    { --btn-c: var(--clr-red, #d05627); }
.l-btn-light  { --btn-c: var(--clr-dark, #111); }

/* Styles */
.l-btn-solid {
  background: var(--btn-c);
  color: var(--clr-white, #fff);
  border-color: var(--btn-c);
}
.l-btn-solid:hover {
  background: color-mix(in oklab, var(--btn-c) 85%, black);
  border-color: color-mix(in oklab, var(--btn-c) 85%, black);
}

.l-btn-ghost {
  background: transparent;
  border-color: transparent;
}
.l-btn-ghost:hover {
  background: color-mix(in oklab, var(--btn-c) 12%, transparent);
  color: var(--btn-c);
  border-color: transparent;
  box-shadow: none;
}

/* Tailles */
.l-btn-sm {
  padding: 4px 10px;
  font-size: 0.85rem;
  border-radius: 6px;
}
.l-btn-md {
  padding: 8px 20px;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
}
.l-btn-lg {
  padding: 12px 28px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}
.l-btn-block {
  width: 100%;
}

/* --- Boutons icône --- */
.btn-icon {
  width: 44px;
  height: 44px;
  border: 0;
  font-size: 19px;
  border-radius: var(--radius-sm);
  box-shadow: none;
  transition: background-color .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bouton-cercle {
  display: inline-block;
  border-radius: var(--radius-full);
  overflow: hidden;
  line-height: 0;
}
.img-cercle {
  display: block;
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  transition: transform .25s ease, box-shadow .25s ease;
}
.img-cercle:hover {
  transform: scale(1.06);
}

/* --- Barre d'actions flottante --- */
.l-float-actions {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  padding: .55rem .85rem;
  border-radius: var(--radius-full);
  display: flex;
  gap: .6rem;
  transition: .25s ease;
}
@media (max-width: 768px) {
  .l-float-actions { bottom: 92px; }
}
.l-float-actions.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(12px);
}

/* =========================================================
   08. 💊 Pills — informations (.pill)
   ---------------------------------------------------------
   RÔLE : afficher un état, une étiquette, un compteur.

   <span class="pill pill-sm pill-success">accepté</span>
   <span class="pill pill-sm pill-info">3e B</span>

   Couleurs : pill-info  | pill-blue
              pill-success | pill-green
              pill-warning | pill-orange
              pill-fail  | pill-red
              (sans variante = gris neutre)
   Tailles  : pill-sm · pill-md · pill-lg

   Une pill <span> est STATIQUE (pas d'effet au survol).
   Compatibilité : une pill posée sur <a>, <button> ou <label>
   réagit au survol. Pour une nouvelle action, préférer .l-btn.
   pill-nohover : désactive tout effet et les clics.
   ========================================================= */
.pill {
  --p-c: var(--comp-neutral);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--pill-py, 0.35rem) var(--pill-px, 0.85rem);
  font-size: var(--pill-fs, 0.85rem);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none !important;

  border-radius: var(--radius-full);
  border: 1px solid color-mix(in oklab, var(--p-c) var(--comp-border), transparent);
  background: color-mix(in oklab, var(--p-c) var(--comp-tint), var(--surface-1, #fff));
  color: var(--p-c);

  backdrop-filter: blur(var(--pill-blur));
  -webkit-backdrop-filter: blur(var(--pill-blur));
}

/* Couleurs (+ alias sémantiques) */
.pill-info,    .pill-blue    { --p-c: var(--clr-blue, #107ba7); }
.pill-success, .pill-green   { --p-c: var(--clr-green, #259893); }
.pill-warning, .pill-orange  { --p-c: var(--clr-orange, #f5a311); }
.pill-fail,    .pill-red     { --p-c: var(--clr-red, #d05627); }

/* Pills interactives (compatibilité avec l'existant) */
:is(a, button, label).pill {
  cursor: pointer;
  font-family: var(--ff-main);
}
:is(a, button, label).pill:not(.pill-nohover):hover {
  background: var(--p-c);
  color: var(--clr-white, #fff);
  border-color: var(--p-c);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--p-c) 25%, transparent);
}
:is(a, button, label).pill:focus-visible {
  outline: var(--focus-outline-width) solid var(--p-c);
  outline-offset: var(--focus-outline-offset);
}

.pill-nohover {
  pointer-events: none;
}

/* Tailles */
.pill-sm {
  --pill-py: .3rem;
  --pill-px: .65rem;
  --pill-fs: .75rem;
}
.pill-md {
  --pill-py: .55rem;
  --pill-px: 1rem;
  --pill-fs: .9rem;
}
.pill-lg {
  --pill-py: .85rem;
  --pill-px: 1.4rem;
  --pill-fs: 1.05rem;
}

/* =========================================================
   08b. 🏷️ Chips — choix & filtres (.chip)
   ---------------------------------------------------------
   RÔLE : choisir, filtrer, cocher une option.

   Forme 1 (recommandée, accessible) :
     <input type="checkbox" class="btn-check" id="f-acc" name="statuts" value="accepté">
     <label class="chip chip-green" for="f-acc"><span class="chip-check">✓</span>Accepté</label>

   Forme 2 (input à l'intérieur) :
     <label class="chip"><input type="checkbox" name="x"> Option</label>

   État coché : automatique (input:checked) ou classe .is-checked
   Couleurs   : (défaut = neutre, cochée en foncé)
                chip-blue · chip-green · chip-orange · chip-red
   Extras     : .chip-dot (pastille de couleur) · .chip-check (✓ visible si coché)
                .chip--empty (emplacement vide en pointillés)
   ========================================================= */
.chip {
  --c-c: var(--clr-dark, #111);

  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .8rem;
  font-size: .85rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;

  border-radius: var(--radius-md);
  border: 1px solid var(--clr-border, rgba(0,0,0,.08));
  background: color-mix(in oklab, var(--surface-1, #fff) 65%, transparent);
  color: color-mix(in oklab, var(--clr-dark, #111) 90%, transparent);

  transition:
    transform .15s ease,
    box-shadow .15s ease,
    background-color .15s ease,
    border-color .15s ease,
    color .15s ease;
}

/* Couleurs */
.chip-blue   { --c-c: var(--clr-blue, #107ba7); }
.chip-green  { --c-c: var(--clr-green, #259893); }
.chip-orange { --c-c: var(--clr-orange, #f5a311); }
.chip-red    { --c-c: var(--clr-red, #d05627); }

/* Au repos, une chip colorée a une bordure légèrement teintée */
:is(.chip-blue, .chip-green, .chip-orange, .chip-red) {
  border-color: color-mix(in oklab, var(--c-c) var(--comp-border), transparent);
}

/* Survol */
.chip:hover {
  transform: translateY(-1px);
  border-color: var(--c-c);
  background: color-mix(in oklab, var(--c-c) 8%, var(--surface-1, #fff));
}
.chip:active { transform: translateY(0); }

/* État coché */
.chip.is-checked,
.btn-check:checked + .chip,
.chip:has(> input:checked) {
  font-weight: 800;
  background: var(--c-c);
  border-color: var(--c-c);
  color: var(--clr-white, #fff);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--c-c) 25%, transparent);
}
/* Chip neutre cochée : couleurs dédiées (surchargeables par le thème) */
.chip:not(.chip-blue, .chip-green, .chip-orange, .chip-red):is(.is-checked, :has(> input:checked)),
.btn-check:checked + .chip:not(.chip-blue, .chip-green, .chip-orange, .chip-red) {
  background: var(--chip-checked-bg);
  border-color: var(--chip-checked-bg);
  color: var(--chip-checked-fg);
}

/* Focus clavier */
.btn-check:focus-visible + .chip,
.chip:has(> input:focus-visible) {
  outline: var(--focus-outline-width) solid var(--c-c);
  outline-offset: var(--focus-outline-offset);
}

/* Input caché à l'intérieur (forme 2) */
.chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

/* Coche ✓ visible uniquement quand la chip est cochée */
.chip .chip-check { display: none; }
.chip.is-checked .chip-check,
.btn-check:checked + .chip .chip-check,
.chip:has(> input:checked) .chip-check { display: inline; }

/* Pastille de couleur */
.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex: 0 0 auto;
  background: var(--c-c, currentColor);
}
.chip.is-checked .chip-dot,
.btn-check:checked + .chip .chip-dot,
.chip:has(> input:checked) .chip-dot {
  background: currentColor;
}

/* Emplacement vide */
.chip--empty {
  border-style: dashed;
  box-shadow: none;
  pointer-events: none;
  user-select: none;
  opacity: .75;
}

/* Les éléments internes héritent toujours de la couleur du composant
   (évite qu'une règle globale sur span/div les recolore) */
:is(.l-btn, .pill, .chip) :is(span, i, b, strong, em, small) {
  color: inherit !important;
  -webkit-text-fill-color: currentColor;
}

/* =========================================================
   09. 🔔 Pastilles & Badges
   ========================================================= */
.pastille-rouge {
  width: 11px;
  height: 11px;
  border-radius: var(--radius-full);
  display: inline-block;
  position: absolute;
  top: -2px;
  right: -3px;
  z-index: 10;
}

@media (min-width: 768px) {
  .pastille-rouge.desktop {
    top: 6px;
    left: auto;
    right: 14px;
    transform: none;
  }
}

.animate-pulse {
  animation: subtlePulse 1.5s ease-in-out infinite;
}
@keyframes subtlePulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: .7; }
  100% { transform: scale(1); opacity: 1; }
}

/* =========================================================
   10. 🃏 Lucien Design System — Cards (Structure)
   ========================================================= */
.l-card, .l-card-action {
  border-radius: var(--l-card-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 1.4rem;
  border-width: 1px;
  border-style: solid;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease;
}

.l-card-action {
  text-align: center;
  text-decoration: none !important;
  cursor: pointer;
}
.l-card-action:active {
  transform: scale(0.985);
}

.l-card--pad { padding: 1.25rem; }
.l-card--flat { box-shadow: none !important; }

.l-card__header {
  padding: 0.9rem 1.1rem;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  font-weight: 700;
}

.l-card__body {
  padding: 1rem 1.1rem;
  flex: 1 1 auto;
}

.l-card__footer {
  padding: 0.85rem 1.1rem;
  border-top-width: 1px;
  border-top-style: solid;
}

body:not(.login-page) :is(.card, .card-header, .card-body, .card-footer) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.l-card :is(.bg-body, .bg-body-tertiary, .bg-body-secondary, .bg-light) {
  background: transparent !important;
}

/* =========================================================
   11. 🧾 Formulaires & Contrôles (Structure)
   ========================================================= */
form {
  border-radius: var(--radius-md);
  padding: 1.2rem;
}
form.fullwidth-no-padding {
  padding-left: 0;
  padding-right: 0;
}

input.form-control, select.form-select, textarea.form-control {
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  outline: none;
}

form h4 {
  border-left-width: 4px;
  border-left-style: solid;
  padding: 8px 12px;
  margin: 1.75rem 0 1rem;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 4px;
}

form .section-box {
  padding: 14px 18px;
  border-width: 1px;
  border-style: solid;
  border-radius: var(--radius-sm);
  margin-bottom: 1.4rem;
}

form .form-label {
  margin-bottom: 5px;
  font-weight: 600;
  font-size: 0.9rem;
}
form .row > [class*="col-"] { margin-bottom: 12px; }

.input-group {
  display: flex;
  width: 100%;
  flex-wrap: nowrap;
  align-items: stretch;
}
.input-group > .form-control {
  flex-grow: 1;
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.input-group > .btn {
  flex-shrink: 0;
  min-width: 120px;
  white-space: nowrap;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.awesomplete {
  display: contents;
}

.l-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.l-check input[type="checkbox"] {
  transform: scale(1.15);
  cursor: pointer;
}
.l-check label {
  margin: 0;
  cursor: pointer;
}

/* =========================================================
   12. 📊 Tables & Tableaux de données (Structure)
   ========================================================= */
.alert {
  font-size: 0.98rem;
  border-radius: var(--radius-sm);
  font-family: var(--ff-main);
}

.table {
  font-size: 0.98rem;
}
.table-active {
  border-left-width: 4px;
  border-left-style: solid;
}

.l-table-wrap {
  width: 100%;
  overflow: auto;
  border-radius: var(--radius-lg);
}

.l-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 520px;
}

.l-table thead th {
  background: var(--clr-white);
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-weight: 750;
}

.l-table thead th:first-child { border-top-left-radius: var(--radius-lg); }
.l-table thead th:last-child  { border-top-right-radius: var(--radius-lg); }

.l-table tbody td {
  padding: 12px 14px;
  vertical-align: middle;
}

.l-table.is-compact thead th,
.l-table.is-compact tbody td {
  padding: 8px 11px;
}

.l-table.is-hover tbody tr {
  transition: transform .12s ease, filter .12s ease;
}

.l-table.is-stickyhead thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.l-table tr > td {
  padding-top: .65rem;
  padding-bottom: .65rem;
}

.is-selected {
  outline: 2px solid rgba(16, 123, 167, .25);
  outline-offset: -2px;
}
tr.is-selected > td {
  background: rgba(16, 123, 167, .08);
}
.mobile-card.is-selected {
  outline: 2px solid rgba(16, 123, 167, .18);
}

.l-actions-row td {
  padding: .55rem .75rem;
}
.l-table .js-actions-row td {
  padding: .35rem .5rem;
}

.l-actions-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  padding: .12rem .35rem;
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  border: 1px solid var(--glass-bd);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(26px) saturate(165%);
  -webkit-backdrop-filter: blur(26px) saturate(165%);
}
.l-actions-bar .pill {
  padding: .20rem .7rem;
  line-height: 1;
}

.table-suivi-sorties td:nth-child(1), .table-suivi-sorties th:nth-child(1) { width: 10%; }
.table-suivi-sorties td:nth-child(2), .table-suivi-sorties th:nth-child(2) { width: 10%; }
.table-suivi-sorties td:nth-child(3), .table-suivi-sorties th:nth-child(3) { width: 10%; }
.table-suivi-sorties td:nth-child(4), .table-suivi-sorties th:nth-child(4) { width: 30%; }
.table-suivi-sorties td:nth-child(5), .table-suivi-sorties th:nth-child(5) { width: 10%; }
.table-suivi-sorties td:nth-child(6), .table-suivi-sorties th:nth-child(6) { width: 18%; }
.table-suivi-sorties td:nth-child(7), .table-suivi-sorties th:nth-child(7) { width: 7%; }

.l-pager {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}
.l-pager a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.l-pager .is-disabled a {
  pointer-events: none;
  opacity: .45;
}
.l-pager .is-active a {
  outline-width: var(--focus-outline-width);
  outline-style: solid;
  outline-offset: 0;
}

/* =========================================================
   13. 📱 Mobile: table → cards (auto)
   ========================================================= */
@media (max-width: 991.98px) {
  .l-table {
    min-width: 0;
  }
  .l-table thead {
    display: none;
  }
  .l-table,
  .l-table tbody,
  .l-table tr,
  .l-table td {
    display: block;
    width: 100%;
  }
  .l-table tbody tr {
    margin-bottom: 12px;
    border-radius: var(--radius-lg);
    overflow: hidden;
  }
  .l-table tbody td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    flex-wrap: wrap;
  }
  .l-table tbody td::before {
    content: attr(data-label);
    font-weight: 800;
    flex: 0 0 auto;
    max-width: 48%;
  }
}

/* =========================================================
   14. 🧭 Navigation & Sidebar (Desktop & Mobile Capsule Adaptative)
   ========================================================= */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width) !important;
    z-index: 1000;
    pointer-events: auto;
  }
  .sidebar-link {
    pointer-events: auto;
    position: relative;
    z-index: 1;
  }
  .bottom-nav,
  .navbar.fixed-bottom,
  .card-list-mobile {
    display: none !important;
  }
}

.sidebar-logo {
  width: 100%;
  text-align: center;
  margin-bottom: 18px;
}
.sidebar-lucien-logo {
  max-width: 56px;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
}

.sidebar-link {
  width: calc(100% - 12px);
  margin: 3px auto;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none !important;
  border-radius: var(--radius-md);
  position: relative;
}
.sidebar-link i {
  font-size: 1.65rem;
  line-height: 1;
}
.sidebar-link span {
  font-size: .72rem;
  line-height: 1.2;
  display: block;
  color: inherit !important;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
}

.sidebar > .text-end {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1100;
}
#toggle-sidebar {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-full);
  display: flex;
  justify-content: center;
  align-items: center;
}
.sidebar-theme-toggle {
  width: calc(100% - 12px);
  margin: 3px auto;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.sidebar-theme-toggle:focus-visible {
  outline: none;
}

/* Bottom Nav (Capsule Verre Liquide Adaptative au nombre d'icônes) */
@media (max-width: 991.98px) {
  body {
    padding-bottom: calc(var(--bn-h) + var(--bn-gap) + env(safe-area-inset-bottom, 0px));
  }

  .bottom-nav,
  .navbar.fixed-bottom {
    position: fixed !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + var(--bn-gap)) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    z-index: 9999 !important;
    isolation: isolate;

    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;

    width: -moz-fit-content !important;
    width: fit-content !important;
    max-width: calc(100vw - (var(--bn-side) * 2)) !important;
    height: var(--bn-h) !important;
    padding: var(--bn-pad-y) var(--bn-pad-x) !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;

    border-radius: var(--radius-full) !important;
    box-sizing: border-box;
    will-change: transform;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .bottom-nav::-webkit-scrollbar,
  .navbar.fixed-bottom::-webkit-scrollbar {
    display: none;
  }

  .bottom-nav .nav-link,
  .navbar.fixed-bottom .nav-link {
    position: relative;
    flex: 1 1 auto !important;
    min-width: 46px;
    max-width: 72px;
    height: 100%;
    z-index: 2;
    margin: 0;
    padding: 4px clamp(2px, 1vw, 6px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px !important;
    background: transparent;
    border: 0;
    border-radius: var(--radius-md);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .bottom-nav .nav-link:active,
  .navbar.fixed-bottom .nav-link:active {
    transform: scale(.95);
  }

  .bottom-nav .icon-wrapper,
  .bottom-nav .nav-link i,
  .bottom-nav .nav-link span {
    position: relative;
    z-index: 3;
  }

  .bottom-nav .icon-wrapper {
    position: relative;
    display: grid;
    place-items: center;
    background: transparent !important;
    border-radius: var(--radius-full);
  }

  .bottom-nav .icon-wrapper .l-icon {
    --l-icon-size: clamp(20px, 5.2vw, 24px);
  }

  .bottom-nav .nav-link i {
    font-size: 20px;
    line-height: 1;
  }

  .bottom-nav .nav-link span {
    font-size: clamp(9px, 2.3vw, 10.5px);
    line-height: 1.1;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
  }
}

@media (max-width: 375px) {
  :root {
    --bn-h: 66px;
    --bn-pad-x: 6px;
    --bn-pad-y: 4px;
    --bn-side: 8px;
  }
  .bottom-nav,
  .navbar.fixed-bottom {
    gap: 1px !important;
  }
  .bottom-nav .nav-link,
  .navbar.fixed-bottom .nav-link {
    min-width: 42px;
    padding: 3px 2px;
  }
  .bottom-nav .icon-wrapper .l-icon {
    --l-icon-size: 19px;
  }
  .bottom-nav .nav-link i { font-size: 18px; }
  .bottom-nav .nav-link span { font-size: 8.5px; }
}

/* =========================================================
   15. 👩‍🏫 Classes & Équipes pédagogiques
   ========================================================= */
.classes-equipe__card { border-radius: 1rem; }
.classes-equipe__section-title {
  font-weight: 800;
  letter-spacing: .2px;
}
.classes-equipe__hint { font-size: .9rem; opacity: .75; }

.classes-equipe__role-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.classes-equipe__divider {
  height: 1px;
  opacity: .8;
  margin: 1rem 0;
  background: var(--l-card-sep, rgba(0, 0, 0, .1));
}
.classes-equipe__profs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.classes-equipe__tile {
  border-radius: var(--l-card-radius);
  padding: 14px 16px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.classes-equipe__tile:hover { transform: translateY(-2px); }

.classes-equipe__tile-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.classes-equipe__tile-name {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .2px;
  font-size: 1rem;
}
.classes-equipe__matiere-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.classes-equipe__tile-side {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
}
.classes-equipe__tile input[type="checkbox"] {
  transform: scale(1.15);
  cursor: pointer;
}
.classes-equipe__sticky {
  position: sticky;
  bottom: 0;
  z-index: 20;
  margin-top: 1rem;
  padding: .75rem;
  border-top: 1px solid var(--l-card-sep, rgba(0, 0, 0, .1));
  border-radius: 1rem;
  backdrop-filter: blur(6px);
}

/* =========================================================
   16. 📅 Calendrier (FullCalendar) & Planning
   ========================================================= */
#calendar {
  max-width: 900px;
  margin: 2rem auto;
  font-size: .9rem;
}
.fc .fc-daygrid-day-frame { min-height: 60px; }

.fc-event.has-tooltip { position: relative; }
.fc-custom-tooltip {
  position: absolute;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: .85rem;
  white-space: nowrap;
  display: none;
  z-index: 1000;
  pointer-events: none;
}
.fc-event.has-tooltip:hover .fc-custom-tooltip { display: block; }
.fc a {
  color: inherit;
  text-decoration: none;
}

.l-grid-5 {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 1199.98px) {
  .l-grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  .l-grid-5 { grid-template-columns: 1fr; }
}

.l-daycol {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.l-daycol__head {
  padding: .7rem .9rem;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  text-align: center;
}
.l-daycol__body {
  padding: .75rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
}

.l-bacblock {
  padding: .75rem .85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.l-bacblock:active { transform: scale(.99); }

.l-step {
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
}

.l-action {
  border-radius: var(--radius-md);
  padding: 10px 12px;
}
.l-action__title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 750;
  margin-bottom: 8px;
  font-size: .95rem;
}
.l-action__hint {
  font-weight: 600;
  opacity: .75;
  font-size: .85rem;
}
.l-action__row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.l-toolbar {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.l-toolbar__left { flex: 1 1 320px; min-width: 260px; }
.l-toolbar__right { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }

.l-mini-card {
  border-radius: var(--radius-md);
  padding: 10px;
}
.l-mini-title {
  font-weight: 750;
  margin-bottom: 8px;
}

.l-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
}
.l-row__label {
  width: 90px;
  font-weight: 700;
  margin: 0;
}

/* =========================================================
   17. 🥗 Demi-pension & Tableaux spécifiques
   ========================================================= */
th.dp-header { text-align: center; }
thead th, thead td { vertical-align: middle !important; }
.dp-subheader th,
.dp-cell {
  width: 60px;
  min-width: 60px;
  max-width: 60px;
  text-align: center;
}
.table td.text-center i {
  font-size: 1.1rem;
}

/* =========================================================
   18. 🧩 Grilles & Utilitaires de disposition
   ========================================================= */
.is-hidden { display: none !important; }

.l-truncate {
  display: inline-block;
  max-width: var(--truncate-max, 170px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.l-chevron { transition: transform .2s ease; }
[aria-expanded="true"] .l-chevron { transform: rotate(180deg); }

.l-grid-rooms {
  display: grid;
  grid-template-columns: 2fr 1fr 3fr;
  gap: 12px;
  align-items: end;
}

.l-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.l-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 991.98px) {
  .l-grid-rooms,
  .l-grid-2,
  .l-grid-3 {
    grid-template-columns: 1fr;
  }
}

.l-divider {
  height: 1px;
  opacity: .75;
  margin: 16px 0;
}

.l-mt-2 { margin-top: 12px; }
.l-mb-4 { margin-bottom: 16px; }

@media (max-width: 768px) {
  h1 { font-size: 1.3rem; }
  .form-check-label, .btn { font-size: .9rem; }
  form { font-size: .9rem; }
  form .form-label, form .form-text { font-size: .85rem; }
  form input, form select, form textarea { font-size: .9rem; }

  .form-control {
    font-size: .95rem;
    padding: .6rem .8rem;
    border-radius: var(--radius-sm);
  }
  .btn {
    font-size: .95rem;
    padding: .6rem 1rem;
  }

  .input-group {
    flex-direction: column;
    align-items: stretch;
  }
  .input-group > .form-control,
  .input-group > .btn {
    width: 100%;
    border-radius: var(--radius-sm);
  }
  .input-group > .form-control { margin-bottom: .5rem; }

  #tableLivres {
    font-size: 13px;
    white-space: nowrap;
  }
  .table-responsive-custom {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  th, td { padding: .5rem; }

  table.table th,
  table.table td {
    font-size: 13px;
    padding: .4rem .3rem;
    vertical-align: middle;
    word-break: break-word;
  }
  table.table td:nth-child(1), table.table td:nth-child(2),
  table.table th:nth-child(1), table.table th:nth-child(2) { width: 25%; }
  table.table td:nth-child(3), table.table th:nth-child(3) { width: 11%; }
  table.table td:last-child,  table.table th:last-child  {
    white-space: nowrap;
    width: 1%;
    text-align: center;
  }
  table.table td:nth-child(7), table.table th:nth-child(7) {
    width: 5%;
    white-space: nowrap;
    text-align: center;
    padding: .2rem;
  }

  .btn-sm {
    font-size: 12px;
    padding: .25rem .5rem;
  }

  main.container {
    min-height: calc(100vh - 104px);
  }

  body:not(.page-liste) .table-responsive-custom { display: none; }

  .img-lucien {
    max-width: 20rem;
    min-width: 10rem;
    max-height: 10rem;
  }

  .mobile-table {
    width: 100%;
    table-layout: fixed !important;
    border-collapse: collapse;
  }
  .mobile-table th,
  .mobile-table td {
    font-size: .8rem;
    padding: .4rem;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-table th:first-child,
  .mobile-table td:first-child {
    width: 35% !important;
    max-width: 35% !important;
    min-width: 35% !important;
    text-align: left;
    white-space: normal;
  }
  .mobile-table th:nth-child(2), .mobile-table th:nth-child(3),
  .mobile-table th:nth-child(4), .mobile-table th:nth-child(5),
  .mobile-table td:nth-child(2), .mobile-table td:nth-child(3),
  .mobile-table td:nth-child(4), .mobile-table td:nth-child(5),
  .mobile-table th:nth-child(6), .mobile-table td:nth-child(6) {
    width: 8% !important;
    max-width: 8% !important;
    min-width: 8% !important;
    white-space: nowrap;
  }
}

@media (max-width: 576px) {
  body { font-size: .95rem; }
  h1 { font-size: 1.35rem; margin-bottom: .6rem; }
  h2 { font-size: 1.2rem; margin-bottom: .5rem; }
  h3, h4 { font-size: 1.05rem; margin-bottom: .5rem; }

  .alert {
    font-size: .9rem;
    padding: .6rem .75rem;
  }

  form { padding: .8rem; }
  form .section-box {
    padding: .75rem .85rem;
    margin-bottom: .9rem;
    border-radius: var(--radius-sm);
  }
  form h4 {
    margin-top: 1.2rem;
    margin-bottom: .6rem;
    font-size: 1.05rem;
    border-left-width: 4px;
    padding: 6px 10px;
  }

  .form-label, .form-text { font-size: .85rem; }
  .form-control, .form-select, textarea.form-control {
    font-size: .9rem;
    padding: .5rem .75rem;
    min-height: 40px;
    border-radius: var(--radius-sm);
  }
  .form-check-label { font-size: .9rem; }

  .btn {
    font-size: .95rem;
    padding: .5rem .9rem;
    min-height: 40px;
    border-radius: var(--radius-sm);
  }
  .btn-lg {
    font-size: 1.05rem;
    padding: .65rem 1rem;
  }
  .btn-sm {
    font-size: .85rem;
    padding: .4rem .65rem;
  }

  .row > [class*="col-"] { margin-bottom: .6rem; }

  .sidebar { width: 76px; }
  main.container { padding-bottom: 1rem; }

  #calendar {
    margin: 1.2rem auto;
    font-size: .85rem;
  }
  .fc .fc-daygrid-day-frame { min-height: 48px; }
}

body.theme-compact { font-size: .95rem; }
body.theme-compact form { padding: .8rem; }
body.theme-compact .form-control,
body.theme-compact .form-select {
  font-size: .9rem;
  padding: .5rem .75rem;
  min-height: 40px;
}
body.theme-compact .btn {
  font-size: .95rem;
  padding: .5rem .9rem;
  min-height: 40px;
}

/* =========================================================
   19. 📱 Login Page (Structure)
   ========================================================= */
body.login-page {
  margin: 0;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: 0;
  padding-right: 0;
  min-height: 100svh;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  background-color: var(--clr-green);
  font-family: var(--ff-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

@media (max-width: 768px) {
  body.login-page { background-position: center top; }
}

body.login-page main.container {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding: 0 1rem;
}

body.login-page .logo-ecole,
body.login-page .logo-lucien {
  display: block;
  margin: 0 auto .5rem;
  width: auto;
  max-width: 100%;
}
body.login-page .logo-ecole { max-height: 80px; }
body.login-page .logo-lucien {
  max-height: 260px;
  margin-bottom: 1rem;
}

body.login-page h2 {
  font-weight: 800;
  margin: 0 0 1.1rem 0;
  font-size: 1.8rem;
}

body.login-page .card { border: 0; }

body.login-page .login-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 24px;
  transform: translateZ(0);
}

body.login-page .login-card form {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.login-page .form-control {
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  padding: .75rem 1rem;
}

body.login-page button.btn-custom-blue {
  font-weight: 700;
  padding: .85rem 1rem;
  border-radius: var(--radius-sm);
  margin-top: .5rem;
  width: 100%;
}

body.login-page a { font-weight: 600; }
body.login-page a:hover { text-decoration: underline; }

body.login-page .login-card::before,
body.login-page .login-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
body.login-page .login-card::before {
  left: -30%;
  top: -55%;
  width: 160%;
  height: 130%;
  border-radius: var(--radius-full);
  transform: rotate(-10deg);
}
body.login-page .login-card::after {
  inset: 1px;
  border-radius: 17px;
}

/* =========================================================
   20. 📷 Scanner & Outils métier
   ========================================================= */
#reader {
  border-width: 1px;
  border-style: solid;
  padding: 1rem;
  border-radius: var(--radius-sm);
}

#mobile-action-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: 90vw;
  max-width: 480px;
  border-width: 1px;
  border-style: solid;
  padding: 10px;
  z-index: 1050;
  display: none;
  gap: 10px;
  justify-content: center;
  align-items: center;
  transition: opacity .3s ease;
}

#action-buttons form {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}
#action-buttons form.d-inline {
  display: inline-flex !important;
}

.ghost-input {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.scan-list-container {
  max-height: 300px;
  overflow-y: auto;
}

.clickable-card {
  cursor: pointer;
  transition: transform 0.1s, border-color 0.2s;
}
.clickable-card:active { transform: scale(0.98); }

/* =========================================================
   21. ✨ Système d'icônes vectorielles
   ========================================================= */
.l-icon {
  display: inline-block;
  --l-icon-size: 24px;
  width: var(--l-icon-size);
  height: var(--l-icon-size);
  min-width: var(--l-icon-size);
  min-height: var(--l-icon-size);
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: middle;
  transition: all 0.25s ease;
}

.l-icon-home        { -webkit-mask-image: url('/static/home.svg');           mask-image: url('/static/home.svg'); }
.l-icon-prof        { -webkit-mask-image: url('/static/teacher.svg');        mask-image: url('/static/teacher.svg'); }
.l-icon-livre       { -webkit-mask-image: url('/static/books.svg');          mask-image: url('/static/books.svg'); }
.l-icon-eleve       { -webkit-mask-image: url('/static/student.svg');        mask-image: url('/static/student.svg'); }
.l-icon-classe      { -webkit-mask-image: url('/static/classe.svg');         mask-image: url('/static/classe.svg'); }
.l-icon-moon        { -webkit-mask-image: url('/static/moon-stars.svg');     mask-image: url('/static/moon-stars.svg'); }
.l-icon-sun         { -webkit-mask-image: url('/static/sun.svg');            mask-image: url('/static/sun.svg'); }
.l-icon-logout      { -webkit-mask-image: url('/static/sign-out.svg');       mask-image: url('/static/sign-out.svg'); }
.l-icon-suivi       { -webkit-mask-image: url('/static/suivi.svg');          mask-image: url('/static/suivi.svg'); }
.l-icon-sortie      { -webkit-mask-image: url('/static/bus.svg');            mask-image: url('/static/bus.svg'); }
.l-icon-compte      { -webkit-mask-image: url('/static/compte.svg');         mask-image: url('/static/compte.svg'); }
.l-icon-salle       { -webkit-mask-image: url('/static/calendar-plus.svg');  mask-image: url('/static/calendar-plus.svg'); }
.l-icon-calendrier  { -webkit-mask-image: url('/static/calendar.svg');       mask-image: url('/static/calendar.svg'); }
.l-icon-edt         { -webkit-mask-image: url('/static/calendar-clock.svg'); mask-image: url('/static/calendar-clock.svg'); }
.l-icon-timetable   { -webkit-mask-image: url('/static/timetable.svg');      mask-image: url('/static/timetable.svg'); }
.l-icon-heures-sup  { -webkit-mask-image: url('/static/overtime.svg');       mask-image: url('/static/overtime.svg'); }
.l-icon-aide        { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M9.5 9.2a2.6 2.6 0 0 1 5 .9c0 1.7-2.5 2.2-2.5 3.9'/><circle cx='12' cy='17.2' r='.6' fill='black'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M9.5 9.2a2.6 2.6 0 0 1 5 .9c0 1.7-2.5 2.2-2.5 3.9'/><circle cx='12' cy='17.2' r='.6' fill='black'/></svg>"); }

@media (min-width: 768px) {
  .l-icon {
    --l-icon-size: 28px;
  }
}

/* =========================================================
   22. 🤖 Widget Assistant Lucien
   (Messages limités à #ia-messages pour ne pas entrer en
    conflit avec le tchat de l'accueil, qui utilise aussi .msg)
   ========================================================= */
#ia-widget {
  position: fixed;
  bottom: 85px;
  right: 20px;
  z-index: 1000;
  font-family: inherit;
}

#ia-button {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--clr-multi);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#ia-button:hover {
  transform: scale(1.08);
}

#ia-window {
  width: 350px;
  height: 450px;
  background: var(--surface-1);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--clr-shadow);
  display: none;
  flex-direction: column;
  overflow: hidden;
  position: absolute;
  bottom: 72px;
  right: 0;
}

#ia-header {
  background: var(--clr-multi);
  color: white;
  padding: 14px;
  font-weight: 750;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#ia-messages {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#ia-messages .msg {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  max-width: 80%;
  font-size: 0.9rem;
}

#ia-messages .msg-user {
  background: var(--clr-blue);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

#ia-messages .msg-ia {
  background: var(--surface-2);
  color: var(--clr-dark);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

#ia-input-area {
  padding: 10px;
  border-top: 1px solid var(--clr-border);
  display: flex;
  gap: 6px;
}

#ia-input {
  flex: 1;
  border: 1px solid var(--clr-border-2);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  outline: none;
}

/* =========================================================
   23. ♿ Accessibilité — mouvement réduit
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}