/* ===========================================
   GLASSMORPHISM - PAGE D'INSCRIPTION
   =========================================== */

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: 
        radial-gradient(circle at 20% 80%, rgba(100, 100, 100, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(150, 150, 150, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(80, 80, 80, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #1a1a1a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Effet de particules flottantes */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.1), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(200,200,200,0.08), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.15), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(180,180,180,0.1), transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: float 20s infinite linear;
    pointer-events: none;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-200px) rotate(360deg); }
}

.bg-primary {
    background: transparent !important;
}

.card {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: 24px !important;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    position: relative;
    z-index: 1;
    animation: slideInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
    border-radius: 24px;
    pointer-events: none;
}

.card-body {
    border-radius: 24px !important;
    position: relative;
    z-index: 2;
}

.btn-primary {
    background: linear-gradient(135deg, #333333 0%, #555555 100%) !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    border-radius: 16px !important;
    padding: 18px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(0, 0, 0, 0.3) !important;
    background: linear-gradient(135deg, #444444 0%, #666666 100%) !important;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(-1px) !important;
}

.form-control {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 16px !important;
    padding: 20px 16px !important;
    font-size: 16px !important;
    color: #333333 !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
}

.form-control::placeholder {
    color: rgba(0, 0, 0, 0.4) !important;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.3) !important;
    box-shadow: 
        0 0 0 4px rgba(0, 0, 0, 0.1),
        0 8px 24px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-2px) !important;
}

/* ===========================================
   CONTAINER MOT DE PASSE AVEC BOUTON TOGGLE
   =========================================== */

.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input {
    padding-right: 50px !important;
}

.password-toggle-btn {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    z-index: 10 !important;
}

.password-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-50%) scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.password-toggle-btn:active {
    transform: translateY(-50%) scale(0.95) !important;
}

.password-toggle-btn i {
    color: rgba(0, 0, 0, 0.6) !important;
    font-size: 14px !important;
    transition: color 0.3s ease !important;
}

.password-toggle-btn:hover i {
    color: rgba(0, 0, 0, 0.8) !important;
}

.form-floating > label {
    color: rgba(0, 0, 0, 0.6) !important;
    font-weight: 500 !important;
}

.alert {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 16px !important;
    color: #333333 !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
    position: relative;
    z-index: 2;
}

.alert-success {
    background: rgba(0, 100, 0, 0.1) !important;
    border-color: rgba(0, 100, 0, 0.2) !important;
}

.alert-danger {
    background: rgba(150, 0, 0, 0.1) !important;
    border-color: rgba(150, 0, 0, 0.2) !important;
}

/* Titre avec effet glassmorphism */
.display-4 {
    background: linear-gradient(135deg, #333333 0%, #666666 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-weight: 800 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.lead {
    color: rgba(0, 0, 0, 0.7) !important;
    font-weight: 400 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}

/* Animation pour les icônes */
.fa-dumbbell {
    animation: bounce 2s infinite;
    color: rgba(0, 0, 0, 0.7) !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Animation d'entrée */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Empêcher le scroll horizontal sur toute la page */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
}

/* S'assurer que tous les éléments respectent la largeur */
* {
    box-sizing: border-box !important;
}

/* Responsive */
@media (max-width: 768px) {
    .card-body {
        padding: 2rem !important;
    }
    .fa-dumbbell {
        font-size: 2rem !important;
    }
    .card {
        margin: 20px !important;
        border-radius: 20px !important;
    }
    .form-control {
        padding: 16px 12px !important;
    }
    .btn-primary {
        padding: 16px !important;
    }
    /* S'assurer que le conteneur ne déborde pas sur mobile */
    .container-fluid {
        max-width: 100% !important;
        overflow-x: hidden !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* ===========================================
   Lien de bascule Auth (vers Register/Connexion)
   =========================================== */
.auth-switch-container {
    margin-top: 0.75rem !important;
}
.auth-switch-link {
    font-weight: 600 !important;
    color: #232323 !important;
    text-decoration: none !important;
    transition: color 0.2s;
}
.auth-switch-link:hover {
    text-decoration: underline !important;
    color: #111 !important;
}
