/* NutriJournal - Styles communs */
:root {
  --green: #3DAA6E;
  --green-dark: #2A8A57;
  --green-light: #E8F5EE;
  --coral: #F4845F;
  --bg: #F9F7F4;
  --card: #FFFFFF;
  --text: #1A1A1A;
  --text-muted: #5A6B63;
  --border: #E3E8E5;
  --danger: #E53935;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 20px;
  font-size: 14px;
  font-weight: 500;
}

nav a:hover { color: var(--green); }

main {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

h2 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 12px;
  color: var(--green-dark);
}

h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--text);
}

p {
  margin-bottom: 14px;
  color: var(--text);
}

ul {
  margin: 12px 0 16px 24px;
}

li {
  margin-bottom: 6px;
}

a { color: var(--green-dark); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin: 20px 0;
}

.btn {
  display: inline-block;
  background: var(--green);
  color: white;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.15s;
}

.btn:hover { background: var(--green-dark); }

.btn-danger {
  background: var(--danger);
}

.btn-danger:hover { background: #c62828; }

.alert {
  background: var(--green-light);
  border-left: 4px solid var(--green);
  padding: 14px 16px;
  border-radius: 8px;
  margin: 20px 0;
  font-size: 15px;
}

.alert-warning {
  background: #FFF4E6;
  border-left-color: var(--coral);
}

.step {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
}

.step-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}

.step-content h3 {
  margin-top: 2px;
  margin-bottom: 4px;
}

footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--card);
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 10px;
}

footer a:hover { color: var(--green); }

/* Home hero */
.hero {
  text-align: center;
  padding: 60px 20px 40px;
}

.hero h1 {
  font-size: 40px;
  margin-bottom: 16px;
}

.hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 24px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.feature h3 {
  margin-top: 0;
  font-size: 16px;
}

.feature p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 600px) {
  h1 { font-size: 26px; }
  .hero h1 { font-size: 32px; }
  main { padding: 24px 16px 60px; }
  nav a { margin-left: 12px; }
}
