/* Bouton fullwidth : prend toute la largeur du parent */
.wp-block-button.is-fullwidth .wp-block-button__link,
.wp-block-button.fullwidth .wp-block-button__link,
.wp-block-button__link.is-fullwidth,
.wp-block-button__link.fullwidth,
.button.is-fullwidth,
.button.fullwidth {
  width: 100%;
  display: block;
}
/**
 * Core/button frontend styles
 * These styles are loaded on the frontend.
 * Editor styles are handled by editor.css.
 */

/* ======================================
 * Variant : neutral (avec tokens)
 * ====================================== */

.wp-block-button__link.neutral,
.button.neutral {
  background-color: var(--wp--custom--semantic--color--background--action--tertiary--default);
  color: var(--wp--custom--semantic--color--foreground--action--neutral--default);
}

.wp-block-button__link.neutral:hover,
.button.neutral:hover {
  background-color: var(--wp--custom--semantic--color--background--action--neutral--hover);
  color: var(--wp--custom--semantic--color--foreground--action--neutral--hover);
}

.wp-block-button__link.neutral:active,
.button.neutral:active {
  background-color: var(--wp--custom--semantic--color--background--action--neutral--press);
  color: var(--wp--custom--semantic--color--foreground--action--neutral--press);
}

.wp-block-button__link.neutral:disabled,
.button.neutral:disabled,
.wp-block-button__link.neutral.is-disabled,
.button.neutral.is-disabled {
  background-color: var(--wp--custom--semantic--color--background--action--neutral--disabled);
  color: var(--wp--custom--semantic--color--text--disabled);
  cursor: not-allowed;
}
/* ======================================
 * Variant : tertiary (avec tokens)
 * ====================================== */

.wp-block-button__link.tertiary,
.button.tertiary {
  background-color: var(--wp--custom--semantic--color--background--action--tertiary--default);
  color: var(--wp--custom--semantic--color--foreground--action--tertiary--default);
}

.wp-block-button__link.tertiary:hover,
.button.tertiary:hover {
  background-color: var(--wp--custom--semantic--color--background--action--tertiary--hover);
  color: var(--wp--custom--semantic--color--foreground--action--tertiary--hover);
}

.wp-block-button__link.tertiary:active,
.button.tertiary:active {
  background-color: var(--wp--custom--semantic--color--background--action--tertiary--press);
  color: var(--wp--custom--semantic--color--foreground--action--tertiary--press);
}

.wp-block-button__link.tertiary:disabled,
.button.tertiary:disabled,
.wp-block-button__link.tertiary.is-disabled,
.button.tertiary.is-disabled {
  background-color: var(--wp--custom--semantic--color--background--action--tertiary--disabled);
  color: var(--wp--custom--semantic--color--text--disabled);
  cursor: not-allowed;
}
/* ======================================
 * Variant : secondary (avec tokens)
 * ====================================== */

.wp-block-button__link.secondary,
.button.secondary {
  border-width: var(--wp--custom--semantic--border--width--default);
  background-color: var(--wp--custom--semantic--color--background--action--secondary--default);
  border-color: var(--wp--custom--semantic--color--border--action--secondary--default);
  color: var(--wp--custom--semantic--color--foreground--action--secondary--default);
}

.wp-block-button__link.secondary:hover,
.button.secondary:hover {
  background-color: var(--wp--custom--semantic--color--background--action--secondary--hover);
}

.wp-block-button__link.secondary:active,
.button.secondary:active {
  background-color: var(--wp--custom--semantic--color--background--action--secondary--press);
}

.wp-block-button__link.secondary:disabled,
.button.secondary:disabled,
.wp-block-button__link.secondary.is-disabled,
.button.secondary.is-disabled {
  background-color: var(--wp--custom--semantic--color--background--action--secondary--disabled);
  border-color: var(--wp--custom--semantic--color--border--action--secondary--disabled);
  color: var(--wp--custom--semantic--color--text--disabled);
  cursor: not-allowed;
}
/* ======================================
 * Variant : primary (avec tokens)
 * ====================================== */

.wp-block-button__link.primary,
.button.primary {
  min-height: var(--wp--custom--primitive--size--48);
  border-radius: var(--wp--custom--semantic--border--radius--base);
  padding-top: var(--wp--custom--component--button--padding--top-l);
  padding-right: var(--wp--custom--component--button--padding--right-l);
  padding-bottom: var(--wp--custom--component--button--padding--bottom-l);
  padding-left: var(--wp--custom--component--button--padding--left-l);
  background-color: var(--wp--custom--semantic--color--background--action--primary--default);
  color: var(--wp--custom--semantic--color--foreground--action--primary--default);
}

.wp-block-button__link.primary:hover,
.button.primary:hover {
  background-color: var(--wp--custom--semantic--color--background--action--primary--hover);
  color: var(--wp--custom--semantic--color--foreground--action--primary--hover);
}

.wp-block-button__link.primary:active,
.button.primary:active {
  background-color: var(--wp--custom--semantic--color--background--action--primary--press);
  color: var(--wp--custom--semantic--color--foreground--action--primary--press);
}

.wp-block-button__link.primary:disabled,
.button.primary:disabled,
.wp-block-button__link.primary.is-disabled,
.button.primary.is-disabled {
  background-color: var(--wp--custom--semantic--color--background--action--primary--disabled);
  color: var(--wp--custom--semantic--color--text--disabled);
  cursor: not-allowed;
}
/* ======================================
 * Base styles
 * ====================================== */

.wp-block-button .wp-block-button__link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: var(--wp--custom--component--button--gap, 8px);
  min-height: var(--wp--custom--semantic--size--m, 40px) !important;
  padding: 0 var(--wp--custom--component--button--padding--left-m, 16px) !important;
  border-radius: var(--wp--custom--semantic--border--radius--base, 6px);
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.wp-block-button .wp-block-button__link .is-fullwidth {
  width: 100%;
}

/* ======================================
 * Sizes
 * ====================================== */

/* Size Small (32px) */
.wp-block-button .wp-block-button__link.has-button-small-font-size {
  min-height: var(--wp--custom--semantic--size--s, 32px) !important;
  padding: 0 var(--wp--custom--component--button--padding--left-s, 12px) !important;
}

/* Size Medium (40px) */
.wp-block-button .wp-block-button__link.has-button-medium-font-size {
  min-height: var(--wp--custom--semantic--size--m, 40px) !important;
  padding: 0 var(--wp--custom--component--button--padding--left-m, 16px) !important;
}

/* Size Large (48px) */
.wp-block-button .wp-block-button__link.has-button-large-font-size {
  min-height: var(--wp--custom--semantic--size--l, 48px) !important;
  padding: 0 var(--wp--custom--component--button--padding--left-l, 24px) !important;
}

/* ======================================
 * Outline style - Override WP Core defaults
 * ====================================== */

.wp-block-button.is-style-outline .wp-block-button__link,
.wp-block-button[class*='is-style-outline'] .wp-block-button__link {
  background-color: transparent !important;
  color: var(--wp--custom--semantic--color--foreground--action--secondary--default) !important;
  border-width: 1px !important;
  border-style: solid !important;
  border-color: var(--wp--custom--semantic--color--border--action--secondary--default) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button[class*='is-style-outline'] .wp-block-button__link:hover {
  color: var(--wp--custom--semantic--color--foreground--action--secondary--hover) !important;
  border-color: var(--wp--custom--semantic--color--border--action--secondary--hover) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:active,
.wp-block-button[class*='is-style-outline'] .wp-block-button__link:active {
  color: var(--wp--custom--semantic--color--foreground--action--secondary--press) !important;
  border-color: var(--wp--custom--semantic--color--border--action--secondary--press) !important;
}
