/* ==========================================================================
   QUE FAIRE AVEC... - STYLES GLOBALS ET DESIGN SYSTEM
   ========================================================================== */

:root {
  --primary: #0077B6;
  --primary-hover: #005F92;
  --primary-light: #E6F4FA;
  --secondary: #90E0EF;
  --secondary-dark: #48CAE4;
  --accent: #FFB703;
  --accent-hover: #FB8500;
  --dark: #0F172A;
  --dark-surface: #1E293B;
  --text-main: #334155;
  --text-muted: #64748B;
  --bg-light: #F8FAFC;
  --white: #FFFFFF;
  --border: #E2E8F0;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

/* RESET & BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--dark);
  line-height: 1.25;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }

/* LAYOUT CONTAINER */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* HEADER & NAVBAR */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.logo-brand span.highlight {
  color: var(--accent-hover);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary-dark));
  color: var(--white);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  font-weight: 600;
  color: var(--dark);
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}

.btn-header {
  background: var(--primary);
  color: var(--white) !important;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 10px rgba(0, 119, 182, 0.25);
}

.btn-header:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--dark);
  cursor: pointer;
}

/* HERO SECTION */
.hero-section {
  background: linear-gradient(135deg, #0077B6 0%, #005F92 50%, #03045E 100%);
  color: var(--white);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.hero-section::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(circle at 80% 20%, rgba(144, 224, 239, 0.2) 0%, transparent 50%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-content h1 {
  color: var(--white);
  margin-bottom: 1.25rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #E2E8F0;
  margin-bottom: 2rem;
}

/* SEARCH BOX */
.ingredient-search-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  display: flex;
  gap: 0.5rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 1.5rem;
}

.ingredient-search-box input {
  flex: 1;
  border: none;
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
  outline: none;
  font-family: var(--font-body);
}

.ingredient-search-box button {
  background: var(--accent);
  color: var(--dark);
  border: none;
  padding: 0.8rem 1.5rem;
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.ingredient-search-box button:hover {
  background: var(--accent-hover);
  color: var(--white);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.9rem;
  color: #CBD5E1;
}

.hero-tags a {
  color: var(--secondary);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.hero-tags a:hover {
  background: var(--secondary);
  color: var(--dark);
}

.hero-image-wrap {
  position: relative;
}

.hero-image-wrap img {
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  object-fit: cover;
  aspect-ratio: 4/3;
  width: 100%;
}

.hero-floating-card {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: var(--white);
  color: var(--dark);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 260px;
}

.floating-icon {
  width: 48px;
  height: 48px;
  background: #E0F2FE;
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* SECTION STYLES */
.section-padding {
  padding: 5rem 0;
}

.section-title-wrap {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem auto;
}

.section-tag {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* CARDS GRID */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.recipe-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.recipe-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--secondary);
}

.card-img-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform 0.5s ease;
}

.recipe-card:hover .card-img-wrap img {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(15, 23, 42, 0.8);
  color: var(--white);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.card-time {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: var(--white);
  color: var(--dark);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.card-body h3 a {
  color: var(--dark);
}

.card-body h3 a:hover {
  color: var(--primary);
}

.card-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex: 1;
}

.card-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.btn-card {
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-card:hover {
  color: var(--primary-hover);
  gap: 0.5rem;
}

/* DYNAMIC GUIDE TEMPLATE PAGE STYLES */
.guide-hero {
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: 4rem 0 3rem 0;
  position: relative;
}

.breadcrumbs {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
}

.breadcrumbs a {
  color: var(--secondary);
}

.badge-wrapper {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.category-badge {
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  color: var(--white);
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.eco-metrics-bar {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.metric-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 200px;
}

.metric-card i {
  font-size: 2rem;
  color: var(--accent);
}

.metric-data strong {
  display: block;
  font-size: 1.4rem;
  font-family: var(--font-heading);
}

.metric-data span {
  font-size: 0.8rem;
  color: #E2E8F0;
}

.guide-layout {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 2.5rem;
  margin: 3rem auto;
}

.tips-card-box {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}

.tips-list {
  list-style: none;
  margin-top: 1rem;
}

.tips-list li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--border);
}

.tips-list li:last-child {
  border: none;
  margin: 0;
  padding: 0;
}

.tip-check {
  color: #16A34A;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.recipe-card-detailed {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  margin-bottom: 2rem;
}

.recipe-card-detailed .recipe-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
  background: transparent;
}

.recipe-meta-pills {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.portion-calculator {
  background: var(--primary-light);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.portion-controls {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.portion-controls button {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--primary);
  color: var(--white);
  font-weight: 800;
  border-radius: 50%;
  cursor: pointer;
}

.portion-controls input {
  width: 40px;
  text-align: center;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 1.1rem;
}

.recipe-body-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
}

.ingredients-column h4, .steps-column h4 {
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.faq-section {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-top: 2rem;
}

.faq-accordion details {
  background: var(--bg-light);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  cursor: pointer;
}

.faq-accordion summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  outline: none;
}

.faq-answer {
  margin-top: 0.75rem;
  color: var(--text-muted);
}

.sidebar-links {
  list-style: none;
}

.sidebar-links li {
  margin-bottom: 0.75rem;
}

.sidebar-links a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--dark);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--border);
}

.sidebar-links a:hover {
  color: var(--primary);
}

/* FOOTER */
.site-footer {
  background: var(--dark-surface);
  color: #94A3B8;
  padding: 4rem 0 2rem 0;
  border-top: 1px solid #334155;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.footer-links h4 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #94A3B8;
}

.footer-links a:hover {
  color: var(--secondary);
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
}

/* SCROLL REVEAL ANIMATION */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* PRINTING / PDF SHEET FORMATTING */
@media print {
  header, footer, .guide-sidebar, .hero-actions, .portion-controls button {
    display: none !important;
  }
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .guide-layout {
    display: block !important;
  }
  .guide-hero {
    background: none !important;
    color: #000 !important;
    padding: 1rem 0 !important;
  }
  .guide-hero h1 {
    color: #000 !important;
    font-size: 2rem !important;
  }
  .tips-card-box, .recipe-card-detailed {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
}

/* RESPONSIVE */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .ingredient-search-box {
    max-width: 500px;
    margin: 0 auto 1.5rem auto;
  }
  .hero-tags {
    justify-content: center;
  }
  .guide-layout {
    grid-template-columns: 1fr;
  }
  .recipe-body-grid {
    grid-template-columns: 1fr;
  }
  .calc-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .main-nav .nav-links {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}