/* ─── Blog / Ressources page ─── */

/* ── Hero ── */
.blog-hero {
  padding: clamp(40px, 5vw, 64px) 0 clamp(32px, 4vw, 48px);
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(560px 280px at 50% -80px, rgba(37, 99, 255, 0.07), transparent 70%),
    linear-gradient(180deg, #fbfcfe 0%, var(--color-off-white, #f7f8fa) 100%);
}

.blog-hero__decor {
  position: absolute;
  z-index: 0;
  width: 150px;
  height: 130px;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(37, 99, 255, 0.2) 1.6px, transparent 1.7px);
  background-size: 17px 17px;
}

.blog-hero__decor--left { top: 46px; left: max(20px, calc((100vw - 1200px) / 2)); }

.blog-hero__decor--right {
  right: max(20px, calc((100vw - 1200px) / 2));
  bottom: 34px;
  background-image: radial-gradient(circle, rgba(34, 197, 94, 0.22) 1.6px, transparent 1.7px);
}

.blog-hero .container { position: relative; z-index: 1; }

.blog-hero__hl--blue { color: var(--color-blue, #2563ff); }
.blog-hero__hl--mint { color: var(--color-mint, #22c55e); }

.blog-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  color: var(--color-navy);
  font-weight: 800;
  text-wrap: balance;
}

.blog-hero .hero-lead {
  max-width: 62ch;
  margin: 0 auto;
  font-size: 19px;
  line-height: 1.55;
  color: var(--color-muted);
  font-weight: 400;
}

.search-bar {
  position: relative;
  margin: 24px auto 0;
  max-width: 620px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px 0 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-white);
  box-shadow: 0 8px 28px rgba(8, 29, 58, 0.06);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-bar:hover {
  border-color: var(--color-border-strong);
}

.search-bar:focus-within {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 255, 0.14), 0 8px 28px rgba(8, 29, 58, 0.06);
}

.search-bar__icon {
  flex-shrink: 0;
  color: var(--color-muted);
}

.search-bar:focus-within .search-bar__icon {
  color: var(--color-blue);
}

.search-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  /* 16px prevents iOS Safari zoom-on-focus. */
  font-size: 16px;
  font-family: inherit;
  color: var(--color-text);
}

.search-bar input::placeholder {
  color: var(--color-muted);
  font-weight: 400;
}

/* Hide the native browser clear (×) — we provide our own. */
.search-bar input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.search-bar__clear {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--color-slate);
  background: var(--color-surface-soft);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.search-bar__clear:hover {
  color: var(--color-navy);
  background: var(--color-border);
}

.search-bar__kbd {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface-soft);
  color: var(--color-muted);
  font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Hide the keyboard hint once the user starts typing (clear button takes its place). */
.search-bar:has(input:not(:placeholder-shown)) .search-bar__kbd,
.search-bar:focus-within .search-bar__kbd { display: none; }

@media (hover: none) {
  /* Touch devices: no slash shortcut, no hint. */
  .search-bar__kbd { display: none; }
}

.blog-search-status {
  margin: 18px auto 0;
  max-width: 560px;
  padding: 14px 18px;
  border: 1px dashed var(--color-border-strong);
  border-radius: 14px;
  background: var(--color-surface-soft);
  color: var(--color-slate);
  text-align: center;
  font-size: 14px;
  font-weight: 500;
}

.blog-search-status strong {
  color: var(--color-navy);
}

/* When a filter is active, hide section titles and ancillary blocks
   (newsletter card, "all articles" headings) so results are easy to scan. */
body.is-blog-searching :where(.blog-section-row, .newsletter-card) {
  display: none;
}

body.is-blog-searching .featured-posts {
  display: none;
}

body.is-blog-searching :where(.article-card, .article-card-h)[hidden] {
  display: none !important;
}

/* ── Featured articles ── */
.featured-posts {
  padding-top: 48px;
  padding-bottom: 60px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.featured-card {
  padding: 26px 26px 30px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.featured-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 56px rgba(8, 29, 58, 0.13);
}

.featured-image {
  height: 170px;
  margin-bottom: 22px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--color-surface-blue);
  display: flex;
  align-items: stretch;
}

.featured-image svg {
  width: 100%;
  height: 100%;
  display: block;
}

.featured-image picture,
.featured-image img {
  display: block;
  width: 100%;
  height: 100%;
}

.featured-image img {
  object-fit: cover;
}

.article-category {
  display: block;
  margin-bottom: 10px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-blue);
}

.article-category.cat-green { color: var(--color-mint-dark); }
.article-category.cat-coral { color: var(--color-coral); }
.article-category.cat-yellow { color: #92400E; }
.article-category.cat-blue { color: var(--color-blue); }
.article-category.cat-purple { color: #7C3AED; }
.article-category.cat-teal { color: #0EA5E9; }

.featured-card h2 {
  margin: 0 0 12px;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--color-navy);
  font-weight: 800;
}

.featured-card > p {
  margin: 0 0 22px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--color-muted);
  flex: 1;
}

.article-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  background: var(--color-navy);
  color: var(--color-white);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  align-self: flex-start;
  transition: background 0.18s ease;
}

.article-btn:hover {
  background: var(--color-blue);
}

/* ── Section row (heading + filter) ── */
.blog-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.blog-section-row h2 {
  margin: 0;
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--color-navy);
  font-weight: 800;
}

.sort-select {
  height: 40px;
  padding: 0 32px 0 14px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236B7890' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* ── Recent 4-col grid ── */
.recent-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.article-card {
  padding: 22px 20px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  box-shadow: 0 10px 28px rgba(8, 29, 58, 0.055);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(8, 29, 58, 0.09);
}

.article-thumb {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-thumb svg {
  width: 100%;
  height: 100%;
  display: block;
}

.article-thumb picture,
.article-thumb img {
  display: block;
  width: 100%;
  height: 100%;
}

.article-thumb img {
  object-fit: cover;
}

/* Banner thumb for article-card (4-col grid) */
.article-card > .article-thumb {
  width: auto;
  height: 150px;
  margin: -2px -2px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, oklch(97% 0.015 240) 0%, oklch(99% 0.008 240) 100%);
  position: relative;
}

.article-card > .article-thumb svg {
  width: 88px;
  height: 88px;
  filter: drop-shadow(0 6px 18px rgba(8, 29, 58, 0.10));
}

.article-card > .article-thumb::after {
  content: "";
  position: absolute;
  inset: auto 14px 12px auto;
  width: 38px;
  height: 38px;
  background:
    radial-gradient(circle, currentColor 1.2px, transparent 1.5px) 0 0/9px 9px;
  color: rgba(37, 99, 255, 0.18);
  pointer-events: none;
}

.article-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--color-navy);
  font-weight: 700;
}

.article-card p {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-muted);
  flex: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  color: #8B96B0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.article-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.article-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-blue);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}

.article-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Newsletter strip ── */
.newsletter-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 22px 26px;
  margin-bottom: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--color-surface-blue) 0%, var(--color-white) 100%);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.newsletter-visual {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-blue);
}

.newsletter-visual svg {
  display: block;
}

.newsletter-content h3 {
  margin: 0 0 4px;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--color-navy);
  font-weight: 700;
}

.newsletter-content p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-muted);
}

.newsletter-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.newsletter-form input {
  width: 230px;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--color-border);
  background: var(--color-white);
  font-size: 13px;
  font-family: inherit;
  color: var(--color-text);
  outline: none;
  transition: border-color 140ms ease;
}

.newsletter-form input:focus {
  border-color: var(--color-blue);
}

.newsletter-form input::placeholder {
  color: var(--color-muted);
}

.newsletter-form button {
  height: 44px;
  padding: 0 20px;
  border: none;
  border-radius: var(--radius-xs);
  background: var(--color-blue);
  color: var(--color-white);
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease;
}

.newsletter-form button:hover {
  background: var(--color-blue-dark);
}

.newsletter-form button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.newsletter-form .leka-hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.newsletter-form__status {
  grid-column: 1 / -1;
  display: none;
  width: 100%;
  margin: 0;
  padding: 13px 16px;
  border: 1px solid rgba(47, 172, 102, 0.22);
  border-radius: var(--radius-xs);
  background: rgba(47, 172, 102, 0.10);
  color: var(--color-mint-dark, #138a45);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.newsletter-form__status:not(:empty) {
  display: block;
}

.newsletter-form__status[data-status-type="error"] {
  border-color: rgba(255, 95, 79, 0.24);
  background: rgba(255, 95, 79, 0.10);
  color: #c7372c;
}

.newsletter-form.is-success input:not(.leka-hp-field),
.newsletter-form.is-success button {
  display: none;
}

.newsletter-dots {
  position: absolute;
  right: 22px;
  bottom: 16px;
  width: 84px;
  height: 60px;
  opacity: 0.28;
  pointer-events: none;
  background-image: radial-gradient(var(--color-blue) 1.2px, transparent 1.2px);
  background-size: 10px 10px;
}

/* ── Secondary 4-col grid ── */
.article-grid-secondary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.article-card-h {
  min-width: 0;
  padding: 22px 20px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  box-shadow: 0 10px 28px rgba(8, 29, 58, 0.055);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card-h:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(8, 29, 58, 0.09);
}

.article-card-h .card-header {
  display: contents;
}

.article-card-h .article-thumb {
  width: auto;
  height: 150px;
  border-radius: 14px;
  flex-shrink: 0;
  margin: -2px -2px 18px;
  background: linear-gradient(135deg, oklch(97% 0.015 240) 0%, oklch(99% 0.008 240) 100%);
  position: relative;
}

.article-card-h .article-thumb svg {
  width: 88px;
  height: 88px;
  filter: drop-shadow(0 6px 18px rgba(8, 29, 58, 0.10));
}

.article-card-h .article-thumb::after {
  content: "";
  position: absolute;
  inset: auto 14px 12px auto;
  width: 38px;
  height: 38px;
  background:
    radial-gradient(circle, currentColor 1.2px, transparent 1.5px) 0 0/9px 9px;
  color: rgba(37, 99, 255, 0.18);
  pointer-events: none;
}

.article-card-h .card-title-group {
  display: contents;
}

.article-card-h .card-title-group .article-category {
  display: block;
  width: fit-content;
  margin-bottom: 10px;
}

.article-card-h h3 {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--color-navy);
  font-weight: 700;
  text-wrap: balance;
}

.article-card-h p {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-muted);
  flex: 1;
}

/* ── Pagination ── */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 32px 0 60px;
}

.blog-pagination a {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-navy);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  display: grid;
  place-items: center;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.blog-pagination a:hover:not(.is-active) {
  border-color: var(--color-blue);
  color: var(--color-blue);
}

.blog-pagination a.is-active {
  background: var(--color-blue);
  border-color: var(--color-blue);
  color: var(--color-white);
  box-shadow: 0 8px 18px rgba(37, 99, 255, 0.26);
}

/* paginate_links() natif (page-numbers) : couvre <a> et le <span> de la page active */
.blog-pagination .page-numbers {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-navy);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  display: grid;
  place-items: center;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.blog-pagination a.page-numbers:hover {
  border-color: var(--color-blue);
  color: var(--color-blue);
}

.blog-pagination .page-numbers.current {
  background: var(--color-blue);
  border-color: var(--color-blue);
  color: var(--color-white);
  box-shadow: 0 8px 18px rgba(37, 99, 255, 0.26);
}

/* ── Final CTA ── */
.blog-cta {
  position: relative;
  margin: 0 auto 60px;
  padding: 48px 54px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--color-surface-blue) 0%, var(--color-white) 70%);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.blog-cta-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}

.blog-cta h2 {
  margin: 0 0 26px;
  max-width: 560px;
  font-size: clamp(24px, 2.6vw, 33px);
  line-height: 1.18;
  letter-spacing: -0.04em;
  color: var(--color-navy);
  font-weight: 800;
}

.blog-cta h2 span {
  color: var(--color-mint-dark);
}

.cta-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
}

.cta-benefit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-muted);
}

.cta-benefit svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.blog-cta-button {
  height: 62px;
  padding: 0 38px;
  border-radius: 14px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  color: var(--color-blue);
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
  flex-shrink: 0;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.blog-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(8, 29, 58, 0.13);
}

.blog-cta::before {
  content: "";
  position: absolute;
  right: -70px;
  top: -50px;
  width: 200px;
  height: 150px;
  border-radius: 50%;
  background: rgba(37, 99, 255, 0.07);
  pointer-events: none;
}

.blog-cta::after {
  content: "";
  position: absolute;
  left: -90px;
  bottom: -70px;
  width: 190px;
  height: 150px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.13);
  pointer-events: none;
}

/* ── Dot decorations ── */
.blog-dot-decor {
  position: absolute;
  pointer-events: none;
  opacity: 0.28;
  background-image: radial-gradient(var(--color-blue) 1.2px, transparent 1.2px);
  background-size: 11px 11px;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .recent-grid,
  .article-grid-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .featured-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .newsletter-card {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .newsletter-form {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: stretch;
  }

  .newsletter-form input,
  .newsletter-form button {
    width: 100%;
  }

  .newsletter-form input {
    width: 100%;
  }

  .blog-cta {
    padding: 36px 28px;
  }

  .blog-cta-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .blog-cta-button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .blog-hero h1 {
    font-size: clamp(36px, 10vw, 48px);
  }

  .blog-hero__decor {
    display: none;
  }

  .blog-hero .hero-lead {
    font-size: 16px;
  }

  .recent-grid {
    grid-template-columns: 1fr;
  }

  .article-grid-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .article-card-h {
    padding: 14px 12px;
    border-radius: 16px;
  }

  .article-card-h .article-thumb {
    height: 112px;
    margin: -2px -2px 12px;
  }

  .article-card-h .article-thumb svg {
    width: 64px;
    height: 64px;
  }

  .article-card-h h3 {
    font-size: 13.5px;
  }

  .article-card-h p {
    font-size: 12px;
  }

  .blog-section-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .blog-pagination a {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    font-size: 13px;
  }

  .blog-cta h2 {
    font-size: 24px;
  }

  .newsletter-card {
    grid-template-columns: 1fr;
  }

  .newsletter-visual {
    display: none;
  }
}

/* ── Newsletter : entrée au scroll + idle ── */
@keyframes nl-card-in {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes nl-icon-pop {
  from { opacity: 0; transform: scale(0.4) rotate(-8deg); }
  60%  { opacity: 1; transform: scale(1.08) rotate(2deg); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes nl-slide-l { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes nl-slide-r { from { opacity: 0; transform: translateX(14px); }  to { opacity: 1; transform: none; } }
@keyframes nl-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes nl-tilt {
  0%, 78%, 100% { transform: rotate(0); }
  82% { transform: rotate(-6deg); } 86% { transform: rotate(5deg); }
  90% { transform: rotate(-3deg); } 94% { transform: rotate(0); }
}
@keyframes nl-check { 0%, 70%, 100% { transform: scale(1); } 78% { transform: scale(1.35); } 86% { transform: scale(1); } }
@keyframes nl-dots-drift { to { background-position: 10px 10px; } }
@keyframes nl-shine { 0%, 55% { transform: translateX(-120%) skewX(-18deg); } 75%, 100% { transform: translateX(280%) skewX(-18deg); } }

@media (prefers-reduced-motion: no-preference) {
  .js .newsletter-card { opacity: 0; }

  /* Entrée en cascade */
  .newsletter-card.is-inview { animation: nl-card-in 0.55s ease-out both; }
  .newsletter-card.is-inview .newsletter-visual { animation: nl-icon-pop 0.6s 0.15s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
  .newsletter-card.is-inview .newsletter-content { animation: nl-slide-l 0.5s 0.25s ease-out both; }
  .newsletter-card.is-inview .newsletter-form { animation: nl-slide-r 0.5s 0.35s ease-out both; }

  /* Idle continu, démarre après l'entrée */
  .newsletter-card.is-idle .newsletter-visual { animation: nl-float 3.4s ease-in-out infinite; }
  .newsletter-card.is-idle .newsletter-visual svg { animation: nl-tilt 6s ease-in-out infinite; }
  .newsletter-card.is-idle .nl-check { transform-origin: 29px 26px; animation: nl-check 6s ease-in-out infinite; }
  .newsletter-card.is-idle .newsletter-dots { animation: nl-dots-drift 8s linear infinite; }
  .newsletter-card.is-idle .newsletter-form button { position: relative; overflow: hidden; }
  .newsletter-card.is-idle .newsletter-form button::after {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 40%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    animation: nl-shine 6s ease-in-out infinite;
  }
}
