/* ============================================================================
   SCIE — Portail d'accès · Styles
   Design repris de la maquette Claude Design « Dashboard applications SCIE »
   (Poppins + Space Mono, navy #132a73 / bleu #3f6fe6).
   ============================================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Poppins', sans-serif;
  color: #132a73;
  -webkit-font-smoothing: antialiased;
}
a { color: #3f6fe6; text-decoration: none; }
a:hover { color: #132a73; }

/* ── Bascule des vues (login / dashboard) ────────────────────────────────── */
.view { display: none; }
.view.active { display: flex; }

/* ── Ossature écran ──────────────────────────────────────────────────────── */
.c-screen { width: 100vw; min-height: 100vh; background: #f5f6f9; overflow: hidden; }

/* ── Panneau gauche (navy) ───────────────────────────────────────────────── */
.c-left {
  width: 460px; flex: none;
  background: radial-gradient(120% 90% at 30% 15%, #2a54d4 0%, #1e3fa8 42%, #132a73 100%);
  color: #fff; padding: 52px 48px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
/* Fond constellation animé (canvas) — repris de scie-cablage.com */
.c-constellation { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* Wordmark SCIE (gros, comme la maquette) */
.brand { position: relative; z-index: 1; }
.brand-word {
  display: block; font-weight: 800; line-height: .82; letter-spacing: -.02em;
  font-size: clamp(72px, 8.8vw, 128px);
}

.c-left .tag { margin-top: auto; position: relative; z-index: 1; }
.c-left .tag h2 {
  margin: 0; font-size: 40px; line-height: 1.02; font-weight: 800;
  text-transform: uppercase; letter-spacing: -.01em;
}
.c-left .subtag {
  position: relative; margin-top: 16px; font-size: 15px; font-weight: 400;
  line-height: 1.5; color: rgba(255,255,255,.72); max-width: 320px;
}

/* Carte utilisateur (bas du panneau) */
.c-uc {
  position: relative; z-index: 1; margin-top: 36px; padding: 20px 22px;
  border: 1px solid rgba(255,255,255,.22); border-radius: 16px;
  display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.06);
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #1e3fa8;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; flex: none; letter-spacing: .02em;
  background-size: cover; background-position: center;
}
.c-uc .who { min-width: 0; }
.c-uc .who .n { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-uc .who .e { font-size: 12px; color: rgba(255,255,255,.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-uc .out {
  margin-left: auto; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.85);
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px; flex: none;
}
.c-uc .out:hover { color: #fff; }

/* ── Zone centrale du panneau (accroche), centrée ── */
.c-mid{ position:relative; z-index:1; flex:1 1 auto; display:flex; flex-direction:column;
  justify-content:center; }
.c-mid .tag{ margin-top:0; }   /* annule le margin-top:auto hérité (vue connexion) */

/* ── Panneau droit ───────────────────────────────────────────────────────── */
.c-right { flex: 1; padding: 56px 60px 40px; display: flex; flex-direction: column; overflow-y: auto; }
.c-rtop { margin-bottom: 30px; }
.date { font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: #8a93a6; }
.c-right h1 {
  margin: 10px 0 0; font-size: 44px; font-weight: 800; letter-spacing: -.01em;
  text-transform: uppercase; line-height: 1; color: #132a73;
}
.c-right h1 em { font-style: normal; color: #3f6fe6; }

/* Stats */
.c-stats { display: flex; gap: 16px; margin-bottom: 32px; }
.c-stat { flex: 1; background: #fff; border: 1px solid rgba(19,42,115,.08); border-radius: 16px; padding: 18px 20px; }
.c-stat .v { font-weight: 800; font-size: 24px; color: #132a73; line-height: 1; }
.c-stat .l { font-size: 12px; color: #8a93a6; font-weight: 500; margin-top: 6px; }

.c-seclabel { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8a93a6; margin-bottom: 18px; }

/* Liste des applications */
.c-list { display: flex; flex-direction: column; gap: 18px; }
.c-row {
  display: flex; align-items: center; gap: 22px; padding: 24px 26px;
  background: #fff; border: 1px solid rgba(19,42,115,.08); border-radius: 20px;
  cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s;
  text-decoration: none; color: inherit; position: relative; overflow: hidden;
}
.c-row:before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: var(--accent, #3f6fe6); transform: scaleY(0); transition: transform .18s;
}
.c-row:hover { transform: translateY(-3px); box-shadow: 0 22px 44px -28px rgba(19,42,115,.55); border-color: rgba(63,111,230,.35); }
.c-row:hover:before { transform: scaleY(1); }
.appicon {
  width: 60px; height: 60px; font-weight: 800; font-size: 16px; border-radius: 16px;
  background: linear-gradient(140deg, var(--accent, #3f6fe6), #132a73);
  color: #fff; display: flex; align-items: center; justify-content: center;
  flex: none; letter-spacing: .02em; overflow: hidden;
}
.appicon.has-logo { background: #fff; border: 1px solid rgba(19,42,115,.1); padding: 8px; }
.appicon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.c-rbody { flex: 1; min-width: 0; }
.c-rhead { display: flex; align-items: center; gap: 10px; }
.c-row h3 { margin: 0; font-size: 22px; font-weight: 700; color: #132a73; }
.c-cat {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent, #3f6fe6); background: color-mix(in srgb, var(--accent, #3f6fe6) 12%, transparent);
  padding: 4px 9px; border-radius: 6px;
}
.c-row p { margin: 7px 0 11px; color: #5a6274; font-size: 14px; font-weight: 400; line-height: 1.4; }
.c-rmeta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.c-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #188a52; }
.c-pill .d { width: 7px; height: 7px; border-radius: 50%; background: #22b268; }
.c-last { font-size: 12px; color: #9aa2b3; font-weight: 500; }
.c-open {
  flex: none; display: flex; align-items: center; gap: 8px; background: #132a73; color: #fff;
  font-weight: 600; font-size: 13px; padding: 12px 22px; border-radius: 999px; transition: background .18s;
}
.c-row:hover .c-open { background: var(--accent, #3f6fe6); }

/* Aucun accès */
.no-apps {
  background: #fff; border: 1px dashed rgba(19,42,115,.2); border-radius: 20px;
  padding: 40px 32px; text-align: center; color: #5a6274; font-size: 15px; line-height: 1.6;
}
.no-apps strong { color: #132a73; }

/* Note bas de page */
.c-note { margin-top: auto; padding-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; color: #8a93a6; font-weight: 500; }
.c-note .help {
  display: inline-flex; align-items: center; gap: 8px; background: #fff;
  border: 1px solid rgba(19,42,115,.1); border-radius: 999px; padding: 10px 18px;
  color: #132a73; font-weight: 600;
}

/* ── Écran de connexion ──────────────────────────────────────────────────── */
.login-right { align-items: center; justify-content: center; }
.login-card { width: 100%; max-width: 400px; margin: auto; text-align: left; }
.login-card .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8a93a6; margin-bottom: 12px; }
.login-card h1 { margin: 0; font-size: 40px; font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; line-height: 1; color: #132a73; }
.login-card p { margin: 16px 0 32px; color: #5a6274; font-size: 15px; line-height: 1.55; }
#gbtn { min-height: 44px; display: flex; }
#gbtn.center { justify-content: flex-start; }
.login-hint { margin-top: 18px; font-size: 13px; color: #8a93a6; display: flex; align-items: center; gap: 8px; }
.login-hint b { color: #132a73; font-weight: 600; }
.login-error {
  margin-top: 20px; padding: 14px 16px; border-radius: 12px;
  background: #fdecec; border: 1px solid #f3b4b4; color: #b2322f;
  font-size: 13px; font-weight: 500; line-height: 1.45;
}
.login-warn {
  margin-top: 20px; padding: 16px; border-radius: 12px;
  background: #fff7e8; border: 1px solid #f0d089; color: #8a5a00;
  font-size: 13px; font-weight: 500; line-height: 1.5;
}
.login-warn code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .c-screen { flex-direction: column; }
  .c-left { width: 100%; padding: 32px 28px; min-height: auto; }
  .c-left .tag { margin-top: 28px; }
  .c-left .tag h2 { font-size: 30px; }
  .c-uc { margin-top: 24px; }
  .c-right { padding: 32px 28px; }
  .c-right h1 { font-size: 34px; }
  .c-stats { flex-wrap: wrap; }
  .c-stat { min-width: 140px; }
  .c-row { flex-wrap: wrap; }
  .c-open { margin-left: auto; }
  .login-right { align-items: stretch; }
}
