/* -------- Structure générale -------- */
body {
  background: linear-gradient(135deg, #434549, #1a1e24);
  min-height: 100vh;
  margin: 0;
  font-family: "Segoe UI", Roboto, sans-serif;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

/* -------- Effet arrière-plan animé -------- */
body::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 25% 25%, #fdd82f22 0, transparent 40%),
              radial-gradient(circle at 75% 75%, #ffffff11 0, transparent 40%);
  animation: rotateBg 25s linear infinite;
  z-index: 0;
}

@keyframes rotateBg {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* -------- Logo + Titre -------- */
.header-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
  position: relative;
  top: -40px;
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.header-logo {
  width: 100px;
  height: auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(253, 216, 47, 0.5);
}

.header-icon { width: 50px; height: auto; }

.header-title h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  text-align: center;
  text-shadow: 0 0 8px #fdd82f77, 0 0 20px #fdd82f33;
}


.logo-wrapper {
  margin-bottom: 2rem;
}

.logo-wrapper h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  text-align: center;
  margin-top: 1rem;
}


/* --- Responsive --- */
@media (max-width: 480px) {
  .header-logo {
    width: 70px;
    /* logo plus petit sur mobile */
  }

  .header-icon {
    width: 35px;
    /* icône plus petite */
  }

  .logo-container {
    gap: 5px;
    /* réduire l’espace entre logo et icône */
  }

 

  .login-card {
    padding: 2rem 1.5rem;
  }
}

/* -------- Carte de connexion -------- */
.login-card {
  background: rgba(31, 31, 31, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7),
              0 0 20px rgba(253, 216, 47, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.6s ease-in-out;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8),
              0 0 25px rgba(253, 216, 47, 0.25);
}

/* -------- Spécifiques -------- */
.login-page .login-card { max-width: 480px; }   /* page login classique */
.main-login-page .login-card { max-width: 600px; } /* page SSO */


/* -------- Boutons principaux -------- */
.btn {
  display: inline-flex;           /* pour aligner icône + texte sur une ligne */
  align-items: center;            /* centre verticalement */
  justify-content: center;        /* centre horizontalement */
  gap: 0.6em;                     /* espace icône/texte */
  width: 400px;                   /* largeur fixe */
  max-width: 100%;                /* responsive pour mobile */
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  transition: all 0.4s ease;
  margin: 1rem auto;              /* espace vertical et centrage horizontal */
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6);
}

/* Bouton Okta SSO */
.btn-primary {
  background: linear-gradient(135deg, #007bff, #5ca4f1, #407fc2);
  color: #000;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0056b3, #3a7ec2, #2e66a0);
}

/* Bouton utilisateur externe */
.btn-external-user {
  background: linear-gradient(135deg, #a08e48, #cab45d);
  color: #000;
  border: none;
}

.btn-external-user:hover {
  background: linear-gradient(135deg, #e6c800, #d4b800);
}


.btn-icon {
  width: 1.3em;
  height: 1.3em;
  display: inline-block;
}

/* -------- Bouton Login -------- */
.btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffdd33, #fdd82f, #ffea80);
  background-size: 200% auto;
  color: #080808;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  transition: all 0.4s ease;
  margin-top: 1rem;
  text-decoration: none;
}

.btn-login:hover {
  background-position: right center;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6),
    0 0 18px rgba(253, 216, 47, 0.5);
}




/* -------- Champs de formulaire -------- */
.login-card form {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.login-card input.form-control {
  width: 100%;
  padding: 0.9rem 1rem;
  margin-bottom: 1.2rem;
  border-radius: 14px;
  border: 1px solid #333;
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}


.form-control:focus {
  border: 1px solid #fdd82f;
  box-shadow: 0 0 12px rgba(253, 216, 47, 0.7);
  outline: none;
  background-color: rgba(255, 255, 255, 0.12);
}

.login-card .alert {
  width: 100%;
  background-color: #fdd82f;
  color: #222;
  border-radius: 8px;
  padding: 0.9rem 1.2rem;
  margin-bottom: 1.2rem;
  text-align: left;
  font-weight: 500;
}



/* -------- Footer -------- */
.login-footer {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #aaa;
  letter-spacing: 0.5px;
  text-align: center;
  text-decoration: none;
}

.login-footer a {
  color: #fdd82f;
  text-decoration: none;
}

/* -------- Texte d’aide -------- */
.form-help {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: #ccc;
  text-align: center;
}


.form-help a {
  color: #fdd82f;
  text-decoration: none;
  transition: color 0.3s ease;
}

.form-help a:hover {
  text-decoration: underline;
  color: #ffe770;
}

/* -------- Separator -------- */
.separator {
  margin: 1.5rem 0;
  font-weight: 500;
  color: #ccc;
  position: relative;
  width: 100%;
  text-align: center;
}

.separator::before,
.separator::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #555;
}

.separator::before { left: 0; }
.separator::after { right: 0; }

.separator span {
  background: rgba(31, 31, 31, 0.8);
  padding: 0 10px;
  position: relative;
  z-index: 1;
}

/* -------- Animations -------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
