/* =============================================================
   SPORTS PRICING WIDGETS — CSS
   Version 1.0.2
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

/* ── Variables ── */
:root {
  --spw-font: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --spw-radius-card: 32px;
  --spw-shadow-card: 0 16px 48px rgba(0,0,0,.22);
  --spw-shadow-hover: 0 26px 68px rgba(0,0,0,.32);
  --spw-transition: .35s cubic-bezier(.4,0,.2,1);
}

/* ── Reset interne ── */
.spw-hero *, .spw-grid * {
  box-sizing: border-box;
  font-family: var(--spw-font);
}

/* =============================================================
   SECTION 1 — HERO PRICING
   ============================================================= */
.spw-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 80px 40px;
  background: #ffffff;
  overflow: hidden;
  position: relative;
}

/* ── Côtés ── */
.spw-hero__side {
  display: flex;
  gap: 22px;
  align-items: center;
}
.spw-hero__side--left  { flex-direction: row-reverse; }
.spw-hero__side--right { flex-direction: row; }

/* ── Colonne icône + liste ── */
.spw-icon-col {
  display: flex;
  align-items: center;
  gap: 14px;
  /* animation */
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .55s ease, transform .55s ease;
}
.spw-icon-col.spw-in-view { opacity: 1; transform: translateY(0); }
.spw-icon-col--bottom { flex-direction: column; }
.spw-icon-col--top    { flex-direction: column-reverse; }

.spw-icon-box {
  width: 72px;
  height: 72px;
  min-width: 72px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 6px 22px rgba(0,0,0,.10);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(0,0,0,.05);
  transition: transform var(--spw-transition), box-shadow var(--spw-transition);
  overflow: hidden;
}
.spw-icon-box:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 14px 32px rgba(0,0,0,.16);
}
.spw-icon-box img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.spw-icon-col__list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.spw-icon-col__list li {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  line-height: 1.5;
  text-transform: lowercase;
}

/* ── Carte centrale ── */
.spw-hero__card {
  position: relative;
  width: 340px;
  min-height: 490px;
  border-radius: var(--spw-radius-card);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--spw-shadow-card);
  cursor: pointer;
  /* animation entrée */
  opacity: 0;
  transform: scale(.93) translateY(20px);
  transition: opacity .7s ease, transform .7s ease,
              box-shadow var(--spw-transition);
}
.spw-hero__card.spw-in-view {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.spw-hero__card:hover {
  transform: scale(1.02) translateY(-4px) !important;
  box-shadow: var(--spw-shadow-hover);
}

/* Bandes photo */
.spw-card-bg {
  position: absolute;
  inset: 0;
  display: flex;
  transition: filter .4s ease;
}
.spw-card-bg__band {
  flex: 1;
  background-size: cover;
  background-position: center;
  background-color: #3d2510; /* fallback marron */
  filter: brightness(.58) saturate(1.1);
  transition: filter .4s ease, flex .4s ease;
}
.spw-hero__card:hover .spw-card-bg__band {
  filter: brightness(.48) saturate(1.2);
}

/* Overlay dégradé */
.spw-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(30,14,4,.20) 0%,
    rgba(30,14,4,.10) 38%,
    rgba(30,14,4,.72) 100%
  );
  pointer-events: none;
}

/* Filigrane */
.spw-card-watermark {
  position: absolute;
  bottom: -14px;
  right: -14px;
  width: 170px;
  opacity: .065;
  pointer-events: none;
  z-index: 1;
}

/* Contenu carte hero */
.spw-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: 490px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 26px 30px;
}

.spw-card-price { text-align: right; color: #fff; }

.spw-card-price__amount {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
  display: block;
  /* animation compteur — géré via JS */
  opacity: 0;
  transform: translateX(18px);
  transition: opacity .5s ease .2s, transform .5s ease .2s;
}
.spw-hero__card.spw-in-view .spw-card-price__amount {
  opacity: 1;
  transform: translateX(0);
}
.spw-card-price__label {
  font-size: 18px;
  font-weight: 700;
  display: block;
  margin-top: 3px;
}
.spw-card-price__sub {
  font-size: 12.5px;
  font-weight: 400;
  opacity: .82;
  display: block;
  margin-top: 2px;
}
.spw-card-price__sub2 {
  font-size: 11px;
  font-weight: 300;
  opacity: .72;
  display: block;
  margin-top: 1px;
}

.spw-card-bottom {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Bouton générique "capsule" ── */
/* FIX v1.0.1 : isolation:isolate crée un nouveau contexte d'empilement
   => le ::before blanc (z-index:-1) passe DERRIÈRE le texte
      mais reste DEVANT le fond de la carte grâce au contexte isolé */
.spw-card-btn,
.spw-plan-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 2px solid #fff;
  border-radius: 50px;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  background: transparent;
  width: fit-content;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;                /* ← clé du correctif hover */
  transition: color var(--spw-transition), border-color var(--spw-transition);
  white-space: nowrap;
}
.spw-card-btn::before,
.spw-plan-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .38s cubic-bezier(.4,0,.2,1);
  z-index: -1;                       /* ← derrière le texte, dans le contexte isolé */
  border-radius: inherit;
}
.spw-card-btn:hover::before,
.spw-plan-btn:hover::before { transform: scaleX(1); }
.spw-card-btn:hover,
.spw-plan-btn:hover {
  color: #2a1505;
  border-color: #fff;
}

/* Plus besoin de z-index sur les enfants, isolation gère tout */
.spw-btn-arrow {
  transition: transform .3s ease;
  font-style: normal;
  display: inline-block;
}
.spw-card-btn:hover .spw-btn-arrow,
.spw-plan-btn:hover .spw-btn-arrow { transform: translateX(5px); }

.spw-card-desc {
  font-size: 12.5px;
  color: rgba(255,255,255,.85);
  line-height: 1.75;
  font-weight: 400;
  margin: 0;
}

/* Shimmer hover */
.spw-hero__card::after,
.spw-plan-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -110%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.07), transparent);
  transform: skewX(-18deg);
  transition: left .75s ease;
  pointer-events: none;
  z-index: 6;
}
.spw-hero__card:hover::after,
.spw-plan-card:hover::after { left: 150%; }

/* =============================================================
   SECTION 2 — GRILLE PLANS
   ============================================================= */
.spw-grid {
  padding: 80px 40px;
  background: #faf8f5;
}

/* En-tête */
.spw-grid__header {
  text-align: center;
  margin-bottom: 48px;
}
.spw-grid__tag {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #9a7a5e;
  margin: 0 0 10px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}
.spw-grid__title {
  font-size: 28px;
  font-weight: 700;
  color: #1a0f06;
  margin: 0;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease .1s, transform .55s ease .1s;
}
.spw-grid__tag.spw-in-view,
.spw-grid__title.spw-in-view { opacity: 1; transform: translateY(0); }

/* Grille */
.spw-grid__row {
  display: grid;
  grid-template-columns: repeat(var(--spw-grid-cols, 3), 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Carte plan ── */
.spw-plan-card {
  position: relative;
  border-radius: var(--spw-radius-card);
  overflow: hidden;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  padding: 28px 26px 30px;
  cursor: pointer;
  box-shadow: var(--spw-shadow-card);
  /* animation */
  opacity: 0;
  transform: translateY(38px);
  transition: opacity .65s ease, transform .65s ease,
              box-shadow var(--spw-transition);
}
.spw-plan-card.spw-in-view {
  opacity: 1;
  transform: translateY(0);
}
.spw-plan-card:hover {
  transform: translateY(-8px) scale(1.015) !important;
  box-shadow: var(--spw-shadow-hover);
}

/* Fond */
.spw-plan-card__bg {
  position: absolute;
  inset: 0;
  display: flex;
}

/* Mode 2 bandes (split) : chaque bande prend 50% */
.spw-plan-card__bg-band {
  flex: 1;
  background-size: cover;
  background-position: center;
  background-color: var(--spw-card-bg, #2a1505);
  filter: brightness(.52) saturate(1.1);
  transition: filter .4s ease;
}

/* Mode 1 image : la bande unique couvre 100% de la carte */
.spw-plan-card__bg--single .spw-plan-card__bg-band {
  flex: 1 0 100%;
  width: 100%;
  height: 100%;
}

.spw-plan-card:hover .spw-plan-card__bg-band {
  filter: brightness(.42) saturate(1.2);
}

/* Overlay */
.spw-plan-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    148deg,
    rgba(25,12,4,.28) 0%,
    rgba(50,22,6,.22) 48%,
    rgba(25,12,4,.72) 100%
  );
  pointer-events: none;
}

/* Filigrane */
.spw-plan-card__watermark {
  position: absolute;
  bottom: -14px;
  right: -14px;
  width: 138px;
  opacity: .07;
  pointer-events: none;
  z-index: 1;
}

/* Badges — FIX v1.0.1 : les pills vides sont masquées via .spw-badge-pill:empty
   et le conteneur se replie automatiquement si tout est vide */
.spw-plan-card__badge {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 3;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
/* Masquer automatiquement les badges sans texte */
.spw-badge-pill:empty {
  display: none !important;
}
.spw-badge-pill {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1.5px solid rgba(255,255,255,.55);
  color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  /* transition douce à l'apparition */
  transition: opacity .3s ease;
}

/* Contenu */
.spw-plan-card__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 364px;
}

.spw-plan-price { text-align: right; color: #fff; }
.spw-plan-price__amount {
  font-size: 60px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
  display: block;
}
.spw-plan-price__label {
  font-size: 17px;
  font-weight: 700;
  display: block;
  margin-top: 3px;
}
/* libellé optionnel "la séance" */
.spw-plan-price__label + .spw-plan-price__label {
  font-size: 17px;
  font-weight: 700;
}
.spw-plan-price__sub {
  font-size: 12px;
  font-weight: 300;
  opacity: .80;
  display: block;
  margin-top: 2px;
}

.spw-plan-card__bottom {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.spw-plan-desc {
  font-size: 12px;
  color: rgba(255,255,255,.82);
  line-height: 1.78;
  font-weight: 400;
  margin: 0;
}

/* =============================================================
   EN-TÊTE HERO (titre + sous-titre au-dessus de la carte)
   ============================================================= */
.spw-hero-header {
  text-align: center;
  margin-bottom: 40px;
  width: 100%;
}
.spw-hero-header__tag {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #9a7a5e;
  margin: 0 0 10px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}
.spw-hero-header__title {
  font-size: 28px;
  font-weight: 700;
  color: #1a0f06;
  margin: 0;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease .1s, transform .55s ease .1s;
}
.spw-hero-header__tag.spw-in-view,
.spw-hero-header__title.spw-in-view {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================================
   GRILLE — DERNIÈRE LIGNE CENTRÉE (quand incomplète)
   ============================================================= */

/* Technique : on utilise un pseudo-élément invisible pour pousser
   les cartes de la dernière ligne vers le centre.
   Fonctionne pour 2 et 3 colonnes avec reste 1 ou 2 cartes. */

/* Reste de 1 carte sur 3 colonnes → carte centrée */
.spw-grid__row--center-last .spw-plan-card--last-row:only-child,
.spw-grid__row--center-last .spw-plan-card--last-row:first-child:nth-last-child(1) {
  grid-column: 2 / 3;
}

/* Flexbox fallback pour le centrage de la dernière ligne */
@supports not (grid-template-columns: repeat(3, 1fr)) {
  .spw-grid__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  .spw-plan-card { flex: 0 1 calc(33.333% - 16px); }
}

/* =============================================================
   FIX ÉDITEUR ELEMENTOR — désactive toutes les animations
   pour que les éléments soient visibles en mode édition
   ============================================================= */
.elementor-editor-active .spw-hero__card,
.elementor-editor-active .spw-icon-col,
.elementor-editor-active .spw-plan-card,
.elementor-editor-active .spw-grid__tag,
.elementor-editor-active .spw-grid__title,
.elementor-editor-active .spw-hero-header__tag,
.elementor-editor-active .spw-hero-header__title,
.elementor-editor-active .spw-card-price__amount {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1140px) {
  .spw-hero { gap: 18px; padding: 60px 24px; }
  .spw-hero__card { width: 300px; min-height: 450px; }
  .spw-card-content { min-height: 450px; }
  .spw-card-price__amount { font-size: 54px; }
  .spw-icon-box { width: 62px; height: 62px; min-width: 62px; }
  .spw-icon-col__list li { font-size: 10px; }
}

@media (max-width: 960px) {
  .spw-hero {
    flex-direction: column;
    gap: 28px;
  }
  .spw-hero__side {
    flex-direction: row !important;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
  }
  .spw-icon-col--top { flex-direction: column !important; }
  .spw-hero__card { width: 100%; max-width: 400px; }
  .spw-grid__row {
    grid-template-columns: repeat(var(--spw-grid-cols-tablet, 2), 1fr) !important;
    gap: 18px;
  }
  .spw-plan-card:last-child {
    grid-column: 1 / -1;
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .spw-hero { padding: 48px 16px; gap: 20px; }
  .spw-grid { padding: 48px 16px; }
  .spw-grid__row { grid-template-columns: repeat(var(--spw-grid-cols-mobile, 1), 1fr) !important; gap: 16px; }
  .spw-plan-card:last-child { grid-column: auto; max-width: none; }
  .spw-hero__card { max-width: 100%; }
  .spw-card-price__amount { font-size: 48px; }
  .spw-plan-price__amount { font-size: 48px; }
  .spw-grid__title { font-size: 22px; }
  .spw-card-btn, .spw-plan-btn { font-size: 12px; padding: 10px 18px; }
}

/* =============================================================
   WIDGET UNIVERS ACCORDION
   ============================================================= */

/* ── Wrapper global ── */
.spw-univ-wrap {
  background-color: #f5f3f0;
  padding: 60px 40px 0;
  position: relative;
  width: 100%;          /* FIX centrage */
  box-sizing: border-box;
}

/* ── Grille des cartes ── */
.spw-univ-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  width: 100%;          /* FIX centrage */
  margin: 0 auto;
}

/* ── Carte univers ── */
.spw-univ-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 36px 28px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  position: relative;
  cursor: pointer;
  transition: box-shadow .3s ease, transform .3s ease;
  box-shadow: 0 4px 18px rgba(0,0,0,.06);
}
.spw-univ-card:hover {
  box-shadow: 0 12px 36px rgba(0,0,0,.11);
  transform: translateY(-3px);
}

/* Indicateur chevron en haut */
.spw-univ-card__indicator {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  color: #bbb;
  transition: color .3s ease, transform .4s ease;
}
.spw-univ-card.spw-univ-card--active .spw-univ-card__indicator {
  color: #555;
  transform: translateX(-50%) rotate(180deg);
}

/* ── Icône ── */
.spw-univ-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.spw-univ-icon img {
  max-width: 130px;
  height: auto;
  object-fit: contain;
}
.spw-univ-icon__secondary {
  max-width: 70px !important;
}

/* ── Description ── */
.spw-univ-desc {
  font-family: var(--spw-font, 'Montserrat', sans-serif);
  font-size: 13.5px;
  line-height: 1.8;
  color: #3a3a3a;
  text-align: center;
  flex: 1;
  width: 100%;         /* FIX centrage */
}
.spw-univ-desc p { margin: 0 0 8px; }
.spw-univ-desc p:last-child { margin-bottom: 0; }
.spw-univ-desc strong { font-weight: 700; }

/* ── Bouton Découvrir ── */
.spw-univ-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background-color: #2a2a2a;  /* écrasé par Elementor via sélecteur */
  color: #fff;
  border: 2px solid #2a2a2a;
  border-radius: 50px;
  font-family: var(--spw-font, 'Montserrat', sans-serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .05em;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  width: 100%;
  justify-content: center;
  /* FIX HOVER : transition directe, sans ::before (incompatible avec styles inline Elementor) */
  transition: background-color .32s ease, color .32s ease, border-color .32s ease;
}

/* FIX : le hover inverse fond/texte — !important nécessaire pour surcharger
   le style inline généré par le sélecteur Elementor */
.spw-univ-btn:hover {
  background-color: #fff !important;
  color: #2a2a2a !important;
  border-color: #2a2a2a !important;
}

/* FIX : état actif (panneau ouvert) — même traitement */
.spw-univ-btn.spw-univ-btn--active {
  background-color: #fff !important;
  color: #2a2a2a !important;
  border-color: #2a2a2a !important;
}

/* Support couleurs hover personnalisées via CSS variables
   (définies dans le PHP via style inline sur .spw-univ-wrap) */
.spw-univ-btn:hover,
.spw-univ-btn.spw-univ-btn--active {
  background-color: var(--spw-btn-hover-bg, #fff) !important;
  color: var(--spw-btn-hover-color, #2a2a2a) !important;
  border-color: var(--spw-btn-hover-border, #2a2a2a) !important;
}

.spw-univ-btn__icon {
  font-size: 16px;
  transition: transform .3s ease;
  display: inline-block;
}
.spw-univ-btn:hover .spw-univ-btn__icon,
.spw-univ-btn.spw-univ-btn--active .spw-univ-btn__icon {
  transform: translateX(4px);
}

/* ═══════════════════════════════════════════════════════════
   PANNEAU PLEINE LARGEUR — accordéon
═══════════════════════════════════════════════════════════ */
.spw-univ-panel {
  /* Breakout pleine largeur */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background-color: #1a1a1a;
  overflow: hidden;

  /* Accordéon : masqué par défaut */
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  transition: max-height .55s cubic-bezier(.4,0,.2,1),
              opacity .4s ease .05s,
              visibility 0s linear .5s;
  position: relative;
}

/* État ouvert */
.spw-univ-panel.spw-univ-panel--open {
  max-height: 5000px;
  opacity: 1;
  visibility: visible;
  transition: max-height .55s cubic-bezier(.4,0,.2,1),
              opacity .4s ease,
              visibility 0s linear 0s;
}

/* Contenu interne */
.spw-univ-panel__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 40px 40px;
  box-sizing: border-box;
  overflow-x: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}
.spw-univ-panel__inner::-webkit-scrollbar { height: 4px; }
.spw-univ-panel__inner::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 2px; }

/* Rangée de disciplines centrée par rapport à la page */
.spw-panel-disc-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 0;
}

/* Carte discipline */
.spw-panel-disc {
  flex: 0 1 200px;
  max-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.spw-panel-disc__link {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.spw-panel-disc__link:hover .spw-panel-disc__img {
  transform: scale(1.03);
}

/* Photo discipline */
.spw-panel-disc__img {
  width: 100%;
  height: 220px;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  background-color: #333;
  overflow: hidden;
  transition: transform .35s ease;
}
.spw-panel-disc__img--empty {
  background: repeating-linear-gradient(
    45deg, #2a2a2a, #2a2a2a 10px, #333 10px, #333 20px
  );
}

/* Nom */
.spw-panel-disc__name {
  font-family: var(--spw-font, 'Montserrat', sans-serif);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
  line-height: 1.4;
}

/* Description */
.spw-panel-disc__desc {
  font-family: var(--spw-font, 'Montserrat', sans-serif);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.65;
  color: rgba(255,255,255,.68);
  margin: 0;
}

/* Bouton fermer dans le panneau */
.spw-panel-close-btn {
  position: absolute;
  top: 16px;
  right: max(18px, env(safe-area-inset-right));
  z-index: 30;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 999px;
  min-width: 108px;
  height: 42px;
  padding: 0 14px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  font-family: var(--spw-font, 'Montserrat', sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.spw-panel-close-btn:hover {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.55);
  color: #fff;
  transform: translateY(-1px);
}
.spw-panel-close-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.spw-panel-close-btn__label {
  display: inline-block;
}

/* ── Fix éditeur Elementor ── */
.elementor-editor-active .spw-univ-panel {
  max-height: 500px !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .spw-univ-wrap { padding: 48px 20px 0; }
  .spw-univ-cards { grid-template-columns: 1fr !important; gap: 16px; }
  .spw-univ-panel__inner {
    padding: 60px 20px 28px;
    overflow-x: visible;
  }
  .spw-panel-disc-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    align-items: start;
    width: 100%;
    max-width: none;
    min-width: 0;
    gap: 18px;
  }
  .spw-panel-disc {
    flex: initial;
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .spw-panel-disc__img { height: 190px; }
  .spw-panel-close-btn {
    top: 12px;
    right: 12px;
    min-width: 96px;
    height: 38px;
    padding: 0 12px;
    font-size: 11px;
  }
}
@media (max-width: 600px) {
  .spw-univ-wrap { padding: 32px 12px 0; }
  .spw-univ-panel__inner {
    padding: 64px 16px 24px;
    overflow-x: visible;
  }
  .spw-panel-disc-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .spw-panel-disc {
    width: 100%;
    max-width: none;
  }
  .spw-panel-disc__img { height: 220px; }
  .spw-panel-close-btn {
    min-width: 90px;
    height: 36px;
    font-size: 10px;
  }
}

/* =============================================================
   WIDGET TÉMOIGNAGES SIGNATURE
   ============================================================= */
.spw-testi {
  background: #efede9;
  padding: 88px 40px;
  position: relative;
  overflow: clip;
}

.spw-testi__inner {
  max-width: 1240px;
  margin: 0 auto;
}

.spw-testi-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 42px;
}

.spw-testi-header__tag,
.spw-testi-header__title,
.spw-testi-header__intro {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}

.spw-testi-header__tag.spw-in-view,
.spw-testi-header__title.spw-in-view,
.spw-testi-header__intro.spw-in-view,
.spw-testi-card.spw-in-view {
  opacity: 1;
  transform: translateY(0);
}

.spw-testi-header__tag {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: #b19377;
}

.spw-testi-header__title {
  margin: 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.06;
  font-weight: 700;
  color: #111;
  transition-delay: .05s;
}

.spw-testi-header__intro {
  margin: 16px auto 0;
  font-size: 15px;
  line-height: 1.75;
  color: #4b4b4b;
  transition-delay: .12s;
}

.spw-testi-grid {
  display: grid;
  grid-template-columns: repeat(var(--spw-testi-cols, 3), minmax(0, 1fr));
  gap: var(--spw-testi-gap, 28px);
  align-items: start;
}

.spw-testi-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s ease, transform .65s ease;
}

.spw-testi-card__media {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  height: var(--spw-testi-image-h, 320px);
  background: #ddd8d0;
  box-shadow: 0 18px 40px rgba(0,0,0,.06);
}

.spw-testi-card__media img,
.spw-testi-card__placeholder {
  width: 100%;
  height: 100%;
  display: block;
}

.spw-testi-card__media img {
  object-fit: cover;
  transition: transform .5s ease, filter .35s ease;
}

.spw-testi-card__placeholder {
  background: linear-gradient(135deg, #d9d5cf 0%, #f1eee9 100%);
}

.spw-testi-card--grayscale .spw-testi-card__media img {
  filter: grayscale(1);
}

.spw-testi-card:hover .spw-testi-card__media img {
  transform: scale(1.04);
}

.spw-testi-card__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #7d654d;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.spw-testi-card__video-pill {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  width: 52px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.82);
  color: #fff;
  box-shadow: 0 12px 26px rgba(0,0,0,.18);
}

.spw-testi-card__media--inline-video {
  cursor: pointer;
}

.spw-testi-card__media--inline-video:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.spw-testi-card__video-pill--play {
  right: 50%;
  bottom: 50%;
  transform: translate(50%, 50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  transition: transform .25s ease, background .25s ease;
}

.spw-testi-card__video-pill--play svg {
  width: 24px;
  height: 24px;
}

.spw-testi-card__media--inline-video:hover .spw-testi-card__video-pill--play {
  transform: translate(50%, 50%) scale(1.08);
  background: rgba(0,0,0,.95);
}

.spw-testi-card__media--inline-video.is-playing .spw-testi-card__media-image,
.spw-testi-card__media--inline-video.is-playing .spw-testi-card__badge,
.spw-testi-card__media--inline-video.is-playing .spw-testi-card__video-pill--play {
  opacity: 0;
  pointer-events: none;
}

.spw-testi-card__inline-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  background: #000;
}

.spw-testi-card__content {
  position: relative;
  min-height: var(--spw-testi-content-h, 170px);
  background: #050505;
  color: #fff;
  border-radius: 24px;
  padding: 24px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 18px 42px rgba(0,0,0,.08);
}

.spw-testi-card--highlight .spw-testi-card__content {
  transform: translateY(-2px);
}

.spw-testi-card__top {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spw-testi-card__name {
  margin: 0;
  font-size: clamp(26px, 2.2vw, 38px);
  line-height: 1;
  letter-spacing: -.03em;
  font-weight: 500;
  color: #fff;
  word-break: break-word;
}

.spw-testi-card__subtitle {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255,255,255,.6);
}

.spw-testi-card__excerpt {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255,255,255,.8);
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.spw-testi-card__actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-start;
}

.spw-testi-action {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #b19377;
  background: transparent;
  color: #b19377;
  border-radius: 999px;
  min-height: 42px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--spw-font, 'Montserrat', sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .28s ease, background-color .28s ease, color .28s ease, border-color .28s ease;
}

.spw-testi-action:hover {
  transform: translateY(-1px);
  background: #fff;
  color: #111;
  border-color: #fff;
}

.spw-testi-action__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.spw-testi-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.spw-testi-modal.is-open {
  display: block;
}

.spw-testi-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8,8,8,.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.spw-testi-modal__dialog {
  position: relative;
  z-index: 2;
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  margin: 20px auto;
  overflow: auto;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0,0,0,.22);
}

.spw-testi-modal__close {
  position: sticky;
  top: 18px;
  margin-left: auto;
  margin-right: 18px;
  margin-top: 18px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.96);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

.spw-testi-modal__content {
  padding: 0 28px 34px;
}

.spw-testi-modal-template__body {
  color: #141414;
}

.spw-testi-modal-template__header {
  padding-top: 6px;
  margin-bottom: 20px;
}

.spw-testi-modal-template__eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #9e7f61;
}

.spw-testi-modal-template__title {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: -.03em;
  font-weight: 600;
  color: #101010;
}

.spw-testi-modal-template__subtitle {
  margin: 10px 0 0;
  font-size: 14px;
  color: #6a6a6a;
}

.spw-testi-modal-template__video {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  margin-bottom: 22px;
}

.spw-testi-modal-template__video iframe,
.spw-testi-modal-template__video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.spw-testi-modal-template__video video {
  object-fit: cover;
  background: #000;
}

.spw-testi-modal-template__content {
  font-size: 15px;
  line-height: 1.85;
  color: #2a2a2a;
}

.spw-testi-modal-template__content p:first-child { margin-top: 0; }
.spw-testi-modal-template__content p:last-child { margin-bottom: 0; }

body.spw-modal-open {
  overflow: hidden;
}

.elementor-editor-active .spw-testi-header__tag,
.elementor-editor-active .spw-testi-header__title,
.elementor-editor-active .spw-testi-header__intro,
.elementor-editor-active .spw-testi-card {
  opacity: 1 !important;
  transform: none !important;
}

@media (max-width: 1024px) {
  .spw-testi {
    padding: 72px 24px;
  }

  .spw-testi-grid {
    grid-template-columns: repeat(var(--spw-testi-cols-tablet, 2), minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767px) {
  .spw-testi {
    padding: 56px 16px;
  }

  .spw-testi-grid {
    grid-template-columns: repeat(var(--spw-testi-cols-mobile, 1), minmax(0, 1fr)) !important;
    gap: 18px;
  }

  .spw-testi-card__media {
    height: min(var(--spw-testi-image-h, 320px), 300px);
    border-radius: 24px;
  }

  .spw-testi-card__content {
    border-radius: 20px;
    padding: 20px 18px 18px;
  }

  .spw-testi-card__name {
    font-size: 22px;
  }

  .spw-testi-modal__dialog {
    width: min(100vw - 16px, 920px);
    margin: 8px auto;
    max-height: calc(100vh - 16px);
    border-radius: 20px;
  }

  .spw-testi-modal__content {
    padding: 0 16px 20px;
  }
}

/* =============================================================
   TÉMOIGNAGES SIGNATURE — correctifs v1.1.8
   ============================================================= */
.spw-testi {
  background-color: var(--spw-testi-section-bg, #efede9);
}

.spw-testi-grid {
  align-items: stretch;
}

.spw-testi-card {
  height: 100%;
}

.spw-testi-card__content {
  flex: 1 1 auto;
  justify-content: flex-start;
}

.spw-testi-card__review {
  font-size: 13px;
  line-height: 1.62;
  color: rgba(255,255,255,.82);
}

.spw-testi-card__review p:first-child,
.spw-testi-card__excerpt p:first-child {
  margin-top: 0;
}

.spw-testi-card__review p:last-child,
.spw-testi-card__excerpt p:last-child {
  margin-bottom: 0;
}

.spw-testi-card__review--full,
.spw-testi-card__review--video {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.spw-testi-card__excerpt--preview {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.spw-testi-card__accordion-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .38s ease, opacity .28s ease;
}

.spw-testi-card__accordion-panel.is-open {
  opacity: 1;
}

.spw-testi-card__actions--toggle {
  margin-top: 2px;
}

.spw-testi-toggle {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #b19377;
  background: transparent;
  color: #b19377;
  border-radius: 999px;
  min-height: 42px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--spw-font, 'Montserrat', sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .28s ease, background-color .28s ease, color .28s ease, border-color .28s ease;
}

.spw-testi-toggle:hover,
.spw-testi-toggle[aria-expanded="true"] {
  transform: translateY(-1px);
  background: #fff;
  color: #111;
  border-color: #fff;
}

.spw-testi-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .28s ease;
}

.spw-testi-toggle[aria-expanded="true"] .spw-testi-toggle__icon {
  transform: rotate(45deg);
}
