/* ==========================================================================
   VARIABLES
   ========================================================================== */
   :root {
    /* Couleurs de base */
    --black-tech: #0A0E17;
    --dark-card: #161B26;
    --border-tech: #2A2F3D;
    --text-white: #FFFFFF;
    --text-gray: #B0B7C3;
    --text-muted: #8892A0;
    
    /* Couleurs thématiques */
    --tech-blue: #00D4FF;
    --tech-green: #00FF9D;
    --tech-gold: #FFD700;
    --tech-gold-dark: #D4AF37;
    
    /* Couleurs d'état */
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --info-color: #3B82F6;
    
    /* Effets */
    --glow-blue: 0 0 20px rgba(0, 212, 255, 0.3);
    --glow-green: 0 0 20px rgba(0, 255, 157, 0.3);
    --glow-gold: 0 0 20px rgba(255, 215, 0, 0.3);
    --shadow-card: 0 15px 35px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   STYLES DE BASE
   ========================================================================== */
.register-page {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, 
        rgba(10, 14, 23, 0.95) 0%,
        rgba(22, 27, 38, 0.95) 100%
    );
    color: var(--text-white);
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Effet de grille en arrière-plan */
.register-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.2;
    z-index: 0;
}

/* ==========================================================================
   CONTAINER PRINCIPAL
   ========================================================================== */
.register-container {
    width: 100%;
    max-width: 800px;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   CARTE D'INSCRIPTION
   ========================================================================== */
.register-card {
    background: var(--dark-card);
    border: 1px solid var(--border-tech);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    animation: slideIn 0.5s ease-out;
}

.register-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--tech-blue),
        var(--tech-green),
        var(--tech-gold)
    );
}

/* ==========================================================================
   EN-TÊTE
   ========================================================================== */
.register-header {
    text-align: center;
    margin-bottom: 35px;
}

.register-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--tech-blue), var(--tech-green));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--black-tech);
    box-shadow: var(--glow-blue);
}

.register-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    margin: 0 0 10px 0;
    background: linear-gradient(90deg, var(--tech-blue), var(--tech-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.register-subtitle {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

/* ==========================================================================
   MESSAGES D'ALERTE
   ========================================================================== */
.alert-message {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-message i {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-message.error {
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.15),
        rgba(220, 38, 38, 0.1)
    );
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
}

.alert-message.error i {
    color: #F87171;
}

.alert-message.success {
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.15),
        rgba(5, 150, 105, 0.1)
    );
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #A7F3D0;
}

.alert-message.success i {
    color: #34D399;
}

.alert-content {
    flex: 1;
}

.alert-content strong {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

/* ==========================================================================
   FORMULAIRE
   ========================================================================== */
.register-form {
    margin-bottom: 30px;
}

/* Sections du formulaire */
.form-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 20px;
    padding-bottom: 0;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text-white);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--tech-blue);
    font-size: 1rem;
}

/* Groupes de formulaire */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-white);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-label i {
    color: var(--tech-blue);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-tech);
    border-radius: 10px;
    color: var(--text-white);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--tech-blue);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: var(--glow-blue);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 5px;
    font-style: italic;
}

/* Wrapper pour les mots de passe */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    z-index: 2;
    border-radius: 4px;
}

.password-toggle:hover {
    color: var(--tech-blue);
    background: rgba(0, 212, 255, 0.1);
}

/* Force du mot de passe */
.password-strength {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.strength-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    transition: all 0.3s ease;
    background: var(--danger-color);
}

.strength-label {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 60px;
    text-align: right;
    color: var(--danger-color);
}

/* Exigences du mot de passe */
.password-requirements {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.requirement i {
    font-size: 0.5rem;
    transition: all 0.3s ease;
}

.requirement.valid {
    color: var(--tech-green);
}

.requirement.valid i {
    color: var(--tech-green);
}

/* Correspondance des mots de passe */
.password-match {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.password-match.valid {
    color: var(--tech-green);
}

.password-match.valid i {
    color: var(--tech-green);
}

/* Cases à cocher */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
    padding-left: 35px;
    user-select: none;
    line-height: 1.5;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 0;
    height: 22px;
    width: 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-tech);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--tech-blue);
}

.checkbox-container input:checked ~ .checkmark {
    background: var(--tech-blue);
    border-color: var(--tech-blue);
    box-shadow: var(--glow-blue);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid var(--dark-card);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.checkbox-label a {
    color: var(--tech-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.checkbox-label a:hover {
    color: var(--tech-green);
    text-decoration: underline;
}

/* ==========================================================================
   BOUTON D'INSCRIPTION
   ========================================================================== */
.register-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, 
        var(--tech-blue),
        var(--tech-green)
    );
    border: none;
    border-radius: 12px;
    color: var(--black-tech);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.register-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.4);
}

.register-btn:active {
    transform: translateY(-1px);
}

.register-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ==========================================================================
   LIENS
   ========================================================================== */
.register-links {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border-tech);
}

.login-link {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.link-tech-blue {
    color: var(--tech-blue);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.link-tech-blue:hover {
    color: var(--tech-green);
    text-decoration: underline;
    gap: 12px;
}

.divider {
    position: relative;
    margin: 20px 0;
    text-align: center;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--border-tech), 
        transparent
    );
}

.divider span {
    display: inline-block;
    padding: 0 15px;
    background: var(--dark-card);
    color: var(--text-muted);
    font-size: 0.9rem;
    position: relative;
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--tech-blue);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.back-home:hover {
    color: var(--tech-green);
    gap: 15px;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation pour les champs de formulaire */
.form-group {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
    .register-container {
        max-width: 100%;
    }
    
    .register-card {
        padding: 30px 20px;
    }
    
    .register-header h1 {
        font-size: 1.6rem;
    }
    
    .register-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .register-page {
        padding: 15px;
    }
    
    .register-card {
        padding: 25px 15px;
    }
    
    .form-section {
        padding-bottom: 20px;
        margin-bottom: 25px;
    }
    
    .form-label {
        font-size: 0.85rem;
    }
    
    .form-input {
        padding: 12px 14px;
        font-size: 0.9rem;
    }
    
    .register-btn {
        padding: 14px;
        font-size: 0.95rem;
    }
    
    .row {
        margin-left: -8px;
        margin-right: -8px;
    }
    
    .col-md-6 {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* ==========================================================================
   ETATS DE CHARGEMENT
   ========================================================================== */
.register-btn.loading {
    position: relative;
    color: transparent;
}

.register-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid var(--black-tech);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}