        /* =========================================
           VARIABLES OFFICIELLES DIGISCALE-PRO
        ========================================== */

        :root {

            --black: #01030A;
            --blue-black: #020713;
            --blue-dark: #041126;
            --blue: #071A36;

            --gold-shadow: #806217;
            --gold-dark: #A88322;
            --gold: #C6A23A;
            --gold-light: #E4C96A;
            --gold-white: #F5E7AE;

            --white: #FFFFFF;
            --text: #E9EBF0;
            --muted: #9299A7;


            /* DARK */

            --page-bg: #01030A;

            --surface:
                rgba(4, 17, 38, 0.88);

            --surface-strong:
                rgba(7, 26, 54, 0.94);

            --input-bg:
                rgba(2, 7, 19, 0.78);

            --border:
                rgba(228, 201, 106, 0.18);

            --border-strong:
                rgba(198, 162, 58, 0.30);

            --shadow:
                0 30px 80px rgba(0, 0, 0, 0.45);

            --transition:
                0.28s ease;
        }


        /* =========================================
           MODE CLAIR PREMIUM
        ========================================== */

        :root.theme-light {

            --page-bg: #EEF1F6;

            --surface: #E8ECF3;

            --surface-strong: #F0F2F6;

            --input-bg: #DDE3EC;

            --text: #071A36;

            --muted: #596477;

            --border:
                rgba(128, 98, 23, 0.20);

            --border-strong:
                rgba(128, 98, 23, 0.34);

            --shadow:
                0 28px 70px rgba(4, 17, 38, 0.13);
        }


        /* =========================================
           RESET
        ========================================== */

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


        html {

            min-height: 100%;

            background:
                var(--page-bg);

            transition:
                background var(--transition),
                color var(--transition);
        }


        body {

            min-height: 100vh;

            font-family:
                "Segoe UI",
                Arial,
                sans-serif;

            color:
                var(--text);

            overflow-x: hidden;

            transition:
                background var(--transition),
                color var(--transition);
        }


        /* =========================================
           ARRIÈRE-PLAN SOMBRE
        ========================================== */

        body {

            background:

                radial-gradient(
                    circle at 15% 15%,
                    rgba(198, 162, 58, 0.08),
                    transparent 30%
                ),

                radial-gradient(
                    circle at 85% 80%,
                    rgba(7, 26, 54, 0.75),
                    transparent 34%
                ),

                linear-gradient(
                    135deg,
                    #01030A 0%,
                    #020713 45%,
                    #041126 100%
                );
        }


        /* =========================================
           ARRIÈRE-PLAN CLAIR PREMIUM
        ========================================== */

        html.theme-light body {

            background:

                /* Halo ivoire supérieur */
                radial-gradient(
                    ellipse 75% 55% at 18% 8%,
                    rgba(255, 255, 255, 0.70),
                    transparent 68%
                ),

                /* Grande profondeur bleu-gris */
                radial-gradient(
                    ellipse 70% 65% at 88% 18%,
                    rgba(7, 26, 54, 0.10),
                    transparent 70%
                ),

                /* Halo doré très discret */
                radial-gradient(
                    ellipse 45% 40% at 78% 82%,
                    rgba(198, 162, 58, 0.11),
                    transparent 72%
                ),

                /* Bleu froid inférieur */
                radial-gradient(
                    ellipse 65% 50% at 10% 95%,
                    rgba(7, 26, 54, 0.08),
                    transparent 72%
                ),

                linear-gradient(
                    135deg,
                    #F7F3E6 0%,
                    #F2F3F5 28%,
                    #EEF1F6 58%,
                    #E8ECF3 100%
                );
        }


        /* =========================================
           TEXTURES VISUELLES DU MODE CLAIR
        ========================================== */

        html.theme-light body::before {

            content: "";

            position: fixed;

            inset: 0;

            pointer-events: none;

            z-index: 0;

            opacity: 0.65;

            background:

                linear-gradient(
                    115deg,
                    transparent 0%,
                    transparent 37%,
                    rgba(7, 26, 54, 0.025) 37.2%,
                    transparent 37.5%
                ),

                linear-gradient(
                    65deg,
                    transparent 0%,
                    transparent 62%,
                    rgba(198, 162, 58, 0.035) 62.2%,
                    transparent 62.5%
                );
        }


        html.theme-light body::after {

            content: "";

            position: fixed;

            width: 650px;
            height: 650px;

            top: -340px;
            right: -250px;

            border-radius: 50%;

            border:
                1px solid
                rgba(128, 98, 23, 0.10);

            box-shadow:

                0 0 0 35px
                rgba(128, 98, 23, 0.018),

                0 0 0 80px
                rgba(7, 26, 54, 0.018);

            pointer-events: none;

            z-index: 0;
        }


        a {
            color: inherit;
            text-decoration: none;
        }


        button,
        input {
            font: inherit;
        }


        /* =========================================
           PAGE
        ========================================== */

        .page {

            min-height: 100vh;

            position: relative;

            display: flex;

            align-items: center;

            justify-content: center;

            padding: 40px 20px;

            overflow: hidden;
        }


        /* =========================================
           ÉLÉMENTS DÉCORATIFS
        ========================================== */

        .decoration {

            position: fixed;

            pointer-events: none;

            z-index: 1;
        }


        .decoration-one {

            width: 420px;
            height: 420px;

            top: -230px;
            left: -180px;

            border:
                1px solid
                rgba(198, 162, 58, 0.10);

            border-radius: 50%;
        }


        .decoration-two {

            width: 560px;
            height: 560px;

            right: -330px;
            bottom: -330px;

            border:
                1px solid
                rgba(198, 162, 58, 0.08);

            border-radius: 50%;
        }


        .decoration-line {

            position: fixed;

            width: 180px;
            height: 1px;

            background:

                linear-gradient(
                    90deg,
                    transparent,
                    rgba(228, 201, 106, 0.35),
                    transparent
                );

            pointer-events: none;

            z-index: 1;
        }


        .line-one {

            top: 18%;
            left: 5%;

            transform:
                rotate(-35deg);
        }


        .line-two {

            right: 5%;
            bottom: 18%;

            transform:
                rotate(-35deg);
        }


        /* =========================================
           DÉCORATIONS SPÉCIFIQUES MODE CLAIR
        ========================================== */

        html.theme-light .decoration-one {

            border-color:
                rgba(128, 98, 23, 0.12);

            box-shadow:
                0 0 0 28px
                rgba(128, 98, 23, 0.018);
        }


        html.theme-light .decoration-two {

            border-color:
                rgba(7, 26, 54, 0.08);

            box-shadow:
                0 0 0 35px
                rgba(7, 26, 54, 0.018);
        }


        html.theme-light .decoration-line {

            background:

                linear-gradient(
                    90deg,
                    transparent,
                    rgba(128, 98, 23, 0.18),
                    transparent
                );
        }


        /* =========================================
           CONTAINER
        ========================================== */

        .register-wrapper {

            position: relative;

            z-index: 3;

            width: 100%;

            max-width: 510px;
        }


        /* =========================================
           NAVIGATION
        ========================================== */

        .top-navigation {

            margin-bottom: 22px;
        }


        .back-link {

            display: inline-flex;

            align-items: center;

            gap: 8px;

            color:
                var(--muted);

            font-size: 14px;

            font-weight: 500;

            transition:
                color var(--transition),
                transform var(--transition);
        }


        .back-link:hover {

            color:
                var(--gold-light);

            transform:
                translateX(-3px);
        }


        html.theme-light .back-link:hover {

            color:
                var(--gold-dark);
        }


        /* =========================================
           CARTE
        ========================================== */

        .register-card {

            position: relative;

            padding:
                42px 42px 36px;

            background:

                linear-gradient(
                    145deg,
                    rgba(7, 26, 54, 0.96),
                    rgba(2, 7, 19, 0.96)
                );

            border:
                1px solid
                var(--border);

            border-radius:
                24px;

            box-shadow:
                var(--shadow);

            overflow:
                hidden;

            transition:
                background var(--transition),
                border-color var(--transition),
                box-shadow var(--transition);
        }


        /* =========================================
           CARTE MODE CLAIR
        ========================================== */

        html.theme-light .register-card {

            background:

                linear-gradient(
                    145deg,
                    #EEF1F6 0%,
                    #E8ECF3 58%,
                    #F2F3F4 100%
                );

            border-color:
                rgba(128, 98, 23, 0.20);

            box-shadow:

                0 30px 70px
                rgba(4, 17, 38, 0.13),

                0 2px 0
                rgba(255, 255, 255, 0.45)
                inset;
        }


        .register-card::before {

            content: "";

            position: absolute;

            top: 0;

            left: 7%;
            right: 7%;

            height: 1px;

            background:

                linear-gradient(
                    90deg,
                    transparent,
                    var(--gold-light),
                    transparent
                );

            opacity:
                0.75;
        }


        .register-card::after {

            content: "";

            position: absolute;

            width: 260px;
            height: 260px;

            top: -180px;
            right: -150px;

            border-radius:
                50%;

            background:

                radial-gradient(
                    circle,
                    rgba(198, 162, 58, 0.10),
                    transparent 68%
                );

            pointer-events:
                none;
        }


        /* =========================================
           MARQUE
        ========================================== */

        .brand {

            text-align: center;

            margin-bottom:
                30px;
        }


        .brand-mark {
    width: 78px;
    height: 78px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}


        html.theme-light .brand-mark {

            background:

                linear-gradient(
                    145deg,
                    #071A36,
                    #041126
                );

            border-color:
                rgba(128, 98, 23, 0.35);
        }


        .brand-name {

            color:
                var(--gold-light);

            font-size:
                21px;

            font-weight:
                700;

            letter-spacing:
                0.8px;
        }


        html.theme-light .brand-name {

            color:
                var(--gold-dark);
        }


        .brand-subtitle {

            margin-top:
                5px;

            color:
                var(--muted);

            font-size:
                12px;

            letter-spacing:
                1.5px;

            text-transform:
                uppercase;
        }


        /* =========================================
           TITRE
        ========================================== */

        .heading {

            text-align:
                center;

            margin-bottom:
                28px;
        }


        .heading h1 {

            color:
                var(--text);

            font-size:
                27px;

            line-height:
                1.25;

            font-weight:
                700;

            letter-spacing:
                -0.4px;
        }


        .heading p {

            margin-top:
                9px;

            color:
                var(--muted);

            font-size:
                14px;

            line-height:
                1.6;
        }


        /* =========================================
           FORMULAIRE
        ========================================== */

        .form-group {

            margin-bottom:
                17px;
        }


        .form-label {

            display:
                block;

            margin-bottom:
                8px;

            color:
                var(--text);

            font-size:
                13px;

            font-weight:
                600;
        }


        .input-wrapper {

            position:
                relative;
        }


        .form-input {

            width:
                100%;

            height:
                52px;

            padding:
                0 15px;

            color:
                var(--text);

            background:
                var(--input-bg);

            border:
                1px solid
                var(--border);

            border-radius:
                12px;

            outline:
                none;

            transition:
                border-color var(--transition),
                background var(--transition),
                box-shadow var(--transition);
        }


        .form-input::placeholder {

            color:
                var(--muted);

            opacity:
                0.72;
        }


        .form-input:focus {

            border-color:
                rgba(228, 201, 106, 0.62);

            box-shadow:

                0 0 0 3px
                rgba(198, 162, 58, 0.08);
        }


        html.theme-light .form-input {

            border-color:
                rgba(4, 17, 38, 0.12);
        }


        html.theme-light .form-input:focus {

            border-color:
                rgba(128, 98, 23, 0.55);

            box-shadow:

                0 0 0 3px
                rgba(198, 162, 58, 0.10);
        }


        /* =========================================
           CONDITIONS
        ========================================== */

        .terms {

            display:
                flex;

            align-items:
                flex-start;

            gap:
                10px;

            margin:
                19px 0 22px;
        }


        .terms input {

            width:
                16px;

            height:
                16px;

            margin-top:
                2px;

            accent-color:
                var(--gold);

            cursor:
                pointer;

            flex-shrink:
                0;
        }


        .terms label {

            color:
                var(--muted);

            font-size:
                12px;

            line-height:
                1.55;

            cursor:
                pointer;
        }


        .terms a {

            color:
                var(--gold-light);

            font-weight:
                600;
        }


        html.theme-light .terms a {

            color:
                var(--gold-dark);
        }


        .terms a:hover {

            text-decoration:
                underline;
        }


        /* =========================================
           BOUTON
        ========================================== */

        .submit-button {

            width:
                100%;

            height:
                53px;

            border:
                none;

            border-radius:
                12px;

            color:
                #071A36;

            background:

                linear-gradient(
                    135deg,
                    var(--gold-white),
                    var(--gold-light) 48%,
                    var(--gold)
                );

            font-size:
                14px;

            font-weight:
                800;

            letter-spacing:
                0.2px;

            cursor:
                pointer;

            box-shadow:

                0 12px 28px
                rgba(128, 98, 23, 0.18);

            transition:
                transform var(--transition),
                box-shadow var(--transition),
                filter var(--transition);
        }


        .submit-button:hover {

            transform:
                translateY(-2px);

            box-shadow:

                0 16px 32px
                rgba(128, 98, 23, 0.25);

            filter:
                brightness(1.03);
        }


        .submit-button:active {

            transform:
                translateY(0);
        }


        /* =========================================
           CONNEXION
        ========================================== */

        .login-link {

            margin-top:
                24px;

            text-align:
                center;

            color:
                var(--muted);

            font-size:
                13px;
        }


        .login-link a {

            margin-left:
                4px;

            color:
                var(--gold-light);

            font-weight:
                700;
        }


        html.theme-light .login-link a {

            color:
                var(--gold-dark);
        }


        .login-link a:hover {

            text-decoration:
                underline;
        }


        /* =========================================
           SÉCURITÉ
        ========================================== */

        .security-note {

            display:
                flex;

            align-items:
                center;

            justify-content:
                center;

            gap:
                7px;

            margin-top:
                25px;

            padding-top:
                20px;

            border-top:
                1px solid
                var(--border);

            color:
                var(--muted);

            font-size:
                11px;
        }


        .security-icon {

            color:
                var(--gold-light);

            font-size:
                13px;
        }


        html.theme-light .security-icon {

            color:
                var(--gold-dark);
        }


        /* =========================================
           RESPONSIVE
        ========================================== */

        @media (max-width: 600px) {

            .page {

                padding:
                    25px 14px;
            }


            .register-card {

                padding:
                    32px 22px 28px;

                border-radius:
                    20px;
            }


            .heading h1 {

                font-size:
                    24px;
            }


            .brand {

                margin-bottom:
                    25px;
            }


            .decoration-one,
            .decoration-two,
            .decoration-line {

                display:
                    none;
            }
        }


        @media (max-height: 760px) {

            .page {

                align-items:
                    flex-start;
            }


            .register-wrapper {

                margin-top:
                    10px;
            }


            .register-card {

                padding-top:
                    30px;
            }


            .brand {

                margin-bottom:
                    20px;
            }


            .heading {

                margin-bottom:
                    22px;
            }


            .form-group {

                margin-bottom:
                    13px;
            }
        }

    

        /* ==========================================
   DIGISCALE-PRO — AVATAR COMPACT ET PREMIUM
   ========================================== */

.avatar-upload-group {
    width: 100%;
    margin: 14px 0 20px;
}

.avatar-upload-container {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 100%;
    padding: 12px;
    box-sizing: border-box;
    border: 1px solid rgba(198, 162, 58, 0.25);
    border-radius: 14px;
    background: rgba(2, 7, 19, 0.35);
}

.avatar-preview-wrapper {
    flex: 0 0 68px;
    width: 68px;
    height: 68px;
    padding: 3px;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid #C6A23A;
    border-radius: 50%;
    background: linear-gradient(135deg, #806217, #E4C96A);
}

.avatar-preview {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: #020713;
}

.avatar-upload-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.avatar-upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 34px;
    padding: 8px 12px;
    border: 1px solid rgba(198, 162, 58, 0.45);
    border-radius: 8px;
    background: rgba(198, 162, 58, 0.10);
    color: #E4C96A;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s ease;
}

.avatar-upload-button:hover {
    border-color: #E4C96A;
    background: rgba(198, 162, 58, 0.20);
}

.avatar-upload-help {
    margin: 0;
    color: #9299A7;
    font-size: 11px;
    line-height: 1.5;
}

.avatar-file-name {
    display: block;
    width: 100%;
    overflow: hidden;
    color: #E9EBF0;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Mode clair : conserver l'identité visuelle */

html.theme-light .avatar-upload-container {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(128, 98, 23, 0.22);
}

html.theme-light .avatar-upload-button {
    color: #806217;
    background: rgba(198, 162, 58, 0.10);
}

html.theme-light .avatar-upload-help {
    color: #596477;
}

html.theme-light .avatar-file-name {
    color: #071A36;
}

/* Affichage sur téléphone */

@media (max-width: 480px) {
    .avatar-upload-container {
        gap: 10px;
        padding: 10px;
    }

    .avatar-preview-wrapper {
        flex-basis: 60px;
        width: 60px;
        height: 60px;
    }

    .avatar-upload-button {
        padding: 7px 9px;
        font-size: 11px;
    }
}