* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: radial-gradient(circle at 50% 0, #fff 0, #ddd 100%);
  color: #333;
}

.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 10px;
  flex-wrap: wrap;
}

.logo {
  height: 60px;
  max-width: 80px;
  object-fit: contain;
}

.header-title {
  text-align: center;
  flex: 1;
  min-width: 200px;
}

.header-title h1 {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

.header-title h2 {
  font-size: 16px;
  font-weight: 400;
  margin: 4px 0 0 0;
  color: #555;
}

.notice {
  background-color: #d4edf5;
  padding: 15px;
  text-align: center;
  border-radius: 4px;
  font-size: 14px;
  margin: 20px 0 10px 0;
  width: 100%;
}

.notice a {
  color: #005ea6;
  text-decoration: underline;
}

.alert {
  background-color: #fff3cd;
  padding: 10px;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
  color: #856404;
  width: 100%;
  margin-bottom: 20px;
}

.login-form {
  background-color: #fff;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  padding: 25px;
  width: 100%;
}

.tabs {
  display: flex;
  margin-bottom: 15px;
}

.tab {
  flex: 1;
  padding: 6px 12px;
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-bottom: none;
  cursor: pointer;
  font-size: 14px;
  text-align: center;
}

.tab.active {
  background: white;
  font-weight: bold;
  border-bottom: 2px solid white;
}

.form-group {
  margin-bottom: 15px;
  position: relative;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: #005ea6;
  outline: none;
}

.captcha-container {
  display: flex;
  flex-direction: column;
}

.captcha-img {
  height: 45px;
  object-fit: contain;
  margin: 8px 0;
  border: 1px solid #ccc;
  background-color: #f7f7f7;
}

.refresh-captcha {
  position: absolute;
  top: 45px;
  right: 10px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #005ea6;
}

.form-checkbox {
  display: flex;
  align-items: center;
  font-size: 14px;
}

.form-checkbox input {
  margin-right: 8px;
}

.btn {
  width: 100%;
  padding: 10px;
  border: none;
  margin-top: 10px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.btn.primary {
  background-color: #198754;
  color: white;
}

.btn.secondary {
  background-color: #6c757d;
  color: white;
}

.btn.portal {
  background-color: #0d6efd;
  color: white;
  width: 200px;
  margin-top: 20px;
}

footer {
  font-size: 13px;
  margin-top: 30px;
  text-align: center;
  color: #666;
}

footer .lang {
  margin-top: 8px;
  font-size: 18px;
}



.password-wrapper .password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper .password-field input {
  flex: 1;
}

.password-wrapper .password-field button {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #888;
}

/* Icônes dans les labels */
label i {
  margin-right: 6px;
  color: #005ea6;
}



/* 📱 Responsive adjustments */
@media (max-width: 768px) {
  .header-flex {
    flex-direction: column;
    align-items: center;
  }

  .logo {
    max-width: 60px;
    height: auto;
  }

  .header-title h1 {
    font-size: 22px;
  }

  .header-title h2 {
    font-size: 14px;
  }

  .btn.portal {
    width: 100%;
  }
}



.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 999;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 6px;
  max-width: 400px;
  margin: auto;
  position: relative;
}

.modal .close {
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  font-size: 20px;
}


/* === MODAL === */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: #fff;
  padding: 30px 20px;
  border-radius: 8px;
  max-width: 450px;
  width: 90%;
  position: relative;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

/* === FERMER MODAL (X) === */
.modal .close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  color: #888;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal .close:hover {
  color: #000;
}

/* === CHAMPS INPUT MODAL === */
.modal-content input[type="text"],
.modal-content input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  margin: 10px 0 20px 0;
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* === BOUTON REINITIALISER === */
.modal-content button[type="submit"] {
  display: block;
  width: 100%;
  padding: 12px;
  background-color: #0055a5;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.modal-content button[type="submit"]:hover {
  background-color: #003f80;
}


.container {
  max-width: 1000px;
  margin: auto;
  padding: 20px;
  font-family: Arial, sans-serif;
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  height: 60px;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
}

.card {
  width: 220px;
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #f9f9f9;
  text-align: center;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

.card img {
  max-width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
}

.btn {
  display: inline-block;
  padding: 10px 14px;
  margin-top: 8px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  transition: background 0.3s ease;
}

.btn.primary {
  background: #0055A4;
  color: white;
}

.btn.secondary {
  background: #999;
  color: white;
}

.btn.danger {
  background: #d9534f;
  color: white;
}


.card img {
  max-width: 100%;
  height: 120px;
  object-fit: contain;
  border-radius: 4px;
}
