/* ========================================
   AUTH PAGES PREMIUM - THÈME SÉNÉGALAIS
   Pages Connexion et Inscription
   ======================================== */

/* ========================================
   LAYOUT PRINCIPAL
   ======================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, #1E3A5F 0%, #0F172A 100%);
    position: relative;
    overflow: hidden;
}

/* Pattern africain de fond */
.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30L30 0z' fill='rgba(212,168,75,0.05)'/%3E%3C/svg%3E");
    background-size: 60px 60px;
    pointer-events: none;
}

/* Cercles décoratifs */
.auth-page::after {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(199, 91, 57, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ========================================
   PANNEAUX SPLIT LAYOUT
   ======================================== */
.auth-left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    position: relative;
    z-index: 1;
    color: #fff;
}

.auth-branding {
    text-align: center;
    margin-bottom: 40px;
}

.auth-branding-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.auth-branding h1 {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 10px;
    background: linear-gradient(135deg, #D4A84B 0%, #E8C872 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-branding p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 350px;
}

.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.auth-feature:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.auth-feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.auth-feature-text h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #D4A84B;
    margin: 0 0 5px;
}

.auth-feature-text p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.5;
}

/* ========================================
   PANNEAU FORMULAIRE (DROITE)
   ======================================== */
.auth-right-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: linear-gradient(135deg, #FFFDF7 0%, #FDF8ED 100%);
    position: relative;
    z-index: 1;
}

/* Vague décorative */
.auth-right-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50px;
    bottom: 0;
    width: 100px;
    background: linear-gradient(135deg, #1E3A5F 0%, #0F172A 100%);
    clip-path: ellipse(50px 100% at 0% 50%);
}

/* ========================================
   CARTE FORMULAIRE
   ======================================== */
.auth-card-premium {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 24px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
}

.auth-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(135deg, #C75B39 0%, #D4A84B 100%);
}

/* Header du formulaire */
.auth-header-premium {
    text-align: center;
    margin-bottom: 35px;
}

.auth-header-premium h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1E3A5F;
    margin: 0 0 10px;
}

.auth-header-premium p {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

/* ========================================
   MESSAGES D'ERREUR/SUCCÈS
   ======================================== */
.auth-alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.auth-alert-error {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    border: 1px solid #F87171;
    color: #991B1B;
}

.auth-alert-success {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    border: 1px solid #34D399;
    color: #065F46;
}

.auth-alert-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.auth-alert ul {
    margin: 0;
    padding-left: 20px;
}

.auth-alert li {
    margin-bottom: 5px;
}

.auth-alert li:last-child {
    margin-bottom: 0;
}

/* ========================================
   CHAMPS DE FORMULAIRE
   ======================================== */
.form-group-premium {
    margin-bottom: 22px;
    position: relative;
}

.form-label-premium {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1E3A5F;
    margin-bottom: 8px;
}

.form-label-icon {
    font-size: 1rem;
}

.form-control-premium {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    font-family: inherit;
    color: #1E3A5F;
    background: #F8FAFC;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    transition: all 0.3s ease;
    outline: none;
}

.form-control-premium:focus {
    background: #fff;
    border-color: #D4A84B;
    box-shadow: 0 0 0 4px rgba(212, 168, 75, 0.15);
}

.form-control-premium::placeholder {
    color: #94A3B8;
}

/* Select stylisé */
.form-select-premium {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%231E3A5F' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 45px;
    cursor: pointer;
}

/* Textarea */
.form-textarea-premium {
    resize: vertical;
    min-height: 100px;
}

/* ========================================
   GRID FORMULAIRE
   ======================================== */
.form-row-premium {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* ========================================
   SÉLECTEUR TYPE UTILISATEUR
   ======================================== */
.user-type-selector-premium {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 5px;
}

.user-type-option-premium {
    padding: 20px 15px;
    border: 2px solid #E2E8F0;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #F8FAFC;
}

.user-type-option-premium:hover {
    border-color: #D4A84B;
    background: #FFFDF7;
}

.user-type-option-premium.selected {
    border-color: #C75B39;
    background: linear-gradient(135deg, #FEF3E8 0%, #FDF0E0 100%);
    box-shadow: 0 4px 15px rgba(199, 91, 57, 0.15);
}

.user-type-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}

.user-type-option-premium h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1E3A5F;
    margin: 0 0 5px;
}

.user-type-option-premium p {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
}

.user-type-option-premium.selected h4 {
    color: #C75B39;
}

/* ========================================
   CHECKBOX REMEMBER ME
   ======================================== */
.remember-forgot-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.remember-me-premium {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.remember-me-premium input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #C75B39;
    cursor: pointer;
}

.remember-me-premium span {
    font-size: 0.9rem;
    color: #666;
}

.forgot-password-premium {
    font-size: 0.9rem;
    color: #C75B39;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password-premium:hover {
    color: #D4A84B;
    text-decoration: underline;
}

/* ========================================
   BOUTON SUBMIT
   ======================================== */
.btn-auth-submit {
    width: 100%;
    padding: 16px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: linear-gradient(135deg, #C75B39 0%, #E07A5A 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(199, 91, 57, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-auth-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(199, 91, 57, 0.4);
}

.btn-auth-submit:active {
    transform: translateY(-1px);
}

.btn-auth-submit .btn-icon {
    font-size: 1.2rem;
}

/* ========================================
   LIENS FOOTER
   ======================================== */
.auth-footer-links {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #E2E8F0;
}

.auth-footer-links p {
    margin: 10px 0;
    font-size: 0.95rem;
    color: #666;
}

.auth-footer-links a {
    color: #C75B39;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer-links a:hover {
    color: #D4A84B;
    text-decoration: underline;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #94A3B8 !important;
    font-weight: 500 !important;
}

.auth-back-link:hover {
    color: #1E3A5F !important;
}

/* ========================================
   SÉPARATEUR "OU"
   ======================================== */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E2E8F0;
}

.auth-divider span {
    padding: 0 15px;
    color: #94A3B8;
    font-size: 0.9rem;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-left-panel {
    animation: slideInLeft 0.8s ease-out;
}

.auth-card-premium {
    animation: slideInRight 0.8s ease-out;
}

/* Input focus animation */
.form-control-premium:focus {
    animation: inputPulse 0.3s ease;
}

@keyframes inputPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.01);
    }

    100% {
        transform: scale(1);
    }
}

/* ========================================
   PASSWORD STRENGTH INDICATOR
   ======================================== */
.password-strength {
    display: flex;
    gap: 5px;
    margin-top: 8px;
}

.password-strength-bar {
    height: 4px;
    flex: 1;
    background: #E2E8F0;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.password-strength-bar.weak {
    background: #EF4444;
}

.password-strength-bar.medium {
    background: #F59E0B;
}

.password-strength-bar.strong {
    background: #10B981;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 992px) {
    .auth-page {
        flex-direction: column;
    }

    .auth-left-panel {
        padding: 40px 30px;
        min-height: auto;
    }

    .auth-branding h1 {
        font-size: 2.2rem;
    }

    .auth-features {
        display: none;
    }

    .auth-right-panel {
        padding: 30px 20px 50px;
    }

    .auth-right-panel::before {
        display: none;
    }
}

@media (max-width: 576px) {
    .auth-left-panel {
        padding: 30px 20px;
    }

    .auth-branding-icon {
        font-size: 3.5rem;
    }

    .auth-branding h1 {
        font-size: 1.8rem;
    }

    .auth-branding p {
        font-size: 1rem;
    }

    .auth-card-premium {
        padding: 35px 25px;
        border-radius: 20px;
    }

    .auth-header-premium h2 {
        font-size: 1.5rem;
    }

    .form-row-premium {
        grid-template-columns: 1fr;
    }

    .user-type-selector-premium {
        grid-template-columns: 1fr;
    }

    .user-type-option-premium {
        padding: 15px;
    }

    .user-type-icon {
        font-size: 2rem;
    }

    .remember-forgot-premium {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========================================
   VERSION MOBILE-ONLY (pour écrans < 768px)
   ======================================== */
@media (max-width: 768px) {
    .auth-page.mobile-only {
        display: block;
        background: linear-gradient(135deg, #FFFDF7 0%, #FDF8ED 100%);
    }

    .auth-page.mobile-only .auth-left-panel {
        display: none;
    }

    .auth-page.mobile-only .auth-right-panel {
        min-height: 100vh;
        display: flex;
        align-items: center;
        padding: 20px;
    }

    .auth-page.mobile-only .auth-card-premium {
        box-shadow: none;
        background: transparent;
        padding: 0;
    }

    .auth-page.mobile-only .auth-card-premium::before {
        display: none;
    }

    .mobile-logo-header {
        text-align: center;
        margin-bottom: 30px;
    }

    .mobile-logo-header .logo-icon {
        font-size: 3rem;
        margin-bottom: 10px;
    }

    .mobile-logo-header h1 {
        font-size: 1.6rem;
        background: linear-gradient(135deg, #C75B39 0%, #D4A84B 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin: 0;
    }
}