/* ==========================================================================
   Auth Pages
   ========================================================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #312E81 100%);
    padding: 40px 20px;
    position: relative;
}

.auth-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('../images/pattern-dots.svg') repeat;
    opacity: 0.05;
    pointer-events: none;
}

.auth-container {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.dark-mode .auth-card {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.05);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.dark-mode .auth-header h1 {
    color: var(--white);
}

.auth-header p {
    color: var(--gray);
    font-size: 16px;
}

/* Auth Notices */
.auth-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.auth-notice.success {
    background: #D1FAE5;
    color: #065F46;
    border-left: 4px solid #10B981;
}

.auth-notice.error {
    background: #FEE2E2;
    color: #991B1B;
    border-left: 4px solid #EF4444;
}

.auth-notice i {
    font-size: 18px;
}

/* Form */
.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--dark);
    margin-bottom: 6px;
}

.dark-mode .auth-form label {
    color: var(--gray-light);
}

.auth-form label i {
    color: var(--gray);
    font-size: 14px;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius);
    font-size: 15px;
    font-family: var(--font);
    transition: var(--transition);
    background: var(--white);
    color: var(--dark);
}

.dark-mode .auth-form input[type="text"],
.dark-mode .auth-form input[type="email"],
.dark-mode .auth-form input[type="password"] {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.auth-form input.error {
    border-color: #EF4444;
}

.auth-form input.error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* Password Field */
.password-field {
    position: relative;
}

.password-field input {
    padding-right: 48px !important;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--dark);
}

.dark-mode .toggle-password:hover {
    color: var(--white);
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: #E2E8F0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.strength-bar .fill {
    height: 100%;
    transition: var(--transition);
}

.strength-text {
    font-size: 12px;
    color: var(--gray);
}

.strength-text.weak { color: #EF4444; }
.strength-text.medium { color: #F59E0B; }
.strength-text.strong { color: #10B981; }

.password-requirements {
    list-style: none;
    padding: 0;
    margin-top: 8px;
    font-size: 13px;
    color: var(--gray);
}

.password-requirements li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
}

.password-requirements li::before {
    content: '○';
    font-size: 14px;
}

.password-requirements li.valid::before {
    content: '✓';
    color: #10B981;
}

.password-requirements li.invalid::before {
    content: '✗';
    color: #EF4444;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gray);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--secondary);
    cursor: pointer;
}

.forgot-link {
    font-size: 14px;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--secondary-light);
    text-decoration: underline;
}

/* Buttons */
.btn-block {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.3);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: none;
}

.btn-primary.loading .btn-text {
    visibility: hidden;
}

.btn-primary.loading .btn-loader {
    display: inline-block;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E2E8F0;
}

.dark-mode .auth-divider::before,
.dark-mode .auth-divider::after {
    background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
    font-size: 14px;
    color: var(--gray);
    white-space: nowrap;
}

/* Social Login */
.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid #E2E8F0;
    background: var(--white);
    color: var(--dark);
}

.dark-mode .btn-social {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
}

.btn-social:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-social.google:hover {
    border-color: #EA4335;
    color: #EA4335;
}

.btn-social.facebook:hover {
    border-color: #1877F2;
    color: #1877F2;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #E2E8F0;
}

.dark-mode .auth-footer {
    border-top-color: rgba(255, 255, 255, 0.05);
}

.auth-footer p {
    font-size: 15px;
    color: var(--gray);
}

.auth-footer a {
    color: var(--secondary);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Field Feedback */
.field-feedback {
    font-size: 13px;
    margin-top: 4px;
    min-height: 20px;
}

.field-feedback.valid {
    color: #10B981;
}

.field-feedback.invalid {
    color: #EF4444;
}

/* ==========================================================================
   Responsive Auth
   ========================================================================== */
@media (max-width: 480px) {
    .auth-card {
        padding: 32px 24px;
    }
    
    .auth-header h1 {
        font-size: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .social-login {
        grid-template-columns: 1fr;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* Nous Pas Bouger - connexion institutionnelle */
.npb-login-page.auth-page {
  background:
    radial-gradient(circle at 18% 12%, rgba(11,122,59,.32), transparent 28%),
    radial-gradient(circle at 86% 16%, rgba(246,198,0,.34), transparent 25%),
    radial-gradient(circle at 82% 88%, rgba(206,17,38,.26), transparent 28%),
    linear-gradient(135deg, #082516 0%, #0B2D1A 58%, #3D1017 100%);
}
.npb-auth-card {
  border-top: 7px solid transparent;
  border-image: linear-gradient(90deg, #0B7A3B, #F6C600, #CE1126) 1;
  box-shadow: 0 30px 70px rgba(0,0,0,.36);
}
.auth-brand { text-align:center; margin-bottom: 20px; }
.auth-brand img { max-width: 260px; max-height: 150px; width: 80%; height: auto; object-fit: contain; }
.npb-auth-card .auth-header h1 { color: var(--npb-primary-dark, #0B2D1A); }
.npb-auth-card .auth-header .eyebrow { display:block; margin-bottom:8px; }
.npb-auth-card .auth-form input:focus {
  border-color: var(--npb-primary, #0B7A3B);
  box-shadow: 0 0 0 4px rgba(11,122,59,.12);
}
.auth-security-note {
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(11,122,59,.10), rgba(246,198,0,.12));
  color: var(--npb-primary-dark, #0B2D1A);
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 700;
}
.auth-security-note i { color: var(--npb-primary, #0B7A3B); margin-top: 3px; }
