﻿@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.layout-body {
    font-family: var(--font-family);
    background-color: var(--gray-900);
    color: var(--white);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

.layout-bg-image {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.layout-page {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.layout-left-panel {
    display: none;
}

/* ===== PANNEAU DROIT ===== */
.layout-right-panel {
    position: relative;
    width: 100%;
    max-width: var(--form-max-xl-width);
    height: calc(100vh - 60px);
}

/* ===== CARTE ===== */
.card-container {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    animation: cardFadeIn 0.4s var(--transition-slow) both;
    overflow-y: auto;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

.card-logo-img {
    height: 11rem;
    width: auto;
}

.card-divider {
    width: 45px;
    height: 3px;
    background: var(--primary);
    border-radius: var(--radius-full);
    margin: 0 0 1.5rem 0;
    flex-shrink: 0;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0.5rem 0;
}

.card-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    text-align: center;
    font-size: var(--font-size-xs);
    color: var(--gray-500);
    border-top: 1px solid var(--gray-300);
    flex-shrink: 0;
}

    .card-footer.hidden {
        display: none;
    }

/* ===== LOADER - CENTRÉ ===== */
.card-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.96);
    border-radius: var(--radius-xl);
    z-index: 10;
}

.spinner {
    display: flex;
    gap: 0.4rem;
}

.spinner-dot {
    width: 12px;
    height: 12px;
    background-color: var(--primary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.spinner-dot1 {
    animation-delay: -0.32s;
}

.spinner-dot2 {
    animation-delay: -0.16s;
}

.spinner-dot3 {
    animation-delay: 0s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.3);
        opacity: 0.2;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loader-text {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    margin-top: 1rem;
}

/* ===== DESKTOP ===== */
@media (min-width: 992px) {
    .layout-page {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: stretch;
        padding: 0;
    }

    .layout-left-panel {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: calc(100% - var(--form-max-width) - 80px);
        max-width: 550px;
        height: 100vh;
    }

    .layout-brand {
        display: flex;
        align-items: center;
        gap: 0.85rem;
        padding: 20px;
        margin: 30px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.01);
        backdrop-filter: blur(6px) saturate(120%);
        -webkit-backdrop-filter: blur(16px) saturate(120%);
    }

    .layout-brand-logo {
        height: 38px;
        width: auto;
    }

    .layout-brand-name {
        font-size: var(--font-size-lg);
        font-weight: 800;
        letter-spacing: 0.2em;
        text-transform: uppercase;
        background: linear-gradient(135deg, var(--white) 30%, var(--primary-light) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .layout-hero {
        display: flex;
        flex-direction: column;
        padding: 20px;
        margin: 30px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.01);
        backdrop-filter: blur(6px) saturate(120%);
        -webkit-backdrop-filter: blur(16px) saturate(120%);
    }

    .layout-hero-line {
        width: 48px;
        height: 4px;
        background: var(--primary);
        border-radius: var(--radius-full);
        margin-bottom: 1.5rem;
    }

    .layout-hero h2 {
        font-size: 2.3rem;
        font-weight: 800;
        line-height: 1.25;
        margin-bottom: 1.25rem;
    }

        .layout-hero h2 em {
            font-style: normal;
            color: #7ff8ee;
        }

    .layout-description {
        font-size: var(--font-size-base);
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.75);
        margin-bottom: 2.25rem;
    }

    .layout-features {
        display: flex;
        gap: 0.6rem;
        flex-wrap: wrap;
    }

    .layout-feature-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.45rem 1rem;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--radius-full);
        font-size: var(--font-size-xs);
        color: rgba(255, 255, 255, 0.85);
    }

        .layout-feature-badge .material-icons {
            font-size: 1rem;
            color: #7ff8ee;
        }

    .layout-right-panel {
        position: fixed;
        inset: 30px 30px 30px auto;
        width: var(--form-max-xl-width);
        max-width: var(--form-max-xl-width);
        height: calc(100vh - 60px);
        z-index: 10;
    }

    .card-container {
        padding: 3rem 2.5rem;
    }
}

/* ===== MOBILE ===== */
@media (max-width: 576px) {
    .card-container {
        padding: 1.5rem 1rem;
    }

    .card-logo-img {
        height: 8rem;
    }
}

/* Scrollbar */
.card-container::-webkit-scrollbar {
    width: 6px;
}

.card-container::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

.card-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

    .card-container::-webkit-scrollbar-thumb:hover {
        background: var(--primary-hover);
    }
