/* Finances Expat - consentement Analytics, version 20260802 */
.fe-consent-layer,
.fe-consent-layer *,
.fe-consent-manage,
.fe-consent-sr-only {
  box-sizing: border-box;
}

.fe-consent-layer[hidden],
.fe-consent-manage[hidden] {
  display: none !important;
}

.fe-consent-layer {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
}

.fe-consent-panel {
  width: min(920px, 100%);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  border: 1px solid var(--line, #e2e7dd);
  border-radius: 16px;
  background: var(--card, #fff);
  color: var(--ink, #13302c);
  box-shadow: 0 28px 70px -28px rgba(13, 58, 53, 0.48);
  font-family: "Hanken Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.5;
  pointer-events: auto;
  scrollbar-gutter: stable;
}

.fe-consent-panel--preferences {
  width: min(820px, 100%);
}

.fe-consent-title {
  margin: 0;
  color: var(--ink, #13302c);
  font-family: "Hanken Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: clamp(20px, 2.6vw, 25px);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.fe-consent-copy {
  min-width: 0;
}

.fe-consent-copy p,
.fe-consent-category p {
  margin: 9px 0 0;
  color: var(--ink-soft, #3c534e);
  font-family: "Hanken Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.fe-consent-policy-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--teal, #114b45);
  font-family: "Hanken Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-color: var(--sage-line, #d5dece);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.fe-consent-policy-link:hover {
  color: var(--teal-deep, #0d3a35);
  text-decoration-color: currentColor;
}

.fe-consent-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  margin-top: 20px;
}

.fe-consent-button,
.fe-consent-manage {
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 11px 15px;
  border: 1px solid var(--teal, #114b45);
  border-radius: 11px;
  font-family: "Hanken Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Accepter et refuser ont volontairement la même importance visuelle. */
.fe-consent-button--choice {
  background: var(--teal, #114b45);
  color: #fff;
  box-shadow: 0 14px 26px -23px rgba(13, 58, 53, 0.72);
}

.fe-consent-button--choice:hover,
.fe-consent-button--choice:active {
  border-color: var(--teal-deep, #0d3a35);
  background: var(--teal-deep, #0d3a35);
}

.fe-consent-button--secondary,
.fe-consent-button--choice-outline {
  border-color: var(--sage-line, #d5dece);
  background: var(--card, #fff);
  color: var(--teal-deep, #0d3a35);
}

.fe-consent-button--secondary:hover,
.fe-consent-button--choice-outline:hover {
  border-color: var(--teal, #114b45);
  background: var(--sage, #e5ebe0);
}

.fe-consent-button--save {
  border-color: var(--gold-deep, #8e6418);
  background: var(--gold, #b07d24);
  color: #211904;
}

.fe-consent-button--save:hover,
.fe-consent-button--save:active {
  border-color: var(--gold-deep, #8e6418);
  background: #c18a2a;
}

.fe-consent-button:focus-visible,
.fe-consent-manage:focus-visible,
.fe-consent-policy-link:focus-visible,
.fe-consent-toggle-input:focus-visible,
.fe-consent-title:focus-visible {
  outline: 3px solid var(--teal-deep, #0d3a35);
  outline-offset: 3px;
}

.fe-consent-categories {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.fe-consent-category {
  min-width: 0;
  margin: 0;
  padding: 15px 16px;
  border: 1px solid var(--line, #e2e7dd);
  border-radius: 12px;
  background: #fafbf9;
}

.fe-consent-category-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.fe-consent-category h3 {
  min-width: 0;
  margin: 0;
  color: var(--ink, #13302c);
  font-family: "Hanken Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.fe-consent-always-on {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid var(--sage-line, #d5dece);
  border-radius: 999px;
  background: var(--sage, #e5ebe0);
  color: var(--teal-deep, #0d3a35);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
}

.fe-consent-toggle {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-width: 48px;
  min-height: 44px;
  margin: 0;
  cursor: pointer;
}

.fe-consent-toggle-input {
  position: relative;
  width: 48px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 2px solid var(--muted, #5e726c);
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  color: var(--teal, #114b45);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.fe-consent-toggle-input::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted, #5e726c);
  transition: transform 0.16s ease, background 0.16s ease;
}

.fe-consent-toggle-input:checked {
  border-color: var(--teal, #114b45);
  background: var(--teal, #114b45);
}

.fe-consent-toggle-input:checked::before {
  background: #fff;
  transform: translateX(20px);
}

.fe-consent-manage {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  min-height: 40px;
  margin: 18px 0 0;
  padding: 9px 13px;
  border-color: var(--sage-line, #d5dece);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--teal-deep, #0d3a35);
  box-shadow: 0 12px 30px -18px rgba(13, 58, 53, 0.48);
  font-size: 13px;
  backdrop-filter: blur(8px);
}

.fe-consent-manage:hover {
  border-color: var(--teal, #114b45);
  background: var(--sage, #e5ebe0);
}

.fe-consent-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 640px) {
  .fe-consent-layer {
    padding: 12px;
  }

  .fe-consent-panel {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 19px;
    border-radius: 14px;
  }

  .fe-consent-actions--notice {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fe-consent-actions--notice .fe-consent-button--secondary {
    grid-column: 1 / -1;
  }

  .fe-consent-actions--preferences {
    grid-template-columns: 1fr;
  }

  .fe-consent-category-heading {
    gap: 12px;
  }
}

@media (max-width: 360px) {
  .fe-consent-actions--notice {
    grid-template-columns: 1fr;
  }

  .fe-consent-actions--notice .fe-consent-button--secondary {
    grid-column: auto;
  }

  .fe-consent-category-heading {
    flex-wrap: wrap;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .fe-consent-layer {
    padding: 8px;
  }

  .fe-consent-panel {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    padding: 16px;
  }

  .fe-consent-actions {
    margin-top: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fe-consent-layer *,
  .fe-consent-manage {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

@media (forced-colors: active) {
  .fe-consent-panel,
  .fe-consent-category,
  .fe-consent-button,
  .fe-consent-manage,
  .fe-consent-toggle-input {
    border-color: ButtonText;
  }

  .fe-consent-toggle-input:checked::before {
    background: HighlightText;
  }
}
