/* =====================================================
   SAVEURS DU MONDE – Feuille de styles (multi-pages)
   ===================================================== */

/* ---------- Variables & Reset ---------- */
:root {
  --primary:   #e07b39;
  --primary-d: #c4622a;
  --primary-l: #fde8d8;
  --dark:      #1e1e1e;
  --dark2:     #2d2d2d;
  --light:     #faf7f2;
  --card-bg:   #ffffff;
  --text:      #333333;
  --muted:     #888888;
  --border:    #e8e3db;
  --radius:    12px;
  --radius-sm: 6px;
  --shadow:    0 4px 18px rgba(0,0,0,.10);
  --shadow-md: 0 8px 28px rgba(0,0,0,.14);
  --transition:150ms ease;
  --max-w:     1200px;
  --header-h:  68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--light);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--light); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 999px; }

/* =====================================================
   BOUTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1.4rem;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: .4rem .9rem; font-size: .82rem; border-radius: var(--radius-sm); }
.btn-full { width: 100%; justify-content: center; }

/* =====================================================
   HEADER
   ===================================================== */
#siteHeader {
  position: sticky;
  top: 0;
  z-index: 100;
}
header {
  background: var(--dark);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 1.5rem;
}
.logo { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; color: #fff; }
.logo-icon { font-size: 1.8rem; }
.logo-text { font-size: 1.2rem; font-weight: 700; letter-spacing: .4px; white-space: nowrap; }

.main-nav { margin-left: auto; }
.nav-links { display: flex; gap: .25rem; list-style: none; }
.nav-links a {
  display: block;
  padding: .5rem .9rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: rgba(255,255,255,.82);
  transition: background var(--transition), color var(--transition);
}
.nav-links a:hover,
.nav-links a.nav-active { background: var(--primary); color: #fff; }
.nav-links a.nav-active { font-weight: 700; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
  margin-left: auto;
}
.burger span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =====================================================
   BARRE FILTRE (recettes.html)
   ===================================================== */
.filter-bar {
  background: var(--primary);
  position: sticky;
  top: var(--header-h);
  z-index: 99;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.filter-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}
.search-wrapper { display: flex; flex: 1; min-width: 200px; max-width: 340px; margin: .6rem 0; }
.search-wrapper input {
  flex: 1;
  padding: .5rem .9rem;
  border: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: .9rem;
  outline: none;
  background: rgba(255,255,255,.18);
  color: #fff;
}
.search-wrapper input::placeholder { color: rgba(255,255,255,.65); }
.search-wrapper input:focus { background: rgba(255,255,255,.28); }
.search-wrapper button {
  padding: .5rem .9rem;
  border: none;
  background: var(--dark);
  color: #fff;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  font-size: .95rem;
  transition: background var(--transition);
}
.search-wrapper button:hover { background: #000; }

.nav-list { display: flex; flex-wrap: wrap; list-style: none; }
.nav-item { position: relative; }
.nav-btn {
  background: none; border: none; color: #fff;
  padding: .75rem 1rem;
  cursor: pointer;
  font-size: .88rem; font-weight: 600; letter-spacing: .2px;
  transition: background var(--transition);
  white-space: nowrap;
}
.nav-btn:hover,
.nav-item.open .nav-btn { background: rgba(0,0,0,.18); }

.dropdown {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  min-width: 200px;
  background: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  z-index: 200;
  animation: fadeDown .15s ease;
}
@keyframes fadeDown {
  from { transform: translateY(-6px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.nav-item.open .dropdown { display: block; }
.dropdown li a {
  display: block;
  padding: .6rem 1.1rem;
  font-size: .88rem;
  color: var(--text);
  transition: background var(--transition), color var(--transition);
}
.dropdown li a:hover,
.dropdown li a.active-filter { background: var(--primary); color: #fff; }

#activeFilters { display: flex; flex-wrap: wrap; gap: .4rem; padding: .4rem 0 .5rem; }
.filter-tag {
  background: rgba(255,255,255,.22);
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 999px;
  padding: .2rem .75rem;
  font-size: .78rem;
  display: flex; align-items: center; gap: .4rem;
}
.filter-tag button { background: none; border: none; color: #fff; cursor: pointer; font-size: .85rem; padding: 0; }

/* =====================================================
   MAIN / SECTIONS
   ===================================================== */
main { flex: 1; }
.section { padding: 3.5rem 0; }
.section-alt { background: #f0ebe3; }
.section-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.8rem; }
.section-header h2 { font-size: 1.6rem; font-weight: 800; color: var(--dark); }
.section-header.centered { flex-direction: column; align-items: center; text-align: center; }
.section-sub { color: var(--muted); max-width: 540px; margin-top: .5rem; }
.link-more { font-size: .9rem; color: var(--primary); font-weight: 600; }
.link-more:hover { text-decoration: underline; }

#resultsCount { max-width: var(--max-w); margin: 0 auto 1rem; padding: 1.2rem 1.5rem 0; color: var(--muted); font-size: .88rem; }

/* =====================================================
   GRILLE RECETTES + CARTES
   ===================================================== */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}
.recipe-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.recipe-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.recipe-card img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.card-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .6rem; }
.tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: .2rem .6rem; border-radius: 999px; }
.tag-categorie           { background: var(--primary-l); color: #b85c1a; }
.tag-cuisine             { background: #d8edfd; color: #1a5cb8; }
.tag-difficulte.facile,
.tag-difficulte.Facile   { background: #d8fde8; color: #1ab85c; }
.tag-difficulte.moyen,
.tag-difficulte.Moyen    { background: #fdfbd8; color: #b8a21a; }
.tag-difficulte.difficile,
.tag-difficulte.Difficile{ background: #fdd8d8; color: #b81a1a; }
.tag-saison                      { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: .2rem .6rem; border-radius: 999px; }
.tag-saison.saison-printemps     { background: #e8f5e9; color: #2e7d32; }
.tag-saison.saison-ete           { background: #fff8e1; color: #f57f17; }
.tag-saison.saison-automne       { background: #fbe9e7; color: #bf360c; }
.tag-saison.saison-hiver         { background: #e3f2fd; color: #1565c0; }
.tag-saison.saison-toutes        { background: #f3e5f5; color: #7b1fa2; }

/* ── Allergènes ── */
.rd-allergenes-warning {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  background: #fff3e0;
  border: 1px solid #ffcc80;
  border-left: 4px solid #ff9800;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}
.rd-allergenes-icon { font-size: 1.6rem; line-height: 1; }
.rd-allergenes-body strong { display: block; color: #e65100; font-size: .95rem; margin-bottom: .2rem; }
.rd-allergenes-body p { margin: 0; color: #bf360c; font-size: .88rem; }

.allergenes-badge {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: #fff3e0;
  border: 1px solid #ffcc80;
  border-radius: 8px;
  padding: .55rem .9rem;
  margin: .6rem 0;
  font-size: .85rem;
  color: #bf360c;
}
.allergenes-badge-icon { font-size: 1.1rem; }

.card-allergenes { margin-top: .4rem; }
.allergenes-badge-sm {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ffcc80;
  padding: .15rem .5rem;
  border-radius: 999px;
}
.card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; color: var(--dark); }
.card-meta { display: flex; gap: 1rem; font-size: .82rem; color: var(--muted); margin-top: auto; padding-top: .6rem; border-top: 1px solid var(--border); }
.card-meta span { display: flex; align-items: center; gap: .3rem; }
.no-results { text-align: center; font-size: 1.1rem; color: var(--muted); margin-top: 4rem; padding: 0 1.5rem; }
.hidden { display: none !important; }

/* =====================================================
   HERO (accueil)
   ===================================================== */
.hero {
  position: relative;
  min-height: 520px;
  background: url('https://images.unsplash.com/photo-1504674900247-0877df9cc836?w=1400&q=80') center/cover no-repeat;
  display: flex; align-items: center;
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(30,30,30,.78) 0%, rgba(224,123,57,.55) 100%); }
.hero-content { position: relative; max-width: var(--max-w); margin: 0 auto; padding: 3rem 1.5rem; color: #fff; }
.hero-eyebrow { font-size: .95rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.7); margin-bottom: .5rem; }
.hero-content h1 { font-size: clamp(2.2rem,6vw,3.6rem); font-weight: 900; line-height: 1.1; margin-bottom: 1rem; }
.hero-sub { font-size: 1.1rem; color: rgba(255,255,255,.85); max-width: 520px; line-height: 1.6; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* STATS */
.stats-bar { background: var(--dark); color: #fff; }
.stats-inner { max-width: var(--max-w); margin: 0 auto; padding: 1.2rem 1.5rem; display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num { display: block; font-size: 1.8rem; font-weight: 900; color: var(--primary); }
.stat-label { font-size: .8rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: 1px; }

/* =====================================================
   CATÉGORIES – mini cards (accueil)
   ===================================================== */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 1.2rem; }
.cat-card {
  background: var(--card-bg); border-radius: var(--radius); padding: 2rem 1.2rem;
  text-align: center; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: pointer; color: var(--text);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); color: var(--primary-d); }
.cat-icon { font-size: 2.5rem; margin-bottom: .8rem; }
.cat-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .3rem; }
.cat-card p  { font-size: .82rem; color: var(--muted); }

/* =====================================================
   CATÉGORIES – grandes cards (categories.html)
   ===================================================== */
.cat-grid-full { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 1.5rem; }
.cat-card-full {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  background: var(--card-bg); transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column; cursor: pointer; color: var(--text);
}
.cat-card-full:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.cat-card-img { height: 200px; background-size: cover; background-position: center; position: relative; }
.cat-card-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.35)); }
.cat-card-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .3rem; }
.cat-card-body .cat-card-icon { font-size: 2rem; }
.cat-card-body h2 { font-size: 1.2rem; font-weight: 800; color: var(--dark); }
.cat-card-body > p:first-of-type { font-size: .82rem; color: var(--muted); }
.cat-card-desc { font-size: .88rem; color: var(--text); line-height: 1.5; margin-bottom: .6rem; }

/* Cuisines */
.cuisine-grid { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.cuisine-card {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  background: var(--card-bg); border-radius: var(--radius); padding: 1.4rem 2rem;
  font-size: 2rem; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  color: var(--text); font-weight: 600;
}
.cuisine-card span { font-size: .88rem; font-weight: 700; }
.cuisine-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); background: var(--primary); color: #fff; }

/* =====================================================
   PAGE HERO (pages intérieures)
   ===================================================== */
.page-hero { background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%); color: #fff; padding: 3rem 1.5rem 2.6rem; }
.page-hero-inner { max-width: var(--max-w); margin: 0 auto; }
.page-hero h1 { font-size: 2.2rem; font-weight: 900; margin-bottom: .5rem; }
.page-hero p  { font-size: 1rem; color: rgba(255,255,255,.7); max-width: 520px; }

/* =====================================================
   BANNIÈRE CTA
   ===================================================== */
.cta-banner { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-d) 100%); padding: 3.5rem 1.5rem; text-align: center; color: #fff; }
.cta-inner { max-width: 600px; margin: 0 auto; }
.cta-inner h2 { font-size: 1.8rem; font-weight: 900; margin-bottom: .5rem; }
.cta-inner p  { font-size: 1rem; margin-bottom: 1.5rem; opacity: .9; }
.cta-banner .btn-primary { background: #fff; color: var(--primary-d); }
.cta-banner .btn-primary:hover { background: var(--light); }

/* =====================================================
   PAGE À PROPOS
   ===================================================== */
.about-split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.about-text h2 { font-size: 1.6rem; font-weight: 800; color: var(--dark); margin-bottom: 1rem; }
.about-text p  { font-size: .95rem; line-height: 1.7; color: var(--text); margin-bottom: .8rem; }
.about-img-wrap img { border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; height: 340px; object-fit: cover; }

.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1.2rem; }
.value-card { background: var(--card-bg); border-radius: var(--radius); padding: 1.6rem 1.3rem; box-shadow: var(--shadow); text-align: center; }
.value-icon { font-size: 2.2rem; margin-bottom: .75rem; }
.value-card h3 { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: .4rem; }
.value-card p  { font-size: .85rem; color: var(--muted); line-height: 1.5; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 1.5rem; }
.team-card { background: var(--card-bg); border-radius: var(--radius); padding: 1.8rem 1.3rem; box-shadow: var(--shadow); text-align: center; }
.team-card img { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; border: 3px solid var(--primary-l); }
.team-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--dark); margin-bottom: .2rem; }
.team-role    { font-size: .8rem; color: var(--primary); font-weight: 600; margin-bottom: .7rem; }
.team-card p  { font-size: .85rem; color: var(--muted); line-height: 1.5; }

/* =====================================================
   PAGE CONTACT
   ===================================================== */
.contact-layout { display: grid; grid-template-columns: 1fr 380px; gap: 3rem; align-items: start; }
.contact-form-wrap h2 { font-size: 1.5rem; font-weight: 800; color: var(--dark); margin-bottom: 1.4rem; }
.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .35rem; }
.form-group label { font-size: .88rem; font-weight: 600; color: var(--dark); }
.required { color: var(--primary); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: .65rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .92rem; font-family: inherit;
  background: #fff; color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(224,123,57,.15); }
.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid { border-color: #e04040; }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0l6 8 6-8z' fill='%23888'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .85rem center; padding-right: 2.2rem; }
.form-error { font-size: .78rem; color: #e04040; min-height: 1em; display: none; }
.form-error.visible { display: block; }
.form-check .checkbox-label { display: flex; align-items: flex-start; gap: .5rem; font-size: .85rem; color: var(--muted); cursor: pointer; }
.form-check input[type="checkbox"] { margin-top: .15rem; accent-color: var(--primary); flex-shrink: 0; }
.form-success { text-align: center; padding: 2.5rem 1rem; }
.success-icon { font-size: 3rem; }
.form-success h3 { font-size: 1.4rem; font-weight: 800; color: var(--dark); margin: .8rem 0 .4rem; }
.form-success p  { color: var(--muted); margin-bottom: 1.4rem; }

.contact-info { background: var(--card-bg); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); }
.contact-info h2 { font-size: 1.25rem; font-weight: 800; color: var(--dark); margin-bottom: 1.2rem; }
.contact-list { display: flex; flex-direction: column; gap: 1.1rem; }
.contact-list li { display: flex; gap: .9rem; align-items: flex-start; }
.contact-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: .1rem; }
.contact-list strong { display: block; font-size: .85rem; font-weight: 700; color: var(--dark); margin-bottom: .15rem; }
.contact-list p, .contact-list a { font-size: .88rem; color: var(--muted); line-height: 1.4; }
.contact-list a:hover { color: var(--primary); }
.contact-social { margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.contact-social h3 { font-size: .9rem; font-weight: 700; color: var(--dark); margin-bottom: .7rem; }
.social-links { display: flex; flex-direction: column; gap: .5rem; }
.social-links a { font-size: .88rem; color: var(--muted); display: flex; align-items: center; gap: .5rem; transition: color var(--transition); }
.social-links a:hover { color: var(--primary); }

/* =====================================================
   MODAL
   ===================================================== */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 1rem; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-content { background: #fff; border-radius: var(--radius); max-width: 720px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; animation: slideUp .2s ease; }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-content img { width: 100%; height: 280px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.modal-close { position: absolute; top: .8rem; right: .8rem; background: rgba(0,0,0,.55); border: none; color: #fff; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: background var(--transition); }
.modal-close:hover { background: #000; }
.modal-body { padding: 1.4rem 1.6rem 1.8rem; }
.modal-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .8rem; }
.modal-body h2 { font-size: 1.6rem; font-weight: 800; color: var(--dark); margin-bottom: .6rem; }
.modal-meta { display: flex; flex-wrap: wrap; gap: 1.2rem; font-size: .88rem; color: var(--muted); margin-bottom: 1.2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.modal-meta span { display: flex; align-items: center; gap: .35rem; }
.modal-section { margin-bottom: 1.4rem; }
.modal-section h3 { font-size: 1.02rem; font-weight: 700; color: var(--primary); margin-bottom: .6rem; }
.modal-section ul { list-style: disc; padding-left: 1.3rem; }
.modal-section ol { list-style: decimal; padding-left: 1.3rem; }
.modal-section li { margin-bottom: .4rem; font-size: .92rem; line-height: 1.55; }
.modal-footer { padding-top: 1rem; border-top: 1px solid var(--border); text-align: right; }
.modal-footer .btn { display: inline-block; padding: .65rem 1.4rem; font-size: .9rem; }

/* =====================================================
   FOOTER
   ===================================================== */
footer { background: var(--dark); color: #fff; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 3rem 1.5rem 2rem; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; }
.footer-brand .logo-icon { font-size: 1.8rem; }
.footer-brand .logo-text { font-size: 1.1rem; font-weight: 700; }
.footer-brand p { font-size: .85rem; color: rgba(255,255,255,.5); margin-top: .5rem; max-width: 260px; line-height: 1.5; }
.footer-nav h4 { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: .9rem; color: rgba(255,255,255,.5); }
.footer-nav ul { display: flex; flex-direction: column; gap: .5rem; }
.footer-nav a { font-size: .88rem; color: rgba(255,255,255,.7); transition: color var(--transition); }
.footer-nav a:hover { color: var(--primary); }
.footer-copy { max-width: var(--max-w); margin: 0 auto; padding: 1.1rem 1.5rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem; color: rgba(255,255,255,.35); }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
  .about-split    { grid-template-columns: 1fr; }
  .about-img-wrap { order: -1; }
  .about-img-wrap img { height: 240px; }
  .contact-layout { grid-template-columns: 1fr; }
  .footer-inner   { grid-template-columns: 1fr 1fr; gap: 1.8rem; }
  .footer-brand   { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .burger { display: flex; }
  .main-nav { position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--dark2); padding: .5rem 0 1rem; display: none; z-index: 99; }
  .main-nav.open { display: block; }
  .nav-links { flex-direction: column; padding: 0 1rem; }
  .nav-links a { padding: .75rem 1rem; border-radius: var(--radius-sm); }
  .filter-bar-inner { flex-direction: column; align-items: stretch; }
  .search-wrapper { max-width: 100%; margin: .5rem 0 0; }
  .nav-list { flex-wrap: wrap; }
  .nav-btn { font-size: .8rem; padding: .6rem .7rem; }
  .cat-grid      { grid-template-columns: repeat(2,1fr); }
  .cat-grid-full { grid-template-columns: 1fr; }
  .recipe-grid   { grid-template-columns: 1fr; }
  .form-row      { grid-template-columns: 1fr; }
  .hero          { min-height: 380px; }
  .hero-content h1 { font-size: 2rem; }
  .stats-inner   { gap: 1.5rem; }
  .footer-inner  { grid-template-columns: 1fr; }
  .modal-body    { padding: 1rem; }
  .modal-body h2 { font-size: 1.25rem; }
  .modal-content img { height: 200px; }
}

/* =====================================================
   PAGE DÉTAIL RECETTE
   ===================================================== */
.recette-detail-page { min-height: 60vh; }
.rd-loading, .rd-not-found { text-align: center; padding: 4rem 1rem; font-size: 1.1rem; color: var(--muted); }
.rd-not-found .btn { margin-top: 1.2rem; }

/* Hero */
.rd-hero { position: relative; height: 420px; background-size: cover; background-position: center; }
.rd-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.25) 0%, rgba(0,0,0,.72) 100%); display: flex; align-items: flex-end; }
.rd-hero-inner { max-width: var(--max-w); width: 100%; margin: 0 auto; padding: 2rem 1.5rem; }
.rd-back { display: inline-block; color: rgba(255,255,255,.8); font-size: .85rem; margin-bottom: 1rem; transition: color var(--transition); }
.rd-back:hover { color: #fff; }
.rd-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .7rem; }
.rd-title { font-size: 2.4rem; font-weight: 800; color: #fff; line-height: 1.15; margin-bottom: .6rem; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.rd-meta { display: flex; gap: 1.4rem; font-size: .9rem; color: rgba(255,255,255,.85); }

/* Layout contenu */
.rd-content { max-width: var(--max-w); margin: 0 auto; padding: 2.5rem 1.5rem 4rem; display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem; align-items: start; }

/* Sections */
.rd-section { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.8rem 2rem; margin-bottom: 1.5rem; }
.rd-section-title { font-size: 1.15rem; font-weight: 700; color: var(--primary); margin-bottom: 1rem; }

/* Vidéo */
.rd-video-section { padding-bottom: 1.5rem; }
.rd-video-wrapper { position: relative; padding-top: 56.25%; border-radius: calc(var(--radius) - 4px); overflow: hidden; }
.rd-video-wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* Ingrédients */
/* liste ingrédients → voir section "Ingrédients avec prix" ci-dessus */
.rd-ing-note-placeholder { display: none; }

/* Étapes */
.rd-steps { list-style: none; padding: 0; counter-reset: step; }
.rd-steps li { display: flex; gap: 1rem; margin-bottom: 1.1rem; counter-increment: step; }
.rd-steps li::before { content: counter(step); min-width: 2rem; height: 2rem; background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .82rem; font-weight: 700; flex-shrink: 0; margin-top: .1rem; }
.rd-step-text { font-size: .93rem; line-height: 1.6; padding-top: .2rem; }

/* Sidebar */
.rd-sidebar { position: sticky; top: calc(var(--header-h) + 1rem); }
.rd-info-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 1rem; }
.rd-info-card h3 { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 1rem; border-bottom: 1px solid var(--border); padding-bottom: .6rem; }
.rd-info-card dl { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1rem; font-size: .88rem; }
.rd-info-card dt { color: var(--muted); font-weight: 500; }
.rd-info-card dd { font-weight: 600; color: var(--dark); }
.rd-btn-back { display: block; text-align: center; width: 100%; box-sizing: border-box; }

/* Ingrédients avec prix */
.rd-ing-note { font-size: .78rem; color: var(--muted); margin-bottom: .9rem; font-style: italic; }
.rd-ingredients { list-style: none; padding: 0; }
.rd-ingredients li { display: flex; justify-content: space-between; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--border); gap: .8rem; }
.rd-ingredients li:last-child { border-bottom: none; }
.ing-nom { font-size: .91rem; color: var(--dark); flex: 1; }
.ing-prix { font-size: .88rem; font-weight: 600; color: var(--primary); white-space: nowrap; min-width: 54px; text-align: right; transition: color .15s; }
.ing-inclus { color: var(--muted); font-weight: 400; font-style: italic; }
.rd-ing-total { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; padding-top: .8rem; border-top: 2px solid var(--primary); font-weight: 700; font-size: .95rem; }
.rd-ing-total span:last-child { color: var(--primary); font-size: 1.1rem; }

/* ─── Simulateur de prix ─────────────────────────────── */
.rd-prix-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 1rem; border-top: 3px solid var(--primary); }
.rd-prix-card h3 { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: .3rem; }
.rd-prix-note { font-size: .75rem; color: var(--muted); margin-bottom: 1.1rem; line-height: 1.4; }

.rd-prix-control label { display: block; font-size: .82rem; font-weight: 600; color: var(--dark); margin-bottom: .55rem; }

.rd-prix-stepper { display: flex; align-items: center; gap: .4rem; margin-bottom: .7rem; }
.rd-prix-stepper button { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--primary); background: transparent; color: var(--primary); font-size: 1.1rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--transition), color var(--transition); line-height: 1; }
.rd-prix-stepper button:hover { background: var(--primary); color: #fff; }
.rd-prix-stepper button:disabled { border-color: var(--border); color: var(--muted); cursor: not-allowed; background: transparent; }
.rd-prix-stepper input[type="number"] { width: 60px; text-align: center; font-size: 1rem; font-weight: 700; border: 2px solid var(--border); border-radius: var(--radius-sm); padding: .25rem; color: var(--dark); -moz-appearance: textfield; }
.rd-prix-stepper input[type="number"]::-webkit-inner-spin-button,
.rd-prix-stepper input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }

#nbPersonnesSlider { width: 100%; margin-bottom: 1.1rem; accent-color: var(--primary); cursor: pointer; }

.rd-prix-result { background: var(--light); border-radius: var(--radius-sm); padding: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.rd-prix-total, .rd-prix-pp { display: flex; justify-content: space-between; align-items: center; }
.rd-prix-label { font-size: .8rem; color: var(--muted); font-weight: 500; }
.rd-prix-amount { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.rd-prix-amount-sm { font-size: 1rem; font-weight: 700; color: var(--dark); }
.rd-prix-budget { display: inline-block; font-size: .78rem; font-weight: 700; padding: .3rem .75rem; border-radius: 999px; letter-spacing: .03em; align-self: flex-start; }
.budget-eco  { background: #d1fae5; color: #065f46; }
.budget-mid  { background: #fef3c7; color: #92400e; }
.budget-haut { background: #fee2e2; color: #991b1b; }

/* Responsive page recette */
@media (max-width: 900px) {
  .rd-content { grid-template-columns: 1fr; }
  .rd-sidebar { position: static; }
}
@media (max-width: 600px) {
  .rd-hero { height: 300px; }
  .rd-title { font-size: 1.6rem; }
  .rd-content { padding: 1.5rem 1rem 3rem; }
  .rd-section { padding: 1.2rem 1.2rem; }
}
@media (max-width: 420px) {
  .cat-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

/* Bouton PDF */
.rd-btn-pdf {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  width: 100%;
  margin-top: .6rem;
  background: #f3f4f6;
  color: #374151;
  border: 1.5px solid #d1d5db;
  font-weight: 600;
  font-size: .88rem;
  padding: .6rem 1rem;
  border-radius: var(--radius-sm, 10px);
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.rd-btn-pdf:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

/* En-tête et pied de page impression — n'existent dans le DOM qu'au moment de print */
#printHeader, #printFooter { display: none; }

/* =====================================================
   IMPRESSION / EXPORT PDF
   ===================================================== */
@media print {
  /* Éléments à masquer */
  #siteHeader,
  #siteFooter,
  .rd-back,
  .rd-btn-back,
  .rd-btn-pdf,
  .rd-video-section,
  .rd-prix-card,
  .rd-ing-note,
  .rd-ing-total,
  .ing-prix {
    display: none !important;
  }

  /* ── En-tête branded ── */
  #printHeader {
    display: block !important;
    margin-bottom: 1.2rem;
  }
  .ph-bar {
    height: 6pt;
    background: #e07b39;
    margin-bottom: 0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .ph-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .5rem 0 .6rem;
    border-bottom: 1pt solid #e5e7eb;
  }
  .ph-logo {
    display: flex;
    align-items: center;
    gap: .35rem;
  }
  .ph-logo-icon { font-size: 15pt; }
  .ph-logo-text {
    font-size: 13pt;
    font-weight: 800;
    color: #e07b39;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .ph-tagline {
    font-size: 8pt;
    color: #9ca3af;
    font-style: italic;
  }

  /* ── Pied de page branded ── */
  #printFooter {
    display: block !important;
    margin-top: 1rem;
  }
  .pf-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .35rem 0;
    border-top: 1pt solid #e5e7eb;
    font-size: 8.5pt;
    color: #6b7280;
  }
  .pf-inner #pfRecipeTitle {
    font-weight: 700;
    color: #374151;
    font-style: italic;
  }
  .pf-site { color: #9ca3af; }
  .pf-bar {
    height: 4pt;
    background: #e07b39;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Mise en page générale */
  * { box-shadow: none !important; }
  html, body {
    background: #fff;
    font-size: 11pt;
    color: #000;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  .recette-detail-page {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
  }

  /* ── Hero : structure aplatie ── */
  .rd-hero {
    position: static !important;
    height: auto !important;
    min-height: 0 !important;
    background-image: none !important;
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    border-bottom: 2pt solid #e5e7eb;
    margin-bottom: 1rem !important;
  }
  .rd-hero-overlay {
    position: static !important;
    background: none !important;
    display: block !important;
    padding: 0 !important;
  }
  .rd-hero-inner {
    color: #000 !important;
    padding: 1rem 0 .75rem !important;
    max-width: 100%;
  }
  .rd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-bottom: .6rem;
  }
  .rd-tags .tag {
    border: 1px solid #ccc;
    background: #f3f4f6;
    color: #333;
    font-size: 8pt;
    padding: .15rem .5rem;
    border-radius: 999px;
  }
  .rd-title {
    color: #111 !important;
    font-size: 20pt !important;
    text-shadow: none !important;
    margin-bottom: .35rem;
    line-height: 1.2;
  }
  .rd-meta {
    display: flex;
    gap: 1.2rem;
    font-size: 9.5pt;
    color: #555 !important;
  }

  /* Layout single colonne */
  .rd-content {
    display: block;
    padding: 0;
    max-width: 100%;
  }
  .rd-sidebar { display: none !important; }

  /* Sections */
  .rd-section {
    border: none;
    box-shadow: none;
    padding: .4rem 0;
    margin-bottom: .8rem;
    page-break-inside: avoid;
    border-radius: 0;
  }
  .rd-section-title {
    font-size: 12pt;
    border-bottom: 1pt solid #ccc;
    padding-bottom: .25rem;
    margin-bottom: .5rem;
    color: #111 !important;
  }

  /* Ingrédients */
  .rd-ingredients { list-style: disc; padding-left: 1.4rem; margin: 0; }
  .rd-ingredients li {
    padding: .1rem 0;
    border: none !important;
    background: none !important;
    display: list-item !important;
  }
  .rd-ingredients li::before { display: none; }
  .ing-nom { color: #000 !important; font-style: normal !important; }

  /* Étapes */
  .rd-steps { padding-left: 1.4rem; list-style: decimal; counter-reset: none; }
  .rd-steps li { display: list-item !important; margin-bottom: .3rem; gap: 0; }
  .rd-steps li::before { display: none !important; }
  .rd-step-text { color: #000 !important; font-style: normal !important; }

  /* Allergènes */
  .rd-allergenes-warning {
    border: 1pt solid #f59e0b;
    background: #fef3c7 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    border-radius: 4pt;
    padding: .4rem .6rem;
    margin-bottom: .8rem;
    display: flex;
    gap: .5rem;
  }
  .rd-allergenes-icon { display: none; }
  .rd-allergenes-body strong { color: #92400e !important; font-size: 10pt; }
  .rd-allergenes-body p { margin: 0; font-size: 9.5pt; color: #92400e !important; }

  /* Marges d'impression */
  @page {
    margin: 1.5cm 1.5cm;
  }

  /* Supprimer les marges basses résiduelles pour éviter la page blanche finale */
  .rd-content,
  .rd-main-col,
  .rd-section:last-of-type {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

}
