/* ============================================
   SOMNICODE — Feuille de style principale
   Le protocole qui déverrouille votre sommeil
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Inter:wght@300;400;500&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400;1,600&display=swap');

/* ---- Variables ---- */
:root {
  --navy:      #1B2A4A;
  --slate:     #2D3A4A;
  --sage:      #5C8A7A;
  --ivory:     #F4EDE0;
  --teal:      #00C9A7;
  --white:     #FAFAF9;
  --teal-glow: rgba(0, 201, 167, 0.25);
  --teal-soft: rgba(0, 201, 167, 0.12);
  --navy-soft: rgba(27, 42, 74, 0.06);
  --font-h:    'DM Sans', sans-serif;
  --font-b:    'Inter', sans-serif;
  --font-a:    'Cormorant Garamond', serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }

/* ---- Base ---- */
body {
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.7;
  color: var(--slate);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* ---- Typographie ---- */
h1, h2, h3, h4 { font-family: var(--font-h); line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p  { margin-bottom: 1.2em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; }
.accent { font-family: var(--font-a); font-style: italic; }

/* ---- Layout ---- */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}
.container--wide { max-width: 980px; }

/* ---- Sections ---- */
.s-navy  { background: var(--navy);  color: var(--ivory); }
.s-slate { background: var(--slate); color: var(--ivory); }
.s-ivory { background: var(--ivory); color: var(--slate); }
.s-white { background: var(--white); color: var(--slate); }

section { padding: 72px 0; }
section.tight { padding: 48px 0; }
section.hero  { padding: 100px 0 80px; }

/* ---- Boutons ---- */
.btn {
  display: inline-block;
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 1rem;
  padding: 16px 32px;
  border-radius: 50px;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  text-align: center;
  line-height: 1.3;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }

/* BEM + alias simple tiret (les deux fonctionnent) */
.btn--primary,
.btn-primary {
  background-color: #00C9A7 !important; /* teal — valeur absolue pour éviter tout conflit CSS variable */
  color: #1B2A4A !important;
  box-shadow: 0 4px 24px rgba(0,201,167,0.25);
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 1rem;
  padding: 16px 40px;
  display: inline-block;
  border-radius: 50px;
  cursor: pointer;
  border: none;
  text-align: center;
  line-height: 1.3;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.btn--primary:hover,
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px var(--teal-glow);
  opacity: 0.93;
  color: var(--navy) !important;
}
.btn--primary.large,
.btn-primary.large {
  font-size: 1.15rem;
  padding: 20px 44px;
}
.btn--ghost {
  background: transparent;
  color: var(--ivory);
  border: 2px solid rgba(244,237,224,0.3);
  display: inline-block;
  font-family: var(--font-h);
  font-weight: 700;
  border-radius: 50px;
  text-decoration: none;
}
.btn--ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn--full,
.btn-primary[style*="width:100%"] { width: 100%; display: block; }

/* ---- Header sticky ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(27, 42, 74, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,201,167,0.15);
  padding: 14px 24px;
}
.site-header__inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ivory);
  letter-spacing: -0.02em;
}
.logo span { color: var(--teal); }
.header-cta .btn { font-size: 0.9rem; padding: 10px 22px; }

/* ---- Séparateur onde ---- */
.wave-divider {
  width: 100%;
  height: 60px;
  overflow: hidden;
  line-height: 0;
}
.wave-divider svg { display: block; width: 100%; height: 100%; }

/* ---- Tag / label ---- */
.tag {
  display: inline-block;
  font-family: var(--font-h);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid var(--teal);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

/* ---- Ligne décorative ---- */
.teal-line {
  width: 48px;
  height: 3px;
  background: var(--teal);
  border-radius: 2px;
  margin: 20px 0;
}
.teal-line--center { margin: 20px auto; }

/* ---- Stats / chiffres ---- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  margin: 40px 0;
}
.stat-box {
  background: rgba(0,201,167,0.08);
  border: 1px solid rgba(0,201,167,0.2);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
}
.stat-box .number {
  font-family: var(--font-a);
  font-size: 2.8rem;
  color: var(--teal);
  display: block;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-box .label {
  font-size: 0.85rem;
  opacity: 0.8;
  line-height: 1.4;
}

/* ---- Encadrés ---- */
.box-key {
  background: rgba(0,201,167,0.08);
  border-left: 4px solid var(--teal);
  border-radius: 0 10px 10px 0;
  padding: 20px 24px;
  margin: 32px 0;
  font-family: var(--font-a);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--ivory);
  line-height: 1.6;
}
.box-key--dark {
  background: rgba(0,201,167,0.06);
  color: var(--slate);
}
.box-warn {
  background: rgba(92,138,122,0.12);
  border: 1px solid rgba(92,138,122,0.3);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 24px 0;
}

/* ---- Étapes de la séquence ---- */
.steps { margin: 48px 0; }
.step {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(0,201,167,0.15);
}
.step:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.step-num {
  font-family: var(--font-a);
  font-size: 4rem;
  color: var(--teal);
  line-height: 1;
  min-width: 60px;
  text-align: center;
  flex-shrink: 0;
}
.step-content h3 {
  font-size: 1.3rem;
  color: var(--teal);
  margin-bottom: 12px;
}
.step-content p { font-size: 0.97rem; opacity: 0.9; }

/* ---- Features / Inclus ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 40px 0;
}
.feature-card {
  background: var(--white);
  border: 1px solid rgba(27,42,74,0.1);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.2s;
}
.feature-card:hover { border-color: var(--teal); }
.feature-card .icon {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--teal);
  font-family: var(--font-h);
  font-weight: 700;
}
.feature-card h4 { margin-bottom: 8px; color: var(--navy); }
.feature-card p { font-size: 0.9rem; margin: 0; }

/* ---- Box offre ---- */
.offer-box {
  background: var(--navy);
  border: 2px solid var(--teal);
  border-radius: 16px;
  padding: 40px;
  margin: 40px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.offer-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(0,201,167,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.offer-box .price-old {
  font-size: 1.1rem;
  text-decoration: line-through;
  opacity: 0.5;
  color: var(--ivory);
  display: block;
  margin-bottom: 4px;
}
.offer-box .price {
  font-family: var(--font-h);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
  display: block;
  margin-bottom: 8px;
}
.offer-box .price-note {
  font-size: 0.85rem;
  opacity: 0.6;
  color: var(--ivory);
  margin-bottom: 24px;
  display: block;
}
.offer-includes {
  text-align: left;
  margin: 28px 0;
}
.offer-includes li {
  list-style: none;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,201,167,0.1);
  font-size: 0.95rem;
  color: var(--ivory);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.offer-includes li::before {
  content: '◎';
  color: var(--teal);
  flex-shrink: 0;
  margin-top: 2px;
}
.offer-includes li:last-child { border-bottom: none; }
.payment-icons {
  font-size: 0.8rem;
  opacity: 0.5;
  color: var(--ivory);
  margin-top: 16px;
}

/* ---- Order bump ---- */
.order-bump {
  border: 2px solid var(--teal);
  border-radius: 12px;
  background: rgba(0,201,167,0.04);
  padding: 28px 32px;
  margin-top: 24px;
}
.order-bump-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  cursor: pointer;
}
.bump-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid var(--teal);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
.order-bump-title {
  font-family: var(--font-h);
  font-weight: 700;
  color: var(--ivory);
  font-size: 1rem;
}
.order-bump p { font-size: 0.9rem; color: var(--ivory); opacity: 0.85; }
.bump-price {
  color: var(--teal);
  font-weight: 700;
  font-size: 1.1rem;
}

/* ---- Garantie ---- */
.guarantee-box {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid rgba(92,138,122,0.3);
  border-radius: 16px;
  padding: 32px;
}
.guarantee-icon {
  font-family: var(--font-a);
  font-size: 3rem;
  color: var(--sage);
  line-height: 1;
  min-width: 56px;
  text-align: center;
  flex-shrink: 0;
}
.guarantee-text h3 { color: var(--navy); margin-bottom: 12px; }
.guarantee-text p { font-size: 0.95rem; margin: 0; }

/* ---- Témoignages ---- */
.testimonials { display: grid; grid-template-columns: 1fr; gap: 20px; }
.testimonial {
  background: rgba(0,201,167,0.06);
  border-left: 3px solid var(--teal);
  border-radius: 0 12px 12px 0;
  padding: 24px 28px;
}
.testimonial blockquote {
  font-family: var(--font-a);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--ivory);
  margin-bottom: 12px;
}
.testimonial cite {
  font-size: 0.85rem;
  opacity: 0.7;
  font-style: normal;
}

/* ---- FAQ ---- */
.faq { margin: 40px 0; }
.faq-item {
  border-bottom: 1px solid rgba(27,42,74,0.1);
}
.faq-item:first-child { border-top: 1px solid rgba(27,42,74,0.1); }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: var(--font-h);
  font-weight: 600;
  font-size: 1rem;
  color: var(--navy);
}
.faq-question .toggle {
  font-size: 1.4rem;
  color: var(--teal);
  flex-shrink: 0;
  transition: transform 0.2s;
  line-height: 1;
}
.faq-question[aria-expanded="true"] .toggle { transform: rotate(45deg); }
.faq-answer {
  padding: 0 0 20px;
  font-size: 0.95rem;
  color: var(--slate);
  display: none;
  line-height: 1.7;
}
.faq-answer.open { display: block; }

/* ---- Source / note ---- */
.source {
  font-size: 0.78rem;
  opacity: 0.55;
  font-style: italic;
  margin-top: 8px;
}

/* ---- Séparateur de section ---- */
.divider {
  border: none;
  border-top: 1px solid rgba(0,201,167,0.15);
  margin: 0;
}

/* ---- Lien "non merci" ---- */
.no-thanks {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 0.85rem;
  opacity: 0.45;
  color: var(--ivory);
  cursor: pointer;
}
.no-thanks:hover { opacity: 0.7; text-decoration: underline; }

/* ---- Footer ---- */
.site-footer {
  background: var(--navy);
  color: var(--ivory);
  padding: 40px 24px;
  text-align: center;
  border-top: 1px solid rgba(0,201,167,0.15);
}
.site-footer .logo { font-size: 1.4rem; margin-bottom: 8px; }
.site-footer .tagline {
  font-family: var(--font-a);
  font-style: italic;
  font-size: 1rem;
  opacity: 0.7;
  margin-bottom: 20px;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  opacity: 0.5;
  margin-bottom: 16px;
}
.footer-legal {
  font-size: 0.78rem;
  opacity: 0.35;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---- Sticky bottom CTA mobile ---- */
.sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--navy);
  border-top: 1px solid rgba(0,201,167,0.3);
  padding: 12px 20px;
  text-align: center;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  section { padding: 56px 0; }
  section.hero { padding: 72px 0 56px; }
  .step { flex-direction: column; gap: 12px; }
  .step-num { font-size: 2.5rem; min-width: auto; }
  .offer-box { padding: 28px 20px; }
  .offer-box .price { font-size: 2.8rem; }
  .guarantee-box { flex-direction: column; gap: 16px; }
  .order-bump { padding: 20px; }
  .sticky-cta { display: block; }
  body { padding-bottom: 72px; }
  .site-header { padding: 12px 16px; }
  .header-cta { display: none; }
}

@media (min-width: 641px) {
  .testimonials { grid-template-columns: 1fr 1fr; gap: 20px; }
}

/* ---- Animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.6s ease both; }
.fade-up--d1 { animation-delay: 0.1s; }
.fade-up--d2 { animation-delay: 0.2s; }
.fade-up--d3 { animation-delay: 0.3s; }

/* ---- Motif onde de fond ---- */
.wave-bg {
  background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='wave' patternUnits='userSpaceOnUse' width='200' height='40' patternTransform='rotate(0)'%3E%3Cpath d='M0 20 Q50 0 100 20 Q150 40 200 20' fill='none' stroke='rgba(0,201,167,0.06)' stroke-width='1.5'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23wave)'/%3E%3C/svg%3E");
}
