/* Bandeau cookies — Él'gance. Voir assets/consent.js. */

.fxc {
  --fxc-accent: var(--fx-accent, #7b4dff);
  --fxc-surface: rgba(255, 255, 255, 0.82);
  --fxc-surface-solid: #fff;
  --fxc-border: rgba(255, 255, 255, 0.65);
  --fxc-ink: #14121c;
  --fxc-muted: rgba(20, 18, 28, 0.62);
  --fxc-line: rgba(20, 18, 28, 0.09);
  --fxc-track: rgba(20, 18, 28, 0.16);

  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 2147483000;
  width: 416px;
  max-width: calc(100vw - 32px);
  color: var(--fxc-ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.fxc[hidden] { display: none; }

/* Le bandeau d'origine du thème, remplacé par celui-ci. */
.fx-consent-replaced { display: none !important; }

.fxc__card {
  position: relative;
  padding: 22px;
  border-radius: 22px;
  background: var(--fxc-surface-solid);
  border: 1px solid var(--fxc-border);
  box-shadow:
    0 24px 60px -16px rgba(18, 12, 45, 0.3),
    0 4px 14px rgba(18, 12, 45, 0.07);
  opacity: 0;
  transform: translateY(26px) scale(0.97);
  transition:
    opacity 0.42s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}
/* Verre dépoli seulement là où il est réellement supporté : ailleurs, la
   carte reste opaque plutôt que translucide et illisible. */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .fxc__card {
    background: var(--fxc-surface);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    backdrop-filter: blur(22px) saturate(180%);
  }
}
.fxc.is-visible .fxc__card { opacity: 1; transform: none; }

.fxc__head { display: flex; align-items: center; gap: 9px; }
.fxc__mark {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--fxc-accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--fxc-accent) 45%, transparent);
  animation: fxc-pulse 2.8s ease-out infinite;
}
@keyframes fxc-pulse {
  0% { box-shadow: 0 0 0 0 rgba(123, 77, 255, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(123, 77, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(123, 77, 255, 0); }
}
.fxc__title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.fxc__text {
  margin: 8px 0 0;
  font-size: 13.5px;
  color: var(--fxc-muted);
}
.fxc__more {
  color: var(--fxc-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.fxc__more:hover { text-decoration-thickness: 2px; }

/* Panneau replié : la carte grandit d'elle-même quand il s'ouvre. */
.fxc__panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease;
}
.fxc__panel-inner { overflow: hidden; }
.fxc.is-open .fxc__panel { grid-template-rows: 1fr; opacity: 1; }

.fxc__list { margin: 0; padding: 0; list-style: none; }
.fxc__row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--fxc-line);
}
.fxc__row:first-child { margin-top: 14px; border-top: 1px solid var(--fxc-line); }
.fxc__row-text { flex: 1; min-width: 0; }
.fxc__row-title { display: block; font-size: 13px; font-weight: 600; }
.fxc__row-desc { display: block; margin-top: 2px; font-size: 12px; color: var(--fxc-muted); }

.fxc__switch {
  flex: 0 0 auto;
  width: 46px;
  height: 28px;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: var(--fxc-track);
  cursor: pointer;
  transition: background 0.25s ease;
}
.fxc__switch[aria-checked="true"] { background: var(--fxc-accent); }
.fxc__switch.is-locked { opacity: 0.45; cursor: default; }
.fxc__knob {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  transform: translateX(0);
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fxc__switch[aria-checked="true"] .fxc__knob { transform: translateX(18px); }

.fxc__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.fxc__grow { flex: 1 1 auto; }
.fxc__btn {
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}
.fxc__btn--primary {
  background: var(--fxc-accent);
  border-color: var(--fxc-accent);
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(123, 77, 255, 0.75);
}
.fxc__btn--primary:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -8px rgba(123, 77, 255, 0.85); }
.fxc__btn--ghost { border-color: var(--fxc-line); }
.fxc__btn--ghost:hover { background: rgba(20, 18, 28, 0.05); }
.fxc__btn--text {
  padding-left: 4px;
  padding-right: 4px;
  color: var(--fxc-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.fxc__btn--text:hover { text-decoration-thickness: 2px; }
.fxc__btn:active { transform: translateY(0) scale(0.98); }

/* Panneau ouvert : les deux choix globaux côte à côte, l'enregistrement en
   pleine largeur dessous — trois boutons sur une seule ligne se marcheraient
   dessus, et « Enregistrer mes choix » doit être l'action principale. */
.fxc.is-open .fxc__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.fxc.is-open .fxc__grow { display: none; }
.fxc.is-open .fxc__btn--text {
  grid-column: 1;
  padding: 10px 16px;
  border-color: var(--fxc-line);
  color: inherit;
  text-decoration: none;
}
.fxc.is-open .fxc__btn--text:hover { background: rgba(20, 18, 28, 0.05); }
.fxc.is-open .fxc__btn--ghost { grid-column: 2; }
.fxc.is-open .fxc__btn--primary { grid-column: 1 / -1; }
.fxc__btn:focus-visible,
.fxc__switch:focus-visible,
.fxc__more:focus-visible,
.fx-consent-action:focus-visible {
  outline: 2px solid var(--fxc-accent, #7b4dff);
  outline-offset: 3px;
}

/* Panneau superposé, utilisé quand le bandeau de la page est conservé
   (mode « inherit »). */
.fxc--modal {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: auto;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 2147483001;
}
.fxc--modal .fxc__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 24, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.fxc--modal.is-visible .fxc__backdrop { opacity: 1; }
.fxc--modal .fxc__card { width: 440px; max-width: 100%; }
.fxc--modal.is-visible .fxc__card { opacity: 1; transform: none; }

@media (max-width: 560px) {
  .fxc { left: 12px; right: 12px; bottom: 12px; width: auto; max-width: none; }
  .fxc__card { padding: 18px; border-radius: 20px; }
  .fxc__actions { gap: 8px; }
  .fxc__grow { display: none; }
  .fxc__btn--ghost, .fxc__btn--primary { flex: 1 1 auto; text-align: center; }
  .fxc__btn--text { order: 3; width: 100%; text-align: center; }
}

/* Thème sombre : explicite (fxc--dark) ou suivant le réglage du visiteur
   (fxc--auto). Par défaut le bandeau reste clair, comme le site. */
.fxc--dark,
.fxc--auto {
  color-scheme: dark;
}
.fxc--dark {
  --fxc-surface: rgba(24, 22, 34, 0.86);
  --fxc-surface-solid: #1a1826;
  --fxc-border: rgba(255, 255, 255, 0.12);
  --fxc-ink: #f4f3f8;
  --fxc-muted: rgba(244, 243, 248, 0.66);
  --fxc-line: rgba(255, 255, 255, 0.13);
  --fxc-track: rgba(255, 255, 255, 0.22);
}
@media (prefers-color-scheme: dark) {
  .fxc--auto {
    --fxc-surface: rgba(24, 22, 34, 0.86);
    --fxc-surface-solid: #1a1826;
    --fxc-border: rgba(255, 255, 255, 0.12);
    --fxc-ink: #f4f3f8;
    --fxc-muted: rgba(244, 243, 248, 0.66);
    --fxc-line: rgba(255, 255, 255, 0.13);
    --fxc-track: rgba(255, 255, 255, 0.22);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fxc__card,
  .fxc__panel,
  .fxc__knob,
  .fxc__btn,
  .fxc--modal .fxc__backdrop { transition: none; }
  .fxc__mark { animation: none; }
  .fxc__card { transform: none; }
}

/* --- Bandeau de la page conservé (mode « inherit ») --------------------- */

/* Hôte fixe pour un bandeau exporté depuis Figma, prisonnier d'une page
   rognée ; il laisse passer les clics partout ailleurs. */
.fx-consent-host {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 24px;
  z-index: 2147483000;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}
.fx-consent-host > * { pointer-events: auto; }
/* !important : un bandeau exporté depuis Figma porte son propre display:flex
   en style inline, qui l'emporterait sinon sur la règle. */
.fx-js .fx-consent:not(.fx-consent-open) { display: none !important; }
.fx-consent-action { cursor: pointer; }

/* Rapport affiché avec ?fx_consent_debug=1 (invisible le reste du temps). */
.fx-consent-diag {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 2147483002;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #101014;
  color: #f5f5f7;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
