/* ==========================================================================
   CATALOGUE D'EFFETS — FC WEB DESIGN (Adapté pour Atelier Tronc & Fil)
   3 effets maximum visibles par page, 100 % accessible
   ========================================================================== */

:root {
  --fx-accent: #a8542b;
  --fx-accent-survol: #873f1b;
  --fx-ligne: #dfd2c4;
  --fx-papier: #ffffff;
}

/* 01–03 Boutons avec relief léger et focus visible */
.fx-bouton-plein,
.fx-bouton-contour,
.fx-bouton-fantome {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.7rem 1.3rem;
  border: 2px solid var(--fx-accent);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.fx-bouton-plein {
  background-color: var(--fx-accent);
  color: #ffffff;
}

.fx-bouton-contour {
  background-color: transparent;
  color: var(--fx-accent);
}

.fx-bouton-fantome {
  background-color: transparent;
  border-color: transparent;
  color: var(--fx-accent);
}

:where(.fx-bouton-plein, .fx-bouton-contour, .fx-bouton-fantome):is(:hover, :focus-visible) {
  transform: translateY(-3px);
}

.fx-bouton-plein:is(:hover, :focus-visible) {
  background-color: var(--fx-accent-survol);
  border-color: var(--fx-accent-survol);
}

.fx-bouton-contour:is(:hover, :focus-visible) {
  background-color: #f7ebe1;
  border-color: var(--fx-accent-survol);
  color: var(--fx-accent-survol);
}

/* 04 Carte relevée : relief sans animer l'ombre lourde */
.fx-carte-leve {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--fx-ligne);
  border-radius: 16px;
  padding: 1.5rem;
  background-color: var(--fx-papier);
  transition: transform 0.25s ease;
}

.fx-carte-leve::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 14px 28px rgba(36, 27, 20, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.fx-carte-leve:is(:hover, :focus-within) {
  transform: translateY(-4px);
}

.fx-carte-leve:is(:hover, :focus-within)::after {
  opacity: 1;
}

/* 05 Image avec zoom discret dans son cadre */
.fx-image-zoom {
  overflow: hidden;
  border-radius: 12px;
}

.fx-image-zoom img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.fx-image-zoom:is(:hover, :focus-within) img {
  transform: scale(1.035);
}

/* 07 Apparition douce au défilement (lisible sans JS par défaut) */
.fx-apparait {
  opacity: 1;
  transform: none;
}

.fx-apparait.fx-attend {
  opacity: 0;
  transform: translateY(16px);
}

.fx-apparait.fx-visible {
  animation: fx-arrive 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--fx-retard, 0ms);
}

@keyframes fx-arrive {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   ACCESSIBILITÉ : PREFERS-REDUCED-MOTION
   Tous les mouvements doivent être désactivés sans casser la lisibilité
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fx-carte-leve:is(:hover, :focus-within),
  :where(.fx-bouton-plein, .fx-bouton-contour, .fx-bouton-fantome):is(:hover, :focus-visible) {
    transform: none !important;
  }
  .fx-image-zoom:is(:hover, :focus-within) img {
    transform: none !important;
  }
  .fx-apparait.fx-attend {
    opacity: 1 !important;
    transform: none !important;
  }
}
