* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0c9b84;
    --primary-dark: #087d6b;
    --primary-light: #e8f8f4;

    --text-dark: #17312d;
    --text: #49615d;
    --text-light: #82938f;

    --background: #f4f8f7;
    --white: #ffffff;

    --border: #e7efed;

    --shadow: 0 30px 80px rgba(20, 72, 63, 0.10);
    --shadow-soft: 0 15px 40px rgba(20, 72, 63, 0.08);
}

html,
body {
    min-height: 100%;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    background: var(--background);
    color: var(--text-dark);
}


/* =====================================================
   PAGE PRINCIPALE
===================================================== */

.welcome-page {
    position: relative;

    min-height: 100vh;

    display: flex;
    flex-direction: column;

    justify-content: center;

    padding: 45px;

    overflow: hidden;
}


/* =====================================================
   FORMES DE FOND
===================================================== */

.background-shape {
    position: absolute;

    border-radius: 50%;

    pointer-events: none;

    filter: blur(2px);
}

.background-shape-one {
    width: 500px;
    height: 500px;

    top: -250px;
    right: -150px;

    background: rgba(12, 155, 132, 0.08);
}

.background-shape-two {
    width: 400px;
    height: 400px;

    bottom: -230px;
    left: -170px;

    background: rgba(12, 155, 132, 0.06);
}


/* =====================================================
   CARTE PRINCIPALE
===================================================== */

.welcome-card {
    position: relative;
    z-index: 2;

    width: min(1220px, 100%);

    margin: auto;

    display: grid;
    grid-template-columns: 0.95fr 1.05fr;

    background: var(--white);

    border: 1px solid rgba(12, 155, 132, 0.06);

    border-radius: 34px;

    box-shadow: var(--shadow);

    overflow: hidden;
}


/* =====================================================
   CONTENU GAUCHE
===================================================== */

.welcome-content {
    padding: 70px 65px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;

    margin-bottom: 55px;
}

.brand-logo {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--primary);

    color: white;

    border-radius: 15px;

    font-size: 23px;
    font-weight: 800;

    box-shadow: 0 10px 25px rgba(12, 155, 132, 0.22);
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-text strong {
    font-size: 18px;
    letter-spacing: 0.8px;
}

.brand-text small {
    font-size: 9px;
    font-weight: 700;

    color: var(--primary);

    letter-spacing: 2px;
}


.welcome-badge {
    display: inline-flex;

    padding: 8px 13px;

    background: var(--primary-light);

    color: var(--primary-dark);

    border-radius: 30px;

    font-size: 12px;
    font-weight: 700;

    margin-bottom: 20px;
}


.welcome-content h1 {
    max-width: 520px;

    font-size: clamp(40px, 4vw, 62px);

    line-height: 1.05;

    letter-spacing: -2.5px;

    color: var(--text-dark);

    margin-bottom: 25px;
}

.welcome-content h1 span {
    display: block;

    color: var(--primary);
}


.welcome-description {
    max-width: 500px;

    font-size: 16px;

    line-height: 1.8;

    color: var(--text);

    margin-bottom: 35px;
}


/* =====================================================
   BOUTON
===================================================== */

.welcome-actions {
    margin-bottom: 38px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 18px;

    padding: 15px 18px 15px 24px;

    background: var(--primary);

    color: white;

    text-decoration: none;

    border-radius: 14px;

    font-size: 14px;
    font-weight: 700;

    box-shadow: 0 14px 30px rgba(12, 155, 132, 0.22);

    transition:
        transform 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);

    transform: translateY(-2px);

    box-shadow: 0 18px 35px rgba(12, 155, 132, 0.28);
}

.btn-arrow {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.16);

    border-radius: 10px;

    font-size: 18px;
}


/* =====================================================
   FONCTIONNALITÉS
===================================================== */

.welcome-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 11px;

    font-size: 13px;
    font-weight: 600;

    color: var(--text);
}

.feature-icon {
    width: 23px;
    height: 23px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--primary-light);

    color: var(--primary);

    font-size: 12px;
    font-weight: 800;
}


/* =====================================================
   VISUEL DROIT
===================================================== */

.welcome-visual {
    position: relative;

    min-height: 650px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 55px;

    background:
        linear-gradient(
            145deg,
            #eefaf7 0%,
            #f7fbfa 65%,
            #eaf7f4 100%
        );

    overflow: hidden;
}

.visual-glow {
    position: absolute;

    width: 500px;
    height: 500px;

    border-radius: 50%;

    background: rgba(12, 155, 132, 0.09);

    filter: blur(3px);
}


/* =====================================================
   DOCUMENT
===================================================== */

.document-card {
    position: relative;
    z-index: 2;

    width: min(480px, 100%);

    padding: 30px;

    background: white;

    border-radius: 20px;

    box-shadow:
        0 30px 70px rgba(19, 78, 68, 0.15),
        0 5px 20px rgba(19, 78, 68, 0.05);

    transform: rotate(-1.5deg);

    transition: transform 0.35s ease;
}

.document-card:hover {
    transform: rotate(0deg) translateY(-5px);
}


.document-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding-bottom: 20px;

    border-bottom: 1px solid var(--border);
}


.document-brand {
    display: flex;
    align-items: center;
    gap: 9px;
}

.mini-logo {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: var(--primary);

    color: white;

    font-size: 14px;
    font-weight: 800;
}

.document-brand div:last-child {
    display: flex;
    flex-direction: column;
}

.document-brand strong {
    font-size: 11px;
}

.document-brand small {
    color: var(--primary);

    font-size: 7px;

    font-weight: 700;

    letter-spacing: 1.5px;
}


.document-status {
    padding: 7px 10px;

    background: var(--primary-light);

    color: var(--primary-dark);

    border-radius: 7px;

    font-size: 8px;
    font-weight: 800;

    letter-spacing: 0.6px;
}


.document-heading {
    padding: 25px 0 20px;
}

.document-label {
    font-size: 8px;

    color: var(--text-light);

    font-weight: 700;

    letter-spacing: 1px;
}

.document-heading h2 {
    font-size: 12px;

    margin-top: 6px;

    color: var(--text-dark);
}


.document-info {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 15px;

    margin-bottom: 22px;
}

.document-info div {
    display: flex;
    flex-direction: column;

    gap: 5px;
}

.document-info span {
    color: var(--text-light);

    font-size: 7px;

    font-weight: 700;

    letter-spacing: 0.8px;
}

.document-info strong {
    font-size: 9px;
}


/* =====================================================
   FILIGRANE
===================================================== */

.document-watermark {
    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    font-size: 170px;

    font-weight: 900;

    color: var(--primary);

    opacity: 0.035;

    pointer-events: none;

    user-select: none;
}


/* =====================================================
   LIGNES DOCUMENT
===================================================== */

.document-lines {
    position: relative;
    z-index: 2;

    border: 1px solid var(--border);

    border-radius: 10px;

    overflow: hidden;
}

.document-line {
    display: grid;

    grid-template-columns: 1fr 45px 90px;

    gap: 10px;

    padding: 10px 12px;

    border-bottom: 1px solid var(--border);

    font-size: 8px;

    color: var(--text);
}

.document-line:last-child {
    border-bottom: none;
}

.document-line.heading {
    background: #f7faf9;

    color: var(--text-light);

    font-size: 7px;

    font-weight: 800;
}


/* =====================================================
   TOTAUX
===================================================== */

.document-total {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;

    gap: 9px;

    margin-top: 20px;

    padding-top: 18px;

    border-top: 1px solid var(--border);
}

.document-total > div {
    display: flex;
    justify-content: space-between;

    font-size: 8px;

    color: var(--text);
}

.document-total strong {
    color: var(--text-dark);
}

.document-total .total-final {
    margin-top: 5px;

    padding: 12px;

    background: var(--primary-light);

    color: var(--primary-dark);

    border-radius: 9px;

    font-size: 9px;
}

.document-total .total-final strong {
    color: var(--primary-dark);
}


.document-signature {
    display: flex;
    flex-direction: column;

    align-items: flex-end;

    margin-top: 24px;

    color: var(--text-light);

    font-size: 7px;
}

.signature-line {
    width: 100px;

    height: 1px;

    margin-top: 20px;

    background: #cdd9d6;
}


/* =====================================================
   CARTES FLOTTANTES
===================================================== */

.floating-card {
    position: absolute;
    z-index: 5;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px 15px;

    background: white;

    border: 1px solid rgba(12, 155, 132, 0.08);

    border-radius: 13px;

    box-shadow: var(--shadow-soft);

    animation: floating 4s ease-in-out infinite;
}

.floating-card strong {
    display: block;

    font-size: 10px;

    color: var(--text-dark);
}

.floating-card span {
    display: block;

    margin-top: 3px;

    font-size: 8px;

    color: var(--text-light);
}

.floating-icon {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: #fff0ef;

    color: #e85d55;

    font-size: 8px;

    font-weight: 900;
}

.floating-card-pdf {
    top: 110px;
    right: 25px;
}

.floating-card-check {
    bottom: 115px;
    left: 15px;

    animation-delay: 1.2s;
}

.check-circle {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--primary-light);

    color: var(--primary);

    font-size: 13px;

    font-weight: 900;
}


@keyframes floating {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }
}


/* =====================================================
   BAS DE PAGE
===================================================== */

.welcome-bottom {
    position: relative;
    z-index: 2;

    margin: 22px auto 0;

    color: var(--text-light);

    font-size: 11px;

    text-align: center;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1000px) {

    .welcome-page {
        padding: 25px;
    }

    .welcome-card {
        grid-template-columns: 1fr;
    }

    .welcome-content {
        padding: 55px;
    }

    .welcome-visual {
        min-height: 580px;
    }

}


@media (max-width: 600px) {

    .welcome-page {
        padding: 15px;
    }

    .welcome-card {
        border-radius: 24px;
    }

    .welcome-content {
        padding: 38px 25px;
    }

    .brand {
        margin-bottom: 35px;
    }

    .welcome-content h1 {
        font-size: 42px;
        letter-spacing: -1.8px;
    }

    .welcome-description {
        font-size: 14px;
    }

    .welcome-visual {
        min-height: 500px;

        padding: 25px 15px;
    }

    .document-card {
        padding: 20px;

        transform: none;
    }

    .floating-card-pdf {
        top: 25px;
        right: 8px;
    }

    .floating-card-check {
        bottom: 25px;
        left: 8px;
    }

    .welcome-bottom {
        margin-bottom: 5px;
    }

}

/* =====================================================
   PAGE CONNEXION
===================================================== */

.login-page {
    position: relative;

    min-height: 100vh;

    display: flex;
    flex-direction: column;

    justify-content: center;

    align-items: center;

    padding: 35px;

    overflow: hidden;

    background: var(--background);
}


.login-background {
    position: absolute;

    border-radius: 50%;

    pointer-events: none;
}

.login-background-one {
    width: 550px;
    height: 550px;

    top: -280px;
    right: -180px;

    background: rgba(12, 155, 132, 0.07);
}

.login-background-two {
    width: 450px;
    height: 450px;

    bottom: -250px;
    left: -180px;

    background: rgba(12, 155, 132, 0.06);
}


.login-card {
    position: relative;
    z-index: 2;

    width: min(1050px, 100%);

    min-height: 650px;

    display: grid;

    grid-template-columns: 1fr 0.85fr;

    background: white;

    border-radius: 30px;

    overflow: hidden;

    box-shadow: var(--shadow);
}


/* =====================================================
   VISUEL
===================================================== */

.login-visual {
    position: relative;

    padding: 55px;

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            #0c9b84,
            #087d6b
        );

    color: white;
}


.login-brand {
    display: flex;

    align-items: center;

    gap: 12px;
}


.login-logo {
    width: 46px;
    height: 46px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background: white;

    color: var(--primary);

    font-size: 21px;

    font-weight: 900;
}


.login-brand > div:last-child,
.mobile-brand > div:last-child {
    display: flex;
    flex-direction: column;

    gap: 2px;
}


.login-brand strong,
.mobile-brand strong {
    font-size: 17px;

    letter-spacing: 0.7px;
}


.login-brand span,
.mobile-brand span {
    font-size: 8px;

    letter-spacing: 2px;

    font-weight: 700;

    opacity: 0.8;
}


.login-visual-content {
    position: relative;
    z-index: 2;

    margin-top: 100px;

    max-width: 420px;
}


.login-badge {
    display: inline-flex;

    padding: 8px 12px;

    border-radius: 30px;

    background: rgba(255,255,255,0.14);

    border: 1px solid rgba(255,255,255,0.16);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1px;

    margin-bottom: 20px;
}


.login-visual-content h1 {
    font-size: 43px;

    line-height: 1.08;

    letter-spacing: -1.8px;

    margin-bottom: 22px;
}


.login-visual-content h1 span {
    display: block;

    color: #baf2e7;
}


.login-visual-content p {
    max-width: 380px;

    color: rgba(255,255,255,0.78);

    font-size: 14px;

    line-height: 1.8;
}


/* =====================================================
   APERÇU DOCUMENT
===================================================== */

.login-document-preview {
    position: absolute;

    z-index: 2;

    right: 40px;

    bottom: -80px;

    width: 390px;

    padding: 25px;

    border-radius: 18px;

    background: white;

    color: var(--text-dark);

    box-shadow: 0 25px 55px rgba(0,0,0,0.15);

    transform: rotate(-4deg);

    opacity: 0.96;
}


.preview-top {
    display: flex;

    align-items: center;

    gap: 9px;

    padding-bottom: 16px;

    border-bottom: 1px solid var(--border);
}


.preview-logo {
    width: 30px;
    height: 30px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 8px;

    background: var(--primary);

    color: white;

    font-size: 12px;

    font-weight: 900;
}


.preview-title {
    display: flex;
    flex-direction: column;

    flex: 1;
}


.preview-title strong {
    font-size: 10px;
}


.preview-title span {
    margin-top: 2px;

    font-size: 7px;

    color: var(--primary);

    font-weight: 800;

    letter-spacing: 1px;
}


.preview-status {
    padding: 6px 8px;

    background: var(--primary-light);

    color: var(--primary);

    border-radius: 6px;

    font-size: 7px;

    font-weight: 900;
}


.preview-line {
    width: 85%;

    height: 5px;

    margin-top: 17px;

    border-radius: 5px;

    background: #edf3f1;
}


.preview-line.large {
    width: 55%;

    height: 8px;

    margin-top: 23px;

    background: #dce9e6;
}


.preview-line.short {
    width: 42%;

    margin-top: 9px;
}


.preview-table {
    display: grid;

    grid-template-columns: 1fr 55px 70px;

    gap: 7px;

    margin-top: 25px;
}


.preview-table div {
    height: 28px;

    border-radius: 5px;

    background: #f1f6f4;
}


.preview-total {
    display: flex;

    justify-content: space-between;

    margin-top: 22px;

    padding: 11px;

    border-radius: 8px;

    background: var(--primary-light);

    font-size: 8px;
}


.preview-total strong {
    color: var(--primary-dark);
}


/* =====================================================
   FORMULAIRE
===================================================== */

.login-content {
    padding: 65px 60px;

    display: flex;

    flex-direction: column;

    justify-content: center;
}


.mobile-brand {
    display: none;
}


.login-heading {
    margin-bottom: 32px;
}


.login-small-title {
    color: var(--primary);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 1.6px;
}


.login-heading h2 {
    margin-top: 10px;

    font-size: 36px;

    letter-spacing: -1.3px;

    color: var(--text-dark);
}


.login-heading p {
    margin-top: 9px;

    color: var(--text-light);

    font-size: 13px;
}


.login-form {
    display: flex;

    flex-direction: column;

    gap: 22px;
}


.form-group {
    display: flex;

    flex-direction: column;

    gap: 8px;
}


.form-group label {
    font-size: 12px;

    font-weight: 700;

    color: var(--text-dark);
}


.input-wrapper {
    position: relative;

    display: flex;

    align-items: center;
}


.input-icon {
    position: absolute;

    left: 16px;

    color: var(--text-light);

    font-size: 14px;

    font-weight: 700;
}


.input-wrapper input {
    width: 100%;

    height: 52px;

    padding: 0 48px;

    border: 1px solid var(--border);

    border-radius: 12px;

    background: #fbfdfc;

    color: var(--text-dark);

    font-family: inherit;

    font-size: 13px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.input-wrapper input:focus {
    border-color: var(--primary);

    background: white;

    box-shadow:
        0 0 0 4px rgba(12,155,132,0.08);
}


.input-wrapper input::placeholder {
    color: #a8b5b2;
}


.password-toggle {
    position: absolute;

    right: 12px;

    border: none;

    background: transparent;

    color: var(--primary);

    font-family: inherit;

    font-size: 10px;

    font-weight: 800;

    cursor: pointer;
}


.login-button {
    width: 100%;

    height: 54px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 13px 0 20px;

    margin-top: 5px;

    border: none;

    border-radius: 13px;

    background: var(--primary);

    color: white;

    font-family: inherit;

    font-size: 13px;

    font-weight: 800;

    cursor: pointer;

    box-shadow: 0 14px 30px rgba(12,155,132,0.2);

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.login-button:hover {
    background: var(--primary-dark);

    transform: translateY(-2px);

    box-shadow: 0 18px 35px rgba(12,155,132,0.25);
}


.login-arrow {
    width: 34px;
    height: 34px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: rgba(255,255,255,0.15);

    font-size: 17px;
}


/* =====================================================
   ALERTE
===================================================== */

.alert {
    display: flex;

    align-items: center;

    gap: 10px;

    padding: 12px 14px;

    margin-bottom: 22px;

    border-radius: 11px;

    font-size: 11px;

    font-weight: 600;
}


.alert-error {
    background: #fff1f0;

    color: #bd4c46;

    border: 1px solid #ffe0de;
}


.alert-icon {
    width: 23px;
    height: 23px;

    display: flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 50%;

    background: #ffd9d6;

    color: #bd4c46;

    font-size: 11px;

    font-weight: 900;
}


/* =====================================================
   SÉCURITÉ
===================================================== */

.login-security {
    display: flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

    margin-top: 25px;

    color: var(--text-light);

    font-size: 9px;
}


.security-icon {
    width: 18px;
    height: 18px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--primary-light);

    color: var(--primary);

    font-size: 9px;

    font-weight: 900;
}


.login-bottom {
    position: relative;
    z-index: 2;

    margin-top: 20px;

    color: var(--text-light);

    font-size: 10px;

    text-align: center;
}


/* =====================================================
   RESPONSIVE CONNEXION
===================================================== */

@media (max-width: 850px) {

    .login-page {
        padding: 20px;
    }

    .login-card {
        grid-template-columns: 1fr;

        min-height: auto;
    }

    .login-visual {
        display: none;
    }

    .login-content {
        padding: 45px 35px;
    }

    .mobile-brand {
        display: flex;

        align-items: center;

        gap: 12px;

        margin-bottom: 45px;
    }

}


@media (max-width: 500px) {

    .login-page {
        padding: 12px;
    }

    .login-card {
        border-radius: 22px;
    }

    .login-content {
        padding: 35px 22px;
    }

    .login-heading h2 {
        font-size: 31px;
    }

    .login-security {
        text-align: center;

        line-height: 1.5;
    }

}

.sidebar-logo {
    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    overflow: hidden;

    background: transparent;

    border: none;

    box-shadow: none;
}

.sidebar-logo img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    display: block;

    background: transparent;

    border: none;

    box-shadow: none;

    /* Permet au blanc de l'image de se fondre
       avec le fond clair de la sidebar */
    mix-blend-mode: multiply;
}