/* ==============================
   Structure principale
   ============================== */
body {
  font-family: Arial, sans-serif;
  background: radial-gradient(ellipse at 20% 50%, #0a0e2a 0%, #020510 50%, #000308 100%);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.profil {
  background: white;
  max-width: 500px;
  width: 90%;
  margin: 100px auto 60px;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(26, 74, 138, 0.5), 0 0 8px rgba(26, 74, 138, 0.3);
  height: auto !important;
  min-height: unset !important;

}

.background-photo2 {
  height: 150px;
  background-image: url('background2.jpg');
  background-size: cover;
  background-position: center;
  border-radius: 10px 10px 0 0;
}

.profile-info {
  padding: 20px 40px 8px;
  text-align: center;
  box-sizing: border-box;
}

.profile-info h1 {
  margin: 0 0 25px 0;
}

/* ==============================
   Formulaire
   ============================== */
.profile-info form {
  text-align: left;
  max-width: 100%;
  margin: 0 auto;
}

.profile-info label {
  display: block;
  margin-top: 15px;
  font-weight: bold;
  font-size: 15px;
}

/* ==============================
   Inputs (Pseudo, Email, MDP)
   ============================== */
.profile-info input[type="text"],
.profile-info input[type="email"],
.profile-info input[type="password"] {
  display: block;
  width: 100%;
  height: 42px;             /* hauteur uniforme */
  padding: 10px 12px;       /* centre le texte tapé */
  margin-top: 6px;
  font-size: 16px;          /* texte tapé légèrement plus petit */
  line-height: 22px;        /* aligne verticalement le texte tapé */
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  background-color: #f9f9f9;
}

/* Texte tapé uniquement dans le pseudo */
.profile-info input#pseudo {
    font-size: 15px;   /* réduit la taille du texte tapé */
}

/* ==============================
   Placeholder "Ton pseudo" uniquement
   ============================== */
/* Placeholder "Ton pseudo" uniquement */
.profile-info input#pseudo::placeholder {
    font-size: 15px;           /* taille du placeholder */
    line-height: 42px;          /* égal à la hauteur de l'input pour centrer verticalement */
    color: #999;
    opacity: 1;
}

/* Placeholder autres champs */
.profile-info input[type="email"]::placeholder,
.profile-info input[type="password"]::placeholder {
    font-size: 14px;                  /* taille normale */
    line-height: 42px;                /* centré verticalement */
    color: #999;
    opacity: 1;
}

/* ==============================
   MASQUER L'ICÔNE NATIVE DU NAVIGATEUR
   ============================== */
/* Masquer l'icône native du navigateur pour les champs password */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}

input[type="password"]::-webkit-contacts-auto-fill-button,
input[type="password"]::-webkit-credentials-auto-fill-button {
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  right: 0;
}

/* ==============================
   Mot de passe wrapper
   ============================== */
/* Mot de passe : espace pour le bouton œil */
.password-wrapper {
  position: relative;
  width: 100%;
  margin-top: 6px;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
  padding-right: 40px; /* espace pour le bouton œil */
}

/* Bouton œil */
.password-wrapper button#toggle-password {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 18px;
  color: #555;
  cursor: pointer;
  user-select: none;
}

.password-wrapper button#toggle-password:hover {
  color: #1a4a8a;
}

/* ==============================
   Bouton soumettre
   ============================== */
.profile-info button[type="submit"] {
  width: 100%;
  margin-top: 30px;
  margin-bottom: 0;
  padding: 14px;
  font-size: 16px;
  background-color: #1a4a8a;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.profile-info button[type="submit"]:hover {
  background-color: #0d2b5e;
}

/* ==============================
   Messages
   ============================== */
#error,
.success {
  font-size: 0.9em;
  margin-top: 15px;
  text-align: center;
}

#error {
  color: red;
}

.success {
  color: green;
}

/* ==============================
   Lien vers connexion
   ============================== */
.link-login {
  margin-top: 6px;
  margin-bottom: 6px;
  font-size: 0.9em;
  text-align: center;
}

.link-login p {
  margin: 0;
  padding: 0;
}

.link-login a {
  color: #1a4a8a;
  text-decoration: none;
}

.link-login a:hover {
  text-decoration: underline;
}

/* ==============================
   Responsive
   ============================== */
@media screen and (max-width: 480px) {
  .profil {
    width: 95%;
    margin: 20px auto 40px;
  }

  .profile-info {
    padding: 20px;
  }
}