/* ============================================================
   INFORMATIQUE 2000 — Minimalist Pill Auth System
   Matching Exact User Screenshot Reference Layout
   ============================================================ */

:root {
  --bg-page: #F5F7FB;          /* Fond pastel très doux */
  --card-bg: #FFFFFF;          /* Carte blanche */
  
  --primary-purple: #1F3F93;   /* Bleu profond officiel */
  --primary-gradient: linear-gradient(135deg, #1F3F93 0%, #183477 100%);
  --primary-gradient-hover: linear-gradient(135deg, #284DB3 0%, #1F3F93 100%);
  
  --text-title: #1F3F93;       /* Titre bleu profond */
  --text-dark: #1E293B;
  --text-muted: #94A3B8;
  
  --border-line: #E2E8F0;
  --border-line-focus: #1F3F93;
  
  --check-badge-bg: #FFCC00;
  
  --error: #EF4444;
  --error-bg: #FEF2F2;
  --error-border: #FCA5A5;
  
  --success: #10B981;
  --success-bg: #ECFDF5;
  
  --font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --shadow-card: 0 20px 40px -15px rgba(31, 63, 147, 0.12);
  --shadow-pill: 0 6px 20px rgba(0, 0, 0, 0.05);
  --shadow-btn: 0 10px 24px rgba(31, 63, 147, 0.28);
  
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Fullscreen Ambient Backdrop with Soft Corner Circles */
.auth-wrapper {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-page);
}

/* Soft Pastels Circles in Corners (Matching Reference Image) */
.corner-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.circle-top-right {
  width: 320px;
  height: 320px;
  background: rgba(124, 119, 255, 0.12);
  top: -80px;
  right: -60px;
}

.circle-bottom-left {
  width: 380px;
  height: 380px;
  background: rgba(124, 119, 255, 0.14);
  bottom: -100px;
  left: -80px;
}

/* Centered Form Card */
.auth-card {
  width: 100%;
  max-width: 620px;
  background: var(--card-bg);
  border-radius: 28px;
  padding: 52px 64px;
  box-shadow: var(--shadow-card);
  position: relative;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Logo Header Centered */
.card-logo-header {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.logo-preserved-img {
  height: 64px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
}

.brand-tagline {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Form Titles */
.card-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-title);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.card-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 32px;
}

/* Alert Banner */
.alert-banner {
  display: none;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 24px;
  align-items: center;
  gap: 10px;
  text-align: left;
  line-height: 1.4;
  animation: slideDown 0.25s ease;
}

.alert-banner.show {
  display: flex;
}

.alert-banner.error {
  background-color: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error);
}

.alert-banner.success {
  background-color: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #065F46;
}

.alert-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

/* Form Body */
.auth-form-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Top Google SSO Button (Matching Screenshot Layout) */
.btn-google-pill {
  width: 100%;
  max-width: 440px;
  height: 52px;
  background-color: #FFFFFF;
  border: none;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  color: #5850EC;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: var(--shadow-pill);
  transition: var(--transition);
  margin-bottom: 28px;
}

.btn-google-pill:hover {
  background: linear-gradient(135deg, #FFD000 0%, #FFB700 100%) !important;
  color: #0F172A !important;
  box-shadow: 0 10px 24px rgba(255, 190, 0, 0.45);
  transform: translateY(-1.5px);
}

.btn-google-pill:active {
  transform: scale(0.99);
}

.google-icon-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}

.google-icon-circle svg {
  width: 18px;
  height: 18px;
}

/* Centered Divider "ou" */
.divider-or {
  font-size: 13px;
  font-weight: 500;
  color: #CBD5E1;
  margin-bottom: 28px;
}

/* Underline Minimal Input Fields (Matching Reference Image) */
.inputs-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 24px;
  text-align: left;
}

.field-line-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

.field-line-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.input-line-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-control-line {
  width: 100%;
  height: 44px;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--border-line);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
  outline: none;
  padding-right: 36px;
  transition: var(--transition);
}

.form-control-line::placeholder {
  color: #CBD5E1;
  font-weight: 400;
}

.form-control-line:focus {
  border-bottom-color: var(--border-line-focus);
}

.field-line-group.has-error .form-control-line {
  border-bottom-color: var(--error);
}

.field-error-msg {
  font-size: 12px;
  color: var(--error);
  font-weight: 500;
  margin-top: 4px;
  display: none;
}

.field-line-group.has-error .field-error-msg {
  display: block;
}

/* Checkmark Badge on Right (Matching Image) */
.checkmark-badge {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--check-badge-bg);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  pointer-events: none;
  transition: var(--transition);
}

.checkmark-badge svg {
  width: 13px;
  height: 13px;
}

/* Password Toggle Button */
.btn-eye-toggle {
  position: absolute;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-eye-toggle:hover {
  color: var(--primary-purple);
}

.btn-eye-toggle svg {
  width: 18px;
  height: 18px;
}

/* Form Options Row */
.options-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  font-size: 13.5px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  color: var(--text-dark);
}

.checkbox-custom {
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--border-line);
  border-radius: 4px;
  accent-color: var(--primary-purple);
  cursor: pointer;
}

.forgot-link {
  font-weight: 700;
  color: var(--primary-purple);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.forgot-link:hover {
  color: #4B42E0;
  text-decoration: underline;
}

/* Main Pill Submit Button (Matching Screenshot) */
.btn-submit-pill {
  width: 100%;
  height: 52px;
  background: var(--primary-gradient);
  color: #FFFFFF;
  border: none;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--shadow-btn);
  transition: var(--transition);
}

.btn-submit-pill:hover {
  background: linear-gradient(135deg, #FFD000 0%, #FFB700 100%);
  color: #0F172A;
  box-shadow: 0 14px 28px rgba(255, 190, 0, 0.45);
  transform: translateY(-1.5px);
}

.btn-submit-pill:active {
  transform: scale(0.99);
}

.btn-submit-pill:disabled {
  opacity: 0.8;
  cursor: not-allowed;
  transform: none;
}

/* Spinner Icon */
.spinner-icon {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Footer Notice (Matching Screenshot) */
.card-footer-notice {
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.admin-link {
  font-weight: 700;
  color: var(--primary-purple);
  text-decoration: none;
  transition: var(--transition);
}

.admin-link:hover {
  color: #4B42E0;
  text-decoration: underline;
}

/* Utilities */
.hidden {
  display: none !important;
}

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

/* Responsive */
@media (max-width: 600px) {
  .auth-card {
    padding: 36px 24px;
    border-radius: 20px;
  }
  
  .card-title {
    font-size: 26px;
  }
  
  .options-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
