/* Dynamo: centralise les deux modeles de boutons standards du Marche ; le perimetre exclut liens, icones et indicateurs techniques. */
.theme-marche :where(:is(.dxbButton_ThemeFdc, .marche-button-standard, .MediumButtonWhite, .ButtonUploadStyle, .marche-stand-card-action, .marche-projection-card-action):not(.footer *):not(.marche-button-technical):not(.ButtonBin):not(.ButtonAddCartQte):not([class*="ButtonSuiviProj"]):not([class*="ASPxButton1"])) {
    --marche-button-bg: #FFFFFF;
    --marche-button-fg: #333333;
}

/* Dynamo: associe les anciens boutons pleins, details, paiements et ajouts au modele sombre de la maquette. */
.theme-marche :is(.ButtonFull, .ButtonBlack, .ButtonPayer, .ButtonPayerFacture, .ButtonAddCart, .marche-button-filled, .marche-action-detail) {
    --marche-button-bg: #333333;
    --marche-button-fg: #FFFFFF;
}

/* Dynamo: conserve le modele blanc pour les boutons secondaires et les cartes deja validees. */
.theme-marche :is(.ButtonWhite, .ButtonBlack2, .ButtonPrior, .ButtonFull2, .marche-action-create, .marche-button-outline, .marche-stand-card-action, .marche-projection-card-action, .marche-projection-followup) {
    --marche-button-bg: #FFFFFF;
    --marche-button-fg: #333333;
}

/* Dynamo: partage entre les suivis d'accreditations et d'equipements la variante transparente a contour blanc, noire au survol avec texte blanc. */
.theme-marche :is(.marche-theme-home-accreditation, .marche-theme-home-equipements) .marche-button-inverse {
    --marche-button-bg: transparent;
    --marche-button-fg: #FFFFFF;
    --marche-button-border: #FFFFFF;
    /* Dynamo: harmonise le fond de survol avec le sombre standard, sans changer les couleurs au repos. */
    --marche-button-hover-bg: #333333;
    --marche-button-hover-fg: #FFFFFF;
}

/* Dynamo: limite les deux actions du bloc S'accrediter a 250 x 55 px comme dans la maquette, sans modifier les autres boutons ni leurs etats. */
.theme-marche .marche-theme-home-accreditation :is([id$="btAccredMarche"], [id$="btMarcheSuivi"]) {
    width: 250px !important;
    height: 55px !important;
}

/* Dynamo: reserve aux bandeaux Ajouter au panier du catalogue un fond gris clair et un texte noir, puis un fond noir et un texte blanc au survol. */
.theme-marche .ButtonAddCart.marche-catalog-add-cart {
    --marche-button-bg: #F1F1F1;
    --marche-button-fg: #000000;
    /* Dynamo: harmonise le fond de survol avec le sombre standard, sans changer les couleurs au repos. */
    --marche-button-hover-bg: #333333;
    --marche-button-hover-fg: #FFFFFF;
    --marche-button-border: var(--marche-button-surface);
    --marche-cart-icon-filter: brightness(0);
    text-transform: none !important;
}

/* Dynamo: neutralise la bordure rose des div internes au survol du bandeau panier, en conservant leur epaisseur et le repere de focus clavier. */
.theme-marche .marche-catalog-add-cart:is(:hover, .ButtonAddCartHovered, .dxbButtonHover_ThemeFdc) div {
    border-color: transparent !important;
}

/* Dynamo: colore les traits du chariot en noir au repos sans modifier le SVG turquoise partage. */
.theme-marche .marche-catalog-add-cart img {
    filter: var(--marche-cart-icon-filter);
}

/* Dynamo: rend le chariot blanc lorsque l'action active passe sur fond noir, au survol, au clavier ou a l'appui DevExpress. */
.theme-marche .marche-catalog-add-cart:not([class*="disabled" i]):not([aria-disabled="true"]):is(:hover, :focus-visible, :focus-within, :active, [class*="Hovered"], [class*="Pressed"], .dxbButtonHover_ThemeFdc, .dxbButtonPressed_ThemeFdc) {
    --marche-cart-icon-filter: brightness(0) invert(1);
}

/* Dynamo: applique les couleurs et la typographie communes, sans changer largeur, hauteur ni positionnement des boutons existants. */
.theme-marche :is(.dxbButton_ThemeFdc, .marche-button-standard, .MediumButtonWhite, .ButtonUploadStyle, .marche-stand-card-action, .marche-projection-card-action):not(.footer *):not(.marche-button-technical):not(.ButtonBin):not(.ButtonAddCartQte):not([class*="ButtonSuiviProj"]):not([class*="ASPxButton1"]) {
    --marche-button-surface: var(--marche-button-bg);
    --marche-button-ink: var(--marche-button-fg);
    background-color: var(--marche-button-surface) !important;
    background-image: none !important;
    color: var(--marche-button-ink) !important;
    /* Dynamo: autorise le contour blanc de la variante inverse et conserve le contour sombre des autres boutons. */
    border: 1px solid var(--marche-button-border, #333333) !important;
    box-sizing: border-box;
    font-family: var(--marche-body-font-family) !important;
    font-weight: var(--marche-body-weight-bold) !important;
    font-size: 14px !important;
    letter-spacing: 0 !important;
    text-transform: uppercase;
    text-decoration: none;
}

/* Dynamo: neutralise les anciens fonds et textes colores des conteneurs internes DevExpress sans recolorer les pictogrammes ou badges metier. */
.theme-marche :is(.dxbButton_ThemeFdc, .marche-button-standard, .MediumButtonWhite, .ButtonUploadStyle, .marche-stand-card-action, .marche-projection-card-action):not(.footer *):not(.marche-button-technical):not(.ButtonBin):not(.ButtonAddCartQte):not([class*="ButtonSuiviProj"]):not([class*="ASPxButton1"]) :is(.dxb, .dx-vam),
.theme-marche :is(.dxbButton_ThemeFdc, .marche-button-standard, .MediumButtonWhite, .ButtonUploadStyle, .marche-stand-card-action, .marche-projection-card-action):not(.footer *):not(.marche-button-technical):not(.ButtonBin):not(.ButtonAddCartQte):not([class*="ButtonSuiviProj"]):not([class*="ASPxButton1"]) > div,
.theme-marche :is(.dxbButton_ThemeFdc, .marche-button-standard, .MediumButtonWhite, .ButtonUploadStyle, .marche-stand-card-action, .marche-projection-card-action):not(.footer *):not(.marche-button-technical):not(.ButtonBin):not(.ButtonAddCartQte):not([class*="ButtonSuiviProj"]):not([class*="ASPxButton1"]) > div > span,
.theme-marche .ButtonUploadStyle a {
    background-color: transparent !important;
    background-image: none !important;
    color: inherit !important;
    font: inherit !important;
    letter-spacing: inherit !important;
    text-transform: inherit;
}

/* Dynamo: inverse les deux couleurs au survol, au focus, a l'appui et lors des etats DevExpress equivalents. */
.theme-marche :is(.dxbButton_ThemeFdc, .marche-button-standard, .MediumButtonWhite, .ButtonUploadStyle, .marche-stand-card-action, .marche-projection-card-action):not(.footer *):not(.marche-button-technical):not(.ButtonBin):not(.ButtonAddCartQte):not([class*="ButtonSuiviProj"]):not([class*="ASPxButton1"]):not([class*="disabled" i]):not([aria-disabled="true"]):not(:disabled):is(:hover, :focus-visible, :focus-within, :active, [class*="Hovered"], [class*="Pressed"], .dxbButtonHover_ThemeFdc, .dxbButtonPressed_ThemeFdc, .dxbButtonChecked_ThemeFdc) {
    /* Dynamo: permet a la variante inverse de garder son texte blanc sur fond noir, sans changer les inversions standards. */
    --marche-button-surface: var(--marche-button-hover-bg, var(--marche-button-fg));
    --marche-button-ink: var(--marche-button-hover-fg, var(--marche-button-bg));
}

/* Dynamo: laisse les boutons desactives dans leur etat normal avec un contraste attenue et sans inversion. */
.theme-marche :is(.dxbButton_ThemeFdc, .marche-button-standard, .MediumButtonWhite, .ButtonUploadStyle, .marche-stand-card-action, .marche-projection-card-action):not(.footer *):not(.marche-button-technical):not(.ButtonBin):not(.ButtonAddCartQte):not([class*="ButtonSuiviProj"]):not([class*="ASPxButton1"]):is([class*="disabled" i], [aria-disabled="true"], :disabled) {
    --marche-button-surface: var(--marche-button-bg);
    --marche-button-ink: var(--marche-button-fg);
    opacity: 0.5;
    cursor: default;
}

/* Dynamo: signale la navigation clavier par un contour exterieur sans deplacer les boutons. */
.theme-marche :is(.dxbButton_ThemeFdc, .marche-button-standard, .MediumButtonWhite, .ButtonUploadStyle, .marche-stand-card-action, .marche-projection-card-action):not(.footer *):not(.marche-button-technical):not(.ButtonBin):not(.ButtonAddCartQte):not([class*="ButtonSuiviProj"]):not([class*="ASPxButton1"]):not([class*="disabled" i]):not([aria-disabled="true"]):not(:disabled):focus-visible {
    /* Dynamo: adapte le contour de focus a la bordure blanche ou sombre du bouton. */
    outline: 2px solid var(--marche-button-border, #333333);
    outline-offset: 2px;
}

/* Dynamo: garde transparente la bordure interne DevExpress des seuls boutons de suivi accreditation et d'acces prestataire ; le survol historique ne doit pas reveler les pointilles. */
.theme-marche .marche-theme-home-accreditation [id$="btMarcheSuivi"] :is(.dxb, .dxbf),
.theme-marche .marche-theme-prestataire-card [id$="btAccredPresta"] :is(.dxb, .dxbf) {
    border-color: transparent !important;
}

/* Dynamo: conserve un contour clavier exterieur, y compris lorsque DevExpress donne le focus a un element interne du bouton. */
.theme-marche .marche-theme-home-accreditation [id$="btMarcheSuivi"]:is(:focus-visible, :has(:focus-visible)),
.theme-marche .marche-theme-prestataire-card [id$="btAccredPresta"]:is(:focus-visible, :has(:focus-visible)) {
    outline: 2px solid var(--marche-button-border, #333333);
    outline-offset: 2px;
}
