
*,
*::after,
*::before {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  --darkBlue: #0a0f2b;
  --blue: #0079b2;
  --lightBlue: #0079b2;
  --grey: #d1d5db;
  --white: #ffffff;
  --shadow: rgba(0, 0, 0, 0.15);
}

/* body {
  font-family: sans-serif;
  line-height: 1.2;
  color: #444;
  font-weight: 400;
  padding: 2rem;
  background: linear-gradient(120deg, #69bcd7, #0079b2);
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-direction: column;
  font-size: clamp(12px, 1vw, 14px); /* Min 14px, Max 24px, ajusté selon l'écran }*/
 

  body {
  font-family: sans-serif;
  line-height: 1.2;
  color: #444;
  font-weight: 400;
  padding: 2rem;
  background: linear-gradient(120deg, #69bcd7, #0079b2);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* <-- positionne en haut */
  position: relative;
  overflow: hidden;
  font-size: clamp(12px, 1vw, 14px);
}



.title-login{
  margin: 10px;
}

.logo-login {
  display: flex;
  justify-content: center; /* Centre horizontalement */
  align-items: center; /* Centre verticalement si besoin */
  width: 100%; /* Prend toute la largeur pour rester responsive */
}

.boxs {
  max-width: 42rem;
  width: 100%;
  position: relative;
  background: var(--white);
  height: 66rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow);
  transition: transform 0.3s ease-in-out;
  z-index: 10;
  margin: 0 auto;
}

.forms {
  padding: 2rem;
  background: var(--white);
  border-radius: 15px;
  box-shadow: 0 8px 20px var(--shadow);
  position: absolute;
  backface-visibility: hidden;
  transition: all 0.4s ease-in-out;
  z-index: 20;
}

.form__login, .form__signUp {
  width: 100%;
  height: 100%;
}

.form__signUp {
  transform: rotateY(-180deg);
}

.forms h2 {
  margin-bottom: 2rem;
  font-weight: 500;
  font-size: 2rem;
  letter-spacing: 1px;
  color: #444;
  text-align: center;
  position: relative;
}

.forms h2::before {
  content: "";
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  width: 15%;
  height: 4px;
  background-color: var(--blue);
  transform: translateX(-50%);
  transition: width 0.3s ease-in-out;
}

.forms:hover h2::before {
  width: 20%;
}

form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  font-size: 1.6rem;
  position: relative;
}

.log__box {
  position: relative;
  height: 5rem;
  width: 100%;
}

.input-style {
  width: 100%;
  border: 2px solid var(--grey);
  border-radius: 10px;
  outline: none;
  height: 100%;
  padding: 1.5rem 4rem;
  font-size: 1.4rem;
  color: #333;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.log__box input:is(:focus, :valid) {
  border-bottom-color: var(--blue);
  font-size: 1.6rem;
  color: #444;
}

form .i, form .eye {
  font-size: 2rem;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--grey);
  z-index: 5;
}

form .i {
  left: 1.5rem;
}

form .eye {
  right: 1.5rem;
  cursor: pointer;
}

.log__remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
}

form button {
  width: 100%;
  height: 5rem;
  border-radius: 10px;
  background: linear-gradient(120deg, #69bcd7, #0079b2);
  color: var(--white);
  border: none;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 10px var(--shadow);
  transition: transform 0.2s, box-shadow 0.3s;
}

.form__text {
  font-size: 1.2rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.form__text a {
  text-decoration: none;
  color: var(--blue);
  font-weight: 600;
}

input {
  font-family: sans-serif;
}

input[type="checkbox"] {
  accent-color: var(--blue);
}



input:invalid:focus {
  border-bottom: 2px solid red;
}

small {
  font-size: 1rem;
  position: absolute;
  bottom: -30%;
  width: 100%;
  left: 0;
  opacity: 0;
}

.error {
  opacity: 1 !important;
  color: red;
}

button:active {
  background-color: var(--darkBlue);
  transform: translateY(-0.2rem);
  box-shadow: 0 0.2rem 0.5rem var(--shadow);
}

img.header-logo {
  max-width: 100px;
  height: auto;
}

.alert-box {
  background-color: #f44336;
  color: white;
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 5px;
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 300px;
  text-align: center;
}

.toast-box {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 16px;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.toast-box.error {
  background-color: rgba(255, 0, 0, 0.8);
}

.toast-box.success {
  background-color: rgba(0, 128, 0, 0.8);
}

.checkbox-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #ccc;
  border-radius: 4px;
  position: relative;
  margin-right: 10px;
  transition: background-color 0.3s, border-color 0.3s;
  margin: 3px;
}

input[type="checkbox"]:checked {
  background-color: #4caf50;
  border-color: #4caf50;
}

input[type="checkbox"]:checked::before {
  content: "✓";
  color: white;
  font-size: 16px;
  position: absolute;
  top: -5;
  left: 2px;
}

input[type="checkbox"]:checked + label {
  color: #4caf50;
  font-weight: bold;
}

input[type="checkbox"]:not(:checked) + label {
  color: #ccc;
  font-weight: normal;
}

label {
  font-size: 14px;
  display: flex;
  align-items: center;
}

.confirm-icon {
  color: green;
  font-size: 20px;
  position: absolute;
  right: 15%;
  top: 50%;
  transform: translateY(-50%);
}

.error-icon {
  color: red;
  font-size: 20px;
  position: absolute;
  right: 15%;
  top: 50%;
  transform: translateY(-50%);
}


.log__pass {
  position: relative;
}

.log__pass .eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 2;
}


.message-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100px;
  padding: 2px;
  margin: 2px;
  max-width: 600px;
  text-align: center;
  font-style: inherit;
}

.message-container p {
  color: #444;
  font-size: 15px;
  font-family: sans-serif;
  line-height: 1.2;
  font-weight: 400;
}


.nav-links {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9em;
  color: #666;
}

.nav-links a {
  color: #666;
  text-decoration: none;
  margin: 0 8px;
  padding: 0 5px;
}

.nav-links a:first-child {
  border-left: none;
}

.nav-links a:hover {
  text-decoration: underline;
  color: #007BFF;
}


/* Responsivité */
@media screen and (max-width: 768px) {


  /* .title-login{
  margin-top: 20px;
} */

.boxs {
  height: 58rem;}

.forms {
  padding: 1rem;}

  .message-container {
    min-height: 100px;
    padding: 5px;
  }

  .message-container p {
    color: #444;
    font-size: 14px;
  }}


  @media (max-width: 480px) {

  
    .message-container {
      min-height: 80px;
    }

  
  }
  