/**
 * Accès Newsletter dans le header et popup de sortie.
 */

.edj-header-action-row {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
}

.edj-header-newsletter-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid #173f5f;
  border-radius: 999px;
  background: linear-gradient(135deg, #245879, #173f5f);
  box-shadow: 0 6px 16px rgba(30, 66, 102, .16);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.edj-header-newsletter-link:hover,
.edj-header-newsletter-link:focus-visible,
.edj-header-newsletter-link[aria-current="page"] {
  background: linear-gradient(135deg, #32739d, #1e4d70);
  box-shadow: 0 9px 20px rgba(30, 66, 102, .23);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.edj-header-newsletter-link:focus-visible {
  outline: 3px solid rgba(44, 95, 138, .28);
  outline-offset: 2px;
}

.edj-header-newsletter-icon {
  display: grid;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #f5c060;
}

.edj-header-newsletter-icon svg {
  display: block;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.edj-header-newsletter-label--short {
  display: none;
}

body.edj-newsletter-popup-open {
  overflow: hidden !important;
}

.edj-newsletter-popup[hidden] {
  display: none !important;
}

.edj-newsletter-popup {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  padding: 16px;
  place-items: center;
  opacity: 0;
  transition: opacity .18s ease;
}

.edj-newsletter-popup.is-visible {
  opacity: 1;
}

.edj-newsletter-popup-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(7, 22, 34, .76);
  cursor: default;
  backdrop-filter: blur(5px);
}

.edj-newsletter-popup-dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(270px, .72fr) minmax(430px, 1.28fr);
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 22px;
  background: #eff2f7;
  box-shadow: 0 30px 90px rgba(0,0,0,.38);
  opacity: 0;
  transform: translateY(15px) scale(.985);
  transition: opacity .18s ease, transform .18s ease;
}

.edj-newsletter-popup.is-visible .edj-newsletter-popup-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.edj-newsletter-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid #ccd5dc;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  color: #173f5f;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(19,48,70,.12);
}

.edj-newsletter-popup-close:hover,
.edj-newsletter-popup-close:focus-visible {
  border-color: var(--color-primary);
  background: #fff;
}

.edj-newsletter-popup-close:focus-visible {
  outline: 3px solid rgba(44,95,138,.25);
  outline-offset: 2px;
}

.edj-newsletter-popup-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.edj-newsletter-popup-copy {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 4vw, 50px) clamp(25px, 4vw, 42px);
  background:
    radial-gradient(circle at 14% 10%, rgba(255,255,255,.10) 0 1px, transparent 1.5px) 0 0 / 25px 25px,
    radial-gradient(circle at 90% 12%, rgba(232,160,32,.23), transparent 27%),
    linear-gradient(145deg, #122f48, #245879);
  color: #fff;
}

.edj-newsletter-popup-copy::after {
  position: absolute;
  right: -100px;
  bottom: -125px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 50%;
  content: '';
}

.edj-newsletter-popup-kicker {
  margin: 0 0 14px;
  color: #f5c060;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.edj-newsletter-popup-copy h2 {
  margin: 0;
  padding: 0;
  background: none;
  color: #fff;
  font-family: var(--font-serif);
  font-size: clamp(29px, 3.4vw, 41px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.edj-newsletter-popup-copy h2::before {
  display: none;
}

.edj-newsletter-popup-copy > p:not(.edj-newsletter-popup-kicker) {
  margin: 20px 0 23px;
  color: rgba(255,255,255,.78);
  font-size: 14px;
  line-height: 1.6;
}

.edj-newsletter-popup-copy ul {
  display: grid;
  gap: 10px;
  margin: 0 0 25px !important;
  padding: 0 !important;
  list-style: none !important;
}

.edj-newsletter-popup-copy li {
  display: flex;
  gap: 9px;
  margin: 0 !important;
  padding: 0 !important;
  color: rgba(255,255,255,.92);
  font-size: 13px;
  font-weight: 700;
}

.edj-newsletter-popup-copy li span {
  color: #f5c060;
}

.edj-newsletter-popup-copy > a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.45);
  text-underline-offset: 4px;
}

.edj-newsletter-popup-copy > a:hover,
.edj-newsletter-popup-copy > a:focus-visible {
  color: #f5c060;
  text-decoration-color: currentColor;
}

.edj-newsletter-popup-form {
  min-width: 0;
  padding: 12px 10px 15px;
  overflow: auto;
  background: #eff2f7;
  overscroll-behavior: contain;
}

.edj-newsletter-popup-frame {
  display: block;
  width: 100% !important;
  height: 650px !important;
  border: 0;
  background: #eff2f7;
}

.edj-newsletter-popup-privacy {
  margin: -2px 12px 0;
  color: #687986;
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.edj-newsletter-popup-privacy a {
  color: var(--color-primary);
  font-weight: 700;
}

#mobileMenu .edj-mobile-newsletter-link {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 48px;
  margin: 0 14px 10px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 13px;
  background: rgba(255,255,255,.10);
  color: #fff;
  font-size: clamp(12px, 3.7vw, 14px);
  font-weight: 850;
  line-height: 1.3;
  text-decoration: none;
  box-sizing: border-box;
}

#mobileMenu .edj-mobile-newsletter-link:hover,
#mobileMenu .edj-mobile-newsletter-link:focus-visible,
#mobileMenu .edj-mobile-newsletter-link[aria-current="page"] {
  border-color: rgba(255,255,255,.46);
  background: rgba(255,255,255,.18);
  color: #fff;
  text-decoration: none;
}

#mobileMenu .edj-mobile-newsletter-link:focus-visible {
  outline: 3px solid rgba(255,255,255,.72);
  outline-offset: 2px;
}

.edj-mobile-newsletter-link-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: #f5c060;
  color: #173f5f;
}

.edj-mobile-newsletter-link-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.edj-mobile-newsletter-link-arrow {
  font-size: 18px;
  line-height: 1;
}

@media (max-width: 1200px) {
  .edj-header-newsletter-label--full {
    display: none;
  }

  .edj-header-newsletter-label--short {
    display: inline;
  }

  .edj-header-newsletter-link {
    min-height: 32px;
    padding: 5px 10px;
    font-size: 11px;
  }
}

@media (max-width: 767px) {
  .edj-brand-bar .edj-site-branding {
    max-width: calc(100% - 132px);
  }

  .edj-header-newsletter-link {
    width: 32px;
    min-width: 32px;
    padding: 4px 6px;
    justify-content: center;
  }

  .edj-header-newsletter-label--full,
  .edj-header-newsletter-label--short {
    display: none;
  }

  .edj-header-action-row .edj-header-birth-link {
    width: 32px;
    min-width: 32px;
    padding: 4px 6px;
    justify-content: center;
  }

  .edj-header-action-row .edj-header-birth-label {
    display: none;
  }

  .edj-header-newsletter-icon {
    flex-basis: 18px;
    width: 18px;
    height: 18px;
  }

  .edj-newsletter-popup {
    padding: 8px;
  }

  .edj-newsletter-popup-dialog {
    display: block;
    width: min(100%, 580px);
    max-height: calc(100dvh - 16px);
    overflow-y: auto;
    border-radius: 16px;
  }

  .edj-newsletter-popup-copy {
    padding: 34px 23px 28px;
  }

  .edj-newsletter-popup-copy h2 {
    padding-right: 25px;
    font-size: clamp(29px, 9vw, 39px);
  }

  .edj-newsletter-popup-copy ul {
    margin-bottom: 5px !important;
  }

  .edj-newsletter-popup-copy > a,
  .edj-newsletter-popup-copy > p:not(.edj-newsletter-popup-kicker) {
    display: none;
  }

  .edj-newsletter-popup-form {
    overflow: visible;
  }

  .edj-newsletter-popup-frame {
    height: 700px !important;
  }
}

@media (max-width: 380px) {
  #mobileMenu .edj-mobile-newsletter-link {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 8px;
    margin-right: 10px;
    margin-left: 10px;
    padding: 9px 10px;
  }

  .edj-mobile-newsletter-link-icon {
    width: 26px;
    height: 26px;
  }

  .edj-mobile-newsletter-link-arrow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .edj-newsletter-popup,
  .edj-newsletter-popup-dialog,
  .edj-header-newsletter-link {
    transition: none;
  }
}
