/**
 * Charte d’accueil InterFilm
 */

html.charter-open,
body.charter-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

html.charter-open #profileGate,
html.charter-open .header,
html.charter-open #mainHome,
html.charter-open .page-loader,
body.charter-open #profileGate,
body.charter-open .header,
body.charter-open #mainHome {
  pointer-events: none !important;
}

/* Au-dessus du profileGate (z-index ~9_999_999) */
#siteCharterModal {
  position: fixed;
  inset: 0;
  z-index: 10000050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
  background: rgba(4, 4, 8, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
  overscroll-behavior: contain;
}
#siteCharterModal.is-open {
  display: flex;
}
#siteCharterModal[hidden] {
  display: none !important;
}

.site-charter {
  width: min(720px, 100%);
  height: min(92vh, 880px);
  max-height: min(92vh, 880px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(232, 48, 74, 0.12), transparent 50%),
    linear-gradient(165deg, #14141c 0%, #0c0c12 100%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  pointer-events: auto;
}

/* Wrapper principal : doit remplir la carte sinon le texte ne scroll jamais */
#siteCharterMain {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#siteCharterMain[hidden] {
  display: none !important;
}

.site-charter__head {
  flex-shrink: 0;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.site-charter__kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.site-charter__title {
  margin: 0;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}
.site-charter__sub {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
}

.site-charter__body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  padding: 18px 24px 8px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  outline: none;
}

.site-charter__section {
  margin: 0 0 22px;
}
.site-charter__section h3 {
  margin: 0 0 8px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 750;
  color: #fff;
}
.site-charter__section p,
.site-charter__section li {
  margin: 0 0 8px;
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.68);
}
.site-charter__section ul {
  margin: 0 0 8px;
  padding-left: 1.15rem;
}
.site-charter__section li { margin-bottom: 5px; }
.site-charter__section strong { color: rgba(255, 255, 255, 0.92); font-weight: 700; }

.site-charter__callout {
  margin: 0 0 22px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(232, 48, 74, 0.4);
  background: rgba(232, 48, 74, 0.12);
  color: #ffc4cb;
  font-size: 13px;
  line-height: 1.5;
}
.site-charter__callout strong {
  display: block;
  margin-bottom: 4px;
  color: #ff8a98;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-charter__foot {
  flex-shrink: 0;
  padding: 14px 24px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.25);
}
.site-charter__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.site-charter__btn {
  appearance: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
}
.site-charter__btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.75);
}
.site-charter__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.site-charter__btn--primary {
  background: linear-gradient(180deg, #e85a6a, #e8304a);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
}
.site-charter__btn--primary:hover { filter: brightness(1.05); }

.site-charter__refuse {
  padding: 36px 28px;
  text-align: center;
}
.site-charter__refuse h3 {
  margin: 0 0 10px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1.35rem;
  color: #fff;
}
.site-charter__refuse p {
  margin: 0 auto 22px;
  max-width: 38ch;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
}
.site-charter__refuse-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  #siteCharterModal { padding: 10px; }
  .site-charter__head,
  .site-charter__body,
  .site-charter__foot { padding-left: 16px; padding-right: 16px; }
  .site-charter__actions { flex-direction: column-reverse; }
  .site-charter__btn { width: 100%; text-align: center; }
}
