:root {
  --russia-editorial-ink: #202020;
  --russia-editorial-line: #d2cabd;
  --russia-editorial-gold: #b88935;
  --russia-editorial-flame: #b82914;
}

/* Share and subscribe action band. */
.end-actions[data-russia-end-actions]:empty {
  display: none;
}

.end-actions {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 0;
  max-height: 160px;
  aspect-ratio: 2048 / 768;
  margin: 2.6rem 0;
  isolation: isolate;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  transition: border-color 0.26s ease, box-shadow 0.26s ease, transform 0.26s ease;
}

.end-actions::before {
  position: absolute;
  z-index: 4;
  top: -1px;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--russia-editorial-gold);
  content: "";
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.26s ease;
}

.end-actions__bg {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  border-radius: 6px;
  background-color: var(--russia-editorial-flame);
  background-image: url("../image-abonnement2.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-blend-mode: normal;
  transition: filter 0.35s ease;
}

.end-actions__overlay {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg, transparent 32%, rgb(255 250 240 / 16%) 53%, rgb(255 250 240 / 34%) 100%);
  pointer-events: none;
  transition: opacity 0.26s ease;
}

.end-actions__inner {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 0 0.6rem 0 42%;
}

@media (width >= 961px) {
  .end-actions {
    width: calc(100% + 40px + 4rem + 290px);
    max-width: calc(100% + 40px + 4rem + 290px);
    margin-left: -40px;
  }
}

@keyframes russia-end-actions-glow {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgb(170 125 42 / 50%), 0 0 26px 2px rgb(24 74 56 / 28%), inset 0 0 36px rgb(170 125 42 / 10%);
  }

  50% {
    box-shadow: 0 0 0 1px rgb(170 125 42 / 75%), 0 0 34px 4px rgb(24 74 56 / 40%), inset 0 0 46px rgb(170 125 42 / 16%);
  }
}

.end-actions:hover,
.end-actions:focus-within {
  border-color: var(--russia-editorial-gold) !important;
  box-shadow: 0 15px 38px rgb(24 74 56 / 20%), 0 0 0 1px rgb(170 125 42 / 28%) !important;
  transform: translateY(-3px);
}

.end-actions:hover::before,
.end-actions:focus-within::before {
  transform: scaleX(1);
}

.end-actions:hover .end-actions__bg,
.end-actions:focus-within .end-actions__bg {
  background-blend-mode: luminosity;
  filter: saturate(1.08) contrast(1.04) brightness(1.03);
  animation: russia-end-actions-glow 2.6s ease-in-out infinite;
}

.end-actions:hover .end-actions__overlay,
.end-actions:focus-within .end-actions__overlay {
  opacity: 0.78;
}

.end-actions .editorial-share__menu {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.end-actions .editorial-share__toggle {
  display: inline-flex;
  height: 46px;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 6px;
  background: var(--russia-editorial-flame);
  box-shadow: 0 0 0 rgb(200 130 26 / 0%);
  color: #fff;
  cursor: pointer;
  font-family: var(--codex-sans, Arial, sans-serif);
  font-size: 0.74rem;
  font-weight: 700;
  list-style: none;
  white-space: nowrap;
  transition: background 0.22s ease, box-shadow 0.25s ease, transform 0.22s ease;
}

.end-actions .editorial-share__toggle::-webkit-details-marker {
  display: none;
}

.end-actions .editorial-share__toggle:hover,
.end-actions .editorial-share__menu[open] .editorial-share__toggle {
  background: #174837;
  box-shadow: 0 6px 22px rgb(200 130 26 / 45%), 0 0 0 1px rgb(255 255 255 / 12%);
  transform: translateY(-2px);
}

.end-actions .editorial-share__mark,
.end-actions .editorial-share__mark svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.end-actions .editorial-share__chevron {
  color: #fff;
  font-size: 0.85rem;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.end-actions .editorial-share__menu[open] .editorial-share__chevron {
  opacity: 1;
  transform: rotate(90deg);
}

.share-panel {
  position: absolute;
  z-index: 6;
  top: calc(100% + 0.55rem);
  right: 0;
  width: min(310px, calc(100vw - 48px));
  padding: 0.9rem;
  border: 1px solid var(--russia-editorial-line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 30px rgb(15 20 25 / 20%);
}

.share-panel__text {
  width: 100%;
  min-height: 82px;
  resize: none;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--russia-editorial-line);
  border-radius: 4px;
  background: #faf8f4;
  color: var(--russia-editorial-ink);
  font-family: inherit;
  font-size: 0.72rem;
  line-height: 1.4;
}

.share-panel__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.share-panel__copy {
  min-width: 0;
  height: 36px;
  flex: 1;
  padding: 0 0.55rem;
  border: 1px solid #55636d;
  border-radius: 4px;
  background: #faf6ee;
  color: #1c2b36;
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.share-panel__copy:hover {
  background: #1c2b36;
  color: #fff;
}

.share-panel__copy.is-copied {
  border-color: #1a8068;
  background: #1a8068;
  color: #fff;
}

.share-panel__status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.share-panel__icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #1c2b36;
  color: #fff;
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.share-panel__icon svg {
  width: 15px;
  height: 15px;
}

.share-panel__icon:hover,
.share-panel__icon:focus-visible {
  box-shadow: 0 4px 14px rgb(200 130 26 / 50%);
  transform: translateY(-2px);
}

.editorial-newsletter-menu {
  flex-shrink: 0;
}

.newsletter-panel__label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--russia-editorial-ink);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.newsletter-panel__form {
  display: flex;
  gap: 0.4rem;
}

.newsletter-panel__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--russia-editorial-line);
  border-radius: 4px;
  background: #faf8f4;
  color: var(--russia-editorial-ink);
  font-family: inherit;
  font-size: 0.72rem;
}

.newsletter-panel__submit {
  flex-shrink: 0;
  height: 36px;
  padding: 0 0.7rem;
  border: 1px solid #55636d;
  border-radius: 4px;
  background: #faf6ee;
  color: #1c2b36;
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.newsletter-panel__submit:hover {
  background: #1c2b36;
  color: #fff;
}

.newsletter-panel__success {
  display: none;
  margin-top: 0.5rem;
  color: #1a8068;
  font-size: 0.7rem;
  font-weight: 600;
}

.newsletter-panel__form.is-sent {
  display: none;
}

.newsletter-panel__form.is-sent ~ .newsletter-panel__success {
  display: block;
}

.newsletter-panel__error {
  margin-top: 0.5rem;
  color: #b3261e;
  font-size: 0.7rem;
}

@media (width <= 700px) {
  .newsletter-panel__form {
    flex-wrap: wrap;
  }

  .newsletter-panel__input {
    flex: 1 1 100%;
  }
}

.end-actions__subscribe {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.4rem;
}

.ea-btn {
  display: inline-flex;
  height: 50px;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0 1rem;
  border-radius: 6px;
  font-family: var(--codex-sans, Arial, sans-serif);
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ea-btn--plain {
  border: 1px solid #b8801f;
  background: #d9a63a;
  color: #2a1c05;
}

.ea-btn--plain:hover,
.ea-btn--plain:focus-visible {
  border-color: #1c2b36;
  background: #1c2b36;
  box-shadow: 0 6px 18px rgb(28 43 54 / 30%);
  color: #fff;
  transform: translateY(-2px);
}


.end-actions :is(.editorial-share__toggle, .ea-btn, .share-panel__copy, .share-panel__icon):focus-visible {
  outline: 2px solid var(--russia-editorial-gold);
  outline-offset: 3px;
}

@media (width <= 700px) {
  .end-actions {
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
  }

  .end-actions__overlay {
    background: rgb(255 250 240 / 88%);
  }

  .end-actions__inner {
    position: relative;
    inset: auto;
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.9rem;
    padding: 1.35rem 1rem;
  }

  .end-actions .editorial-share__menu,
  .end-actions .editorial-share__toggle,
  .end-actions__subscribe {
    width: 100%;
  }

  .end-actions .editorial-share__toggle {
    height: 50px;
    justify-content: center;
  }

  .share-panel {
    position: static;
    width: 100%;
    margin-top: 0.6rem;
  }

  .ea-btn--plain {
    flex: 1;
  }

  .next-teaser {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .next-teaser__media {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .next-teaser__body {
    padding: 1.2rem;
  }
}

@media (701px <= width <= 820px) {
  .side .related-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (hover: none) {
  .article-cover:active,
  .related .cards > a.card:active,
  .next-teaser:active,
  .end-actions:active {
    border-color: var(--russia-editorial-gold) !important;
    box-shadow: 0 10px 28px rgb(24 74 56 / 18%) !important;
  }

  .related .cards > a.card:active .card__body {
    background: #e7ede2;
  }

  .side a.related-item:active {
    border-color: var(--russia-editorial-flame) !important;
    background: #e7ede2 !important;
    box-shadow: 0 8px 20px rgb(24 74 56 / 18%) !important;
  }

  .side a.related-item:active .related-item__media img {
    mix-blend-mode: luminosity;
    filter: saturate(1.04) contrast(1.03);
  }

  .article-cover:active::before,
  .end-actions:active::before {
    transform: scaleX(1);
  }

  .article-cover:active img,
  .related .cards > a.card:active .card__media img,
  .next-teaser:active .next-teaser__media img,
  .end-actions:active .end-actions__bg {
    mix-blend-mode: luminosity;
    filter: saturate(1.04) contrast(1.03) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-cover,
  .article-cover::before,
  .article-cover img,
  .related .cards > a.card,
  .related .card__body,
  .side a.related-item,
  .related-item__media img,
  .related .card__media img,
  .next-teaser,
  .next-teaser__media img,
  .end-actions,
  .end-actions::before,
  .end-actions__bg,
  .end-actions__overlay {
    transition: none !important;
  }

  .end-actions:hover .end-actions__bg,
  .end-actions:focus-within .end-actions__bg {
    animation: none !important;
  }
}

@media print {
  .end-actions {
    display: none !important;
  }
}

.ge-nudge {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: -120px;
  z-index: 500;
  max-width: 400px;
  margin: 0 auto;
  padding: 1rem 2.6rem 1rem 1.2rem;
  border-radius: 14px;
  background: #14243a;
  color: #fff;
  box-shadow: 0 14px 34px rgb(10 12 20 / 32%);
  opacity: 0;
  transition: opacity 0.3s ease, bottom 0.3s ease;
}

.ge-nudge.is-visible {
  bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px));
  opacity: 1;
}

.ge-nudge__close {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: rgb(255 255 255 / 60%);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.ge-nudge__close:hover {
  color: #fff;
}

.ge-nudge__text {
  margin: 0 0 0.65rem;
  font-size: 0.84rem;
  font-weight: 500;
}

.ge-nudge__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: #fff;
  color: #14243a;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.ge-nudge__cta:hover {
  opacity: 0.85;
}

@media (width <= 480px) {
  .ge-nudge {
    left: 0.6rem;
    right: 0.6rem;
    max-width: none;
  }

  .ge-nudge.is-visible {
    bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ge-nudge {
    transition: none !important;
  }
}

/* Mur d'abonnement — opt-in via [data-geopolo-gate]. Le script ajoute
   .geopolo-gated sur le conteneur article quand le marqueur existe,
   puis .geopolo-gate-open en plus si l'abonnement est actif. Verrouille
   tout ce qui suit le marqueur dans .body (sinon la fin de l'article
   fuite sous le mur). */
.body [data-geopolo-gate] ~ *:not(.related):not(.end-actions):not(.author):not(.nextbox) { display: none; }
.geopolo-gated .tags,
.geopolo-gated .wordcount,
.geopolo-gated .notes { display: none; }
.geopolo-gate-open .body [data-geopolo-gate] ~ * { display: revert; }
.geopolo-gate-open .body [data-geopolo-gate] { display: none; }
.geopolo-gate-open .tags,
.geopolo-gate-open .wordcount,
.geopolo-gate-open .notes { display: revert; }
.geopolo-paywall { margin: 2.6rem 0; padding: 2rem 1.8rem; border: 1px solid #c9c9c9; border-top: 3px solid #7b5054; background: #faf6f6; text-align: center; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
.geopolo-paywall__text { margin: 0 0 1.1rem; color: #5d5d5d; font-size: .95rem; line-height: 1.6; }
.geopolo-paywall__cta { display: inline-block; padding: .8rem 1.8rem; background: #7b5054; color: #fff; font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; border-radius: 3px; transition: background .2s ease; }
.geopolo-paywall__cta:hover, .geopolo-paywall__cta:focus-visible { background: #61373b; }
