/* ─────────────────────────────────────────────────────────────
   Composants — port direct du design system app
   ───────────────────────────────────────────────────────────── */

/* ─── Inline icons (default size — components can override) ─── */
.icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex-shrink: 0; }
.icon svg { width: 100%; height: 100%; display: block; }
.feature-card .icon-wrap svg { width: 24px; height: 24px; }
.store-btn .icon { width: 22px; height: 22px; }

/* ─── Buttons (mirror Button component) ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-xs);
  padding: 12px 20px;
  border-radius: var(--r-lg);
  font-family: var(--font-sans);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  line-height: 1;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 6px 16px rgba(232,55,42,.25); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: var(--fresh-teal-light); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--primary-light); }
.btn-lg { padding: 16px 28px; font-size: var(--fs-lg); }
.btn-sm { padding: 8px 14px; font-size: var(--fs-sm); }

/* ─── Store buttons (App Store / Play) ─── */
.stores { display: flex; gap: var(--sp-sm); flex-wrap: wrap; justify-content: center; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--charcoal); color: #fff;
  padding: 12px 20px; border-radius: var(--r-lg);
  font-weight: var(--fw-semibold); font-size: var(--fs-sm);
  transition: transform .15s ease;
}
.store-btn:hover { transform: scale(1.03); }
.store-btn svg { width: 22px; height: 22px; fill: currentColor; flex-shrink: 0; }
.store-btn .small { font-size: 10px; opacity: .8; line-height: 1; display: block; font-weight: var(--fw-regular); }
.store-btn .big { font-size: var(--fs-base); line-height: 1.1; display: block; }

/* ─── Cards (mirror Card component) ─── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-md);
  box-shadow: var(--shadow-card);
}
.card-flat { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-md); }
.card-tip {
  background: rgba(42,157,143,.08);
  border: 1px solid rgba(42,157,143,.2);
  border-radius: var(--r-lg);
  padding: var(--sp-md);
}
.card-tip .label {
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: var(--sp-xs);
}

/* ─── Badges (mirror Badge component) ─── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-family: var(--font-sans);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-xs);
  background: var(--muted);
  color: var(--text);
  white-space: nowrap;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-secondary { background: rgba(42,157,143,.12); color: var(--secondary); }
.badge-info { background: rgba(42,157,143,.12); color: var(--secondary); }
.badge-outline { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.badge-easy { background: rgba(5,150,105,.12); color: var(--difficulty-easy); }
.badge-intermediate { background: rgba(217,119,6,.12); color: var(--difficulty-intermediate); }
.badge-hard { background: rgba(220,20,60,.12); color: var(--difficulty-hard); }
.badge-halal { background: rgba(42,157,143,.12); color: var(--secondary); font-weight: var(--fw-bold); }
.badge-adaptable { background: rgba(232,55,42,.10); color: var(--primary); font-weight: var(--fw-bold); }

/* ─── Recipe card (mirror RecipeCard.tsx) ─── */
.recipe-card {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: 320px;
  box-shadow: var(--shadow-card);
  transition: transform .15s ease, box-shadow .15s ease;
}
.recipe-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }
.recipe-card .thumb {
  width: 100%; height: 180px;
  background: var(--muted) center/cover no-repeat;
  position: relative;
}
.recipe-card .thumb-fallback {
  width: 100%; height: 180px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(232,55,42,.08), rgba(42,157,143,.08));
  font-size: 48px;
}
.recipe-card .body {
  flex: 1;
  padding: var(--sp-md);
  display: flex; flex-direction: column; justify-content: space-between;
  gap: var(--sp-sm);
}
.recipe-card .title {
  font-family: var(--font-serif);
  font-size: var(--fs-2xl);
  line-height: 30px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.recipe-card .category {
  font-family: var(--font-sans);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  color: var(--accent);
  margin-top: 4px;
}
.recipe-card .meta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px;
  margin-top: var(--sp-xs);
}
.recipe-card .meta .text { font-size: var(--fs-xs); color: var(--text-secondary); }

/* ─── Hero ─── */
.hero {
  text-align: center;
  padding: var(--sp-2xl) var(--sp-md) var(--sp-xl);
}
.hero .eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--r-full);
  background: rgba(42,157,143,.12);
  color: var(--secondary);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-md);
}
.hero h1 {
  font-size: clamp(36px, 6vw, var(--fs-5xl));
  line-height: 1.1;
  max-width: 720px;
  margin: 0 auto var(--sp-md);
}
.hero .subtitle {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto var(--sp-lg);
  line-height: var(--lh-relaxed);
}
.hero .cta-row { display: flex; gap: var(--sp-sm); justify-content: center; flex-wrap: wrap; }

/* ─── Feature card (mirror FEATURES grid) ─── */
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-md);
  transition: transform .15s ease, box-shadow .15s ease;
}
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.feature-card .icon-wrap {
  width: 48px; height: 48px;
  border-radius: var(--r-lg);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-sm);
}
.feature-card .icon-wrap svg { width: 24px; height: 24px; }
.feature-card h3 {
  font-family: var(--font-serif);
  font-size: var(--fs-xl);
  margin-bottom: 4px;
  line-height: var(--lh-snug);
}
.feature-card p { color: var(--text-secondary); font-size: var(--fs-sm); line-height: var(--lh-relaxed); }
.feature-card.is-clickable { cursor: pointer; }

/* ─── Step (3-steps section) ─── */
.step {
  text-align: center;
  padding: var(--sp-md);
}
.step .number {
  width: 48px; height: 48px;
  margin: 0 auto var(--sp-sm);
  border-radius: var(--r-full);
  background: var(--primary);
  color: #fff;
  font-family: var(--font-serif);
  font-size: var(--fs-2xl);
  display: flex; align-items: center; justify-content: center;
}
.step h3 { font-size: var(--fs-xl); margin-bottom: 6px; }
.step p { color: var(--text-secondary); font-size: var(--fs-sm); }

/* ─── Header ─── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,250,245,.92);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
  padding: 0 var(--sp-md);
  max-width: var(--container-max);
  margin: 0 auto;
}
.site-header .brand {
  font-family: var(--font-serif);
  font-size: var(--fs-2xl);
  color: var(--primary);
  letter-spacing: -.5px;
}
.site-header nav {
  display: flex; gap: var(--sp-md); align-items: center;
}
.site-header nav a {
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
  color: var(--text);
  padding: 8px 4px;
  position: relative;
}
.site-header nav a:hover { color: var(--primary); }
.site-header nav a.active { color: var(--primary); }
.site-header nav a.active::after {
  content: ""; position: absolute; left: 4px; right: 4px; bottom: 0; height: 2px;
  background: var(--primary); border-radius: var(--r-sm);
}
.site-header .cta { display: flex; gap: var(--sp-xs); align-items: center; }
@media (max-width: 768px) {
  .site-header nav { display: none; }
  .nav-toggle { display: inline-flex; }
}
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r-md);
  border: 1px solid var(--border); background: var(--card);
}

/* Mobile menu (revealed by checkbox toggle) */
#mnav { display: none; }
#mnav:checked ~ .mobile-menu { display: block; }
.mobile-menu {
  display: none;
  position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 40;
  background: var(--bg); border-bottom: 1px solid var(--border);
  padding: var(--sp-sm);
}
.mobile-menu a {
  display: block; padding: 12px var(--sp-sm);
  font-weight: var(--fw-medium); border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: none; }

/* ─── Footer ─── */
.site-footer {
  margin-top: auto;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: var(--sp-xl) 0 var(--sp-md);
}
.site-footer .cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-lg);
  padding-bottom: var(--sp-lg);
}
.site-footer h4 {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-secondary);
  margin-bottom: var(--sp-sm);
}
.site-footer ul a {
  display: block;
  padding: 4px 0;
  color: var(--text);
  font-size: var(--fs-sm);
}
.site-footer ul a:hover { color: var(--primary); }
.site-footer .legal {
  border-top: 1px solid var(--border);
  padding-top: var(--sp-md);
  display: flex; justify-content: space-between; gap: var(--sp-sm);
  font-size: var(--fs-xs);
  color: var(--text-light);
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}

/* ─── Recipe detail layout ─── */
.recipe-hero {
  width: 100%; height: clamp(240px, 40vw, 420px);
  border-radius: var(--r-lg);
  background: var(--muted) center/cover no-repeat;
  margin-bottom: var(--sp-md);
}
.recipe-meta-row { display: flex; flex-wrap: wrap; gap: var(--sp-xs); margin-top: var(--sp-md); }
.section-title {
  font-family: var(--font-serif);
  font-size: var(--fs-2xl);
  margin: var(--sp-lg) 0 var(--sp-sm);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--sp-xs);
}
.ingredients-list { display: grid; gap: var(--sp-xs); }
.ingredient-row {
  display: flex; align-items: baseline; gap: var(--sp-xs);
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.ingredient-row .qty { font-family: var(--font-sans); font-weight: var(--fw-semibold); color: var(--text); flex-shrink: 0; min-width: 80px; }
.ingredient-row .name { color: var(--text-secondary); }
.steps-list { display: grid; gap: var(--sp-md); margin-top: var(--sp-sm); }
.step-row {
  display: flex; gap: var(--sp-sm); align-items: flex-start;
}
.step-row .num {
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-sans); font-weight: var(--fw-bold); font-size: var(--fs-sm);
  flex-shrink: 0;
}
.step-row .text { flex: 1; line-height: var(--lh-relaxed); padding-top: 4px; }

/* Sticky CTA (mobile recipe) */
.sticky-cta {
  position: sticky; bottom: 0; left: 0; right: 0;
  padding: var(--sp-sm); background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex; gap: var(--sp-xs);
  z-index: 30;
}
.sticky-cta .btn { flex: 1; }

/* ─── Pills filter row (catalog) ─── */
.filter-row {
  display: flex; gap: var(--sp-xs);
  overflow-x: auto;
  padding: var(--sp-xs) 0;
  scrollbar-width: thin;
}
.pill {
  display: inline-flex; align-items: center;
  padding: 8px 14px;
  border-radius: var(--r-full);
  background: var(--card);
  border: 1px solid var(--border);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text);
  white-space: nowrap;
  transition: all .15s ease;
}
.pill:hover { border-color: var(--primary); color: var(--primary); }
.pill.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ─── Breadcrumb ─── */
.breadcrumb {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-size: var(--fs-sm);
  color: var(--text-light);
  padding: var(--sp-sm) 0;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { opacity: .5; }
.breadcrumb .current { color: var(--text); }

/* ─── Halal banner (mirror DietaryHalalBanner) ─── */
.halal-banner {
  background: rgba(42,157,143,.08);
  border: 1px solid rgba(42,157,143,.2);
  border-radius: var(--r-lg);
  padding: var(--sp-sm) var(--sp-md);
  display: flex; gap: var(--sp-sm); align-items: center;
}
.halal-banner .icon { font-size: 24px; }
.halal-banner .text { flex: 1; }
.halal-banner .title { font-weight: var(--fw-semibold); color: var(--secondary); margin-bottom: 2px; }
.halal-banner .sub { font-size: var(--fs-sm); color: var(--text-secondary); }

/* ─── Utilities ─── */
.divider { height: 1px; background: var(--border); margin: var(--sp-lg) 0; }
.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
}
