@import url("https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/css/bootstrap.min.css");
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css");
@import url("https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif !important;
    min-height: 100vh;
    overflow-x: hidden;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

#page p {
    text-align: justify !important;
}

/* Section gauche avec image et overlay */
.left-section {
    flex: 1;
    background: 
        linear-gradient(135deg, rgba(249, 145, 49, 0.92), rgba(249, 180, 49, 0.88), rgba(63, 81, 181, 0.85)),
        url('https://images.unsplash.com/photo-1563986768494-4dee2763ff3f?w=1200&q=80');
    background-size: cover;
    background-position: center;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    color: white;
}

.left-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(249, 145, 49, 0.3) 0%, 
        rgba(249, 180, 49, 0.4) 35%, 
        rgba(63, 81, 181, 0.5) 100%);
    backdrop-filter: blur(2px);
}

.left-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 500px;
}

.logo-section {
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease-out;
}

.logo-icon {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.logo-icon i {
    font-size: 60px;
    color: white;
}

.brand-name {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.brand-slogan {
    font-size: 20px;
    font-weight: 300;
    opacity: 0.95;
    margin-bottom: 40px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.features-list {
    text-align: left;
    margin-top: 50px;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    animation: fadeInLeft 0.8s ease-out;
}

.feature-item:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-item:nth-child(3) {
    animation-delay: 0.4s;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    backdrop-filter: blur(10px);
}

.feature-icon i {
    font-size: 24px;
}

.feature-text h4 {
    font-size: 18px;
    margin-bottom: 5px;
    font-weight: 600;
}

.feature-text p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

/* Copyright */
.copyright {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    z-index: 3;
    padding: 0 60px;
}

.copyright a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.copyright a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* Section droite avec formulaire */
.right-section {
    flex: 1;
    margin-left: 52%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: #ffffff;
    position: relative;
    min-height: 100vh;
}

.right-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(63, 81, 181, 0.05), transparent);
    border-radius: 50%;
    transform: translate(40%, -40%);
}

.form-wrapper {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 2;
    animation: fadeInRight 0.8s ease-out;
}

.form-header {
    margin-bottom: 40px;
    text-align: center;
}

.form-header h2 {
    color: #3f51b5;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.form-header p, #page {
    color: #666;
    font-size: 16px;
}

.auth-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
}

.auth-tab {
    flex: 1;
    padding: 15px 8px;
    text-align: center;
    background: none;
    border: none;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.auth-tab.active {
    color: #3f51b5;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #f99131, #f9b431);
}

.form-content {
    display: none;
}

.form-content.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.input-group-custom {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 18px;
}

.form-control {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: #3f51b5;
    background: white;
    box-shadow: 0 0 0 4px rgba(63, 81, 181, 0.1);
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.form-check-label {
    color: #666;
    font-size: 14px;
    cursor: pointer;
}

.forgot-link {
    color: #3f51b5;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    float: right;
    margin-top: -15px;
    margin-bottom: 20px;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-primary-custom {
    width: 100%;
    padding: 15px;
    background: linear-gradient(90deg, #f99131, #f9b431);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(249, 145, 49, 0.3);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 145, 49, 0.4);
}

.btn-secondary-custom {
    width: 100%;
    padding: 15px;
    background: #3f51b5;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(63, 81, 181, 0.3);
}

.btn-secondary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(63, 81, 181, 0.4);
    background: #354399;
}

.divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    background: white;
    padding: 0 15px;
    color: #999;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.social-login {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.social-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
}

.social-btn:hover {
    border-color: #3f51b5;
    transform: translateY(-2px);
}

.social-btn.google {
    color: #db4437;
}

.social-btn.facebook {
    color: #4267B2;
}

.social-btn.twitter {
    color: #1DA1F2;
}

.back-link {
    text-align: center;
    margin-top: 25px;
}

.back-link a {
    color: #3f51b5;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.back-link a:hover {
    text-decoration: underline;
}

.language-switcher {
    position: absolute;
    top: 30px;
    right: 30px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.lang-btn {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 2px solid white;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

.lang-btn.active {
    background: white;
    border-color: #f99131;
}

.lang-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@media (max-width: 992px) {
    .auth-container {
        flex-direction: column;
    }

    .left-section {
        position: relative;
        width: 100%;
        min-height: 400px;
        padding: 40px 20px;
    }

    .right-section {
        margin-left: 0;
    }

    .features-list {
        display: none;
    }

    .right-section {
        padding: 40px 20px;
    }
}

@media (max-width: 576px) {
    .brand-name {
        font-size: 32px;
    }

    .brand-slogan {
        font-size: 16px;
    }

    .form-header h2 {
        font-size: 26px;
    }
}