/* ==========================================================================
   IT Concierge - Feuille de style
   Fichier : /var/www/it-concierge/assets/css/style.css
   Thème sombre par défaut, effet de verre, aucune dépendance externe.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Jetons de design
   -------------------------------------------------------------------------- */
:root {
  /* Palette imposée */
  --bg:            #0F172A;
  --surface:       #1E293B;
  --accent:        #2563EB;
  --success:       #10B981;
  --text:          #FFFFFF;

  /* Déclinaisons */
  --bg-deep:       #0A1122;
  --surface-2:     #253244;
  --accent-soft:   rgba(37, 99, 235, 0.16);
  --accent-line:   rgba(96, 141, 255, 0.45);
  --warning:       #F59E0B;
  --danger:        #EF4444;

  --text-muted:    rgba(226, 232, 240, 0.72);
  --text-dim:      rgba(203, 213, 225, 0.52);

  --glass:         rgba(30, 41, 59, 0.62);
  --glass-strong:  rgba(30, 41, 59, 0.86);
  --glass-border:  rgba(148, 163, 184, 0.18);
  --glass-hi:      rgba(255, 255, 255, 0.06);

  /* Élévation */
  --shadow-sm:  0 1px 2px rgba(2, 6, 23, 0.4);
  --shadow-md:  0 10px 24px -12px rgba(2, 6, 23, 0.85);
  --shadow-lg:  0 26px 50px -20px rgba(2, 6, 23, 0.95);
  --shadow-accent: 0 22px 44px -22px rgba(37, 99, 235, 0.85);

  /* Rayons : hiérarchie volontaire, pas un rayon unique partout */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Rythme */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 72px;

  --shell: 1240px;

  --font: "Segoe UI Variable Display", "Segoe UI", -apple-system,
          BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-num: "SF Mono", "Cascadia Mono", "JetBrains Mono", ui-monospace,
              "DejaVu Sans Mono", monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. Réinitialisation
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, dl, dd, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
svg { display: block; }

/* Une icône sans classe suit la taille du texte qui l'entoure. */
svg:not([class]) { width: 1.2em; height: 1.2em; flex: none; }

/* Seuls ces conteneurs imposent leur propre dimension à l'icône. */
.tile__icon svg,
.icon-btn svg,
.brand__mark svg,
.signature__mark svg,
.fichier__type svg,
.nav__ico svg { width: 100%; height: 100%; }
code {
  font-family: var(--font-num);
  font-size: 0.86em;
  padding: 1px 6px;
  border-radius: var(--r-xs);
  background: rgba(148, 163, 184, 0.14);
}

:focus-visible {
  outline: 2px solid #93B4FF;
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 50%; top: -60px;
  transform: translateX(-50%);
  padding: 10px 18px;
  background: var(--accent);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  z-index: 200;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; }

/* --------------------------------------------------------------------------
   3. Fond général
   -------------------------------------------------------------------------- */
body.app,
body.auth {
  background:
    radial-gradient(1100px 620px at 82% -12%, rgba(37, 99, 235, 0.26), transparent 62%),
    radial-gradient(820px 520px at 4% 8%, rgba(16, 185, 129, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
}

.card-glass {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

/* Liseré lumineux supérieur, signature visuelle du portail */
.card-glass::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent, rgba(255, 255, 255, 0.34), transparent);
  border-radius: inherit;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   4. Barre supérieure
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.78);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.topbar__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 12px var(--sp-5);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--sp-5);
}

.brand { display: inline-flex; align-items: center; gap: 12px; }

/* Le logo est une image transparente : ni fond, ni arrondi, ni halo bleu.
   Une ombre portée douce le détache du fond sombre. */
.brand__mark {
  width: 42px;
  height: 42px;
  flex: none;
  display: block;
}
.brand__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(2, 6, 23, 0.55));
}
.brand__mark--lg { width: 76px; height: 76px; }

.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.brand__text span { font-size: 12px; color: var(--text-dim); }

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  overflow-x: visible;
  flex: 0 1 auto;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  white-space: nowrap;
  color: var(--text-muted);
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.nav__ico { width: 17px; height: 17px; flex: none; opacity: 0.75; }
.nav__link:hover .nav__ico,
.nav__link.is-active .nav__ico { opacity: 1; }
.nav__link:hover { background: rgba(148, 163, 184, 0.12); color: var(--text); }
.nav__link.is-active {
  color: var(--text);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

.topbar__aside { display: flex; align-items: center; gap: var(--sp-4); }

.clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.clock__time {
  font-family: var(--font-num);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.clock__date { font-size: 11.5px; color: var(--text-dim); }

.account { display: flex; align-items: center; gap: 10px; }
.account__avatar {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 14px; font-weight: 650;
  background: linear-gradient(140deg, var(--accent), #1D4ED8);
  box-shadow: var(--shadow-accent);
}
.account__id { display: flex; flex-direction: column; line-height: 1.2; }
.account__id strong { font-size: 13.5px; font-weight: 600; }
.account__id span { font-size: 11.5px; color: var(--text-dim); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  padding: 9px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  background: var(--glass);
  cursor: pointer;
}
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

/* --------------------------------------------------------------------------
   5. Boutons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  transition: transform 0.16s var(--ease), background 0.18s var(--ease),
              box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.btn--primary {
  background: linear-gradient(140deg, #3B82F6, var(--accent));
  box-shadow: var(--shadow-accent);
}
.btn--primary:hover:not([disabled]) {
  background: linear-gradient(140deg, #60A5FA, #1D4ED8);
}

.btn--ghost {
  background: rgba(148, 163, 184, 0.10);
  border-color: var(--glass-border);
  color: var(--text-muted);
}
.btn--ghost:hover { background: rgba(148, 163, 184, 0.18); color: var(--text); }

.btn--block { width: 100%; padding: 13px 16px; font-size: 15px; margin-top: var(--sp-2); }

.btn--icon svg { width: 18px; height: 18px; flex: none; }

/* --------------------------------------------------------------------------
   6. Page de connexion
   -------------------------------------------------------------------------- */
/* La page occupe au moins la hauteur de la fenêtre mais reste défilable :
   sur un écran bas ou en paysage, le contenu déborde et doit pouvoir glisser. */
.auth {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  justify-content: center;
  align-items: center;
  padding: var(--sp-6) var(--sp-4);
  overflow-x: hidden;
  overflow-y: auto;
}

/* Marges automatiques : centré quand il y a de la place, collé en haut sinon. */
.auth__panel  { margin-block: auto; }
.auth__footer { margin-top: var(--sp-6); flex: none; }

.auth__backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;   /* confine les halos, sinon ils créent une barre horizontale */
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}
.orb--a {
  width: 520px; height: 520px;
  top: -160px; right: -120px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.85), transparent 68%);
}
.orb--b {
  width: 460px; height: 460px;
  bottom: -180px; left: -140px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.5), transparent 68%);
}
.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 78%);
}

.auth__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: var(--sp-7);
  align-items: center;
}

.auth__pitch {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-right: var(--sp-4);
}
.auth__pitch .brand__mark--lg { width: 116px; height: 116px; }
.auth__title {
  margin: var(--sp-5) 0 var(--sp-3);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 680;
  letter-spacing: -0.025em;
}
.auth__lead {
  max-width: 42ch;
  margin-inline: auto;
  color: var(--text-muted);
  font-size: 15.5px;
}
.auth__lead strong { color: var(--text); font-weight: 600; }

.auth__list {
  margin-top: var(--sp-5);
  display: grid;
  gap: 10px;
  text-align: left;
}
.auth__list li {
  position: relative;
  padding-left: 26px;
  font-size: 14px;
  color: var(--text-muted);
}
.auth__list li::before {
  content: "";
  position: absolute;
  left: 4px; top: 8px;
  width: 8px; height: 8px;
  border-radius: 3px;
  background: var(--success);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.75);
}

.auth__card { padding: var(--sp-6); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); }

.auth__head { margin-bottom: var(--sp-5); }
.auth__head h2 { font-size: 21px; font-weight: 650; letter-spacing: -0.015em; }
.auth__head p { margin-top: 4px; font-size: 13.5px; color: var(--text-dim); }

.auth__hint {
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--glass-border);
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.6;
}

.auth__footer {
  position: relative;
  z-index: 1;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
  color: var(--text-dim);
}
.auth__footer strong { color: var(--text-muted); font-weight: 600; }

/* --------------------------------------------------------------------------
   7. Formulaires
   -------------------------------------------------------------------------- */
.form { display: grid; gap: var(--sp-4); }

.field { display: grid; gap: 7px; }
.field__label { font-size: 13px; font-weight: 550; color: var(--text-muted); }

.field__control { position: relative; display: flex; align-items: center; }

.field__icon {
  position: absolute;
  left: 13px;
  width: 18px; height: 18px;
  color: var(--text-dim);
  pointer-events: none;
}

.input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease),
              background 0.18s var(--ease);
}
.input::placeholder { color: var(--text-dim); }
.input:focus {
  outline: none;
  border-color: var(--accent-line);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.field__reveal {
  position: absolute;
  right: 8px;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--r-xs);
  background: transparent;
  font-size: 12.5px;
  color: var(--text-dim);
  cursor: pointer;
}
.field__reveal:hover { color: var(--text); background: rgba(148, 163, 184, 0.14); }

.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--sp-4);
  padding: 11px 14px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  line-height: 1.45;
}
.alert svg { width: 18px; height: 18px; flex: none; }
.alert--error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #FECACA;
}
.alert--warn {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #FDE68A;
}

/* --------------------------------------------------------------------------
   8. Structure des pages internes
   -------------------------------------------------------------------------- */
.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: var(--sp-7) var(--sp-5) var(--sp-8);
  display: grid;
  gap: var(--sp-7);
}

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-5);
}

.hero__eyebrow {
  font-size: 13px;
  color: var(--text-dim);
  text-transform: none;
}
.hero__title {
  margin: 6px 0 8px;
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 680;
  letter-spacing: -0.028em;
}
.hero__sub { max-width: 62ch; color: var(--text-muted); font-size: 14.5px; }

.hero__services { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass);
  font-size: 13px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.chip__state { font-style: normal; color: var(--text-dim); font-size: 12px; }
.chip__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  flex: none;
}
.chip__dot--up {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}
.chip__dot--down {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.16);
}
.chip__dot--warn {
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

/* --------------------------------------------------------------------------
   9. Cartes de mesure
   -------------------------------------------------------------------------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
  gap: var(--sp-4);
}

.metric { padding: var(--sp-5); border-radius: var(--r-md); }

.metric__head { display: flex; align-items: center; gap: 10px; margin-bottom: var(--sp-4); }
.metric__icon { width: 19px; height: 19px; color: var(--text-dim); flex: none; }
.metric__label { font-size: 13.5px; font-weight: 550; color: var(--text-muted); }
.metric__value {
  margin-left: auto;
  font-family: var(--font-num);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.gauge {
  height: 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14);
}
.gauge__fill {
  display: block;
  height: 100%;
  width: var(--fill, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--success), #34D399);
  transition: width 0.6s var(--ease-out), background 0.4s var(--ease);
}
.metric[data-level="warn"] .gauge__fill { background: linear-gradient(90deg, #FBBF24, var(--warning)); }
.metric[data-level="crit"] .gauge__fill { background: linear-gradient(90deg, #F87171, var(--danger)); }

.metric__detail { margin-top: 10px; font-size: 12.5px; color: var(--text-dim); }

.metric--info .deflist { display: grid; gap: 7px; }
.deflist > div { display: flex; justify-content: space-between; gap: var(--sp-3); font-size: 12.8px; }
.deflist dt { color: var(--text-dim); }
.deflist dd { margin: 0; color: var(--text-muted); font-family: var(--font-num); font-size: 12px; }

/* --------------------------------------------------------------------------
   10. Section applications
   -------------------------------------------------------------------------- */
.section-head { margin-bottom: var(--sp-5); }
.section-head h2 { font-size: 19px; font-weight: 650; letter-spacing: -0.015em; }
.section-head p { margin-top: 3px; font-size: 13.5px; color: var(--text-dim); }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: var(--sp-4);
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 0.28s var(--ease-out), box-shadow 0.28s var(--ease-out),
              border-color 0.28s var(--ease), background 0.28s var(--ease);
}

/* Halo suivant le curseur, alimenté par app.js */
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%),
              rgba(59, 130, 246, 0.20), transparent 62%);
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}

.tile:hover,
.tile:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent-line);
  background: var(--glass-strong);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(96, 141, 255, 0.22);
}
.tile:hover::after, .tile:focus-visible::after { opacity: 1; }

.tile__icon {
  width: 44px; height: 44px;
  padding: 11px;
  border-radius: var(--r-md);
  color: #BFD4FF;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.tile:hover .tile__icon { color: #fff; background: rgba(37, 99, 235, 0.34); }

.tile__title { font-size: 15.5px; font-weight: 620; letter-spacing: -0.012em; }
.tile__desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.tile__foot {
  margin-top: auto;
  padding-top: var(--sp-3);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-dim);
  transition: color 0.25s var(--ease);
}
.tile:hover .tile__foot { color: #93B4FF; }
.tile__arrow {
  width: 15px; height: 15px;
  transition: transform 0.28s var(--ease-out);
}
.tile:hover .tile__arrow { transform: translateX(4px); }

.tile--soon { opacity: 0.62; cursor: not-allowed; }
.tile--soon:hover { transform: none; box-shadow: var(--shadow-md); border-color: var(--glass-border); }
.tile--soon:hover::after { opacity: 0; }

/* --------------------------------------------------------------------------
   11. Pied de page
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--glass-border);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.footer__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   12. Adaptation aux petits écrans
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .auth__panel { grid-template-columns: 1fr; max-width: 460px; gap: var(--sp-6); }
  .auth__pitch { padding-right: 0; }
  .auth__list { max-width: 300px; margin-inline: auto; }
}

@media (max-width: 900px) {
  .topbar__inner { grid-template-columns: 1fr auto; gap: var(--sp-3); }

  .nav-toggle { display: block; order: 2; }

  .nav {
    order: 4;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.32s var(--ease-out), opacity 0.2s var(--ease);
    opacity: 0;
  }
  /* Le menu doit pouvoir défiler : il compte jusqu'à huit entrées et
     dépassait la hauteur d'un écran de téléphone (capture 2). */
  .nav.is-open {
    max-height: min(58vh, 460px);
    opacity: 1;
    padding-top: var(--sp-3);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .nav__link { padding: 13px 14px; font-size: 15px; }
  .nav__ico { width: 19px; height: 19px; }

  .topbar__aside {
    order: 5;
    grid-column: 1 / -1;
    justify-content: space-between;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s var(--ease-out), opacity 0.2s var(--ease);
  }
  .topbar__aside.is-open {
    max-height: 200px;
    opacity: 1;
    padding-top: var(--sp-3);
    margin-top: var(--sp-3);
    border-top: 1px solid var(--glass-border);
  }

  .shell { padding: var(--sp-6) var(--sp-4) var(--sp-7); gap: var(--sp-6); }
  .hero { align-items: flex-start; }
}

@media (max-width: 560px) {
  .tiles { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .btn__label { display: none; }
  .btn--icon { padding: 10px; }
  .auth__card { padding: var(--sp-5); }
  .footer__inner { flex-direction: column; gap: 4px; }
}

/* --------------------------------------------------------------------------
   13. Préférences d'accessibilité
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .tile:hover { transform: none; }
}

@media print {
  .topbar, .footer, .hero__services { display: none; }
  body.app { background: #fff; color: #000; }
  .card-glass { box-shadow: none; border: 1px solid #ccc; background: #fff; }
}

/* --------------------------------------------------------------------------
   14. Signature du pied de page
   -------------------------------------------------------------------------- */
.footer__inner { align-items: center; }

.signature {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 7px 14px 7px 8px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.10);
}
.signature__mark {
  width: 26px; height: 26px;
  color: #93B4FF;
  flex: none;
}
.signature__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  font-size: 12.5px;
  color: var(--text-muted);
}
.signature__text strong { color: var(--text); font-weight: 620; }
.signature__role { font-size: 11px; color: var(--text-dim); }

.footer__meta { font-size: 11.5px; color: var(--text-dim); text-align: right; }

/* --------------------------------------------------------------------------
   15. Gestion des comptes
   -------------------------------------------------------------------------- */
.hero--compact { align-items: center; }

.alert--ok {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.42);
  color: #A7F3D0;
}

.copiable {
  cursor: pointer;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--glass-border);
  user-select: all;
}
.copiable:hover { border-color: var(--accent-line); }

.panel { padding: var(--sp-6); }
.panel[hidden] { display: none; }

.form--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
}
.field--wide { grid-column: 1 / -1; }

.form__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-3);
  padding-top: var(--sp-2);
}

/* Champ sans pictogramme : pas de retrait à gauche */
.input--plain { padding-left: 14px; }

select.input {
  appearance: none;
  cursor: pointer;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-dim) 50%),
    linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: right 18px center, right 13px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
select.input option { background: var(--surface); color: var(--text); }
select.input:disabled { opacity: 0.55; cursor: not-allowed; }

.perms {
  margin: 0;
  padding: var(--sp-4);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  background: rgba(15, 23, 42, 0.45);
}
.perms legend { padding: 0 6px; }
.perms__hint { margin-bottom: var(--sp-3); font-size: 12.5px; color: var(--text-dim); }
.perms__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.check:hover { background: rgba(148, 163, 184, 0.10); }
.check input {
  width: 17px; height: 17px;
  accent-color: var(--accent);
  flex: none;
  cursor: pointer;
}
.check input:disabled { cursor: not-allowed; opacity: 0.6; }
.check:has(input:checked) {
  color: var(--text);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.check--switch { padding-left: 0; }

.accounts { display: grid; gap: var(--sp-4); }

.account-card { padding: var(--sp-5); border-radius: var(--r-lg); }
.account-card--off { opacity: 0.62; }

.account-card__head {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.account__avatar--lg { width: 44px; height: 44px; font-size: 17px; }

.account-card__id { flex: 1 1 240px; min-width: 0; }
.account-card__id h3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 620;
}
.account-card__id p { margin-top: 3px; font-size: 12.5px; color: var(--text-dim); }

.tag {
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
}
.tag--primary {
  color: #A7F3D0;
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.12);
}
.tag--off {
  color: #FDE68A;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
}

.perm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--sp-4);
}
.perm-tags li {
  padding: 4px 10px;
  border-radius: var(--r-xs);
  background: rgba(148, 163, 184, 0.12);
  font-size: 11.5px;
  color: var(--text-muted);
}

.account-card__body {
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--glass-border);
}
.account-card__body[hidden] { display: none; }

.account-card__tools {
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px dashed var(--glass-border);
  display: grid;
  gap: var(--sp-4);
}

.inline-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: 7px;
}
.inline-form__row .input { flex: 1 1 220px; }

.btn--danger {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.42);
  color: #FECACA;
}
.btn--danger:hover { background: rgba(239, 68, 68, 0.26); color: #fff; }

/* --------------------------------------------------------------------------
   16. Petits écrans et fenêtres basses
   -------------------------------------------------------------------------- */
@media (max-width: 700px) {
  .form--grid { grid-template-columns: 1fr; }
  .footer__inner { align-items: flex-start; }
  .footer__meta { text-align: left; }
  .account-card__head { gap: var(--sp-3); }
}

/* Écran bas ou paysage sur mobile : on allège la colonne de présentation
   pour que le formulaire reste atteignable sans défilement excessif. */
@media (max-height: 720px) and (min-width: 1025px) {
  .auth__list { display: none; }
  .auth__title { margin-top: var(--sp-3); font-size: 30px; }
}

@media (max-height: 620px) and (max-width: 1024px) {
  .auth { justify-content: flex-start; }
  .auth__pitch { display: none; }
  .auth__panel { margin-block: 0; }
}

/* --------------------------------------------------------------------------
   17. Fiche d'identifiants après création ou réinitialisation
   -------------------------------------------------------------------------- */
.field__help {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-dim);
}

.credentials {
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  border-color: rgba(16, 185, 129, 0.42);
  background:
    linear-gradient(180deg, rgba(16, 185, 129, 0.12), transparent 60%),
    var(--glass);
}
.credentials__title { font-size: 16px; font-weight: 650; }
.credentials__warn {
  margin-top: 4px;
  font-size: 12.5px;
  color: #A7F3D0;
}

.credentials__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-4);
}
.credentials__grid dt { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.credentials__grid dd { margin: 0; }

.credentials code {
  display: block;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--glass-border);
  font-size: 13px;
  word-break: break-all;
}
.copiable--key { font-size: 15px; letter-spacing: 0.03em; color: #A7F3D0; }

.credentials__hint { margin-top: var(--sp-3); font-size: 11.5px; color: var(--text-dim); }

/* ==========================================================================
   18. Compte verrouillé et rôle Website Manager
   ========================================================================== */
.tag--manager {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #BFD4FF;
  border-color: var(--accent-line);
  background: var(--accent-soft);
  font-weight: 600;
}
.tag__cadenas { width: 12px; height: 12px; }

.verrou {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px dashed var(--glass-border);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text-dim);
}
.verrou svg { width: 16px; height: 16px; }

/* ==========================================================================
   19. Barre d'actions des pages internes
   ========================================================================== */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  padding: 9px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  background: rgba(148, 163, 184, 0.10);
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease);
}
.icon-btn:hover {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.4);
  color: #FECACA;
}

/* ==========================================================================
   20. Espace documentaire
   ========================================================================== */
.fil {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: calc(var(--sp-6) * -1 + var(--sp-2));
  font-size: 13px;
  color: var(--text-dim);
}
.fil a { color: var(--text-muted); }
.fil a:hover { color: #93B4FF; }
.fil__sep { opacity: 0.45; }
.fil__actuel { color: var(--text); font-weight: 550; }

.vide {
  padding: var(--sp-7) var(--sp-5);
  text-align: center;
  border-radius: var(--r-lg);
}
.vide__icone { width: 42px; height: 42px; margin: 0 auto var(--sp-4); color: var(--text-dim); }
.vide h2 { font-size: 17px; font-weight: 620; }
.vide p { margin-top: 6px; font-size: 13.5px; color: var(--text-dim); }

.tiles--dense { grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); }

/* La carte dossier contient un lien plein cadre plus un bouton de suppression :
   le lien ne peut donc pas être l'élément racine. */
.tile--folder { padding: 0; display: block; position: relative; }
.tile__lien {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--sp-5);
}
.tile__suppr {
  position: absolute;
  top: 12px; right: 12px;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.tile--folder:hover .tile__suppr,
.tile__suppr:focus-within { opacity: 1; }
.tile__suppr .icon-btn { width: 32px; height: 32px; padding: 7px; }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: var(--sp-7) var(--sp-5);
  border: 2px dashed var(--glass-border);
  border-radius: var(--r-lg);
  background: rgba(15, 23, 42, 0.42);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.dropzone:hover,
.dropzone.is-survol {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.dropzone__icon { width: 34px; height: 34px; color: #93B4FF; margin-bottom: 4px; }
.dropzone__titre { font-size: 15px; font-weight: 600; }
.dropzone__sous { font-size: 12.5px; color: var(--text-dim); }
.dropzone__liste {
  margin-top: var(--sp-3);
  font-size: 12.5px;
  color: #A7F3D0;
  line-height: 1.6;
  word-break: break-all;
}

.fichiers { display: grid; gap: var(--sp-3); }

.fichier {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.fichier:hover { border-color: var(--accent-line); background: var(--glass-strong); }

.fichier__vignette,
.fichier__type {
  width: 54px; height: 54px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--glass-border);
}
.fichier__vignette img { width: 100%; height: 100%; object-fit: cover; }
.fichier__type svg { width: 24px; height: 24px; color: #93B4FF; }

.fichier__infos { flex: 1 1 200px; min-width: 0; }
.fichier__infos h3 {
  font-size: 14px;
  font-weight: 570;
  overflow-wrap: anywhere;
}
.fichier__infos p { margin-top: 3px; font-size: 12px; color: var(--text-dim); }

.fichier__actions { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }

/* ==========================================================================
   21. Planning
   ========================================================================== */
.mois-nav {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 4px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass);
}
.mois-nav .icon-btn { width: 34px; height: 34px; border: 0; background: transparent; }
.mois-nav .icon-btn:hover { background: rgba(148, 163, 184, 0.16); color: var(--text); }
.mois-nav .btn { padding: 7px 14px; border-radius: 999px; }

.legende {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-top: calc(var(--sp-6) * -1 + var(--sp-2));
}
.legende__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.legende__pastille {
  width: 9px; height: 9px;
  border-radius: 3px;
  background: var(--c);
  box-shadow: 0 0 10px color-mix(in srgb, var(--c) 60%, transparent);
}
.legende__item em {
  font-style: normal;
  font-size: 11px;
  color: var(--text-dim);
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}

.calendrier { padding: var(--sp-4); border-radius: var(--r-lg); overflow: hidden; }

.calendrier__entetes,
.calendrier__grille {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.calendrier__entetes {
  margin-bottom: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-align: center;
}

.jour {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: rgba(15, 23, 42, 0.5);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.jour:hover { border-color: var(--glass-border); background: rgba(15, 23, 42, 0.75); }
.jour--weekend { background: rgba(15, 23, 42, 0.72); }
.jour--hors { opacity: 0.38; }
.jour--aujourdhui { border-color: var(--accent-line); background: var(--accent-soft); }
.jour--actif { box-shadow: inset 0 0 0 1px #93B4FF; }

.jour__numero {
  align-self: flex-start;
  min-width: 24px;
  padding: 2px 6px;
  border-radius: var(--r-xs);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}
.jour--aujourdhui .jour__numero {
  background: var(--accent);
  color: #fff;
  font-weight: 620;
}
.jour__numero:hover { background: rgba(148, 163, 184, 0.18); color: var(--text); }

.jour__events { display: grid; gap: 3px; min-width: 0; }

.evt {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 3px 7px;
  border-radius: var(--r-xs);
  border-left: 3px solid var(--c);
  background: color-mix(in srgb, var(--c) 20%, transparent);
  font-size: 11.5px;
  line-height: 1.35;
  overflow: hidden;
}
.evt:hover { background: color-mix(in srgb, var(--c) 34%, transparent); }
.evt__heure { font-variant-numeric: tabular-nums; color: var(--text-muted); flex: none; }
.evt__titre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evt--plus { border-left-color: transparent; background: none; color: var(--text-dim); }

.evt-liste { display: grid; gap: var(--sp-3); }

.evt-carte {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  border-left: 3px solid var(--c);
}
.evt-carte__heure {
  flex: none;
  width: 66px;
  display: flex;
  flex-direction: column;
  font-variant-numeric: tabular-nums;
}
.evt-carte__heure strong { font-size: 15px; }
.evt-carte__heure span { font-size: 12px; color: var(--text-dim); }

.evt-carte__corps { flex: 1 1 auto; min-width: 0; }
.evt-carte__corps h3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
}
.evt-carte__meta { margin-top: 4px; font-size: 12.5px; color: var(--text-dim); }
.evt-carte__notes {
  margin-top: 8px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: rgba(15, 23, 42, 0.6);
  font-size: 12.5px;
  color: var(--text-muted);
}
.evt-carte__actions { display: flex; align-items: flex-start; gap: var(--sp-2); }

.a-venir { display: grid; gap: var(--sp-2); }
.a-venir__item {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-sm);
  border-left: 3px solid var(--c);
}
.a-venir__date {
  flex: none;
  width: 44px;
  text-align: center;
  line-height: 1.1;
}
.a-venir__date strong { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.a-venir__date span { font-size: 10.5px; color: var(--text-dim); }
.a-venir__corps { display: flex; flex-direction: column; min-width: 0; }
.a-venir__corps strong { font-size: 13.5px; font-weight: 570; }
.a-venir__corps span { font-size: 12px; color: var(--text-dim); }

textarea.input { resize: vertical; min-height: 84px; line-height: 1.55; }

/* ==========================================================================
   22. Planning et documents sur petits écrans
   ========================================================================== */
@media (max-width: 860px) {
  .calendrier { padding: var(--sp-2); }
  .calendrier__entetes, .calendrier__grille { gap: 3px; }
  .jour { min-height: 84px; padding: 5px; }
  .evt__heure { display: none; }
  .evt { font-size: 10.5px; padding: 2px 5px; }
  .fichier { flex-wrap: wrap; }
  .fichier__actions { width: 100%; }
  .evt-carte { flex-wrap: wrap; }
  .hero__actions { width: 100%; }
}

@media (max-width: 560px) {
  .calendrier__entetes span { font-size: 9.5px; }
  .jour { min-height: 68px; }
  .jour__events .evt__titre { display: none; }
  .jour__events .evt { height: 6px; padding: 0; border-radius: 3px; border-left-width: 0;
                       background: var(--c); }
  .evt--plus { display: none; }
}

/* ==========================================================================
   23. Administration serveur : actions et terminal
   ========================================================================== */
.action-carte {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--sp-4);
  border-radius: var(--r-md);
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), border-color 0.2s var(--ease),
              background 0.2s var(--ease);
}
.action-carte:hover {
  transform: translateY(-2px);
  border-color: var(--accent-line);
  background: var(--glass-strong);
}
.action-carte__titre { font-size: 14.5px; font-weight: 600; }
.action-carte__desc { font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }

/* Une action réputée sensible se signale avant même le clic. */
.action-carte.sensible {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.10), transparent 70%), var(--glass);
}
.action-carte.sensible .action-carte__titre { color: #FDE68A; }

.console {
  margin-top: var(--sp-4);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: #070C18;
}
.console__titre {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(148, 163, 184, 0.08);
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.console__corps {
  margin: 0;
  padding: var(--sp-4);
  max-height: 420px;
  overflow: auto;
  font-family: var(--font-num);
  font-size: 12.2px;
  line-height: 1.65;
  color: #CBD5E1;
  white-space: pre-wrap;
  word-break: break-word;
  overscroll-behavior: contain;
}

.terminal { padding: var(--sp-5); border-radius: var(--r-lg); }
.terminal__statut {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.terminal__actif { color: #A7F3D0; }
.terminal__absent {
  padding: var(--sp-5);
  border: 1px dashed var(--glass-border);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.65;
}
.terminal__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-4); }
.terminal__avertissement {
  margin-top: var(--sp-4);
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(239, 68, 68, 0.42);
  background: rgba(239, 68, 68, 0.10);
  font-size: 12.5px;
  line-height: 1.6;
  color: #FECACA;
}

/* ==========================================================================
   24. Journaux
   ========================================================================== */
.onglets {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  background: var(--glass);
}
.onglets a {
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text-muted);
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.onglets a:hover { background: rgba(148, 163, 184, 0.12); color: var(--text); }
.onglets a.is-actif {
  color: var(--text);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

.recherche {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}
.recherche .input { flex: 1 1 240px; }

.tableau-enveloppe {
  border-radius: var(--r-md);
  border: 1px solid var(--glass-border);
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.tableau {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.8px;
}
.tableau th,
.tableau td {
  padding: 10px 14px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.tableau th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(30, 41, 59, 0.96);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  backdrop-filter: blur(8px);
}
.tableau tbody tr:last-child td { border-bottom: 0; }
.tableau tbody tr:hover { background: rgba(148, 163, 184, 0.07); }
.tableau__principal { white-space: normal; min-width: 240px; color: var(--text); }
.tableau__actions { width: 1%; white-space: nowrap; }
.tableau td:first-child { font-variant-numeric: tabular-nums; color: var(--text-dim); }

.tag--alerte {
  color: #FECACA;
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
}
.tag--info { color: var(--text-muted); }

.icon-btn--neutre:hover {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: #BFD4FF;
}

/* ==========================================================================
   25. Inventaire
   ========================================================================== */
.colonnes {
  display: grid;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}
.colonne {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px auto;
  gap: var(--sp-2);
  align-items: center;
  padding: 10px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  background: rgba(15, 23, 42, 0.45);
}
.colonne .input { padding-block: 8px; }

@media (max-width: 640px) {
  .colonne { grid-template-columns: minmax(0, 1fr) auto; }
  .colonne select { grid-column: 1 / 2; }
}

/* ==========================================================================
   26. Mode maintenance
   ========================================================================== */
.apercu {
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-5);
  margin-top: var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.10), transparent 70%),
              rgba(15, 23, 42, 0.5);
}
.apercu__pastille {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #FDE68A;
}
.apercu__pastille::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
  animation: pouls 2.4s var(--ease) infinite;
}
.apercu__ouvert { display: flex; flex-wrap: wrap; gap: 6px; }
.apercu__ouvert span {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  font-size: 11.5px;
  color: var(--text-muted);
}
.apercu__echeance { font-size: 12.5px; color: var(--text-dim); }

@keyframes pouls {
  0%, 100% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18); }
  50%      { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.05); }
}

/* Bandeau affiché sur la page de connexion pendant une intervention */
.maint-avis {
  margin-bottom: var(--sp-5);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.10);
}
.maint-avis__pastille {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #FDE68A;
}
.maint-avis p { margin-top: 6px; font-size: 13px; line-height: 1.6; color: var(--text-muted); }
.maint-avis__ouvert {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(245, 158, 11, 0.28);
  font-size: 12.5px;
  color: var(--text-muted);
}
.maint-avis__ouvert strong { color: #FDE68A; }
.maint-avis__fin { margin-top: 6px; font-size: 12px; color: var(--text-dim); }

/* ==========================================================================
   27. Gestionnaire Redis
   ========================================================================== */
.verrou-panneau {
  max-width: 460px;
  margin: 0 auto;
  padding: var(--sp-6);
  border-radius: var(--r-xl);
  text-align: center;
}
.verrou-panneau__ico {
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  margin: 0 auto var(--sp-4);
  padding: 14px;
  border-radius: 50%;
  color: #BFD4FF;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.verrou-panneau h2 { font-size: 18px; font-weight: 640; }
.verrou-panneau p {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-dim);
}
.verrou-panneau__form { margin-top: var(--sp-5); text-align: left; }

.bases {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: var(--sp-2);
}
.base {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  background: var(--glass);
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease),
              transform 0.18s var(--ease-out);
}
.base:hover { transform: translateY(-2px); border-color: var(--accent-line); }
.base strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.base span { font-size: 11.5px; color: var(--text-dim); }
.base--active {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.base--vide { opacity: 0.5; }
.base--vide:hover { opacity: 1; }

/* ==========================================================================
   28. Corrections d'affichage sur téléphone
   ========================================================================== */
@media (max-width: 900px) {
  /* La barre supérieure tenait mal ses trois colonnes sur écran étroit. */
  .topbar__inner { padding: 10px var(--sp-4); }
  .brand__text span { display: none; }

  /* Les panneaux et cartes n'ont plus besoin d'un rembourrage de bureau. */
  .panel, .auth__card, .verrou-panneau { padding: var(--sp-4); }
  .card-glass { backdrop-filter: blur(12px); }

  .hero { flex-direction: column; align-items: stretch; }
  .hero__actions { justify-content: flex-start; }
  .mois-nav { flex: 1 1 auto; justify-content: space-between; }

  .section-head h2 { font-size: 17px; }
  .metrics { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }
  .metric { padding: var(--sp-4); }

  /* Les tableaux larges défilent au doigt plutôt que de déborder. */
  .tableau-enveloppe { -webkit-overflow-scrolling: touch; }
  .tableau th, .tableau td { padding: 9px 11px; font-size: 12px; }

  .bases { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); }
  .fil { font-size: 12px; }
}

@media (max-width: 560px) {
  .shell { padding: var(--sp-5) var(--sp-3) var(--sp-6); gap: var(--sp-5); }
  .hero__title { font-size: 23px; }
  .hero__sub { font-size: 13.5px; }

  /* Les listes d'actions passent en pleine largeur, plus faciles à viser. */
  .hero__actions .btn,
  .recherche .btn { flex: 1 1 auto; justify-content: center; }
  .form__actions { flex-direction: column-reverse; }
  .form__actions .btn { width: 100%; }

  .fichier { gap: var(--sp-3); }
  .fichier__vignette, .fichier__type { width: 44px; height: 44px; }
  .fichier__actions .btn { flex: 1 1 auto; justify-content: center; }

  .evt-carte { gap: var(--sp-3); }
  .evt-carte__heure { width: 100%; flex-direction: row; gap: 8px; align-items: baseline; }

  .credentials__grid { grid-template-columns: 1fr; }
  .console__corps { font-size: 11.5px; padding: var(--sp-3); }
  .verrou-panneau__ico { width: 46px; height: 46px; padding: 12px; }

  /* Une cible tactile ne descend pas sous 40 px. */
  .icon-btn { width: 40px; height: 40px; }
}

/* ==========================================================================
   29. Menu Administration déroulant
   ========================================================================== */
.nav-groupe { position: relative; }

.nav-groupe__bouton {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.nav-groupe.is-active .nav__link,
.nav-groupe__bouton[aria-expanded="true"] {
  color: var(--text);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.nav-groupe__fleche {
  width: 13px; height: 13px;
  opacity: 0.6;
  transform: rotate(90deg);
  transition: transform 0.2s var(--ease);
}
.nav-groupe__bouton[aria-expanded="true"] .nav-groupe__fleche { transform: rotate(-90deg); }

.nav-groupe__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  min-width: 208px;
  padding: 6px;
  display: grid;
  gap: 2px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  background: rgba(23, 33, 51, 0.97);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.nav-groupe__menu[hidden] { display: none; }

.nav-groupe__lien {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  white-space: nowrap;
  color: var(--text-muted);
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}
.nav-groupe__lien:hover { background: rgba(148, 163, 184, 0.14); color: var(--text); }
.nav-groupe__lien.is-active { color: var(--text); background: var(--accent-soft); }

/* Sur téléphone le menu se déplie dans le flux, pas en surimpression. */
@media (max-width: 900px) {
  .nav-groupe { position: static; }
  .nav-groupe__menu {
    position: static;
    margin-top: 4px;
    min-width: 0;
    background: rgba(15, 23, 42, 0.6);
    box-shadow: none;
  }
  .nav-groupe__lien { padding: 12px 14px; font-size: 15px; }
}

/* ==========================================================================
   30. Navigation compacte
   Au-delà de six entrées, les libellés faisaient déborder la barre et
   masquaient les dernières sans le dire. Sur grand écran on garde le texte,
   en dessous on ne montre que le pictogramme, le libellé passe en infobulle.
   ========================================================================== */
@media (min-width: 901px) {
  .nav__texte { display: none; }
  .nav__link  { padding: 9px 10px; }
  .nav__ico   { width: 20px; height: 20px; opacity: 0.85; }
  .nav-groupe__fleche { display: none; }
  /* Le menu déroulant garde ses libellés : sans eux il serait illisible. */
  .nav-groupe__menu .nav__texte { display: inline; }
}

/* Espace regagné sur la marque et l'horloge quand la place manque. */
@media (min-width: 901px) and (max-width: 1240px) {
  .brand__text { display: none; }
  .account__id { display: none; }
  .btn__label  { display: none; }
  .topbar__inner { gap: var(--sp-3); }
}

/* Le menu déroulant garde toujours ses libellés : c'est sa raison d'être. */
.nav-groupe__lien .nav__texte { display: inline; }

/* ==========================================================================
   34. Tâches
   ========================================================================== */
.taches { display: grid; gap: var(--sp-3); }
.taches--compact { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.tache {
  padding: var(--sp-4);
  border-radius: var(--r-md);
  border-left: 3px solid var(--c, var(--accent));
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* Une échéance dépassée doit sauter aux yeux sans hurler. */
.tache--retard {
  border-left-color: var(--danger);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.09), transparent 60%), var(--glass);
}

.tache__tete {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.tache__titre { font-size: 14.5px; font-weight: 600; flex: 1 1 auto; min-width: 0; }
.tache__meta  { font-size: 12.5px; color: var(--text-dim); }
.tache__desc  {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: rgba(15, 23, 42, 0.5);
}

/* Fil des échanges : refus, questions et réponses successives. */
.tache__fil {
  display: grid;
  gap: 8px;
  padding-left: 12px;
  border-left: 2px solid var(--glass-border);
}
.tache__fil li { display: grid; gap: 2px; font-size: 12.5px; }
.tache__fil strong { color: var(--text); font-weight: 600; }
.tache__quand { font-size: 11px; color: var(--text-dim); }
.tache__texte { color: var(--text-muted); line-height: 1.5; }

.tache__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-top: auto;
  padding-top: 4px;
}
.tache__actions .btn { padding: 8px 14px; font-size: 13px; }

.tache__reponse {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--glass-border);
}
.tache__reponse[hidden] { display: none; }

.tache-vide {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
}
.tache-vide__ico { width: 26px; height: 26px; color: var(--success); flex: none; }
.tache-vide div { display: flex; flex-direction: column; flex: 1 1 auto; }
.tache-vide strong { font-size: 14px; }
.tache-vide span { font-size: 12.5px; color: var(--text-dim); }

/* ==========================================================================
   35. Avertissement d'expiration de session
   ========================================================================== */
.expiration {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: var(--sp-4);
  background: rgba(8, 13, 26, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: apparition 0.2s var(--ease-out);
}
.expiration[hidden] { display: none; }

.expiration__boite {
  width: min(420px, 100%);
  padding: var(--sp-6);
  border-radius: var(--r-xl);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.expiration__ico {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  margin: 0 auto var(--sp-4);
  padding: 13px;
  border-radius: 50%;
  color: #FDE68A;
  background: rgba(245, 158, 11, 0.14);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.4);
}
.expiration__boite h2 { font-size: 18px; font-weight: 640; }
.expiration__boite p {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
}
.expiration__boite strong {
  font-family: var(--font-num);
  font-size: 17px;
  color: #FDE68A;
  font-variant-numeric: tabular-nums;
}
.expiration__actions {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}
.expiration__actions .btn { flex: 1 1 auto; justify-content: center; }

@keyframes apparition {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (max-width: 560px) {
  .taches--compact { grid-template-columns: 1fr; }
  .tache__actions .btn { flex: 1 1 auto; justify-content: center; }
  .expiration__actions { flex-direction: column-reverse; }
}

/* ==========================================================================
   36. Pastilles de notification
   ========================================================================== */
.pastille {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  flex: none;
}
/* Sur une entrée réduite à son icône, la pastille se pose en exposant. */
@media (min-width: 901px) {
  .nav__link { position: relative; }
  .nav__link .pastille {
    position: absolute;
    top: 1px;
    right: 1px;
    min-width: 15px;
    height: 15px;
    font-size: 9.5px;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.9);
  }
}

/* ==========================================================================
   37. Aide à la connexion
   ========================================================================== */
.aide-lien { margin-top: var(--sp-4); text-align: center; }

.lien-bouton {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 4px;
  border: 0;
  background: none;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(148, 163, 184, 0.4);
}
.lien-bouton:hover { color: #93B4FF; text-decoration-color: #93B4FF; }
.lien-bouton svg { width: 15px; height: 15px; }

.aide {
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--glass-border);
}
.aide[hidden] { display: none; }
.aide__intro {
  margin-bottom: var(--sp-4);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-dim);
}
.aide__duo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }

@media (max-width: 420px) {
  .aide__duo { grid-template-columns: 1fr; }
}

/* ==========================================================================
   38. Demandes d'assistance
   ========================================================================== */
.demandes { display: grid; gap: var(--sp-3); }

.demande {
  padding: var(--sp-4);
  border-radius: var(--r-md);
  border-left: 3px solid var(--c, var(--accent));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.demande__tete {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.demande__tete h3 { font-size: 15px; font-weight: 620; flex: 1 1 auto; }

.demande__infos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px var(--sp-4);
}
.demande__infos > div { display: flex; flex-direction: column; gap: 1px; }
.demande__infos dt { font-size: 11px; color: var(--text-dim); }
.demande__infos dd { margin: 0; font-size: 13px; color: var(--text-muted); }

.demande__message {
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: rgba(15, 23, 42, 0.5);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
}
.demande__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* ==========================================================================
   39. Messagerie
   ========================================================================== */
.messagerie {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: var(--sp-4);
  align-items: start;
}

.messagerie__liste {
  display: grid;
  gap: 4px;
  max-height: 620px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.conv {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: var(--glass);
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease);
}
.conv:hover { background: var(--glass-strong); }
.conv--active { border-color: var(--accent-line); background: var(--accent-soft); }
.conv--nonlu .conv__tete strong { color: var(--text); font-weight: 680; }

.conv__avatar {
  width: 34px; height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 650;
  background: linear-gradient(140deg, var(--accent), #1D4ED8);
}
.conv__corps { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.conv__tete { display: flex; align-items: center; gap: 6px; }
.conv__tete strong {
  font-size: 13.5px;
  font-weight: 570;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
}
.conv__apercu {
  font-size: 12px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conv__quand { font-size: 10.5px; color: var(--text-dim); }

.messagerie__fil {
  display: flex;
  flex-direction: column;
  min-height: 480px;
  max-height: 620px;
  border-radius: var(--r-lg);
  overflow: hidden;
}

.fil-vide {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 13.5px;
}
.fil-vide svg { width: 34px; height: 34px; }

.fil__tete {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-bottom: 1px solid var(--glass-border);
  flex: none;
}
.fil__tete h2 { font-size: 15px; font-weight: 620; }
.fil__tete p {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 46ch;
}
.fil__outils { margin-left: auto; display: flex; gap: var(--sp-2); flex: none; }
.fil__outils .btn { padding: 7px 12px; font-size: 12.5px; }

.ajout-membre { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--glass-border); }
.ajout-membre[hidden] { display: none; }

.fil__messages {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fil__debut, .fil__systeme {
  align-self: center;
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
}
.fil__jour {
  align-self: center;
  margin: var(--sp-2) 0;
  font-size: 11px;
  color: var(--text-dim);
}
.fil__jour span {
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.6);
}

.bulle {
  align-self: flex-start;
  max-width: min(76%, 520px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 13px;
  border-radius: 14px 14px 14px 4px;
  background: rgba(148, 163, 184, 0.13);
  font-size: 13.5px;
  line-height: 1.5;
}
/* Ses propres messages basculent à droite, sur fond accentué. */
.bulle--moi {
  align-self: flex-end;
  border-radius: 14px 14px 4px 14px;
  background: rgba(37, 99, 235, 0.28);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.bulle__auteur { font-size: 11px; font-weight: 620; color: #93B4FF; }
.bulle__texte { color: var(--text); overflow-wrap: anywhere; }
.bulle__heure {
  align-self: flex-end;
  font-size: 10px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.fil__saisie {
  display: flex;
  gap: var(--sp-2);
  align-items: flex-end;
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--glass-border);
  flex: none;
}
.fil__saisie textarea {
  flex: 1 1 auto;
  min-height: 42px;
  max-height: 140px;
  resize: none;
  line-height: 1.5;
}

@media (max-width: 860px) {
  .messagerie { grid-template-columns: 1fr; }
  .messagerie__liste { max-height: 260px; }
  .messagerie__fil { max-height: none; min-height: 420px; }
  .fil__tete p { max-width: 28ch; }
  .bulle { max-width: 88%; }
}

/* ==========================================================================
   40. Synchronisation GLPI
   ========================================================================== */
.sync {
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  border-color: rgba(16, 185, 129, 0.32);
  background:
    linear-gradient(180deg, rgba(16, 185, 129, 0.09), transparent 65%),
    var(--glass);
  display: grid;
  gap: var(--sp-4);
}

.sync__tete { display: flex; gap: var(--sp-4); align-items: flex-start; }
.sync__ico {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  flex: none;
  padding: 11px;
  border-radius: var(--r-md);
  color: #A7F3D0;
  background: rgba(16, 185, 129, 0.14);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.38);
}
.sync__texte h2 { font-size: 15.5px; font-weight: 640; }
.sync__texte p {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.sync__form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: flex-end;
}
.sync__form .field { flex: 1 1 300px; margin: 0; }

.sync__note, .sync__vide {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-dim);
  padding-top: var(--sp-2);
  border-top: 1px dashed var(--glass-border);
}

@media (max-width: 560px) {
  .sync__form .btn { width: 100%; justify-content: center; }
}

/* ==========================================================================
   41. Inventaire : état d'usage, quantité, lisibilité du tableau
   ========================================================================== */
.repartition {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
  padding: 12px var(--sp-4);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  background: var(--glass);
}
.repartition__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.repartition__point {
  width: 9px; height: 9px;
  border-radius: 3px;
  background: var(--c);
  box-shadow: 0 0 10px color-mix(in srgb, var(--c) 55%, transparent);
}
.repartition__item strong {
  font-family: var(--font-num);
  font-size: 14px;
  color: var(--text);
}
.repartition__total {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-dim);
}

/* Pastille d'état, cliquable pour les comptes qui gèrent l'inventaire. */
.etat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 550;
  white-space: nowrap;
  cursor: default;
  background: none;
  font-family: inherit;
}
button.etat { cursor: pointer; transition: filter 0.16s var(--ease); }
button.etat:hover { filter: brightness(1.25); }

.etat__point { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

.etat--disponible { color: #34D399; border-color: rgba(16, 185, 129, 0.42); background: rgba(16, 185, 129, 0.12); }
.etat--utilise    { color: #93B4FF; border-color: var(--accent-line);        background: var(--accent-soft); }
.etat--reserve    { color: #FDE68A; border-color: rgba(245, 158, 11, 0.42);  background: rgba(245, 158, 11, 0.12); }
.etat--hs         { color: #FCA5A5; border-color: rgba(239, 68, 68, 0.42);   background: rgba(239, 68, 68, 0.12); }

.qte__champ {
  width: 62px;
  padding: 5px 8px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xs);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  font-family: var(--font-num);
  font-size: 12.5px;
  text-align: center;
}
.qte__champ:focus { outline: none; border-color: var(--accent-line); }

/* Le tableau devenait illisible passé une dizaine de colonnes : on impose
   une largeur minimale par cellule et on fige la première colonne. */
.tableau td, .tableau th { min-width: 96px; }
.tableau .col-nom  { min-width: 180px; }
.tableau .col-etat { min-width: 120px; }
.tableau .col-qte  { min-width: 68px; text-align: center; }

.tableau .col-nom {
  position: sticky;
  left: 0;
  z-index: 2;
  background: rgba(23, 33, 51, 0.97);
  backdrop-filter: blur(6px);
}
.tableau thead .col-nom { z-index: 3; }
.tableau tbody tr:hover .col-nom { background: rgba(35, 47, 68, 0.98); }

@media (max-width: 860px) {
  .tableau .col-nom { position: static; backdrop-filter: none; }
  .repartition { gap: var(--sp-3); }
  .repartition__total { margin-left: 0; width: 100%; }
}

/* Suppression en lot dans l'inventaire */
.lot {
  display: flex; align-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-3); padding: 10px var(--sp-4);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--r-md); background: rgba(239, 68, 68, 0.09);
}
.lot[hidden] { display: none; }
.lot__compte { font-size: 13px; color: #FECACA; }
.lot__compte strong { font-family: var(--font-num); font-size: 15px; }
.tableau .col-case { min-width: 40px; width: 40px; text-align: center; }
.tableau .col-case input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
