/* ========================================================
   VRADIO — FINITION DE L’ÉCRITURE
======================================================== */

/* Effets discrets et lisibles */

.nom-profil.effet-pseudo-neon,
.texte-personnalise.effet-texte-neon {
    text-shadow:
        0 0 6px var(--couleur-personnelle, #e0c27a);
    -webkit-text-stroke: 0;
}

.nom-profil.effet-pseudo-ombre,
.texte-personnalise.effet-texte-ombre {
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.65);
    -webkit-text-stroke: 0;
}

.nom-profil.effet-pseudo-relief,
.texte-personnalise.effet-texte-relief {
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12),
        0 2px 2px rgba(0, 0, 0, 0.65);
    -webkit-text-stroke: 0;
}

.nom-profil.effet-pseudo-contour,
.texte-personnalise.effet-texte-contour {
    -webkit-text-stroke: 0;
    text-shadow:
        -0.5px 0 rgba(0, 0, 0, 0.55),
        0.5px 0 rgba(0, 0, 0, 0.55),
        0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Dégradés limités à la largeur du texte */

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
    .nom-profil:is(
        .degrade-pseudo-aurore,
        .degrade-pseudo-coucher-soleil,
        .degrade-pseudo-galaxie,
        .degrade-pseudo-or,
        .degrade-pseudo-bonbon,
        .degrade-pseudo-ocean,
        .degrade-pseudo-foret,
        .degrade-pseudo-flamme,
        .degrade-pseudo-arc-en-ciel
    ),
    .texte-personnalise:not(textarea):is(
        .degrade-texte-aurore,
        .degrade-texte-coucher-soleil,
        .degrade-texte-galaxie,
        .degrade-texte-or,
        .degrade-texte-bonbon,
        .degrade-texte-ocean,
        .degrade-texte-foret,
        .degrade-texte-flamme,
        .degrade-texte-arc-en-ciel
    ) {
        width: fit-content;
        max-width: 100%;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        background-repeat: no-repeat;
        background-size: 100% 100%;
        text-shadow: none;
        -webkit-text-stroke: 0;
    }

    /* Menthe et bleu doux */

    .nom-profil.degrade-pseudo-aurore,
    .texte-personnalise:not(textarea).degrade-texte-aurore {
        background-image:
            linear-gradient(100deg, #a9ead8, #a8ceef);
    }

    /* Pêche et rose */

    .nom-profil.degrade-pseudo-coucher-soleil,
    .texte-personnalise:not(textarea).degrade-texte-coucher-soleil {
        background-image:
            linear-gradient(100deg, #ffd1ac, #efb1c7);
    }

    /* Lavande et bleu */

    .nom-profil.degrade-pseudo-galaxie,
    .texte-personnalise:not(textarea).degrade-texte-galaxie {
        background-image:
            linear-gradient(100deg, #c9baf0, #a8ccef);
    }

    /* Or champagne */

    .nom-profil.degrade-pseudo-or,
    .texte-personnalise:not(textarea).degrade-texte-or {
        background-image:
            linear-gradient(100deg, #f6e8c6, #dbba79);
    }

    /* Rose et mauve */

    .nom-profil.degrade-pseudo-bonbon,
    .texte-personnalise:not(textarea).degrade-texte-bonbon {
        background-image:
            linear-gradient(100deg, #f1b9d0, #ccbaeb);
    }

    /* Bleu et turquoise */

    .nom-profil.degrade-pseudo-ocean,
    .texte-personnalise:not(textarea).degrade-texte-ocean {
        background-image:
            linear-gradient(100deg, #a8cfee, #9dded9);
    }

    /* Sauge et menthe */

    .nom-profil.degrade-pseudo-foret,
    .texte-personnalise:not(textarea).degrade-texte-foret {
        background-image:
            linear-gradient(100deg, #d2e4b5, #a7d9bc);
    }

    /* Champagne et abricot */

    .nom-profil.degrade-pseudo-flamme,
    .texte-personnalise:not(textarea).degrade-texte-flamme {
        background-image:
            linear-gradient(100deg, #f6dfb4, #efb493);
    }

    /* Arc-en-ciel pastel, sans couleurs criardes */

    .nom-profil.degrade-pseudo-arc-en-ciel,
    .texte-personnalise:not(textarea).degrade-texte-arc-en-ciel {
        background-image: linear-gradient(
            100deg,
            #efb8ca 0%,
            #ead6ad 25%,
            #b7ddcb 50%,
            #accfe8 75%,
            #cdbce8 100%
        );
    }
}

/* Le champ de saisie conserve une couleur unie */

.composition textarea.texte-personnalise,
#texte-prive.texte-personnalise {
    background-image: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    text-shadow: none;
    -webkit-text-stroke: 0;
}

/* Accessibilité */

@media (forced-colors: active) {
    .nom-profil[class*="degrade-pseudo-"],
    .texte-personnalise:not(textarea)[class*="degrade-texte-"] {
        background-image: none;
        -webkit-background-clip: border-box;
        background-clip: border-box;
        -webkit-text-fill-color: CanvasText;
        color: CanvasText !important;
        text-shadow: none;
    }

    .nom-profil[class*="effet-pseudo-"],
    .texte-personnalise[class*="effet-texte-"] {
        text-shadow: none;
        -webkit-text-stroke: 0;
    }
}