/* Pages d'authentification - Sign In & Sign Up */

/* Annuler le zoom global pour les pages d'authentification */
body.auth-page {
    zoom: 1;
    transform: none;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.auth-content {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Logo en haut à gauche */
.auth-logo-container {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 10;
}

.auth-logo-link {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    color: var(--text-white);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    transition: opacity 0.3s ease;
}

.auth-logo-link:hover {
    opacity: 0.8;
}

.auth-logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.auth-logo-fallback {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8b5cf6 0%, #5b21b6 100%);
    border-radius: 8px;
}

.auth-logo-text {
    font-size: 1.4rem;
    font-weight: 600;
}

/* Section formulaire */
.auth-form-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
    width: 90%;
    margin: 0 auto;
    justify-content: center;
    min-height: 100%;
}

.auth-title {
    font-family: 'Alike', serif;
    font-size: 2rem;
    font-weight: 500;
    color: var(--text-white);
    margin: 0 0 2rem 0;
    text-align: center;
    line-height: 1.2;
}

/* Boutons sociaux */
.auth-social-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(217, 217, 217, 0.02);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-white);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.auth-social-btn:hover {
    background: rgba(217, 217, 217, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.auth-google-btn {
    background: rgba(217, 217, 217, 0.02);
}

.auth-google-btn-light {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-color: rgba(255, 255, 255, 0.3);
}

.auth-google-btn-light:hover {
    background: rgba(255, 255, 255, 1);
}

.auth-apple-btn {
    background: rgba(217, 217, 217, 0.02);
}

.auth-social-icon {
    flex-shrink: 0;
}

/* Séparateur */
.auth-separator {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.3rem 0;
    gap: 1rem;
}

.auth-separator::before {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.auth-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.auth-separator-text {
    position: relative;
    background: transparent;
    padding: 0;
    color: var(--text-white);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Formulaire */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-form-group:last-of-type {
    margin-bottom: 1.5rem;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.auth-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.auth-label {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-forgot-password {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-forgot-password:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

.auth-input-wrapper {
    position: relative;
    width: 100%;
}

.auth-input {
    padding: 0.75rem 1.25rem;
    padding-right: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(217, 217, 217, 0.02);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-white);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
}

.auth-password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.auth-password-toggle:hover {
    color: rgba(255, 255, 255, 0.8);
}

.auth-password-toggle svg {
    width: 20px;
    height: 20px;
}

.auth-password-toggle.hidden svg:first-child {
    display: none;
}

/* Icône œil barré pour masquer */
.auth-password-toggle .eye-off {
    display: none;
}

.auth-password-toggle.hidden .eye-off {
    display: block;
}

.auth-password-toggle.hidden .eye-on {
    display: none;
}

/* SVG pour l'œil barré */
.auth-password-toggle svg.eye-off {
    display: none;
}

.auth-password-toggle.hidden svg.eye-off {
    display: block;
}

.auth-password-toggle.hidden svg:not(.eye-off) {
    display: none;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.auth-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(217, 217, 217, 0.05);
}

/* Bouton de soumission */
.auth-submit-btn {
    padding: 0.75rem 2rem;
    border-radius: 20px;
    border: none;
    background: #0a1628;
    color: var(--text-white);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.auth-submit-btn:hover {
    background: #0f1d32;
    transform: translateY(-2px);
}

/* Lien de basculement */
.auth-switch {
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    font-size: 0.8rem;
    color: var(--text-white);
}

.auth-switch span {
    font-weight: 100;
}

.auth-switch-link {
    color: var(--text-white);
    font-weight: 600;
    text-decoration: none;
    margin-left: 0.5rem;
    transition: opacity 0.3s ease;
}

.auth-switch-link:hover {
    opacity: 0.9;
    text-decoration: underline;
}

/* Texte légal */
.auth-legal {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    font-size: 0.7rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.5;
    margin: auto 0 0 0;
    padding-top: 2rem;
    text-align: center;
}

.auth-legal-right {
    margin: 0;
    margin-top: auto;
    padding-top: 2rem;
    width: 100%;
    max-width: 100%;
}

/* Responsive */
@media (max-width: 1024px) {
    .auth-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-logo-container {
        top: 1rem;
        left: 1rem;
    }

    .auth-title {
        font-size: 2rem;
    }

    .auth-form-section {
        gap: 1.5rem;
    }
}

/* Popup mot de passe oublié */
.auth-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeInOverlay 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-popup-overlay.active {
    display: flex;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes popupSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 
            0 30px 100px rgba(0, 0, 0, 0.7),
            0 0 80px -20px rgba(76, 165, 204, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    50% {
        box-shadow: 
            0 35px 120px rgba(0, 0, 0, 0.75),
            0 0 100px -10px rgba(76, 165, 204, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

.auth-popup {
    background: linear-gradient(
        135deg,
        rgba(20, 35, 55, 0.92) 0%,
        rgba(15, 28, 45, 0.95) 100%
    );
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 32px;
    padding: 3.5rem 3rem;
    max-width: 600px;
    width: 100%;
    position: relative;
    animation: popupSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
    box-shadow: 
        0 30px 100px rgba(0, 0, 0, 0.7),
        0 0 80px -20px rgba(76, 165, 204, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.auth-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(76, 165, 204, 0.3) 20%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(76, 165, 204, 0.3) 80%,
        transparent 100%
    );
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

.auth-popup::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(76, 165, 204, 0.08) 0%,
        transparent 70%
    );
    pointer-events: none;
    animation: rotateGlow 20s linear infinite;
}

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

.auth-popup-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-white);
    font-size: 1.75rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0.8;
    z-index: 10;
}

.auth-popup-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.auth-popup-title {
    font-family: 'Alike', serif;
    font-size: 2.25rem;
    font-weight: 500;
    color: var(--text-white);
    margin: 0 0 1.25rem 0;
    text-align: center;
    letter-spacing: -0.03em;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.auth-popup-description {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
    margin: 0 0 2.5rem 0;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.auth-popup-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.auth-popup .auth-form-group {
    margin-bottom: 0;
}

.auth-popup .auth-form-group:last-of-type {
    margin-bottom: 0;
}

/* Styles spécifiques pour les inputs dans le popup */
.auth-popup .auth-input {
    background: rgba(217, 217, 217, 0.03);
    border-color: rgba(255, 255, 255, 0.15);
}

.auth-popup .auth-input:focus {
    background: rgba(217, 217, 217, 0.06);
    border-color: rgba(76, 165, 204, 0.4);
    box-shadow: 0 0 0 3px rgba(76, 165, 204, 0.1);
}

.auth-popup .auth-submit-btn {
    background: linear-gradient(135deg, #0a1628 0%, #0f1d32 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-popup .auth-submit-btn:hover {
    background: linear-gradient(135deg, #0f1d32 0%, #15243a 100%);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

