/* ============================================================
   BÉBÉ SOMMEIL — Shared Stylesheet
   ============================================================ */

/* === Variables === */
:root {
  --navy: #1a1a2e;
  --purple: #6366f1;
  --purple-dark: #4f46e5;
  --purple-light: #ede9fe;
  --amber: #f59e0b;
  --cream: #fdf8f0;
  --green: #10b981;
  --text: #374151;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --white: #ffffff;
  --card-shadow: 0 2px 12px rgba(0,0,0,.07);
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-w: 1200px;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--cream); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding-left: 0; }

/* === Container === */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* ============ HEADER ============ */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.nav-brand__icon { font-size: 1.4rem; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  color: rgba(255,255,255,.75);
  padding: 6px 13px;
  border-radius: 6px;
  font-size: .88rem;
  transition: all .15s;
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,.1); }
.nav-links a.active { color: var(--white); background: var(--purple); }
.nav-toggle { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; padding: 4px 8px; }

/* ============ BREADCRUMB ============ */
.breadcrumb { padding: 12px 0; }
.breadcrumb__list { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: .82rem; color: var(--text-muted); list-style: none; padding: 0; }
.breadcrumb__list li { list-style: none !important; display: flex !important; align-items: center; }
.breadcrumb__list li::marker { content: ''; display: none; }
.breadcrumb__list li:not(:last-child)::after { content: '›'; margin-left: 6px; }
.breadcrumb__list a { color: var(--purple); }
.breadcrumb__list a:hover { text-decoration: underline; }

/* ============ HERO ============ */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #16213e 60%, #0f3460 100%);
  color: var(--white);
  padding: 64px 0 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 120%, rgba(99,102,241,.28) 0%, transparent 70%);
  pointer-events: none;
}
.hero__content { position: relative; max-width: 760px; margin: 0 auto; }
.hero__badge {
  display: inline-block;
  background: rgba(99,102,241,.25);
  border: 1px solid rgba(99,102,241,.5);
  color: #a5b4fc;
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 16px;
}
.hero__title { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.hero__subtitle { font-size: clamp(.95rem, 2vw, 1.1rem); opacity: .8; max-width: 580px; margin: 0 auto 28px; }
.hero__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  border: none;
  text-decoration: none;
}
.btn-primary { background: var(--purple); color: white; }
.btn-primary:hover { background: var(--purple-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99,102,241,.4); }
.btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,.4); }
.btn-outline:hover { border-color: white; background: rgba(255,255,255,.1); }
.btn-affiliate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--amber);
  color: white;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 700;
  transition: all .15s;
  white-space: nowrap;
}
.btn-affiliate:hover { background: #d97706; transform: scale(1.02); }

/* ============ SECTIONS ============ */
.section { padding: 64px 0; }
.section--gray { background: #f3f4f6; }
.section--white { background: var(--white); }
.section--dark { background: var(--navy); color: white; }
.section__header { text-align: center; margin-bottom: 40px; }
.section__tag {
  display: inline-block;
  background: var(--purple-light);
  color: var(--purple);
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 10px;
}
.section__title { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; color: var(--navy); margin-bottom: 12px; }
.section--dark .section__title { color: white; }
.section__subtitle { color: var(--text-muted); font-size: 1rem; max-width: 560px; margin: 0 auto; }

/* ============ PRODUCT CARDS ============ */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.product-card__img-wrap {
  position: relative;
  background: #f9fafb;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 12px;
}
.product-card__img { max-height: 100%; width: auto; object-fit: contain; }
.product-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--amber);
  color: white;
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.product-card__badge--green { background: var(--green); }
.product-card__body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.product-card__category { font-size: .72rem; font-weight: 700; color: var(--purple); text-transform: uppercase; letter-spacing: .4px; }
.product-card__title { font-size: .92rem; font-weight: 600; line-height: 1.4; color: var(--navy); }
.product-card__stars { color: var(--amber); font-size: .85rem; letter-spacing: 1px; }
.product-card__features { font-size: .82rem; color: var(--text-muted); line-height: 1.5; padding-left: 0; }
.product-card__features li { padding: 2px 0 2px 18px; position: relative; }
.product-card__features li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.product-card__footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.product-card__price { font-size: 1.15rem; font-weight: 800; color: var(--purple); }

/* ============ COMPARATIF TABLE ============ */
.comparatif { margin-top: 16px; }
.comparatif__wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--card-shadow); }
.comparatif table { width: 100%; border-collapse: collapse; background: white; min-width: 580px; }
.comparatif th {
  background: var(--navy);
  color: white;
  padding: 14px 16px;
  text-align: left;
  font-size: .84rem;
  font-weight: 600;
}
.comparatif td { padding: 12px 16px; font-size: .87rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.comparatif tr:last-child td { border-bottom: none; }
.comparatif tr:nth-child(even) td { background: #f9fafb; }
.comparatif .highlight-row td { background: #ede9fe !important; font-weight: 600; }
.comparatif .check { color: var(--green); font-weight: 700; font-size: 1rem; }
.comparatif .cross { color: #ef4444; font-size: 1rem; }
.badge-best {
  display: inline-block;
  background: var(--green);
  color: white;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  margin-left: 6px;
  vertical-align: middle;
}
.badge-budget {
  display: inline-block;
  background: var(--amber);
  color: white;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  margin-left: 6px;
  vertical-align: middle;
}

/* ============ FAQ ============ */
.faq { padding: 48px 0; }
.faq .section__header { margin-bottom: 28px; }
.faq__list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.faq__item { background: white; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.faq__question {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 20px;
  text-align: left;
  font-size: .93rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  transition: background .15s;
}
.faq__question:hover { background: #f9fafb; }
.faq__question::after { content: '+'; font-size: 1.2rem; font-weight: 400; color: var(--purple); flex-shrink: 0; }
.faq__question[aria-expanded="true"]::after { content: '−'; }
.faq__answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s;
  font-size: .9rem;
  color: var(--text);
  line-height: 1.75;
}
.faq__answer.open { padding: 2px 20px 18px; max-height: 600px; }

/* ============ BLOG GRID ============ */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.blog-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.blog-card__cover {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.blog-card__cover--purple { background: linear-gradient(135deg, #ede9fe, #c4b5fd); }
.blog-card__cover--blue { background: linear-gradient(135deg, #dbeafe, #93c5fd); }
.blog-card__cover--amber { background: linear-gradient(135deg, #fef3c7, #fcd34d); }
.blog-card__cover--green { background: linear-gradient(135deg, #d1fae5, #6ee7b7); }
.blog-card__body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.blog-card__tag {
  display: inline-block;
  background: var(--purple-light);
  color: var(--purple);
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.blog-card__title { font-size: 1rem; font-weight: 700; color: var(--navy); line-height: 1.4; }
.blog-card__excerpt { font-size: .87rem; color: var(--text-muted); line-height: 1.6; flex: 1; }
.blog-card__meta { display: flex; gap: 12px; font-size: .78rem; color: var(--text-muted); margin-top: 8px; }
.blog-card__cta { display: inline-flex; align-items: center; gap: 4px; color: var(--purple); font-size: .85rem; font-weight: 600; margin-top: 6px; }
.blog-card__cta:hover { text-decoration: underline; }

/* ============ ARTICLE ============ */
.article { padding: 40px 0 64px; }
.article__container { max-width: 800px; margin: 0 auto; }
.article__header { margin-bottom: 28px; }
.article__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tag {
  display: inline-block;
  background: var(--purple-light);
  color: var(--purple);
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.article__title { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 800; color: var(--navy); line-height: 1.25; margin-bottom: 16px; }
.article__meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .82rem;
  color: var(--text-muted);
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.reading-time { display: inline-flex; align-items: center; gap: 4px; }
.update-date { display: inline-flex; align-items: center; gap: 4px; }
.article__body h2 { font-size: 1.4rem; font-weight: 700; color: var(--navy); margin: 32px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--purple-light); }
.article__body h3 { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin: 24px 0 10px; }
.article__body p { margin-bottom: 16px; line-height: 1.8; }
.article__body ul, .article__body ol { padding-left: 24px; margin-bottom: 16px; }
.article__body li { margin-bottom: 8px; line-height: 1.7; }
.article__body strong { color: var(--navy); }
.article__body a { color: var(--purple); text-decoration: underline; }

/* ============ CTA BOX ============ */
.cta-box {
  background: var(--purple-light);
  border: 1px solid #c4b5fd;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 28px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.cta-box__icon { font-size: 1.6rem; flex-shrink: 0; margin-top: 2px; }
.cta-box__title { font-weight: 700; color: var(--navy); margin-bottom: 6px; font-size: .95rem; }
.cta-box__text { font-size: .87rem; color: var(--text); margin-bottom: 12px; line-height: 1.6; }
.cta-box .btn-affiliate { font-size: .85rem; }

/* ============ AFFILIATE DISCLOSURE ============ */
.affiliate-inline {
  font-size: .72rem;
  color: #9585c0;
  text-align: center;
  margin: -8px 0 20px;
  letter-spacing: .01em;
}

.disclosure-section {
  background: #fff;
  padding: 20px 0 28px;
}
.affiliate-disclosure {
  background: #f3f0ff;
  border: 1px solid #ddd6fe;
  border-radius: var(--radius-sm);
  padding: 10px 16px 16px;
  font-size: .78rem;
  color: #6d5a9a;
  line-height: 1.6;
  text-align: center;
  opacity: .85;
}

/* ============ CATEGORY CARDS (Homepage) ============ */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.category-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px 20px;
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  text-align: center;
  transition: all .2s;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.category-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.1); border-color: var(--purple); }
.category-card__icon { font-size: 2.4rem; }
.category-card__title { font-size: .95rem; font-weight: 700; color: var(--navy); }
.category-card__desc { font-size: .8rem; color: var(--text-muted); line-height: 1.5; }
.category-card__count { font-size: .78rem; color: var(--purple); font-weight: 600; background: var(--purple-light); padding: 2px 10px; border-radius: 20px; }

/* ============ GUIDE STEPS ============ */
.guide-steps { display: flex; flex-direction: column; gap: 20px; max-width: 700px; margin: 0 auto; }
.guide-step { display: flex; gap: 16px; align-items: flex-start; }
.guide-step__num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--purple);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  margin-top: 2px;
}
.guide-step__content h3 { font-size: .95rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.guide-step__content p { font-size: .87rem; color: var(--text); line-height: 1.6; }

/* ============ TRUST BADGES ============ */
.trust-row { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; padding: 32px 0; }
.trust-item { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.trust-item__icon { font-size: 1.8rem; }
.trust-item__label { font-size: .8rem; font-weight: 600; color: var(--text-muted); }

/* ============ FOOTER ============ */
.site-footer { background: var(--navy); color: rgba(255,255,255,.7); padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-brand { color: white; font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.footer-desc { font-size: .85rem; line-height: 1.65; }
.footer-col h4 { color: white; font-size: .85rem; font-weight: 700; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .5px; }
.footer-nav { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a { font-size: .84rem; transition: color .15s; }
.footer-nav a:hover { color: white; }
.footer-bottom { padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .78rem; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > *:first-child { grid-column: 1/-1; }
}
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 12px 16px;
    gap: 4px;
    border-top: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 8px 16px rgba(0,0,0,.2);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 14px; }
  .site-nav { position: relative; }
}
@media (max-width: 480px) {
  .hero { padding: 48px 0 56px; }
  .section { padding: 48px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr 1fr; }
}
