/* FomLove - Contrôle d'âge global */

html.age-gate-pending,
html.age-gate-pending body {
  overflow: hidden;
}

.age-gate[hidden] {
  display: none;
}

html.age-gate-pending .age-gate[hidden] {
  display: grid;
}

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(12px, 3vw, 28px);
  overflow-y: auto;
  background: rgba(5, 5, 7, 0.72);
  -webkit-backdrop-filter: blur(12px) saturate(0.65);
  backdrop-filter: blur(12px) saturate(0.65);
}

.age-gate__panel {
  position: relative;
  width: min(100%, 560px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  padding: clamp(24px, 3vw, 36px);
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--color-text);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.72);
}

.age-gate__panel::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}

.age-gate__brand {
  display: inline-flex;
  align-items: center;
  margin-bottom: var(--space-4);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: var(--font-weight-bold);
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--color-white);
}

.age-gate__brand strong {
  margin-left: 0.12em;
  padding: 0.16em 0.2em;
  color: var(--color-white);
  background: var(--color-primary);
  border-radius: var(--radius-sm);
}

.age-gate__eyebrow {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--color-primary-light);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.age-gate__title {
  max-width: 480px;
  margin: 0 auto var(--space-5);
  font-size: clamp(1.45rem, 3.2vw, 1.9rem);
  line-height: 1.18;
  text-wrap: balance;
}

.age-gate__notice {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  max-width: 480px;
  margin: 0 auto var(--space-6);
  padding: var(--space-3) var(--space-4);
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
  line-height: 1.55;
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
}

.age-gate__notice-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-top: 2px;
  fill: none;
  stroke: var(--color-primary-light);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.age-gate__actions {
  display: grid;
  gap: var(--space-3);
  max-width: 370px;
  margin: 0 auto;
}

.age-gate__button {
  min-height: 48px;
  padding: 10px var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  color: var(--color-white);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  line-height: 1.35;
  touch-action: manipulation;
  transition: background-color var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base), opacity var(--transition-fast);
}

.age-gate__button--primary {
  background: var(--color-primary);
  box-shadow: 0 8px 24px rgba(232, 23, 93, 0.26);
}

.age-gate__button--primary:hover {
  background: var(--color-primary-light);
}

.age-gate__button--secondary {
  color: var(--color-text-light);
  background: transparent;
  border-color: var(--color-border-light);
}

.age-gate__button--secondary:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--color-text-muted);
}

.age-gate__button:active {
  opacity: 0.78;
}

.age-gate__button:focus-visible {
  outline: 3px solid var(--color-white);
  outline-offset: 3px;
}

.age-gate__privacy {
  max-width: 400px;
  margin: var(--space-4) auto 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  line-height: 1.55;
}

@media (min-width: 481px) and (max-width: 768px) {
  .age-gate__panel {
    width: min(100%, 520px);
    padding: 28px;
  }
}

@media (max-width: 480px) {
  .age-gate {
    padding: 10px;
  }

  .age-gate__panel {
    width: min(100%, 400px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    padding: 24px 18px max(20px, env(safe-area-inset-bottom));
    border-radius: var(--radius-lg);
  }

  .age-gate__brand {
    margin-bottom: var(--space-3);
    font-size: 1.65rem;
  }

  .age-gate__eyebrow {
    font-size: 0.6875rem;
    letter-spacing: 0.11em;
  }

  .age-gate__title {
    margin-bottom: var(--space-4);
    font-size: clamp(1.3rem, 7vw, 1.55rem);
  }

  .age-gate__notice {
    gap: 10px;
    margin-bottom: var(--space-5);
    padding: var(--space-3);
    font-size: 0.8125rem;
  }

  .age-gate__actions {
    gap: 10px;
  }

  .age-gate__button {
    min-height: 46px;
    padding-inline: var(--space-4);
    font-size: 0.8125rem;
  }

  .age-gate__privacy {
    margin-top: var(--space-3);
    font-size: 0.6875rem;
  }
}

@media (max-height: 620px) {
  .age-gate {
    padding: 8px;
  }

  .age-gate__panel {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    padding-block: var(--space-4);
  }

  .age-gate__brand,
  .age-gate__title,
  .age-gate__notice {
    margin-bottom: 10px;
  }

  .age-gate__privacy {
    margin-top: 10px;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .age-gate__panel {
    width: min(100%, 620px);
  }

  .age-gate__brand {
    margin-bottom: 8px;
    font-size: 1.45rem;
  }

  .age-gate__eyebrow {
    margin-bottom: 6px;
  }

  .age-gate__title {
    font-size: 1.35rem;
  }

  .age-gate__notice {
    padding-block: 8px;
    line-height: 1.4;
  }

  .age-gate__actions {
    grid-template-columns: 1fr 1fr;
    max-width: 100%;
  }

  .age-gate__button {
    min-height: 44px;
    padding: 8px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .age-gate__button {
    transition: none;
  }
}
