* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body, html {
    width: 100vw;
    height: 100vh;
    background-color: #f5f8ff;
    overflow: hidden;
}

.split-layout {
    display: flex;
    width: 100%;
    height: 100%;
}

/* --- CÔTÉ GAUCHE : image de fond + overlay sombre --- */
.left-panel {
    width: calc(50% + 20px);
    height: 100%;
    background-image:
        linear-gradient(135deg, rgba(0,0,0,0.88) 0%, rgba(10,10,10,0.82) 40%, rgba(20,20,20,0.78) 100%),
        url('../img/fond-connexion.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 8% 0 8%;
    position: relative;
    overflow: hidden;
}

.left-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.left-panel::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
}

/* --- BADGE LOGO --- */
.brand-badge {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
    animation: slideInLeft 0.8s ease-out;
}

.brand-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    backdrop-filter: blur(8px);
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* --- STATS EN BAS DU PANNEAU --- */
.stats-row {
    display: flex;
    gap: 36px;
    margin-top: 44px;
    position: relative;
    z-index: 1;
    animation: slideInLeft 0.8s ease-out 0.35s both;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
}

.stat-label {
    font-size: 0.78rem;
    color: #a3a3a3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.05); }
}

.left-panel h1 {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
    color: #ffffff;
    animation: slideInLeft 0.8s ease-out;
}

.left-panel h1 em {
    font-style: italic;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #999999 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.left-panel p {
    font-size: 1.15rem;
    color: #b3b3b3;
    line-height: 1.7;
    max-width: 80%;
    position: relative;
    z-index: 1;
    font-weight: 400;
    animation: slideInLeft 0.8s ease-out 0.2s both;
}

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

/* --- CÔTÉ DROIT : clean, blanc --- */
.right-panel {
    width: calc(50% + 20px);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f5f8ff;
    position: relative;
    overflow-y: auto;
    padding: 0 5%;
    margin-left: -20px;
    border-radius: 20px 0 0 20px;
    z-index: 2;
}

.right-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, #e2e2e2 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.4;
}

.form-box {
    width: 100%;
    max-width: 600px;
    padding: 0;
    position: relative;
    z-index: 1;
    animation: slideUp 0.7s ease-out;
    margin: 32px 0;
}

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

/* --- ONGLETS CONNEXION / INSCRIPTION --- */
.tabs {
    display: flex;
    gap: 8px;
    background: #eef3fc;
    padding: 6px;
    border-radius: 14px;
    margin-bottom: 32px;
}

.tab-btn {
    flex: 1;
    padding: 12px 0;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
    color: #8a8a8a;
    cursor: pointer;
    transition: all 0.25s ease;
}

.tab-btn.active {
    background: #ffffff;
    color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

/* --- PANNEAUX DE FORMULAIRE --- */
.tab-panel {
    display: none;
    animation: fadeIn 0.35s ease-out;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- CHAMPS EN LIGNE (style sobre, pas de "case") --- */
.field-group {
    margin-bottom: 26px;
}

.field-group label {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0a0a0a;
    margin-bottom: 10px;
}

.field-line {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    transition: border-color 0.25s ease;
}

.field-line:focus-within {
    border-bottom-color: #2563eb;
}

.field-line input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    color: #0a0a0a;
    font-family: 'Inter', sans-serif;
}

.field-line input::placeholder {
    color: #a3a3a3;
    font-weight: 400;
}

.field-line i {
    color: #a3a3a3;
    font-size: 1rem;
    margin-left: 12px;
    transition: color 0.25s ease;
}

.field-line:focus-within i {
    color: #000000;
}

.field-line i.toggle-password {
    cursor: pointer;
    pointer-events: auto;
}

.field-hint {
    margin-top: 8px;
    font-size: 0.8rem;
    color: #999999;
}

/* --- MOT DE PASSE OUBLIÉ --- */
.forgot-password {
    text-align: right;
    margin-bottom: 28px;
}

.forgot-password a {
    font-size: 0.88rem;
    color: #666666;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.forgot-password a:hover {
    color: #000000;
}

/* --- BOUTON : noir plein --- */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow:
        0 4px 14px rgba(37, 99, 235, 0.25),
        0 8px 24px rgba(37, 99, 235, 0.15);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
    font-family: 'Inter', sans-serif;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    background: #1d4ed8;
    box-shadow:
        0 8px 24px rgba(37, 99, 235, 0.35),
        0 12px 32px rgba(37, 99, 235, 0.2);
}

.btn-submit:hover::before {
    left: 100%;
}

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

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

/* --- GRANDS ÉCRANS : le bloc respire davantage --- */
@media (min-width: 1400px) {
    .form-box {
        max-width: 640px;
    }
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    body, html {
        overflow: auto;
        height: auto;
    }

    .split-layout {
        flex-direction: column;
    }

    .left-panel {
        width: 100%;
        height: auto;
        min-height: unset;
        padding: 28px 20px 24px;
        clip-path: none;
        border-radius: 0 0 20px 20px;
        align-items: center;
        text-align: center;
    }

    .left-panel h1 {
        font-size: 1.5rem;
        letter-spacing: -0.5px;
        margin-bottom: 10px;
    }

    .left-panel p {
        max-width: 100%;
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .brand-badge {
        justify-content: center;
        margin-bottom: 14px;
    }

    .brand-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .brand-name {
        font-size: 0.9rem;
    }

    .stats-row {
        justify-content: center;
        gap: 18px;
        margin-top: 14px;
        flex-wrap: nowrap;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    .stat-label {
        font-size: 0.6rem;
    }

    .stat-item {
        align-items: center;
    }

    .right-panel {
        width: 100%;
        margin-left: 0;
        border-radius: 0;
        padding: 32px 20px;
        justify-content: flex-start;
        align-items: center;
        background: #f5f8ff;
        overflow-y: visible;
    }

    .right-panel::before {
        display: none;
    }

    .left-panel {
        width: 100%;
    }

    .form-box {
        box-shadow: none;
        background: transparent;
        border: none;
        backdrop-filter: none;
        padding: 20px 0;
        animation: slideUp 0.5s ease-out;
        margin: 0;
    }
}
