/* ===== Digital Dream Vault — Design System ===== */

:root {
  --purple: #6C4AB6;
  --purple-dark: #2E1F5E;
  --coral: #FF6B6B;
  --yellow: #FFD166;
  --teal: #06D6A0;
  --sky: #5B9BD5;
  --pink: #FF8FAB;
  --bg: #FFF9F0;
  --bg-alt: #F4EEFF;
  --text: #2E2A3D;
  --text-light: #6B6580;
  --white: #FFFFFF;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(108, 74, 182, 0.14);
  --shadow-hover: 0 16px 40px rgba(108, 74, 182, 0.22);
  --font-heading: 'Fredoka', sans-serif;
  --font-body: 'Nunito', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--purple-dark);
  line-height: 1.25;
}

/* ===== Header / Nav ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(108, 74, 182, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--purple-dark);
}

.logo-icon { font-size: 1.4rem; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.main-nav a {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--purple-dark);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--bg-alt);
  color: var(--purple);
}

.nav-contact {
  background: var(--coral);
  color: var(--white) !important;
}
.nav-contact:hover { background: #ff5252; color: var(--white) !important; }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.menu-toggle span {
  display: block;
  height: 3px;
  border-radius: 3px;
  background: var(--purple-dark);
}

/* ===== Hero ===== */

.hero {
  padding: 70px 0 60px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, var(--bg-alt) 0%, var(--bg) 70%);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 16px;
}

.hero p {
  max-width: 600px;
  margin: 0 auto 28px;
  color: var(--text-light);
  font-size: 1.15rem;
}

.hero-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.badge {
  background: var(--white);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--shadow);
  color: var(--purple-dark);
}

/* ===== Buttons ===== */

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--coral); color: var(--white); box-shadow: 0 8px 20px rgba(255,107,107,0.35); }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(255,107,107,0.45); }

.btn-secondary { background: var(--white); color: var(--purple-dark); box-shadow: var(--shadow); }
.btn-secondary:hover { box-shadow: var(--shadow-hover); }

.btn-stripe { background: #635BFF; color: #fff; width: 100%; text-align: center; }
.btn-block { display: block; margin-bottom: 12px; }

/* ===== Category grid (homepage) ===== */

.section { padding: 60px 0; }
.section-title { text-align: center; margin-bottom: 8px; font-size: 2rem; }
.section-subtitle { text-align: center; color: var(--text-light); margin-bottom: 40px; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}

.category-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-top: 6px solid var(--purple);
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.category-card .emoji { font-size: 2.6rem; margin-bottom: 12px; }
.category-card h3 { margin-bottom: 8px; font-size: 1.2rem; }
.category-card p { color: var(--text-light); font-size: 0.92rem; }

.category-card.c-coloriages { border-color: var(--pink); }
.category-card.c-histoires { border-color: var(--sky); }
.category-card.c-sommeil { border-color: var(--purple-dark); }
.category-card.c-formations { border-color: var(--teal); }
.category-card.c-images { border-color: var(--yellow); }

/* ===== Product grid ===== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 26px;
  margin-top: 30px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }

.product-card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }

.product-card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.product-card-body h3 { font-size: 1.05rem; margin-bottom: 8px; }
.product-card-body .price { font-family: var(--font-heading); color: var(--coral); font-weight: 600; font-size: 1.1rem; margin: 8px 0 14px; }
.product-card-body .format-tag { font-size: 0.78rem; color: var(--text-light); margin-bottom: 6px; }

.collection-tag {
  display: inline-block;
  background: var(--yellow);
  color: var(--purple-dark);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
  width: fit-content;
}

.audience-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
  width: fit-content;
  background: var(--bg-alt);
  color: var(--purple);
}

.product-card-body .btn { margin-top: auto; }

/* ===== Filters ===== */

.filter-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 30px 0 10px;
}

.filter-btn {
  background: var(--white);
  border: 2px solid var(--bg-alt);
  color: var(--purple-dark);
  padding: 9px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-btn:hover { border-color: var(--purple); }
.filter-btn.active { background: var(--purple); border-color: var(--purple); color: var(--white); }

/* ===== Category page header ===== */

.category-hero {
  padding: 50px 0 20px;
  text-align: center;
}
.category-hero .emoji-big { font-size: 3rem; margin-bottom: 10px; }
.category-hero p { color: var(--text-light); max-width: 580px; margin: 10px auto 0; }

/* ===== Product detail page ===== */

.product-detail {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: 50px;
  padding: 50px 0 70px;
  align-items: flex-start;
}

.product-detail img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.product-detail-info .price-big {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--coral);
  margin: 14px 0 20px;
}

.product-detail-info .description { color: var(--text-light); margin-bottom: 26px; font-size: 1.05rem; }

.purchase-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  max-width: 340px;
}
.purchase-box p.note { font-size: 0.8rem; color: var(--text-light); margin-top: 10px; }

.breadcrumb {
  padding: 18px 0 0;
  font-size: 0.85rem;
  color: var(--text-light);
}
.breadcrumb a { color: var(--purple); font-weight: 700; }

/* ===== Newsletter / footer ===== */

.site-footer {
  background: var(--purple-dark);
  color: #E4DCFF;
  margin-top: 60px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 34px;
  padding: 55px 24px 35px;
}

.footer-logo { color: var(--white); margin-bottom: 12px; }
.site-footer h4 { color: var(--white); margin-bottom: 14px; font-size: 1rem; }
.site-footer p { color: #C6B8F0; font-size: 0.9rem; }
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer ul a { color: #C6B8F0; font-size: 0.9rem; }
.site-footer ul a:hover { color: var(--white); }

.secure-badge { margin-top: 14px; font-size: 0.82rem; }

.newsletter-form { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.newsletter-form input {
  flex: 1;
  min-width: 140px;
  padding: 10px 14px;
  border-radius: 999px;
  border: none;
  font-family: var(--font-body);
}
.newsletter-form button {
  background: var(--coral);
  color: var(--white);
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.footer-bottom {
  text-align: center;
  padding: 18px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.82rem;
  color: #A896D9;
}

/* ===== Responsive ===== */

@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .product-detail img { max-width: 320px; margin: 0 auto; }
}

@media (max-width: 720px) {
  .menu-toggle { display: flex; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 12px 20px rgba(108,74,182,0.12);
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 20px 20px;
    gap: 4px;
  }
  .main-nav a { display: block; padding: 12px 16px; }

  .footer-inner { grid-template-columns: 1fr; padding: 40px 24px; }
}
