/* ==========================================================================
   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 { width: 100%; height: 100%; display: block; }
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: 4px; }

.nav__link {
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--text-muted);
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.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 { padding-right: var(--sp-4); }
.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: 46ch; 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; }
.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; text-align: center; }
  .auth__pitch .brand__mark--lg { margin: 0 auto; }
  .auth__lead { margin: 0 auto; }
  .auth__list { max-width: 300px; margin-inline: auto; text-align: left; }
}

@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.3s var(--ease-out), opacity 0.2s var(--ease);
    opacity: 0;
  }
  .nav.is-open { max-height: 320px; opacity: 1; padding-top: var(--sp-3); }
  .nav__link { padding: 12px 14px; }

  .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); }
