
* { box-sizing: border-box; }

html, body {
  height: 100%;
}

/* 1) Base globale (alignée sur la page publique) */
body{
  font-family: 'Open Sans', Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #004080;
  background-image:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23ffffff" opacity="0.03" viewBox="0 0 640 512"><path d="M480 192h-128L288 64h-64l32 128H64c-35.3 0-64 28.7-64 64 0 35.3 28.7 64 64 64h192l-32 128h64l64-128h128c35.3 0 64-28.7 64-64 0-35.3-28.7-64-64-64z"/></svg>');
  background-repeat: repeat;
  background-size: 100px 100px;
  color: #111;
}

/* 2) Header & footer (mêmes tons) */
header, .site-header {
  background-color: rgb(0, 0, 102);
  color: #fff;
  padding: 1rem 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}

.header-content .logo {
  max-width: 50px;
  height: auto;
}

header h1 {
  font-size: .95rem;
  margin: 0;
  line-height: 1.2;
  font-weight: 700;
  text-align: center;
}

footer, .site-footer {
  background-color: rgb(0, 0, 102);
  color: #fff;
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
  margin-top: auto;
}

/* 3) Mise en page principale */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* 4) Carte du formulaire */
.form-box {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 1.5rem;
  border-radius: 1rem;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 5) Titres/texte d’aide */
.form-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.login-sub {
  text-align: center;
  color: #333;
  font-size: .95rem;
  margin-bottom: 1rem;
}

/* 6) Groupes de champs */
.input-group {
  margin-bottom: .9rem;
}

.input-label {
  display: block;
  font-weight: 600;
  margin-bottom: .35rem;
}

/* Ligne avec icône à gauche + input */
.input-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

.input-wrap .fa {
  background-color: #fff;
  border: 1px solid #dfe3eb;
  border-right: 0;
  border-radius: .6rem 0 0 .6rem;
  width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

/* Champ texte/email/password */
.input-field {
  flex: 1 1 auto;
  background-color: #fff;
  border: 1px solid #dfe3eb;
  border-radius: 0 .6rem .6rem 0;
  padding: .75rem .9rem;
  line-height: 1.4;
  outline: none;
  transition: box-shadow 0.15s, border-color 0.15s;
  min-width: 0; /* évite l’overflow dans flex */
}

.input-field:focus {
  border-color: #8aa7ff;
  box-shadow: 0 0 0 3px rgba(138,167,255,0.25);
}

/* 7) Bouton oeil pour le password */
.toggle-password {
  position: absolute;
  right: .5rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: .25rem;
  line-height: 1;
  color: #666;
}

.toggle-password:focus {
  outline: 2px solid rgba(138,167,255,0.5);
  outline-offset: 2px;
}

/* 8) Bouton primaire */
.btn-primary,
input[type="submit"].btn-primary {
  display: inline-block;
  background-color: rgb(0, 0, 102);
  border: 1px solid rgb(0, 0, 102);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: .6rem;
  text-transform: none;
  cursor: pointer;
  transition: filter 0.15s, transform 0.02s ease-in-out;
}

.btn-primary:hover,
input[type="submit"].btn-primary:hover {
  filter: brightness(0.92);
}

.btn-primary:active,
input[type="submit"].btn-primary:active {
  transform: translateY(1px);
}

/* 9) Erreurs/feedback */
.text-danger {
  display: block;
  color: #b00020;
  margin-top: .25rem;
  font-size: .9rem;
}

/* 10) Responsive */
@media (max-width: 768px) {
  .form-box { padding: 1.25rem; }

  .header-content {
    flex-direction: column;
  }

  .header-content .logo {
    margin-bottom: .35rem;
  }
}

@media (max-width: 480px) {
  .input-wrap .fa {
    width: 44px;
    font-size: 1rem;
  }
  .toggle-password { right: .35rem; }
}

.alert-message {
  background-color: #ffe5e5;
  color: #b00020;
  padding: 0.75rem 1rem;
  border-left: 4px solid #b00020;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  text-align: center;
  font-weight: 600;
  transition: opacity 0.5s ease; /* 👈 pour une transition fluide */
}


