/* ═══════════════════════════════════════════════════════════
   Styles Saveurs & Recettes — Design Culinaire Moderne
   ═══════════════════════════════════════════════════════════ */
:root {
  --primary: #c2410c;
  --primary-hover: #9a3412;
  --secondary: #15803d;
  --accent: #f59e0b;
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #1c1917;
  --text-muted: #78716c;
  --border: #e7e5e4;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  --radius: 0.85rem;
}

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

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

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

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Navigation ── */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.brand {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.nav-links a {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

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

/* ── Boutons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  background: #f5f5f4;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  padding: 3.5rem 0;
  border-bottom: 1px solid #fed7aa;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  font-weight: 900;
  color: #7c2d12;
  margin-bottom: 0.75rem;
}

.hero p {
  font-size: 1.15rem;
  color: #9a3412;
  max-width: 640px;
  margin: 0 auto 1.75rem;
}

/* ── Barre de Recherche ── */
.search-bar {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
}

.search-bar input {
  flex: 1;
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.search-bar input:focus {
  outline: 2px solid var(--primary);
}

/* ── Grille & Cartes ── */
.section {
  padding: 3rem 0;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.section-sub {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.grid-recipes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

.card-recipe {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card-recipe:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.card-recipe img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #e7e5e4;
}

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

.card-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex: 1;
}

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

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-category { background: #ffedd5; color: #c2410c; }
.badge-easy { background: #dcfce7; color: #15803d; }
.badge-medium { background: #fef3c7; color: #b45309; }
.badge-hard { background: #fee2e2; color: #b91c1c; }

/* ── Formulaires ── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.95rem;
  background: var(--surface);
}

.form-control:focus {
  outline: 2px solid var(--primary);
}

/* ── Alertes ── */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.alert-success { background: #dcfce7; color: #14532d; border-left: 4px solid #16a34a; }
.alert-error { background: #fee2e2; color: #7f1d1d; border-left: 4px solid #dc2626; }

/* ── Étoiles d'Avis ── */
.stars {
  color: #f59e0b;
  font-weight: bold;
}

/* ── Footer ── */
footer {
  background: #1c1917;
  color: #a8a29e;
  padding: 3rem 0 2rem;
  margin-top: auto;
}

footer a {
  color: #f5f5f4;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .navbar .container { flex-direction: column; justify-content: center; height: auto; padding: 1rem; gap: 0.75rem; }
  .nav-links { gap: 1rem; flex-wrap: wrap; justify-content: center; }
  .search-bar { flex-direction: column; }
}
