/* ==========================================================================
   Advanced Registration & Login Forms - Main Styles
   ========================================================================== */

/* Variables CSS */
:root {
    --arl-primary: #9c88ff;
    --arl-secondary: #e91e63;
    --arl-text: #2c3e50;
    --arl-text-light: #7f8c8d;
    --arl-border: #e0e0e0;
    --arl-bg: #ffffff;
    --arl-bg-light: #f8f9fa;
    --arl-radius: 8px;
    --arl-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --arl-shadow-hover: 0 6px 30px rgba(0, 0, 0, 0.12);
}

/* Container principal */
.arl-registration-wrapper,
.arl-login-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.arl-form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 500px;
}

/* Badge de réduction */
.arl-discount-badge {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.arl-discount-content {
    background: var(--arl-primary);
    color: white;
    padding: 60px 40px;
    border-radius: var(--arl-radius);
    position: relative;
    box-shadow: var(--arl-shadow);
}

.arl-discount-text {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.arl-discount-shape {
    position: absolute;
    right: -30px;
    bottom: -20px;
    width: 100px;
    height: 100px;
    background: #ff6b9d;
    border-radius: 50% 50% 0 50%;
    z-index: -1;
}

/* Formulaire principal */
.arl-form-box {
    background: var(--arl-bg);
    padding: 50px;
    border-radius: var(--arl-radius);
    box-shadow: var(--arl-shadow);
    max-width: 500px;
    width: 100%;
    margin-left: auto;
    position: relative;
    z-index: 2;
}

.arl-registration-wrapper .arl-form-box {
    margin-left: 200px;
}

.arl-login-box {
    max-width: 450px;
    margin: 0 auto;
}

/* En-têtes */
.arl-form-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--arl-text);
    margin: 0 0 10px 0;
    text-align: center;
}

.arl-form-subtitle {
    font-size: 16px;
    color: var(--arl-text-light);
    margin: 0 0 30px 0;
    text-align: center;
}

.arl-welcome-header {
    text-align: center;
    margin-bottom: 30px;
}

/* Formulaire */
.arl-form {
    width: 100%;
}

.arl-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.arl-form-group {
    margin-bottom: 20px;
    position: relative;
}

.arl-form-group.arl-half {
    flex: 1;
}

.arl-form-group.arl-full {
    width: 100%;
}

/* Inputs */
.arl-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid var(--arl-border);
    border-radius: var(--arl-radius);
    background: var(--arl-bg-light);
    color: var(--arl-text);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.arl-input:focus {
    outline: none;
    border-color: var(--arl-primary);
    background: var(--arl-bg);
    box-shadow: 0 0 0 4px rgba(156, 136, 255, 0.1);
}

.arl-input::placeholder {
    color: var(--arl-text-light);
}

/* Input avec icône */
.arl-input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--arl-text-light);
    pointer-events: none;
}

.arl-input-with-icon {
    padding-left: 50px;
}

.arl-icon {
    width: 100%;
    height: 100%;
}

/* Checkbox */
.arl-checkbox-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.arl-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.arl-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: var(--arl-primary);
}

.arl-checkbox-text {
    font-size: 14px;
    color: var(--arl-text);
}

.arl-forgot-link {
    font-size: 14px;
    color: var(--arl-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.arl-forgot-link:hover {
    color: var(--arl-secondary);
}

/* Message */
.arl-form-message {
    margin-bottom: 20px;
    padding: 12px 15px;
    border-radius: var(--arl-radius);
    font-size: 14px;
    display: none;
}

.arl-form-message.arl-success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.arl-form-message.arl-error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Bouton de soumission */
.arl-submit-btn {
    width: 100%;
    padding: 16px 30px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: var(--arl-secondary);
    border: none;
    border-radius: var(--arl-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.arl-submit-btn:active {
    transform: translateY(0);
}

.arl-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.arl-btn-text {
    display: inline-block;
}

.arl-btn-loader {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.arl-submit-btn.arl-loading .arl-btn-text {
    visibility: hidden;
}

.arl-submit-btn.arl-loading .arl-btn-loader {
    display: block;
}

/* Spinner */
.arl-spinner {
    animation: rotate 2s linear infinite;
    width: 24px;
    height: 24px;
}

.arl-spinner .path {
    stroke: currentColor;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Footer du formulaire */
.arl-form-footer {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--arl-border);
    text-align: center;
}

.arl-form-footer p {
    margin: 0;
    font-size: 14px;
    color: var(--arl-text);
}

.arl-link {
    color: var(--arl-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.arl-link:hover {
    color: var(--arl-secondary);
}

/* Style minimal */
.arl-style-minimal .arl-form-box {
    box-shadow: none;
    border: 1px solid var(--arl-border);
}

.arl-style-minimal .arl-input {
    background: var(--arl-bg);
}

/* Style moderne */
.arl-style-modern .arl-form-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.arl-style-modern .arl-form-title,
.arl-style-modern .arl-form-subtitle,
.arl-style-modern .arl-checkbox-text,
.arl-style-modern .arl-form-footer p {
    color: white;
}

.arl-style-modern .arl-input {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.arl-style-modern .arl-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.arl-style-modern .arl-input:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .arl-registration-wrapper .arl-form-box {
        margin-left: 0;
    }
    
    .arl-discount-badge {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        margin-bottom: 30px;
    }
    
    .arl-discount-content {
        padding: 40px 30px;
    }
    
    .arl-discount-text {
        font-size: 36px;
    }
    
    .arl-form-box {
        padding: 30px 20px;
    }
    
    .arl-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .arl-form-group.arl-half {
        width: 100%;
    }
    
    .arl-checkbox-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .arl-form-title {
        font-size: 24px;
    }
    
    .arl-form-subtitle {
        font-size: 14px;
    }
    
    .arl-discount-text {
        font-size: 28px;
    }
}
