* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  height: 100vh;
  overflow: hidden;
  display: flex;
}

/* ===== LAYOUT DEUX COLONNES ===== */
.login-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
}

/* ---- Colonne gauche : branding ---- */
.login-left {
  width: 52%;
  background: linear-gradient(160deg, #002d15 0%, #004d25 55%, #006B3C 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 50px;
  position: relative;
  text-align: center;
}

/* Motif zellige en fond */
.login-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("img/background-zellige.png");
  background-size: 280px 280px;
  background-repeat: repeat;
  opacity: 0.07;
  pointer-events: none;
}

/* Bordure dorée à droite */
.login-left::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, transparent, #c8a84b, #b8922a, transparent);
}

.login-logo {
  width: 90px;
  margin-bottom: 24px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
  position: relative;
}

.login-brand {
  font-size: 58px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -1.5px;
  line-height: 1;
  margin-bottom: 16px;
  position: relative;
}

.login-brand span {
  color: #C1272D;
}

.login-tagline {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  margin-bottom: 28px;
  position: relative;
}

.login-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 30px;
  position: relative;
}

.login-pills span {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(200, 168, 75, 0.4);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 50px;
}

.login-arabic {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  direction: rtl;
  font-style: italic;
  line-height: 1.8;
  position: relative;
}

/* ---- Colonne droite : formulaire ---- */
.login-right {
  flex: 1;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 30px;
}

.login-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 44px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.login-institution {
  text-align: center;
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -1px;
  color: #004d25;
  background: none;
  border: none;
  padding: 0;
  margin: 0 auto 20px;
  display: block;
  line-height: 1;
}

.login-institution-ia {
  color: #C1272D;
}

.login-title {
  font-size: 26px;
  font-weight: 800;
  color: #004d25;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.login-sub {
  font-size: 13.5px;
  color: #888;
  margin-bottom: 30px;
}

.login-disclaimer {
  font-size: 11px;
  color: #bbb;
  line-height: 1.6;
  margin-top: 14px;
  text-align: center;
  border-top: 1px solid #f0f0f0;
  padding-top: 12px;
}

/* ===== FORMULAIRE ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.form-group input {
  padding: 12px 14px;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  font-size: 14px;
  color: #1a1c27;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fafafa;
}

.form-group input:focus {
  border-color: #004d25;
  box-shadow: 0 0 0 3px rgba(0, 77, 37, 0.1);
  background: #fff;
}

.form-group input::placeholder {
  color: #bbb;
}

/* ===== MESSAGE D'ERREUR ===== */
.login-error {
  background: #fff5f5;
  border: 1px solid rgba(193, 39, 45, 0.3);
  border-left: 4px solid #C1272D;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #8b1a1a;
  margin-bottom: 16px;
}

.login-error.hidden {
  display: none;
}

/* ===== BOUTON ===== */
.login-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #004d25, #006B3C);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(0, 77, 37, 0.3);
  letter-spacing: 0.3px;
  margin-top: 4px;
}

.login-btn:hover {
  background: linear-gradient(135deg, #005a2d, #007a44);
  box-shadow: 0 6px 20px rgba(0, 77, 37, 0.4);
  transform: translateY(-1px);
}

.login-btn:active {
  transform: translateY(0);
}

/* ===== SÉPARATEUR ===== */
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e8e8e8;
}

.login-divider span {
  font-size: 12px;
  color: #aaa;
  font-weight: 500;
}

/* ===== BOUTON INVITÉ ===== */
.guest-btn {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: #555;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.2px;
}

.guest-btn:hover {
  border-color: #004d25;
  color: #004d25;
  background: rgba(0, 77, 37, 0.04);
}

.guest-icon {
  font-size: 16px;
}

/* ===== BLOC "QUE PUIS-JE FAIRE" + DISCLAIMER ===== */
.login-can-help {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.login-can-help-title {
  font-size: 13px;
  font-weight: 700;
  color: #004d25;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}

.login-disclaimer {
  font-size: 11.5px;
  color: #999;
  line-height: 1.7;
  font-style: italic;
}

/* ===== RESPONSIVE ===== */

/* Tablette (≤ 900px) */
@media (max-width: 900px) {
  .login-left { width: 42%; padding: 40px 30px; }
  .login-brand { font-size: 44px; }
  .login-tagline { font-size: 14px; }
}

/* Mobile (≤ 700px) */
@media (max-width: 700px) {
  body { overflow: auto; }
  .login-wrapper { flex-direction: column; height: auto; min-height: 100vh; }
  .login-left { display: none; }
  .login-right {
    width: 100%;
    padding: 32px 20px 40px;
    justify-content: flex-start;
    padding-top: 48px;
  }
  .login-card {
    width: 100%;
    max-width: 420px;
    padding: 32px 24px 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  }
  .login-logo { font-size: 30px; margin-bottom: 4px; }
  .login-subtitle { font-size: 12px; margin-bottom: 20px; }
  .login-form label { font-size: 12px; }
  .login-form input { font-size: 14px; padding: 10px 14px; }
  .login-btn { font-size: 14px; padding: 12px; }
  .login-pills { gap: 6px; }
  .login-pills span { font-size: 11px; padding: 4px 10px; }
  .login-disclaimer { font-size: 11px; }
  .login-can-help-title { font-size: 12px; }
}

/* Très petit mobile (≤ 380px) */
@media (max-width: 380px) {
  .login-right { padding: 24px 14px 32px; }
  .login-card { padding: 24px 16px 20px; }
  .login-logo { font-size: 26px; }
}
