/* =========================================================
   CF Salubrité : système de boutons (Phases 0.3 + 0.4)

   Capture les boutons Impreza déjà posés dans WPBakery,
   sans toucher au contenu :
   - us-btn-style_1 « Bouton principal »  -> action (orange)
   - us-btn-style_2 « Bouton contour »    -> secondaire
   - us-btn-style_3 « Bouton inversé »    -> ghost sur fond sombre
   Les classes .cfs-btn-* servent au HTML injecté par nos hooks.
   ========================================================= */

/* ---- Base commune : boutons Impreza et boutons injectés ---- */
.w-btn,
.cfs-btn {
  font-weight: 700;
  border-radius: var(--cfs-radius-btn);
  transition: background .12s ease, border-color .12s ease,
              color .12s ease, transform .12s ease, box-shadow .12s ease;
}

/* Tap target mobile : minimum 48px (Phase 0.3) */
@media (max-width: 782px) {
  .w-btn,
  .cfs-btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ---- Style 1 : bouton d'action (orange) ---- */
.w-btn.us-btn-style_1 {
  background: var(--cfs-orange);
  color: #fff;
  box-shadow: 0 2px 8px rgba(244, 124, 38, .35);
}
.w-btn.us-btn-style_1:hover,
.w-btn.us-btn-style_1:focus {
  background: var(--cfs-orange-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(244, 124, 38, .4);
}

/* ---- Style 2 : secondaire (contour) ---- */
.w-btn.us-btn-style_2 {
  background: transparent;
  color: var(--cfs-navy);
  box-shadow: inset 0 0 0 1.5px var(--cfs-line);
}
.w-btn.us-btn-style_2:hover,
.w-btn.us-btn-style_2:focus {
  color: var(--cfs-blue);
  box-shadow: inset 0 0 0 1.5px var(--cfs-blue);
}

/* ---- Style 3 : ghost sur fond sombre ---- */
.w-btn.us-btn-style_3 {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45);
}
.w-btn.us-btn-style_3:hover,
.w-btn.us-btn-style_3:focus {
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 0 0 1.5px #fff;
  color: #fff;
}

/* ---- Boutons injectés par nos hooks (mêmes styles, sans Impreza) ---- */
.cfs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 15.5px;
  line-height: 1.2;
  padding: 13px 24px;
  min-height: 48px;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
/* Les couleurs portent un !important : les sections Impreza
   (.color_alternate, .color_primary...) imposent leur couleur de
   lien avec plus de spécificité, ce qui rendait le texte des
   boutons invisible (orange sur orange). */
.cfs-btn-primary {
  background: var(--cfs-orange);
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(244, 124, 38, .35);
}
.cfs-btn-primary:hover,
.cfs-btn-primary:focus {
  background: var(--cfs-orange-dark);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(244, 124, 38, .4);
}
.cfs-btn-secondary {
  background: transparent;
  color: var(--cfs-navy) !important;
  box-shadow: inset 0 0 0 1.5px var(--cfs-line);
}
.cfs-btn-secondary:hover,
.cfs-btn-secondary:focus {
  color: var(--cfs-blue) !important;
  box-shadow: inset 0 0 0 1.5px var(--cfs-blue);
}
.cfs-btn-ghost {
  background: transparent;
  color: #fff !important;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45);
}
.cfs-btn-ghost:hover,
.cfs-btn-ghost:focus {
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 0 0 1.5px #fff;
  color: #fff !important;
}

/* Tailles */
.cfs-btn-sm { font-size: 14px; padding: 9px 16px; min-height: 40px; }
.cfs-btn-lg { font-size: 17px; padding: 16px 30px; min-height: 54px; }

/* ---- Lien-flèche contextuel (cartes services, articles) ---- */
.cfs-arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 15px;
  color: var(--cfs-orange-dark);
  text-decoration: none;
}
.cfs-arrow-link:hover {
  color: var(--cfs-orange-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cfs-arrow-link::after {
  content: "→";
  transition: transform .12s ease;
}
.cfs-arrow-link:hover::after {
  transform: translateX(3px);
}

/* ---- Capture des actionbox Impreza (Phase 0.4) ---- */
.w-actionbox {
  border-radius: var(--cfs-radius);
  box-shadow: var(--cfs-shadow-sm);
}

/* ---- Formulaires : états de saisie propres (Phase 0.4) ---- */
:where(.w-form, .wpcf7, .wpforms-container) :where(input[type="text"], input[type="email"], input[type="tel"], input[type="number"], textarea, select) {
  border-radius: var(--cfs-radius-btn);
  border: 1.5px solid var(--cfs-line);
  transition: border-color .12s ease, box-shadow .12s ease;
}
:where(.w-form, .wpcf7, .wpforms-container) :where(input, textarea, select):focus {
  border-color: var(--cfs-blue);
  box-shadow: var(--cfs-focus-ring);
  outline: none;
}
