@charset "UTF-8";
/* TwinModel : habillage du portail de connexion Authelia.
   Injecte par deploy/login-skin/nginx.conf (une balise <link> avant </head>). Aucun script.
   Compatible avec la CSP d'Authelia : fichier du meme domaine, image du meme domaine, pas de style en ligne.
   Cibles : classes statiques de Material UI (.MuiXxx), stables d'une version d'Authelia a l'autre. */

:root {
  --twin-bg: #070b14;
  --twin-text: #e6eefc;
  --twin-muted: #9fb3cf;
  --twin-cyan: #4fc3ff;
  --twin-teal: #00d4c8;
}

html, body { background: var(--twin-bg) !important; color-scheme: dark; }

/* Fond : topologie reseau animee, fixe derriere la page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("/twin-skin/bg.svg") center / cover no-repeat;
}
#root { position: relative; z-index: 1; }

/* Signature en bas a gauche */
body::after {
  content: "TWINMODEL  ·  JUMEAU NUMÉRIQUE RÉSEAU";
  position: fixed;
  left: 28px;
  bottom: 22px;
  z-index: 1;
  pointer-events: none;
  font: 600 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .22em;
  color: #8fd3ff;
  opacity: .8;
  text-shadow: 0 0 14px rgba(79, 195, 255, .55);
}

/* Barre du haut (langue) : transparente */
.MuiAppBar-root {
  background: transparent !important;
  box-shadow: none !important;
  color: var(--twin-muted) !important;
}

/* Carte de connexion : verre depoli */
#root .MuiContainer-maxWidthXs {
  position: relative;
  color: var(--twin-text);
  background: linear-gradient(160deg, rgba(16, 28, 52, .74), rgba(8, 14, 28, .68));
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
  border: 1px solid rgba(110, 200, 255, .20);
  border-radius: 22px;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, .55),
    0 0 60px rgba(40, 160, 255, .10),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  padding: 30px 34px 22px !important;
  animation: twin-rise .7s cubic-bezier(.2, .8, .2, 1) both;
}

/* Titre en degrade */
#root .MuiContainer-maxWidthXs .MuiTypography-h5 {
  font-weight: 700;
  letter-spacing: .02em;
  background: linear-gradient(90deg, #ffffff, #9fe3ff 60%, var(--twin-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
}
#root .MuiContainer-maxWidthXs .MuiTypography-h6,
#root .MuiContainer-maxWidthXs .MuiTypography-body1,
#root .MuiContainer-maxWidthXs .MuiTypography-body2,
#root .MuiContainer-maxWidthXs .MuiFormControlLabel-label { color: var(--twin-text); }

/* Logo : halo et leger flottement */
#root .MuiContainer-maxWidthXs svg:first-of-type,
#root .MuiContainer-maxWidthXs img[alt="Logo"] {
  fill: #fff;
  filter: drop-shadow(0 0 12px rgba(79, 195, 255, .6));
  animation: twin-float 6s ease-in-out infinite;
}

/* Champs */
.MuiOutlinedInput-root {
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .045);
  color: var(--twin-text) !important;
  transition: background .2s, box-shadow .2s;
}
.MuiOutlinedInput-notchedOutline { border-color: rgba(143, 211, 255, .26) !important; }
.MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline { border-color: rgba(143, 211, 255, .50) !important; }
.MuiOutlinedInput-root.Mui-focused {
  background: rgba(79, 195, 255, .07);
  box-shadow: 0 0 0 3px rgba(79, 195, 255, .18);
}
.MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {
  border-color: var(--twin-cyan) !important;
  border-width: 1px !important;
}
.MuiInputBase-input { color: var(--twin-text) !important; }
.MuiInputLabel-root { color: var(--twin-muted) !important; }
.MuiInputLabel-root.Mui-focused { color: #7fd6ff !important; }
.MuiInputAdornment-root, .MuiSvgIcon-root { color: var(--twin-muted); }
.MuiFormHelperText-root { color: var(--twin-muted); }

/* Remplissage automatique du navigateur : garde le fond sombre */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 100px #0e1a30 inset !important;
  -webkit-text-fill-color: var(--twin-text) !important;
  caret-color: #fff;
  transition: background-color 9999s ease-out 0s;
}

/* Boutons */
.MuiButton-contained {
  border-radius: 12px !important;
  font-weight: 700;
  letter-spacing: .04em;
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.MuiButton-containedPrimary {
  background: linear-gradient(135deg, #1e88e5 0%, var(--twin-teal) 100%) !important;
  box-shadow: 0 8px 24px rgba(0, 160, 255, .30) !important;
  color: #fff !important;
}
.MuiButton-contained:hover { transform: translateY(-1px); filter: brightness(1.08); }
.MuiButton-containedPrimary:hover { box-shadow: 0 12px 30px rgba(0, 190, 255, .42) !important; }
.MuiButton-contained.Mui-disabled { opacity: .5; filter: grayscale(.3); }
.MuiButton-text, .MuiLink-root { color: #7fd6ff !important; }
.MuiCheckbox-root { color: var(--twin-muted) !important; }
.MuiCheckbox-root.Mui-checked { color: var(--twin-cyan) !important; }

/* Animations */
@keyframes twin-rise {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
@keyframes twin-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

@media (max-width: 600px) {
  body::after { display: none; }
  #root .MuiContainer-maxWidthXs {
    width: calc(100% - 24px);
    border-radius: 16px;
    padding: 24px 22px 18px !important;
  }
}

/* Mouvement reduit : fond fixe, pas d'animation */
@media (prefers-reduced-motion: reduce) {
  body::before { background-image: url("/twin-skin/bg-static.svg"); }
  #root .MuiContainer-maxWidthXs,
  #root .MuiContainer-maxWidthXs svg:first-of-type,
  #root .MuiContainer-maxWidthXs img[alt="Logo"] { animation: none !important; }
  .MuiButton-contained { transition: none; }
}
