// =============================================
// Marketing CTA - Bandeaux & composants abonnement
// =============================================

// Section wrapper (test page only)
.mkt-section {
  margin-bottom: 50px;

  &__label {
    color: #76869c;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border-card);
  }
}

// =============================================
// 1. HERO BANNER
// =============================================
.mkt-hero {
  background: linear-gradient(135deg, #007cb0 0%, #009cb4 50%, #439a86 100%);
  border-radius: 8px;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 50px 40px;
  position: relative;
  overflow: hidden;

  @include rmax($medium) {
    flex-direction: column;
    padding: 35px 25px;
    text-align: center;
  }

  &__content {
    flex: 1;
    position: relative;
    z-index: 1;
  }

  &__visual {
    flex: 0 0 auto;
    margin-left: 40px;
    opacity: 0.15;

    @include rmax($medium) {
      display: none;
    }

    img {
      width: 180px;
      filter: brightness(0) invert(1);
    }
  }

  &__badge {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    display: inline-block;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 15px;
    padding: 6px 14px;
    text-transform: uppercase;
  }

  &__title {
    color: #fff;
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 12px;

    @include rmax($medium) {
      font-size: 2.2rem;
    }
  }

  &__text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.6rem;
    line-height: 1.5;
    margin-bottom: 25px;
    max-width: 520px;

    @include rmax($medium) {
      max-width: none;
    }
  }

  &__actions {
    align-items: center;
    display: flex;
    gap: 20px;
    margin-bottom: 25px;

    @include rmax($medium) {
      flex-direction: column;
      gap: 12px;
    }

    .btn {
      background: #fff;
      color: #007cb0;
      font-weight: 800;

      &:hover {
        background: rgba(255, 255, 255, 0.9);
      }

      &:before {
        content: none;
      }
    }
  }

  &__price {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.5rem;

    strong {
      color: #fff;
      font-weight: 800;
    }
  }

  &__features {
    display: flex;
    gap: 25px;

    @include rmax($medium) {
      flex-direction: column;
      gap: 8px;
      align-items: center;
    }
  }

  &__feature {
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    font-size: 1.4rem;
    font-weight: 500;
    gap: 8px;

    .icon {
      color: #40d17e;
      font-size: 1.6rem;
    }
  }
}

// =============================================
// 2. BANDEAU INLINE
// =============================================
.mkt-inline {
  align-items: center;
  background: linear-gradient(135deg, rgba(0, 124, 176, 0.08) 0%, rgba(0, 156, 180, 0.08) 100%);
  border: 1px solid rgba(0, 124, 176, 0.15);
  border-radius: 8px;
  display: flex;
  gap: 20px;
  padding: 25px 30px;

  html[data-theme="dark"] & {
    background: rgba(0, 124, 176, 0.12);
    border-color: rgba(0, 124, 176, 0.25);
  }

  @include rmax($medium) {
    flex-direction: column;
    text-align: center;
    padding: 25px 20px;
  }

  &__icon {
    color: var(--color-blue-700);
    flex: 0 0 auto;
    font-size: 2.4rem;

    svg {
      width: 32px;
      height: 32px;
    }

    @include rmax($medium) {
      display: none;
    }
  }

  &__body {
    flex: 1;
  }

  &__title {
    color: var(--color-base);
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 4px;
  }

  &__text {
    color: #76869c;
    font-size: 1.4rem;
    line-height: 1.4;
  }

  .btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

// =============================================
// 3. BANDEAU COMPACT
// =============================================
.mkt-compact {
  align-items: center;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-card);
  border-left: 4px solid var(--color-blue-700);
  border-radius: 4px;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 18px 25px;

  @include rmax($medium) {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  &__text {
    color: var(--color-base);
    font-size: 1.5rem;
    line-height: 1.4;

    strong {
      font-weight: 800;
    }
  }

  .btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

// =============================================
// 4. CARD AVANTAGES
// =============================================
.mkt-benefits {
  background: var(--color-bg-card);
  border-radius: 8px;
  box-shadow: 0 -5px 20px 0 rgba(0, 0, 0, 0.05);
  overflow: hidden;
  padding: 40px;

  html[data-theme="dark"] & {
    box-shadow: none;
  }

  @include rmax($medium) {
    padding: 30px 20px;
  }

  &__header {
    margin-bottom: 35px;
    text-align: center;
  }

  &__title {
    color: var(--color-base);
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 8px;
  }

  &__subtitle {
    color: #76869c;
    font-size: 1.5rem;
  }

  &__grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 35px;

    @include rmax($medium) {
      grid-template-columns: 1fr;
      gap: 20px;
    }
  }

  &__item {
    background: var(--color-bg);
    border-radius: 8px;
    padding: 30px 25px;
    text-align: center;

    html[data-theme="dark"] & {
      background: var(--color-bg-card-dark);
    }
  }

  &__icon {
    align-items: center;
    background: linear-gradient(315deg, #009cb4 0%, #007cb0 100%);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    height: 56px;
    justify-content: center;
    margin-bottom: 18px;
    width: 56px;

    svg {
      width: 24px;
      height: 24px;
    }
  }

  &__item-title {
    color: var(--color-base);
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
  }

  &__item-text {
    color: #76869c;
    font-size: 1.4rem;
    line-height: 1.5;
  }

  &__footer {
    text-align: center;
  }
}

// =============================================
// 5. PAYWALL TEASER
// =============================================
.mkt-paywall-demo {
  position: relative;

  &__article {
    p {
      color: var(--color-base);
      font-family: "Roboto Slab", serif;
      font-size: 1.75rem;
      line-height: 1.7;
      margin-bottom: 20px;
    }
  }
}

.mkt-paywall {
  position: relative;

  &__fade {
    background: linear-gradient(180deg, rgba(244, 244, 244, 0) 0%, var(--color-bg) 100%);
    height: 120px;
    left: 0;
    position: absolute;
    right: 0;
    top: -120px;
    pointer-events: none;

    html[data-theme="dark"] & {
      background: linear-gradient(180deg, rgba(10, 17, 26, 0) 0%, var(--color-bg) 100%);
    }
  }

  &__content {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-card);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
  }

  &__lock {
    align-items: center;
    background: linear-gradient(315deg, #009cb4 0%, #007cb0 100%);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    height: 56px;
    justify-content: center;
    margin-bottom: 18px;
    width: 56px;
  }

  &__title {
    color: var(--color-base);
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 12px;
  }

  &__text {
    color: #76869c;
    font-size: 1.5rem;
    margin-bottom: 20px;

    a {
      color: var(--color-blue-700);
      font-weight: 700;
      text-decoration: underline;
    }
  }

  &__mention {
    color: #76869c;
    font-size: 1.2rem;
    margin-top: 12px;
  }
}

// =============================================
// 6. SIDEBAR CTA
// =============================================
.mkt-sidebar-cta {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-card);
  border-radius: 8px;
  padding: 30px 20px;
  text-align: center;

  &__header {
    margin-bottom: 18px;

    img {
      width: 80px;
    }
  }

  &__title {
    color: var(--color-base);
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 8px;
  }

  &__text {
    color: #76869c;
    font-size: 1.4rem;
    line-height: 1.4;
    margin-bottom: 18px;
  }

  &__list {
    list-style: none;
    margin: 0 0 25px 0;
    padding: 0;
    text-align: left;

    li {
      align-items: center;
      color: var(--color-base);
      display: flex;
      font-size: 1.4rem;
      font-weight: 500;
      gap: 10px;
      padding: 8px 0;

      &:not(:last-child) {
        border-bottom: 1px solid var(--color-border-card);
      }

      .icon {
        color: #40d17e;
        font-size: 1.4rem;
        flex: 0 0 auto;
      }
    }
  }
}

// =============================================
// 7. STICKY BOTTOM BAR
// =============================================
.mkt-sticky-bar {
  background: var(--color-bg-card);
  border-top: 1px solid var(--color-border-card);
  bottom: 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  left: 0;
  opacity: 0;
  position: fixed;
  right: 0;
  transform: translateY(100%);
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 999;

  html[data-theme="dark"] & {
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  }

  &.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  &__inner {
    align-items: center;
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 0 auto;
    max-width: 1248px;
    padding: 14px 24px;

    @include rmax($medium) {
      gap: 12px;
    }
  }

  &__text {
    color: var(--color-base);
    font-size: 1.5rem;
    line-height: 1.3;

    @include rmax($medium) {
      font-size: 1.3rem;
    }

    strong {
      font-weight: 800;
    }
  }

  &__close {
    background: none;
    border: none;
    color: #76869c;
    cursor: pointer;
    flex: 0 0 auto;
    padding: 8px;
    transition: color 0.15s;

    &:hover {
      color: var(--color-base);
    }
  }

  .btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

// =============================================
// 8. BANDEAU PROMO
// =============================================
.mkt-promo {
  align-items: center;
  background: linear-gradient(135deg, rgba(253, 161, 59, 0.1) 0%, rgba(245, 166, 35, 0.15) 100%);
  border: 1px solid rgba(245, 166, 35, 0.25);
  border-radius: 8px;
  display: flex;
  gap: 25px;
  padding: 25px 30px;

  html[data-theme="dark"] & {
    background: rgba(245, 166, 35, 0.1);
    border-color: rgba(245, 166, 35, 0.2);
  }

  @include rmax($medium) {
    flex-direction: column;
    text-align: center;
    padding: 25px 20px;
  }

  &__badge {
    background: #f5a623;
    border-radius: 4px;
    color: #fff;
    flex: 0 0 auto;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 8px 14px;
    text-transform: uppercase;
  }

  &__body {
    flex: 1;
  }

  &__title {
    color: var(--color-base);
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 4px;
  }

  &__text {
    color: #76869c;
    font-size: 1.4rem;
    line-height: 1.4;
  }

  .btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

// =============================================
// 9. SOCIAL PROOF
// =============================================
.mkt-social-proof {
  align-items: center;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-card);
  border-radius: 8px;
  display: flex;
  gap: 20px;
  padding: 22px 30px;

  @include rmax($medium) {
    flex-direction: column;
    text-align: center;
    padding: 25px 20px;
  }

  &__pulse {
    animation: mkt-pulse 2s ease-in-out infinite;
    background: #40d17e;
    border-radius: 50%;
    flex: 0 0 auto;
    height: 12px;
    width: 12px;

    @include rmax($medium) {
      display: none;
    }
  }

  &__content {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex: 1;

    @include rmax($medium) {
      flex-direction: column;
      align-items: center;
      gap: 4px;
    }
  }

  &__count {
    color: var(--color-blue-700);
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: -0.02em;
  }

  &__label {
    color: var(--color-base);
    font-size: 1.5rem;
    font-weight: 500;
  }
}

@keyframes mkt-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

// =============================================
// 10. ARTICLE COUNTER
// =============================================
.mkt-article-counter {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-card);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 28px 30px;

  @include rmax($medium) {
    flex-direction: column;
    text-align: center;
    padding: 25px 20px;
  }

  &__gauge {
    flex: 0 0 160px;

    @include rmax($medium) {
      flex: none;
      width: 100%;
    }
  }

  &__bar {
    background: var(--color-border-card);
    border-radius: 4px;
    height: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    width: 100%;
  }

  &__fill {
    background: linear-gradient(90deg, #f5a623 0%, #ff5555 100%);
    border-radius: 4px;
    height: 100%;
    transition: width 1s ease;
  }

  &__fraction {
    color: #76869c;
    font-size: 1.2rem;
    font-weight: 700;

    strong {
      color: #ff5555;
    }
  }

  &__body {
    flex: 1;
  }

  &__title {
    color: var(--color-base);
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 4px;
  }

  &__text {
    color: #76869c;
    font-size: 1.4rem;
    line-height: 1.4;
  }

  .btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

// =============================================
// 11. TESTIMONIAL
// =============================================
.mkt-testimonial {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-card);
  border-radius: 8px;
  padding: 40px;

  @include rmax($medium) {
    padding: 30px 20px;
  }

  &__quote {
    position: relative;
    margin-bottom: 25px;
  }

  &__quote-icon {
    color: var(--color-blue-700);
    opacity: 0.15;
    position: absolute;
    top: -8px;
    left: -5px;
    width: 48px;
    height: 48px;
  }

  &__text {
    color: var(--color-base);
    font-family: "Roboto Slab", serif;
    font-size: 1.8rem;
    font-style: italic;
    line-height: 1.6;
    margin: 0;
    padding-left: 40px;

    @include rmax($medium) {
      font-size: 1.6rem;
      padding-left: 0;
      padding-top: 30px;
    }
  }

  &__author {
    align-items: center;
    border-top: 1px solid var(--color-border-card);
    display: flex;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
  }

  &__avatar {
    align-items: center;
    background: linear-gradient(315deg, #009cb4 0%, #007cb0 100%);
    border-radius: 50%;
    color: #fff;
    display: flex;
    flex: 0 0 auto;
    font-size: 1.4rem;
    font-weight: 800;
    height: 48px;
    justify-content: center;
    width: 48px;
  }

  &__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  &__name {
    color: var(--color-base);
    font-size: 1.5rem;
    font-weight: 800;
  }

  &__location {
    color: #76869c;
    font-size: 1.3rem;
  }

  &__cta {
    margin-top: 25px;
    text-align: center;
  }
}

// =============================================
// 12. COMPARISON TABLE
// =============================================
.mkt-comparison {
  display: grid;
  gap: 25px;
  grid-template-columns: 1fr 1fr;

  @include rmax($medium) {
    grid-template-columns: 1fr;
  }

  &__col {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-card);
    border-radius: 8px;
    padding: 30px 25px;
    position: relative;

    &--premium {
      border-color: var(--color-blue-700);
      border-width: 2px;
      box-shadow: 0 8px 30px rgba(0, 124, 176, 0.12);
    }
  }

  &__ribbon {
    background: linear-gradient(315deg, #009cb4 0%, #007cb0 100%);
    border-radius: 4px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    left: 20px;
    letter-spacing: 0.05em;
    padding: 5px 12px;
    position: absolute;
    text-transform: uppercase;
    top: -12px;
  }

  &__header {
    margin-bottom: 25px;
    text-align: center;
  }

  &__col-title {
    color: var(--color-base);
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 4px;
  }

  &__price {
    color: var(--color-blue-700);
    font-size: 2.6rem;
    font-weight: 900;

    small {
      font-size: 1.4rem;
      font-weight: 500;
    }
  }

  &__list {
    list-style: none;
    margin: 0 0 25px 0;
    padding: 0;

    li {
      align-items: center;
      color: var(--color-base);
      display: flex;
      font-size: 1.4rem;
      font-weight: 500;
      gap: 10px;
      padding: 10px 0;

      &:not(:last-child) {
        border-bottom: 1px solid var(--color-border-card);
      }

      svg {
        flex: 0 0 auto;
        color: #40d17e;
      }

      &.is-limited {
        color: #76869c;

        svg {
          color: #ccc;

          html[data-theme="dark"] & {
            color: #555;
          }
        }
      }
    }
  }
}

// =============================================
// 13. URGENCY BANNER
// =============================================
.mkt-urgency {
  align-items: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: 8px;
  color: #fff;
  display: flex;
  gap: 25px;
  justify-content: space-between;
  padding: 25px 30px;

  @include rmax($medium) {
    flex-direction: column;
    text-align: center;
    padding: 25px 20px;
  }

  &__left {
    align-items: center;
    display: flex;
    flex: 1;
    gap: 20px;

    @include rmax($medium) {
      flex-direction: column;
      gap: 12px;
    }
  }

  &__flash {
    animation: mkt-flash-pulse 1.5s ease-in-out infinite;
    background: #ff5555;
    border-radius: 4px;
    flex: 0 0 auto;
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    padding: 8px 16px;
  }

  &__body {
    flex: 1;
  }

  &__title {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 2px;

    strong {
      color: #f5a623;
      font-weight: 900;
    }
  }

  &__sub {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.3rem;
  }

  &__right {
    align-items: center;
    display: flex;
    gap: 20px;

    @include rmax($medium) {
      flex-direction: column;
      gap: 15px;
    }
  }

  &__countdown {
    align-items: center;
    display: flex;
    gap: 6px;
  }

  &__time-block {
    text-align: center;
  }

  &__time-value {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: block;
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    min-width: 52px;
    padding: 8px 10px;
  }

  &__time-label {
    color: rgba(255, 255, 255, 0.5);
    display: block;
    font-size: 1rem;
    margin-top: 4px;
    text-transform: uppercase;
  }

  &__time-sep {
    color: rgba(255, 255, 255, 0.4);
    font-size: 2rem;
    font-weight: 700;
    padding-bottom: 18px;
  }
}

@keyframes mkt-flash-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

// =============================================
// 14. EDITORIAL CTA
// =============================================
.mkt-editorial {
  background: var(--color-bg-card);
  border-radius: 8px;
  box-shadow: 0 -5px 20px 0 rgba(0, 0, 0, 0.05);
  overflow: hidden;
  position: relative;

  html[data-theme="dark"] & {
    box-shadow: none;
  }

  &__border {
    background: linear-gradient(90deg, #007cb0, #009cb4, #439a86);
    height: 4px;
  }

  &__inner {
    padding: 35px 40px;

    @include rmax($medium) {
      padding: 25px 20px;
    }
  }

  &__head {
    align-items: center;
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
  }

  &__avatar {
    align-items: center;
    background: linear-gradient(315deg, #009cb4 0%, #007cb0 100%);
    border-radius: 50%;
    color: #fff;
    display: flex;
    flex: 0 0 auto;
    height: 52px;
    justify-content: center;
    width: 52px;
  }

  &__author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  &__author-name {
    color: var(--color-base);
    font-size: 1.6rem;
    font-weight: 800;
  }

  &__author-role {
    color: #76869c;
    font-size: 1.3rem;
    font-weight: 500;
  }

  &__text {
    color: var(--color-base);
    font-family: "Roboto Slab", serif;
    font-size: 1.6rem;
    line-height: 1.7;
    margin-bottom: 25px;

    em {
      font-style: italic;
    }
  }
}
