/* ===== LOGIN-MAIN.CSS - STYLES PAGE DE CONNEXION ===== */

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.login-body {
    font-family: 'Inter', system-ui, sans-serif;
    background: #000011;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background spatial */
.space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    z-index: -2;
    animation: backgroundShift 20s ease-in-out infinite alternate;
}

.stars-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.stars-field::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, #fff, transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.4), transparent);
    background-repeat: repeat;
    background-size: 150px 150px;
    animation: starMove 60s linear infinite;
}

@keyframes backgroundShift {
    0% { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(1deg) scale(1.1); }
}

@keyframes starMove {
    from { transform: translateX(0) translateY(0); }
    to { transform: translateX(-150px) translateY(-150px); }
}

/* Header */
.login-header {
    background: rgba(0, 0, 17, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 255, 136, 0.3);
    height: 80px;
    min-height: 80px;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
}

.logo-container .logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.8rem;
}

.logo-img {
    height: 32px;
    width: auto;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    pointer-events: none;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #00ff88, #00ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.btn-back {
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-back:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: #00ff88;
    color: #00ff88;
}

/* Container principal */
.login-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    min-height: calc(100vh - 100px);
}

/* Sections */
.login-section, .register-section {
    display: flex;
    justify-content: center;
}

.login-card {
    background: rgba(0, 255, 136, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    animation: cardSlideIn 0.8s ease-out;
}

@keyframes cardSlideIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-header-card {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header-card h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #00ff88, #00ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.login-header-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

/* Formulaires */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-group label {
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    padding: 1rem;
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 10px;
    background: rgba(0, 255, 136, 0.05);
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
    background: rgba(0, 255, 136, 0.1);
}

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

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #ffffff;
    font-size: 0.9rem;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: #00ff88;
    border-color: #00ff88;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark:after {
    content: '✓';
    color: #000011;
    font-weight: bold;
}

.forgot-password, .terms-link {
    color: #00ccff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover, .terms-link:hover {
    color: #00ff88;
}

/* Boutons */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(45deg, #00ff88, #00ccff);
    color: #000011;
    font-weight: 700;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 255, 136, 0.4);
}

.btn-secondary {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    border: 2px solid #00ff88;
}

.btn-secondary:hover {
    background: rgba(0, 255, 136, 0.2);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin: 2rem 0;
    color: rgba(255, 255, 255, 0.6);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    height: 1px;
    background: rgba(0, 255, 136, 0.3);
    flex: 1 1 0;
}

.auth-divider span {
    padding: 0 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

/* Social auth */
.social-auth {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-social {
    flex: 1;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #ffffff;
    padding: 0.8rem;
    font-size: 0.9rem;
}

.btn-social.google:hover {
    background: rgba(219, 68, 55, 0.2);
    border-color: #db4437;
}

.btn-social.discord:hover {
    background: rgba(114, 137, 218, 0.2);
    border-color: #7289da;
}

/* Switch auth */
.auth-switch {
    text-align: center;
}

/* Ajoute de l'espace sous le bouton d'inscription avant le switch */
.register-section .auth-switch {
    margin-top: 1.5rem;
}

.auth-switch p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Section info */
.info-section {
    display: flex;
    justify-content: center;
}

.info-card {
    background: rgba(0, 255, 136, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 20px;
    padding: 2.5rem;
    animation: cardSlideIn 0.8s ease-out 0.2s both;
}

.info-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #00ff88;
    font-size: 1.8rem;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 255, 136, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(0, 255, 136, 0.1);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}

.feature-svg-icon {
    width: 32px;
    height: 32px;
    opacity: 0.95;
}

.feature-text h3 {
    color: #00ff88;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feature-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Trust indicators */
.trust-indicators {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 255, 136, 0.3);
}

.trust-item {
    text-align: center;
}

.trust-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #00ff88;
}

.trust-label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.25rem;
}

/* Style pour le champ date */
.form-group input[type="date"] {
    padding: 1rem;
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 10px;
    background: rgba(0, 255, 136, 0.05);
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input[type="date"]:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
    background: rgba(0, 255, 136, 0.1);
}

/* Style pour le calendrier (WebKit) */
.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    background-color: #00ff88;
    border-radius: 3px;
    cursor: pointer;
    filter: invert(1);
}

/* Firefox */
.form-group input[type="date"]::-moz-focus-inner {
    border: 0;
}


/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}


/* Password toggle */
.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-container input {
    width: 100%;
    padding-right: 3rem !important;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    z-index: 10;
}

.password-toggle:hover {
    background: rgba(0, 255, 136, 0.1);
}

.eye-icon {
    font-size: 1.2rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.password-toggle:hover .eye-icon {
    opacity: 1;
}

.password-toggle.visible .eye-icon {
    opacity: 0.5;
}



/* Masquer le bouton retour sur APK/PWA */
@media (display-mode: standalone) {
    .back-to-site-btn,
    #back-to-site,
    .retour-site {
        display: none !important;
    }
}

/* Détection supplémentaire pour Capacitor */
.capacitor-app .back-to-site-btn,
.capacitor-app #back-to-site,
.capacitor-app .retour-site {
    display: none !important;
}



/* Desktop : layout centré */
@media (min-width: 769px) {
    .header-content {
        justify-content: center; /* Au lieu de flex-start */
        gap: 2rem;
        position: relative;
    }
    
    /* Bouton retour en position absolue à gauche */
    .back-link {
        position: absolute;
        left: 2rem;
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* Logo centré */
    .logo-container {
        position: static;
        transform: none;
        margin: 0 auto;
    }
    
    .header-spacer {
        display: none;
    }
    
    .btn-arrow {
        display: none;
    }
    
    .btn-text {
        display: inline;
    }
}



/* Classes pour détection JavaScript */
.capacitor-app .back-to-site-btn,
.pwa-app .back-to-site-btn {
    display: none !important;
}

/* Layout mobile responsive */
.login-header .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 1rem;
    width: 100%;
}

/* Desktop : layout normal */
@media (min-width: 769px) {
    .header-content {
        justify-content: flex-start;
        gap: 2rem;
    }
    
    .btn-arrow {
        display: none;
    }
    
    .header-spacer {
        display: none;
    }
    
    .logo-container {
        position: static;
        transform: none;
    }
}

/* Mobile : flèche à gauche, logo centré */
@media (max-width: 768px) {
    .back-link {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .btn-text {
        display: none !important;
    }
    
    .btn-arrow {
        display: inline !important;
        font-size: 2rem;
        color: #fff;
        line-height: 1;
    }
    
    .logo-container {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
        height: 50px;
        display: flex;
        align-items: center;
    }
    
    .header-spacer {
        width: 3rem;
        height: 50px;
    }
}

/* Ajustements logo */
.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.btn-back {
    background: transparent;
    border: none;
    color: #fff;
    text-decoration: none;
    padding: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 8px;
    transition: background 0.3s ease;
    min-width: 50px;
    min-height: 50px;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
}

button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

button:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}