/* ─── Variables globales ─────────────────────────────────────────────────── */
:root {
  --noir: #0a0a0a;
  --rouge: #c0384a;
  --rose: #e8a0a0;
  --creme: #f0ede8;
  --gris: #8a8580;
  --card-bg: #141414;
  --card-border: rgba(192, 56, 74, 0.15);
  --header-h: 4rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Reset minimal ─────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--creme);
  background-color: var(--noir);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--rouge);
  text-decoration: none;
  transition: opacity 0.25s var(--ease-out), color 0.25s var(--ease-out);
}

a:hover {
  opacity: 0.85;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

h1,
h2,
h3,
.display {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-style: italic;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

/* ─── Layout général ────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  padding: 0.75rem 1rem;
  background: var(--rouge);
  color: var(--creme);
}

.skip-link:focus {
  left: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  padding: 0 1.25rem;
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0.95), rgba(10, 10, 10, 0.65), transparent);
}

.logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  color: var(--creme);
}

.logo-link:hover {
  opacity: 0.92;
}

.site-logo {
  height: 1.75rem;
  width: auto;
  display: block;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  background: transparent;
  color: var(--creme);
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--creme);
  position: relative;
  transition: background 0.2s;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--creme);
  transition: transform 0.25s var(--ease-out), top 0.25s var(--ease-out);
}

.nav-toggle-bar::before {
  top: -7px;
}

.nav-toggle-bar::after {
  top: 7px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--creme);
  font-weight: 400;
  font-size: 0.95rem;
}

.site-nav a:hover {
  color: var(--rose);
  opacity: 1;
}

/* Lien plan SEO — injecté par script.js en local uniquement */
.site-nav .nav-local-dev a {
  font-size: 0.82rem;
  opacity: 0.75;
  letter-spacing: 0.02em;
}

.site-nav .nav-local-dev a:hover {
  opacity: 1;
  color: var(--rose);
}

main {
  padding-top: var(--header-h);
}

/* ─── Hero (complément hors CSS critique) ───────────────────────────────── */
.hero-subtitle {
  font-family: "DM Sans", sans-serif;
  font-weight: 300;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  line-height: 1.65;
  color: var(--creme);
  margin: 0;
  text-shadow: 0 1px 28px rgba(10, 10, 10, 0.9);
}

.hero-critical h1 {
  text-shadow: 0 2px 32px rgba(10, 10, 10, 0.95);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.scroll-indicator-dot {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rouge);
  opacity: 0.55;
  animation: scrollPulse 2.2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  50% {
    opacity: 0.85;
    transform: translateY(6px);
  }
}

.footer-sep {
  color: var(--gris);
  user-select: none;
}

.section-inner {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  text-align: center;
  margin-bottom: 2.5rem;
  color: var(--creme);
}

/* ─── Animations scroll (Intersection Observer) ─────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

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

/* ─── Section code ──────────────────────────────────────────────────────── */
.section-code {
  background: #0f0f0f;
  padding: 4rem 0 5rem;
}

.code-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--gris);
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.code-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.code-display {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2.25rem, 5vw, 3rem);
  letter-spacing: 0.08em;
  color: var(--creme);
  background: var(--card-bg);
  border: 0.5px solid var(--card-border);
  border-radius: 2px;
  padding: 1.25rem 2rem;
  min-width: min(100%, 20rem);
}

.code-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 22rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 400;
  border-radius: 2px;
  transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out), transform 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--rouge);
  color: var(--creme);
}

.btn-primary:hover {
  background: #a82d3e;
  opacity: 1;
}

.btn-secondary {
  background: transparent;
  color: var(--creme);
  border: 0.5px solid rgba(192, 56, 74, 0.35);
}

.btn-secondary:hover {
  border-color: var(--rouge);
  color: var(--rose);
  opacity: 1;
}

.btn-copy-state {
  min-width: 11rem;
}

/* ─── Avantages (ancienne section — conservée pour rétrocompat blog pages) ── */
.section-perks {
  padding: 4.5rem 0;
  background-color: var(--noir);
}

.cards-row {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.perk-card {
  background: var(--card-bg);
  border: 0.5px solid rgba(192, 56, 74, 0.2);
  border-radius: 2px;
  padding: 1.75rem 1.5rem;
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.perk-card:hover {
  border-color: rgba(192, 56, 74, 0.45);
  box-shadow: 0 0 0 1px rgba(192, 56, 74, 0.08);
}

.perk-card svg {
  display: block;
  margin-bottom: 1rem;
}

.perk-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.perk-card p {
  margin: 0;
  color: var(--gris);
  font-size: 0.95rem;
}

/* ─── Blog preview ───────────────────────────────────────────────────────── */
.section-blog-preview {
  position: relative;
  padding: 4.5rem 0 5rem;
  background-image: url("assets/images/Home3.jpeg");
  background-size: cover;
  background-position: center top;
}

.section-blog-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 0;
}

.section-blog-preview > * {
  position: relative;
  z-index: 1;
}

.article-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.article-card {
  background: var(--card-bg);
  border: 0.5px solid rgba(192, 56, 74, 0.15);
  border-radius: 2px;
  padding: 1.5rem 1.35rem;
  transition: border-color 0.3s var(--ease-out);
}

.article-card:hover {
  border-color: rgba(192, 56, 74, 0.35);
}

.article-card h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-style: italic;
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
}

.article-card h3 a {
  color: var(--creme);
}

.article-card h3 a:hover {
  color: var(--rose);
  opacity: 1;
}

.article-meta {
  font-size: 0.8rem;
  color: var(--gris);
  margin-bottom: 0.75rem;
}

.article-card p {
  margin: 0 0 1rem;
  color: var(--gris);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  font-size: 0.9rem;
  font-weight: 400;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
  padding: 3rem 1.25rem 2.5rem;
  border-top: 0.5px solid rgba(192, 56, 74, 0.12);
  background: #080808;
}

.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  margin: 0 0 1.25rem;
}

.footer-logo {
  height: 2rem;
  width: auto;
  margin: 0 auto;
  display: block;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: var(--gris);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--creme);
  opacity: 1;
}

.footer-legal {
  font-size: 0.78rem;
  color: var(--gris);
  max-width: 36rem;
  margin: 0 auto 1rem;
  line-height: 1.55;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--gris);
  margin: 0;
}

/* ─── Pages légales / blog listing ─────────────────────────────────────── */
.page-hero {
  padding: 3rem 0 2rem;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
}

.page-hero .lead {
  color: var(--gris);
  max-width: 36rem;
  margin: 0.75rem auto 0;
}

.page-hero .article-meta {
  margin-bottom: 0.75rem;
}

.blog-list-section {
  padding-top: 0;
}

.legal-content,
.article-body {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.legal-content h2,
.article-body h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-style: italic;
  font-size: 1.5rem;
  margin: 2rem 0 0.75rem;
  color: var(--creme);
}

.legal-content p,
.article-body p {
  color: var(--gris);
  margin: 0 0 1rem;
}

.legal-content ul {
  color: var(--gris);
  padding-left: 1.25rem;
}

/* ─── Media queries ───────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    background: transparent;
    padding: 0;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav ul {
    display: flex;
    gap: 2rem;
    align-items: center;
  }

  .cards-row {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .perk-card {
    flex: 1 1 calc(33.333% - 0.85rem);
    min-width: 14rem;
  }

  .article-cards {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .article-card {
    flex: 1 1 calc(33.333% - 1rem);
    min-width: 15rem;
  }

  .code-actions {
    flex-direction: row;
    justify-content: center;
    max-width: none;
    width: auto;
  }
}

@media (max-width: 767px) {
  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.97);
    padding: 2rem 1.5rem;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease-out), opacity 0.35s var(--ease-out);
  }

  .site-nav.is-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .site-nav a {
    display: block;
    min-height: 44px;
    line-height: 44px;
    font-size: 1.05rem;
  }
}

@media (min-width: 1200px) {
  .section-inner {
    padding: 0 2rem;
  }

  .perk-card {
    padding: 2rem 1.75rem;
  }

  .code-display {
    font-size: 3rem;
  }
}

/* ─── Stats ──────────────────────────────────────────────────────────────── */
.section-stats { padding: 4rem 2rem; background: var(--noir); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; max-width: 900px; margin: 0 auto; }
.stat-card { text-align: center; padding: 2rem 1rem; background: var(--card-bg); border-radius: 12px; }
.stat-card .stat-number { font-size: 1.8rem; color: var(--rouge); font-family: 'Cormorant Garamond', serif; }
.stat-card .stat-label { color: var(--gris); margin-top: .5rem; font-size: .9rem; }

/* ─── Avantages ──────────────────────────────────────────────────────────── */
.section-avantages {
  position: relative;
  padding: 5rem 2rem;
  background-image: url("assets/images/Home2.jpeg");
  background-size: cover;
  background-position: center;
}

.section-avantages::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 0;
}

.section-avantages > * {
  position: relative;
  z-index: 1;
}
.avantages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; max-width: 1100px; margin: 2rem auto 0; }
.avantage-card { background: var(--card-bg); border-radius: 16px; padding: 2rem; }
.avantage-card h3 { color: var(--creme); margin-bottom: 1rem; }
.avantage-card p { color: var(--gris); line-height: 1.6; }
.avantage-card .tags { margin-top: 1rem; font-size: .85rem; color: var(--rose); }

/* ─── Steps ──────────────────────────────────────────────────────────────── */
.section-steps { padding: 5rem 2rem; background: var(--card-bg); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; max-width: 1100px; margin: 2rem auto 0; }
.step { text-align: center; padding: 2rem; }
.step .step-number { font-size: 3rem; font-family: 'Cormorant Garamond', serif; color: var(--rouge); line-height: 1; }
.step h3 { color: var(--creme); margin: 1rem 0 .5rem; }
.step p { color: var(--gris); }

/* ─── FAQ ────────────────────────────────────────────────────────────────── */
.section-faq { padding: 5rem 2rem; }
.section-faq .faq-inner { max-width: 800px; margin: 2rem auto 0; }
.faq-item { border-bottom: 1px solid #222; }
.faq-item button { width: 100%; text-align: left; background: none; border: none; color: var(--creme); padding: 1.5rem 0; cursor: pointer; font-size: 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq-item button::after { content: '+'; color: var(--rouge); font-size: 1.5rem; flex-shrink: 0; transition: transform .3s; }
.faq-item.open button::after { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .4s ease; color: var(--gris); line-height: 1.6; }
.faq-item.open .faq-answer { max-height: 300px; padding-bottom: 1.5rem; }

/* ─── Newsletter ─────────────────────────────────────────────────────────── */
.section-newsletter { padding: 5rem 2rem; background: var(--card-bg); }
.section-newsletter .newsletter-inner { max-width: 520px; margin: 0 auto; text-align: center; }
.newsletter-form { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.form-group { text-align: left; }
.form-group label { display: block; color: var(--gris); font-size: .9rem; margin-bottom: .4rem; }
.form-group input { width: 100%; padding: .9rem 1.2rem; background: var(--noir); border: 1px solid #333; border-radius: 8px; color: var(--creme); font-size: 1rem; outline: none; transition: border-color .2s; box-sizing: border-box; }
.form-group input:focus { border-color: var(--rouge); }
.form-note { font-size: .8rem; color: var(--gris); margin-top: .5rem; }
.newsletter-success { text-align: center; padding: 2rem; color: var(--rose); font-size: 1.1rem; }

/* ─── Code pill ──────────────────────────────────────────────────────────── */
.code-pill { margin-top: 1.5rem; display: inline-flex; align-items: center; gap: 1rem; background: var(--card-bg); border: 1px solid var(--rouge); border-radius: 50px; padding: .75rem 1.5rem; color: var(--creme); font-size: 1rem; flex-wrap: wrap; justify-content: center; }
.btn-copy { background: var(--rouge); color: var(--creme); border: none; border-radius: 30px; padding: .5rem 1rem; cursor: pointer; font-size: .9rem; transition: opacity .2s; white-space: nowrap; }
.btn-copy:hover, .btn-copy.copied { opacity: .8; }

/* ─── Réassurance hero ───────────────────────────────────────────────────── */
.hero-reassurance { margin-top: 1rem; color: var(--gris); font-size: .9rem; }

@media (max-width: 768px) {
  .stats-grid, .avantages-grid, .steps-grid { grid-template-columns: 1fr; }
}
