/**
 * ================================================================
 * FICHIER : WebExpress_paiement_carte.css
 * EMPLACEMENT : 2027_B2B/pages/WebExpress/WebExpress_paiement_carte.css
 * SHORT_DESC : Styles du composant de paiement de l'acompte par carte (WebExpress_paiement_carte.js)
 * DESCRIPTION : Uniquement les variables du thème 2027 (_theme/theme.css) : couleurs, rayons, polices, espacements,
 *               durées. Mode sombre par défaut, mode clair (html.bright_mode) suivi automatiquement par les variables.
 *               Le champ de carte est une iframe Stripe : ses couleurs sont passées par le script (getComputedStyle).
 *
 * MODIFICATIONS :
 *   - 14/10/2026 11:00 : Création (n° 1301, lot R, sous-agent de Claude #1) — A VALIDER PAR JaxX
 *
 * ================================================================
 */

.wxp_carte
{
    display: flex;
    flex-direction: column;
    gap: var(--espace_2);
    max-width: 520px;
    padding: var(--espace_3);
    color: var(--encre);
    font-family: var(--police_texte);
    background: var(--surface);
    border: 1px solid var(--ligne_forte);
    border-radius: var(--rayon_carte);
    box-shadow: var(--ombre);
}

.wxp_carte [hidden]
{
    display: none !important;
}

.wxp_carte_titre
{
    margin: 0;
    font-family: var(--police_titres);
    font-size: var(--texte_l);
    line-height: 1.2;
    color: var(--encre);
}

/* Bandeaux TEST et SIMULATION : impossibles à confondre avec un vrai paiement */
.wxp_carte_bandeau
{
    margin: 0;
    padding: var(--espace_1) var(--espace_2);
    font-size: var(--texte_s);
    font-weight: 600;
    line-height: 1.4;
    border-radius: var(--rayon_input);
}

.wxp_carte_bandeau_test
{
    color: var(--encre);
    background: var(--accent_halo);
    border: 1px dashed var(--accent);
}

.wxp_carte_bandeau_simulation
{
    color: var(--erreur);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: transparent;
    border: 2px dashed var(--erreur);
}

.wxp_carte_bandeau_aide
{
    display: block;
    margin-top: 4px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--encre_second);
}

/* Récapitulatif des montants (lecture seule, calculés côté serveur) */
.wxp_carte_recap
{
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: var(--espace_2) 0;
    border-top: 1px solid var(--ligne);
    border-bottom: 1px solid var(--ligne);
}

.wxp_carte_recap:empty
{
    display: none;
}

.wxp_carte_ligne
{
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--espace_2);
}

.wxp_carte_ligne dt
{
    margin: 0;
    font-size: var(--texte_s);
    color: var(--encre_second);
}

.wxp_carte_ligne dd
{
    margin: 0;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--encre);
}

.wxp_carte_ligne_acompte dt
{
    font-weight: 600;
    color: var(--encre);
}

.wxp_carte_ligne_acompte dd
{
    font-family: var(--police_titres);
    font-size: var(--texte_l);
    font-weight: 700;
    color: var(--accent);
}

.wxp_carte_note
{
    margin: 0;
    font-size: var(--texte_xs);
    color: var(--encre_attenuee);
}

/* Formulaire : un seul champ « Carte bancaire » */
.wxp_carte_formulaire
{
    display: flex;
    flex-direction: column;
    gap: var(--espace_1);
    margin: 0;
}

.wxp_carte_libelle
{
    font-size: var(--texte_s);
    font-weight: 600;
    color: var(--encre);
}

.wxp_carte_champ
{
    min-height: 22px;
    padding: 14px 12px;
    background: var(--surface_input);
    border: 1px solid var(--ligne_forte);
    border-radius: var(--rayon_input);
    transition: border-color var(--duree) var(--easing), box-shadow var(--duree) var(--easing);
}

.wxp_carte_champ_focus,
.wxp_carte_champ.StripeElement--focus
{
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent_halo);
}

.wxp_carte_champ.StripeElement--invalid
{
    border-color: var(--erreur);
}

.wxp_carte_erreur
{
    margin: 0;
    font-size: var(--texte_s);
    line-height: 1.4;
    color: var(--erreur);
}

.wxp_carte_bouton,
.wxp_carte_reessayer
{
    min-height: 48px;
    margin-top: var(--espace_1);
    padding: 12px var(--espace_3);
    font-family: var(--police_texte);
    font-size: var(--texte_m);
    font-weight: 600;
    color: var(--accent_texte);
    cursor: pointer;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: var(--rayon_bouton);
    transition: transform var(--duree) var(--easing), box-shadow var(--duree) var(--easing), opacity var(--duree) var(--easing);
}

.wxp_carte_bouton:hover:not(:disabled),
.wxp_carte_reessayer:hover
{
    box-shadow: 0 0 0 4px var(--accent_halo);
    transform: translateY(-1px);
}

.wxp_carte_bouton:focus-visible,
.wxp_carte_reessayer:focus-visible
{
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.wxp_carte_bouton:disabled
{
    cursor: not-allowed;
    opacity: 0.55;
}

.wxp_carte_bouton_occupe
{
    cursor: progress !important;
}

.wxp_carte_reessayer
{
    align-self: flex-start;
    margin-top: 0;
    color: var(--encre);
    background: transparent;
    border-color: var(--ligne_forte);
}

.wxp_carte_securite
{
    margin: 0;
    font-size: var(--texte_xs);
    line-height: 1.5;
    color: var(--encre_attenuee);
}

/* n° 677 : icône en float, le texte l'entoure */
.wxp_carte_cadenas
{
    float: left;
    margin: 1px 6px 0 0;
    color: var(--succes);
}

/* Chargement */
.wxp_carte_chargement
{
    display: flex;
    align-items: center;
    gap: var(--espace_1);
    font-size: var(--texte_s);
    color: var(--encre_second);
}

.wxp_carte_roue
{
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border: 2px solid var(--ligne_forte);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: wxp_carte_tourner 0.8s linear infinite;
}

@keyframes wxp_carte_tourner
{
    to
    {
        transform: rotate(360deg);
    }
}

.wxp_carte_indisponible,
.wxp_carte_attente
{
    margin: 0;
    padding: var(--espace_2);
    font-size: var(--texte_s);
    line-height: 1.5;
    color: var(--encre);
    background: var(--fond_second);
    border-left: 3px solid var(--accent);
    border-radius: var(--rayon_input);
}

/* Succès */
.wxp_carte_succes
{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--espace_1);
    padding: var(--espace_2) 0;
    text-align: center;
    outline: none;
    animation: wxp_carte_apparaitre 420ms var(--easing) both;
}

.wxp_carte_succes_icone
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent_texte);
    background: var(--succes);
    border-radius: 50%;
}

.wxp_carte_succes_titre
{
    margin: 0;
    font-family: var(--police_titres);
    font-size: var(--texte_l);
    font-weight: 700;
    color: var(--encre);
}

.wxp_carte_succes_texte
{
    margin: 0;
    font-size: var(--texte_s);
    line-height: 1.5;
    color: var(--encre_second);
}

.wxp_carte_reussi .wxp_carte_recap
{
    opacity: 0.75;
}

@keyframes wxp_carte_apparaitre
{
    from
    {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to
    {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce)
{
    .wxp_carte_roue,
    .wxp_carte_succes
    {
        animation: none;
    }

    .wxp_carte_bouton,
    .wxp_carte_reessayer,
    .wxp_carte_champ
    {
        transition: none;
    }
}

@media (max-width: 560px)
{
    .wxp_carte
    {
        padding: var(--espace_2);
    }

    .wxp_carte_bouton
    {
        width: 100%;
    }
}
