/* Charte alguiso — commune au portail et à la mire de connexion */
[hidden] { display: none !important; }

:root {
  --alg-bg: #0a0e19;
  --alg-surface: rgba(19, 25, 43, 0.72);
  --alg-surface-solid: #131a2b;
  --alg-surface-hover: rgba(28, 36, 60, 0.8);
  --alg-border: rgba(148, 163, 184, 0.14);
  --alg-border-strong: rgba(148, 163, 184, 0.28);
  --alg-text: #e7eaf3;
  --alg-muted: #8b94a9;
  --alg-violet: #7c5cff;
  --alg-cyan: #22d3ee;
  --alg-gradient: linear-gradient(135deg, var(--alg-violet), var(--alg-cyan));
  --alg-radius: 18px;
  --alg-font: "Inter", ui-sans-serif, system-ui, "Segoe UI Variable Text", "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

html {
  background-color: var(--alg-bg);
  background-image:
    radial-gradient(60rem 40rem at 12% -10%, rgba(124, 92, 255, 0.22), transparent 60%),
    radial-gradient(50rem 36rem at 105% 110%, rgba(34, 211, 238, 0.16), transparent 60%),
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
  background-attachment: fixed;
  min-height: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
  color: var(--alg-text);
  font-family: var(--alg-font);
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(124, 92, 255, 0.45); color: #fff; }

/* ---------- Portail ---------- */
.alg-top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(10, 14, 25, 0.6);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--alg-border);
}
.alg-brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: .2px; font-size: 16px; color: var(--alg-text); text-decoration: none; }
.alg-brand img { width: 30px; height: 30px; display: block; }
.alg-brand span { color: var(--alg-muted); font-weight: 500; }
.alg-user { display: flex; align-items: center; gap: 12px; }
.alg-chip { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border: 1px solid var(--alg-border); border-radius: 999px; background: var(--alg-surface); font-size: 14px; }
.alg-avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--alg-gradient); color: #fff; font-weight: 700; font-size: 13px; }
.alg-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--alg-border); background: transparent; color: var(--alg-text);
  font: 500 14px var(--alg-font); text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.alg-btn:hover { background: var(--alg-surface-hover); border-color: var(--alg-border-strong); }
.alg-btn svg { width: 16px; height: 16px; }

.alg-main { max-width: 1040px; margin: 0 auto; padding: clamp(32px, 7vh, 72px) clamp(16px, 4vw, 40px) 48px; }
.alg-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--alg-cyan); margin: 0 0 10px; }
.alg-title { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; margin: 0 0 10px; }
.alg-title em { font-style: normal; background: var(--alg-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.alg-sub { color: var(--alg-muted); margin: 0 0 36px; font-size: 16px; }

.alg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.alg-card {
  position: relative; display: flex; flex-direction: column; gap: 18px;
  padding: 22px; border-radius: var(--alg-radius);
  background: var(--alg-surface); border: 1px solid var(--alg-border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: inherit; text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
  opacity: 0; animation: alg-in .45s ease forwards;
}
.alg-card:hover { transform: translateY(-3px); border-color: var(--alg-border-strong); background: var(--alg-surface-hover); box-shadow: 0 18px 40px -18px var(--glow, rgba(124, 92, 255, .55)); }
.alg-card:focus-visible { outline: 2px solid var(--alg-violet); outline-offset: 3px; }
.alg-card-head { display: flex; align-items: center; justify-content: space-between; }
.alg-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.alg-icon svg { width: 24px; height: 24px; }
.alg-arrow { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--alg-muted); border: 1px solid var(--alg-border); transition: color .2s, background .2s, transform .2s; }
.alg-arrow svg { width: 16px; height: 16px; }
.alg-card:hover .alg-arrow { color: #fff; background: var(--alg-gradient); border-color: transparent; transform: rotate(0deg) scale(1.05); }
.alg-card h2 { margin: 0 0 4px; font-size: 18px; font-weight: 650; }
.alg-card p { margin: 0; color: var(--alg-muted); font-size: 14px; line-height: 1.5; }
.alg-host { font: 500 12px ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--alg-muted); opacity: .8; }
.alg-empty { color: var(--alg-muted); }
.alg-foot { max-width: 1040px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 32px; color: var(--alg-muted); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.alg-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .15); }
.alg-skel { height: 150px; border-radius: var(--alg-radius); background: linear-gradient(90deg, var(--alg-surface) 0%, var(--alg-surface-hover) 50%, var(--alg-surface) 100%); background-size: 200% 100%; animation: alg-shimmer 1.2s linear infinite; border: 1px solid var(--alg-border); }

@keyframes alg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes alg-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .alg-card, .alg-skel { animation: none; opacity: 1; } .alg-card:hover { transform: none; } }
@media (max-width: 560px) { .alg-chip .alg-name { display: none; } .alg-btn .alg-btn-label { display: none; } }
