/**
 * CMS page « Programme de fidélité » — styles isolés (.fc-fidel-page).
 * Palette alignée FourmiCurieuse (tons pierre / rouge boutique / nature), pas MakerShop.
 */

:root {
  --fc-bg-page: #f7f5f2;
  --fc-bg-white: #ffffff;
  --fc-bg-muted: #fafaf9;
  --fc-heading: #1c1917;
  --fc-text: #44403c;
  --fc-text-muted: #78716c;
  --fc-border: #e7e5e4;
  --fc-brand: #99342f;
  --fc-brand-hover: #7a2924;
  --fc-accent: #c2410c;
  --fc-link: #c2410c;
  --fc-link-hover: #9a3412;
  --fc-success: #15803d;
  --fc-radius: 10px;
  --fc-shadow: 0 8px 28px rgba(28, 25, 23, 0.08);
  --fc-check-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%2399342f'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
}

.fc-fidel-page {
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  color: var(--fc-text);
  background: var(--fc-bg-white);
  line-height: 1.55;
  font-size: 16px;
}

.fc-fidel-page * {
  box-sizing: border-box;
}

.fc-fidel-page h1,
.fc-fidel-page h2,
.fc-fidel-page h3 {
  color: var(--fc-heading);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

.fc-fidel-page h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.fc-fidel-page h2 {
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  margin-bottom: 1rem;
}

.fc-fidel-page h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.fc-fidel-page p {
  margin: 0 0 1rem;
  color: var(--fc-text-muted);
}

.fc-fidel-page a {
  color: var(--fc-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fc-fidel-page a:hover {
  color: var(--fc-link-hover);
}

.fc-fidel-page .container.fc-fidel-wrap {
  max-width: 1180px;
}

.fc-fidel-wrap {
  margin-bottom: 5rem;
}

/* Hero */
.fc-fidel-hero {
  background: #efefed;
  padding: clamp(2rem, 4vw, 2.75rem) 0 clamp(3.75rem, 7vw, 5.75rem);
  margin-bottom: 0;
  overflow-x: hidden;
  overflow-y: visible;
}

/* Air between hero (grey) and “Comment ça marche ?”: margin separates blocks; padding clears the border + title */
.fc-fidel-page .fc-fidel-hero + .fc-fidel-section {
  margin-top: clamp(1.5rem, 3.5vw, 2.75rem);
  padding-top: clamp(4.5rem, 8vw, 6.5rem);
}

.fc-fidel-hero__layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  align-items: stretch;
  gap: clamp(1.75rem, 3.5vw, 3rem);
  min-height: 0;
}

.fc-fidel-hero__content {
  position: relative;
  z-index: 2;
  max-width: 36rem;
  padding-left: 4px;
  padding-right: clamp(0px, 2vw, 12px);
  padding-bottom: 0.25rem;
}

.fc-fidel-page .fc-fidel-hero__content h1 {
  margin: clamp(1.1rem, 2vw, 1.35rem) 0 clamp(1.1rem, 2vw, 1.35rem);
  font-size: clamp(1.55rem, 2.6vw + 0.55rem, 2.65rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #171717;
  max-width: min(20em, 100%);
}

.fc-fidel-page .fc-fidel-hero__content p {
  margin: 0 0 1.15rem;
  max-width: 38rem;
  font-size: 1rem;
  line-height: 1.62;
  color: #67615d;
}

.fc-fidel-brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
  color: #36322f;
}

.fc-fidel-brand em {
  color: var(--fc-brand);
  font-style: normal;
}

.fc-fidel-brand__icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1px solid #d6d0ca;
  background: #f6f4f1;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  font-weight: 800;
  color: #453f3a;
  flex: 0 0 52px;
}

.fc-fidel-brand--small {
  font-size: 0.92rem;
  gap: 14px;
}

.fc-fidel-brand--small .fc-fidel-brand__icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  font-size: 1.45rem;
  flex-basis: 42px;
}

.fc-fidel-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: clamp(0.35rem, 1.2vw, 0.65rem);
  padding: 0 28px;
  background: var(--fc-brand);
  color: #fff !important;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
  font-size: 0.92rem;
  border-radius: 5px;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease,
    background 0.2s ease;
}

.fc-fidel-cta:hover {
  background: var(--fc-brand-hover);
  color: #fff !important;
  opacity: 0.95;
  transform: translateY(-1px);
}

.fc-fidel-hero__media {
  position: relative;
  min-height: min(26rem, 62vh);
  z-index: 1;
}

.fc-fidel-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  background:
    linear-gradient(
      105deg,
      #efefed 0%,
      rgba(239, 239, 237, 0.92) 14%,
      rgba(255, 255, 255, 0) 22%
    ),
    linear-gradient(rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.04)),
    url("/modules/fc_fidelisation/views/img/background.png") 78% 42% / cover
      no-repeat;
  clip-path: polygon(16% 0, 100% 0, 100% 100%, 0 100%);
}

.fc-fidel-floating-card {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: clamp(2.875rem, 2.25vw + 1.875rem, 4rem);
  width: min(100%, 420px);
  max-width: calc(100% - 28px);
  background: #f8f7f4;
  border: 1px solid #cfc9c3;
  border-radius: var(--fc-radius);
  box-shadow: var(--fc-shadow);
  padding: 1.35rem 1.35rem 1.25rem;
  z-index: 2;
}

.fc-fidel-floating-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.fc-fidel-floating-card__head .fc-fidel-brand--small {
  flex: 1 1 12rem;
  min-width: 0;
}

.fc-fidel-floating-card__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 2.25rem;
  margin: 0;
  background: var(--fc-brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  white-space: nowrap;
}

.fc-fidel-page .fc-fidel-checklist,
.fc-fidel-page .fc-fidel-checklist ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.fc-fidel-page .fc-fidel-checklist li {
  list-style: none !important;
  position: relative;
  display: block;
  padding: 0 0 0 48px !important;
  margin: 0 0 16px !important;
  font-size: 0.98rem;
  line-height: 1.45;
  color: #4f4b47;
}

.fc-fidel-page .fc-fidel-checklist li:last-child {
  margin-bottom: 0 !important;
}

.fc-fidel-page .fc-fidel-checklist li::marker {
  content: "" !important;
  color: transparent !important;
}

.fc-fidel-page .fc-fidel-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--fc-brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

@media (max-width: 1399.98px) {
  .fc-fidel-hero__layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr);
    gap: 1.75rem;
  }

  .fc-fidel-page .fc-fidel-hero__content h1 {
    font-size: clamp(1.45rem, 2.4vw + 0.55rem, 2.5rem);
  }

  .fc-fidel-floating-card {
    width: min(100%, 400px);
    padding: 1.2rem 1.2rem 1.05rem;
  }
}

@media (max-width: 1199.98px) {
  .fc-fidel-hero {
    padding: 1.75rem 0 clamp(2.75rem, 5.5vw, 3.75rem);
  }

  .fc-fidel-hero__layout {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    min-height: auto;
  }

  .fc-fidel-hero__content {
    max-width: none;
  }

  .fc-fidel-page .fc-fidel-hero__content h1 {
    max-width: min(20em, 100%);
    font-size: clamp(1.45rem, 4.2vw + 0.45rem, 2.35rem);
  }

  .fc-fidel-hero__media {
    min-height: 22rem;
  }

  .fc-fidel-hero__bg {
    width: 100%;
    clip-path: none;
    background-position: 70% 40%;
  }

  .fc-fidel-floating-card {
    top: clamp(1.25rem, 4vw, 1.875rem);
    width: min(100%, 480px);
    max-width: calc(100% - 48px);
  }
}

@media (max-width: 767.98px) {
  .fc-fidel-hero {
    padding: 1.35rem 0 clamp(2.25rem, 6vw, 3rem);
  }

  .fc-fidel-page .fc-fidel-hero__content h1 {
    max-width: none;
    margin: 1rem 0;
    font-size: clamp(1.45rem, 5.8vw, 1.95rem);
    line-height: 1.1;
  }

  .fc-fidel-page .fc-fidel-hero__content p {
    font-size: 0.98rem;
    line-height: 1.58;
    margin-bottom: 1rem;
  }

  .fc-fidel-brand {
    gap: 12px;
    font-size: 1rem;
  }

  .fc-fidel-brand__icon {
    width: 46px;
    height: 46px;
    font-size: 1.55rem;
    flex-basis: 46px;
  }

  .fc-fidel-hero__media {
    min-height: auto;
  }

  .fc-fidel-hero__bg {
    display: none;
  }

  .fc-fidel-floating-card {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    padding: 1.15rem 1.05rem 1rem;
  }

  .fc-fidel-floating-card__head {
    margin-bottom: 0.95rem;
  }

  .fc-fidel-page .fc-fidel-checklist li {
    padding-left: 42px !important;
    font-size: 0.95rem;
  }
}

.fc-fidel-section {
  padding: 2.75rem 0;
  border-top: 1px solid var(--fc-border);
}

.fc-fidel-section--muted {
  background: var(--fc-bg-muted);
}

.fc-fidel-intro {
  max-width: 720px;
  margin-bottom: 2rem;
  color: var(--fc-text-muted);
}

.fc-fidel-page .fc-fidel-steps.row {
  margin-left: 0;
  margin-right: 0;
}

.fc-fidel-step {
  text-align: center;
}

.fc-fidel-step__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fc-fidel-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--fc-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--fc-heading);
  background: var(--fc-bg-white);
  line-height: 1;
}

.fc-fidel-page .fc-fidel-tiers.row {
  margin-left: 0;
  margin-right: 0;
  --bs-gutter-x: 1.75rem;
  --bs-gutter-y: 1.5rem;
  margin-bottom: 5rem;
}

/* Évite traits verticaux entre colonnes (thème / doubles bordures cartes) */
.fc-fidel-page .fc-fidel-tiers.row > [class*="col-"] {
  border: 0 !important;
  box-shadow: none !important;
}

.fc-fidel-tier-card {
  background: var(--fc-bg-white);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  box-shadow: var(--fc-shadow);
  padding: 1.5rem 1.25rem 1.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.fc-fidel-tier-card__badge {
  width: 100%;
  max-width: 160px;
  margin: 0 auto 1rem;
  flex-shrink: 0;
}

.fc-fidel-tier-card__badge img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  margin: 0 auto;
}

.fc-fidel-tier-card__name {
  width: 100%;
  max-width: 17rem;
  margin: 0 auto 0.5rem;
  text-align: center;
  font-weight: 700;
  color: var(--fc-heading);
  font-size: 1rem;
  flex-shrink: 0;
}

/* Le <p> ne doit pas être en flex : le texte et <strong> deviendraient des items côte à côte. */
.fc-fidel-tier-card__criteria {
  margin: 0 auto !important;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 17rem;
  padding: 0.35rem 0.5rem;
  min-height: 0;
}

.fc-fidel-tier-card__criteria-inner {
  display: block;
  text-align: center;
  font-size: 0.95rem;
  color: var(--fc-text-muted);
  line-height: 1.45;
}

.fc-fidel-tier-card__criteria-inner strong {
  font-weight: 700;
}

/* Séparateur type MakerShop : triangle vers le bas */
.fc-fidel-tier-card__arrow {
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 10px solid var(--fc-border);
  margin: 0.75rem auto 0.85rem;
  flex-shrink: 0;
}

/* Bloc remise : empilé centré (comme MakerShop : % puis « de remise » puis ligne détail) */
.fc-fidel-tier-card__discount {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.2rem;
  width: 100%;
  max-width: 17rem;
  margin: 0 auto;
  flex-shrink: 0;
}

.fc-fidel-tier-card__pct {
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.05;
  margin: 0;
  display: block;
}

.fc-fidel-tier-card__de-remise {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--fc-heading);
  line-height: 1.3;
  margin: 0.15rem 0 0;
}

.fc-fidel-tier-card__sub {
  display: block;
  font-size: 0.8rem;
  color: var(--fc-text-muted);
  text-align: center;
  margin: 0.25rem 0 0;
  line-height: 1.4;
  max-width: 15rem;
}

.fc-fidel-tier-card .fc-fidel-tier-card__pct,
.fc-fidel-tier-card .fc-fidel-tier-card__de-remise {
  color: var(--fc-brand);
}

.fc-fidel-disclaimer {
  font-size: 0.85rem;
  color: var(--fc-text-muted);
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  padding-top: 0;
  border-top: none;
  line-height: 1.6;
}

.fc-fidel-legal-link {
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* FAQ */
.fc-fidel-faq__heading-row {
  margin-bottom: 1.5rem;
}

.fc-fidel-page .fc-fidel-faq.row {
  margin-left: 0;
  margin-right: 0;
  align-items: stretch;
}

.fc-fidel-faq__col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fc-fidel-faq__item {
  background: var(--fc-bg-white);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  padding: 1rem 1.15rem;
  box-shadow: 0 1px 4px rgba(28, 25, 23, 0.04);
  flex: 0 0 auto;
}

/* Le titre seul : le sélecteur > strong évite de styler les <strong> dans la réponse comme un second titre. */
.fc-fidel-faq__item > strong {
  display: block;
  color: var(--fc-heading);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  line-height: 1.35;
}

.fc-fidel-faq__item p {
  font-size: 0.9rem;
  margin: 0;
  color: var(--fc-text-muted);
  line-height: 1.58;
}

.fc-fidel-faq__item p strong {
  display: inline;
  color: var(--fc-text);
  font-weight: 600;
  font-size: inherit;
  line-height: inherit;
}
