/* Reset et base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Roboto', sans-serif;
  background-color: #121212;
  color: #f0f0f0;
  padding: 2rem;
  animation: fadeIn 1s ease;
}

/* Conteneur */
.container {
  max-width: 600px;
  margin: auto;
  background: #1e1e1e;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  animation: slideIn 0.6s ease-out;
}

/* Titre */
h1 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #ffffff;
}

/* Formulaire */
form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* Étiquettes */
label {
  font-weight: bold;
  margin-bottom: 0.25rem;
  color: #cccccc;
}

/* Champs */
input[type="text"],
select {
  padding: 0.65rem;
  border: 1px solid #444;
  border-radius: 6px;
  font-size: 1rem;
  background-color: #2c2c2c;
  color: #f0f0f0;
  transition: border 0.3s, background-color 0.3s;
}

input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: #66b0ff;
  background-color: #333;
}

/* Bouton année*/
.bouton-annee {
  background-color: #ff9800;
  color: #121212;
  border: none;
  padding: 12px 22px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(255, 152, 0, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
}

.bouton-annee:hover {
  background-color: #ffc107;
  box-shadow: 0 0 25px rgba(255, 193, 7, 0.6);
  transform: scale(1.05);
}

/* Bouton */
input[type="submit"],
button {
  padding: 0.8rem;
  background-color: #007BFF;
  border: none;
  border-radius: 6px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 4px 12px rgba(0,123,255,0.2);
}

input[type="submit"]:hover,
button:hover {
  background-color: #339aff;
  transform: scale(1.02);
  box-shadow: 0 6px 18px rgba(0,123,255,0.4);
}

input[type="submit"]:active,
button:active {
  transform: scale(0.98);
  box-shadow: 0 3px 10px rgba(0,123,255,0.2);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideIn {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Pied de page */
footer {
  margin-top: 2rem;
  text-align: center;
  color: #888;
  font-size: 0.85rem;
}

/* Message succès */
.success-message {
  background-color: #1f3b1f;
  color: #a5f7a5;
  border: 1px solid #3b804b;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  animation: slideFade 0.5s ease-in-out;
  font-size: 1rem;
}

@keyframes slideFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loader {
      display: none;
      margin: 1rem auto;
      border: 6px solid #444;
      border-top: 6px solid #00ffcc;
      border-radius: 50%;
      width: 40px;
      height: 40px;
      animation: spin 1s linear infinite;
    }

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

    .success-message {
      background-color: #1f3b1f;
      color: #a5f7a5;
      border: 1px solid #3b804b;
      padding: 1rem;
      border-radius: 6px;
      margin-bottom: 1.5rem;
      animation: slideFade 0.5s ease-in-out;
      font-size: 1rem;
    }
    
    /* Spinner loader */
.loading {
  margin-top: 20px;
  text-align: center;
}

.spinner {
  border: 4px solid #2a2a2a;
  border-top: 4px solid #4caf50;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

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

.message {
  margin-top: 20px;
  color: #4caf50;
  font-weight: bold;
} 

.loading-bar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1.5rem;
  gap: 0.5rem;
}

.loading-bar-wrapper {
  width: 250px;
  height: 10px;
  background-color: #333;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #09f, #4fcbff);
  border-radius: 5px;
  transition: width 0.2s ease-in-out;
}

.loading-text {
  color: #ccc;
  font-size: 14px;
  font-style: italic;
}

.login-box {
            width: 360px;
            padding: 30px;
            background: #000000;
            border-radius: 8px;
            box-shadow: 0 0 15px rgba(0,0,0,.2);
            text-align: center;
        }
        .login-box input {
            width: 100%;
            padding: 10px;
            margin-top: 15px;
        }
        .login-box button {
            width: 100%;
            padding: 10px;
            margin-top: 20px;
        }
        .error {
            color: red;
            margin-top: 10px;
        }