/* ==========================================================================
   🏛️ 0X DESIGN SYSTEM - FEUILLE DE STYLE GLOBALE SOUVERAINE (CDN MASTER)
   URL : https://assets.uhgid.com/css/0x-theme.css
   Cibles : 0X Identity (Keycloak & Next.js), Gitea, Nextcloud, Roundcube, Apps
   ========================================================================== */

/* Import de la typographie officielle de l'écosystème */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Montserrat:wght@700;800;900&display=swap');

:root {
  /* ------------------------------------------------------------------------
     1. PALETTE ORBITALE OFFICIELLE (Extraite du blason 0x-id.svg)
     ------------------------------------------------------------------------ */
  --0x-neon-cyan: #00E5FF;
  --0x-neon-blue: #4D8DFF;
  --0x-neon-purple: #9B4DFF;
  --0x-sovereign-blue: #0b57d0;
  --0x-sovereign-blue-hover: #0842a0;
  --0x-google-blue: #1a73e8;

  /* Dégradés officiels de la marque 0X */
  --0x-orbital-gradient: linear-gradient(135deg, #00c6ff 0%, #0b57d0 50%, #7c3aed 100%);
  --0x-cyber-gradient: linear-gradient(90deg, var(--0x-neon-blue), var(--0x-neon-purple));

  /* ------------------------------------------------------------------------
     2. UNIVERS CITOYEN "DAYLIGHT" (0X Identity, SSO, Espace Compte, Mail)
     ------------------------------------------------------------------------ */
  --0x-light-bg: #f0f4f9;
  --0x-light-surface: #ffffff;
  --0x-light-header: #f8f9fa;
  --0x-light-input-bg: #f1f3f4;
  --0x-light-border: #e2e8f0;
  --0x-text-primary: #1f1f1f;
  --0x-text-secondary: #5f6368;

  /* Rayons et ombres standard 0X (Design Split-Card) */
  --0x-radius-card: 28px;
  --0x-radius-input: 12px;
  --0x-radius-pill: 9999px;
  --0x-shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.03);
  --0x-shadow-popover: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08);

  /* ------------------------------------------------------------------------
     3. UNIVERS BUNKER "DARK OPS" (Gitea, Portainer, Console SecOps)
     ------------------------------------------------------------------------ */
  --0x-dark-bg: #05060A;
  --0x-card-bg: rgba(5, 6, 10, 0.85);
  --0x-text-light: #E5E7EB;
  --0x-text-muted: #94A3B8;

  /* ------------------------------------------------------------------------
     4. TYPOGRAPHIES MAÎTRESSES & ASSETS CDN
     ------------------------------------------------------------------------ */
  --0x-font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --0x-title-family: 'Montserrat', sans-serif;
  --0x-logo-id-url: url('https://assets.uhgid.com/svg/brand/0x-id.svg');
}

/* ==========================================================================
   SIGNATURE TYPOGRAPHIQUE & COMPOSANTS UNIVERSELS "0X COMPTE"
   ========================================================================== */

/* Signature "0X" avec le dégradé exact du logo orbital 0x-id.svg */
.ox-brand-mark {
  font-family: var(--0x-title-family);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--0x-orbital-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

/* Libellé "Compte" / "Identity" associé à .ox-brand-mark */
.ox-brand-label {
  font-family: var(--0x-font-family);
  font-weight: 400;
  color: var(--0x-text-secondary);
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

/* Carte souveraine standard (Keycloak & Next.js) */
.ox-card-sovereign {
  background-color: var(--0x-light-surface);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--0x-radius-card);
  box-shadow: var(--0x-shadow-card);
}

/* Bouton primaire citoyen (Pilule bleue 0X) */
.btn-0x-sovereign {
  background-color: var(--0x-sovereign-blue);
  color: #ffffff;
  font-family: var(--0x-font-family);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.625rem 1.5rem;
  border-radius: var(--0x-radius-pill);
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-0x-sovereign:hover {
  background-color: var(--0x-sovereign-blue-hover);
  box-shadow: 0 1px 3px rgba(11, 87, 208, 0.3);
}

/* Bouton primaire Bunker / Cyber (Gitea & Dark Apps) */
.btn-0x-primary {
  background: var(--0x-cyber-gradient);
  color: white;
  border-radius: 8px;
  border: none;
  font-family: var(--0x-font-family);
  font-weight: 700;
  transition: all 0.3s ease;
  padding: 12px 24px;
  cursor: pointer;
}

.btn-0x-primary:hover {
  background: linear-gradient(90deg, var(--0x-neon-cyan), var(--0x-neon-blue));
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
  color: var(--0x-dark-bg);
}

/* ==========================================================================
   SÉLECTEURS DE FALLBACK KEYCLOAK (Thèmes Admin / Legacy PatternFly)
   ========================================================================== */

body.login-pf-page {
  background-color: var(--0x-dark-bg) !important;
  background-image: radial-gradient(circle at center, #0a1128 0%, var(--0x-dark-bg) 100%) !important;
  font-family: var(--0x-font-family) !important;
  color: var(--0x-text-light) !important;
}

#kc-header-wrapper {
  font-size: 0 !important;
  background-image: var(--0x-logo-id-url);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  height: 120px;
  width: 100%;
  display: block;
  margin-bottom: 20px;
}

.login-pf-page .card-pf {
  background: var(--0x-card-bg) !important;
  border: 1px solid var(--0x-neon-blue) !important;
  border-radius: 12px !important;
  box-shadow: 0 0 25px rgba(77, 141, 255, 0.15) !important;
  backdrop-filter: blur(10px);
}

#kc-page-title {
  font-family: var(--0x-title-family) !important;
  font-weight: 700 !important;
  color: var(--0x-neon-cyan) !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
}

.form-control {
  background: rgba(0, 0, 0, 0.5) !important;
  border: 1px solid var(--0x-neon-blue) !important;
  color: var(--0x-neon-cyan) !important;
  border-radius: 8px !important;
  padding: 12px !important;
  font-family: var(--0x-font-family) !important;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--0x-neon-cyan) !important;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3) !important;
  outline: none !important;
}

.kcButtonPrimary {
  background: var(--0x-cyber-gradient) !important;
  color: white !important;
  border-radius: 8px !important;
  border: none !important;
  font-family: var(--0x-font-family) !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 12px !important;
  transition: all 0.3s ease !important;
}

.kcButtonPrimary:hover {
  background: linear-gradient(90deg, var(--0x-neon-cyan), var(--0x-neon-blue)) !important;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.4) !important;
  color: var(--0x-dark-bg) !important;
}

.login-pf-page .login-pf-settings a,
#kc-registration a {
  color: var(--0x-text-muted) !important;
  text-decoration: none !important;
  transition: color 0.3s ease;
}

.login-pf-page .login-pf-settings a:hover,
#kc-registration a:hover {
  color: var(--0x-neon-cyan) !important;
}
