/* public/css/login.css */

/* ============================================ */
/* ===== RESET & BASE ===== */
/* ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --teal-deep: #0D4D4A;
  --teal-mid: #1A7A72;
  --teal-light: #2BA89C;
  --gold: #F2C27A;
  --gold-dark: #D4A25A;
  --charcoal: #1C2B2A;
  --surface: #F7F9F8;
  --white: #FFFFFF;
  --text-muted: #4A6462;
  --border: #C8DEDD;
  --error: #EF4444;
  --error-bg: #FEF2F2;
  --error-border: #FECDD3;
  --shadow: 0 8px 32px rgba(13, 77, 74, 0.12);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--surface);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--charcoal);
  padding: 20px;
  margin: 0;
}

/* ============================================ */
/* ===== WRAPPER ===== */
/* ============================================ */

.login-wrapper {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

/* ============================================ */
/* ===== CONTAINER ===== */
/* ============================================ */

.login-container {
  background: var(--white);
  padding: 44px 36px 32px;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

/* ============================================ */
/* ===== LOGO ===== */
/* ============================================ */

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  text-align: center;
}

.login-logo .logo-text {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1;
}

.login-logo .logo-text .logo-briz {
  color: var(--teal-deep);
}

.login-logo .logo-text .logo-prix {
  color: var(--gold-dark);
}

.login-logo .logo-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 6px;
  opacity: 0.7;
}

/* ============================================ */
/* ===== TITRE ===== */
/* ============================================ */

.login-container h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--charcoal);
  text-align: center;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* ============================================ */
/* ===== FORM GROUP ===== */
/* ============================================ */

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 5px;
}

.form-group label i {
  color: var(--teal-deep);
  font-size: 13px;
}

/* ============================================ */
/* ===== INPUT WRAPPER ===== */
/* ============================================ */

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper:focus-within {
  border-color: var(--teal-mid);
  box-shadow: 0 0 0 4px rgba(26, 122, 114, 0.1);
}

.input-wrapper.input-error {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.input-wrapper .input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 15px;
  pointer-events: none;
  transition: color 0.2s;
}

.input-wrapper:focus-within .input-icon {
  color: var(--teal-mid);
}

.input-wrapper input {
  width: 100%;
  padding: 14px 14px 14px 44px;
  border: none;
  background: transparent;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: var(--charcoal);
  outline: none;
  letter-spacing: 0.3px;
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
  font-weight: 400;
}

.input-wrapper input:autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--white) inset;
  -webkit-text-fill-color: var(--charcoal);
}

/* ============================================ */
/* ===== TOGGLE CODE ===== */
/* ============================================ */

.toggle-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.toggle-btn:hover {
  color: var(--teal-deep);
  background: var(--surface);
}

/* ============================================ */
/* ===== INPUT HINT ===== */
/* ============================================ */

.input-hint {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  padding-left: 4px;
  opacity: 0.7;
}

/* ============================================ */
/* ===== ERROR MESSAGE ===== */
/* ============================================ */

.error-message {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--error-bg);
  color: var(--error);
  border-radius: 10px;
  border: 1px solid var(--error-border);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
}

.error-message i {
  font-size: 18px;
  flex-shrink: 0;
}

.error-message span {
  flex: 1;
}

/* ============================================ */
/* ===== BUTTON ===== */
/* ============================================ */

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  background: var(--teal-deep);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: var(--teal-mid);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(13, 77, 74, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary i {
  font-size: 16px;
}

.btn-primary .spinner {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================ */
/* ===== FOOTER ===== */
/* ============================================ */

.login-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.3px;
}

.footer-separator {
  color: var(--border);
  font-weight: 300;
}

/* ============================================ */
/* ===== RESPONSIVE ===== */
/* ============================================ */

/* Mobile First - déjà optimisé pour mobile */

@media (max-width: 480px) {
  .login-container {
    padding: 32px 22px 24px;
    border-radius: 16px;
  }

  .login-logo {
    margin-bottom: 22px;
  }

  .login-logo .logo-text {
    font-size: 32px;
  }

  .login-logo .logo-badge {
    font-size: 10px;
    letter-spacing: 2.5px;
  }

  .login-container h1 {
    font-size: 20px;
  }

  .login-subtitle {
    font-size: 13px;
    margin-bottom: 22px;
  }

  .input-wrapper input {
    padding: 12px 12px 12px 40px;
    font-size: 14px;
  }

  .input-wrapper .input-icon {
    left: 12px;
    font-size: 14px;
  }

  .btn-primary {
    padding: 12px 20px;
    font-size: 15px;
  }

  .form-group {
    margin-bottom: 14px;
  }

  .login-footer {
    font-size: 11px;
    flex-wrap: wrap;
    gap: 4px;
  }
}

@media (max-width: 360px) {
  .login-container {
    padding: 24px 16px 20px;
  }

  .login-logo .logo-text {
    font-size: 26px;
  }

  .login-logo .logo-badge {
    font-size: 9px;
    letter-spacing: 2px;
  }

  .login-container h1 {
    font-size: 18px;
  }

  .input-wrapper input {
    padding: 10px 10px 10px 36px;
    font-size: 13px;
  }

  .btn-primary {
    padding: 10px 16px;
    font-size: 14px;
  }
}

/* ============================================ */
/* ===== KEYBOARD NAVIGATION ===== */
/* ============================================ */

.input-wrapper input:focus-visible {
  outline: 2px solid var(--teal-mid);
  outline-offset: -2px;
}

.btn-primary:focus-visible {
  outline: 2px solid var(--teal-mid);
  outline-offset: 2px;
}