/* Italiaanse Percolator - Design System */
/* Inspiré de Sleeps.fr + identité café italien */

:root {
  /* Colors - Palette café + design scandinave */
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --surface-soft: #F5F5F5;
  --text: #1B1C1E;
  --text-dim: #6B7280;
  --text-light: #9CA3AF;
  
  /* Accents café italien */
  --coffee: #7B5A43;
  --coffee-light: #A67C5A;
  --sage: #C2C8B2;
  --sage-light: #D4D9C7;
  --cta: #2F4858;
  --cta-hover: #1E3A4A;
  
  /* Status colors */
  --success: #059669;
  --warning: #D97706;
  --error: #DC2626;
  --rating: #F59E0B;
  
  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', var(--font-sans);
  --font-serif: 'DM Serif Display', Georgia, serif;
  
  /* Type scale */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 1.875rem;
  --fs-4xl: 2.25rem;
  --fs-5xl: 3rem;
  
  /* Spacing scale - Large margins & breathing space */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;
  
  /* Border radius */
  --r-sm: 0.375rem;
  --r-md: 0.5rem;
  --r-lg: 0.75rem;
  --r-xl: 1rem;
  --r-2xl: 1.5rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Container */
  --container: 1200px;
  --container-sm: 768px;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: var(--sp-4);
}

h1 {
  font-size: var(--fs-4xl);
  font-weight: 700;
}

h2 {
  font-size: var(--fs-3xl);
}

h3 {
  font-size: var(--fs-2xl);
}

h4 {
  font-size: var(--fs-xl);
}

.display-title {
  font-family: var(--font-serif);
  font-size: var(--fs-5xl);
  font-weight: 400;
  line-height: 1.1;
}

.lead {
  font-size: var(--fs-lg);
  color: var(--text-dim);
  line-height: 1.7;
}

.text-sm {
  font-size: var(--fs-sm);
}

.text-xs {
  font-size: var(--fs-xs);
}

.text-dim {
  color: var(--text-dim);
}

.text-light {
  color: var(--text-light);
}

/* Layout */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-4);
}

.container-sm {
  max-width: var(--container-sm);
  margin: 0 auto;
  padding: 0 var(--sp-4);
}

.section {
  padding: var(--sp-20) 0;
}

.section-sm {
  padding: var(--sp-12) 0;
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--sp-6);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Flex utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-4 {
  gap: var(--sp-4);
}

.gap-6 {
  gap: var(--sp-6);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-lg);
  font-weight: 600;
  font-size: var(--fs-base);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--cta);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--cta-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: white;
}

.btn-secondary {
  background: var(--coffee);
  color: white;
}

.btn-secondary:hover {
  background: var(--coffee-light);
  color: white;
}

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

.btn-outline:hover {
  background: var(--coffee);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
}

.btn-ghost:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.btn-lg {
  padding: var(--sp-4) var(--sp-8);
  font-size: var(--fs-lg);
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-body {
  padding: var(--sp-6);
}

.card-header {
  padding: var(--sp-6);
  padding-bottom: 0;
}

.card-footer {
  padding: var(--sp-6);
  padding-top: 0;
}

/* Product Cards */
.product-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--sage);
}

.product-image {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: white;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-content {
  padding: var(--sp-6);
}

.product-title {
  font-size: var(--fs-xl);
  font-weight: 600;
  margin-bottom: var(--sp-2);
}

.product-subtitle {
  color: var(--text-dim);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-4);
}

.product-rating {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.stars {
  display: flex;
  gap: var(--sp-1);
}

.star {
  width: 16px;
  height: 16px;
  color: var(--rating);
}

.rating-text {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  font-weight: 500;
}

.product-price {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--coffee);
  margin-bottom: var(--sp-4);
}

/* Navigation */
.navbar {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) 0;
}

.nav-brand {
  font-family: var(--font-serif);
  font-size: var(--fs-2xl);
  font-weight: 400;
  color: var(--coffee);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  list-style: none;
}

.nav-link {
  color: var(--text-dim);
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--coffee);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--surface) 0%, var(--sage-light) 100%);
  padding: var(--sp-24) 0;
  text-align: center;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: var(--fs-5xl);
  font-weight: 400;
  color: var(--text);
  margin-bottom: var(--sp-6);
  line-height: 1.1;
}

.hero-subtitle {
  font-size: var(--fs-xl);
  color: var(--text-dim);
  margin-bottom: var(--sp-8);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: var(--sp-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* Quick Pick Cards */
.quick-pick-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  transition: all 0.2s ease;
}

.quick-pick-card:hover {
  border-color: var(--coffee);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.quick-pick-card .rating-badge {
  display: inline-block;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-md);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quick-pick-card h4 {
  margin: var(--sp-2) 0;
  font-size: var(--fs-lg);
  font-weight: 600;
}

.quick-pick-card h4 a {
  color: var(--text);
  text-decoration: none;
}

.quick-pick-card h4 a:hover {
  color: var(--coffee);
}

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: var(--sp-8) 0;
}

.comparison-table th {
  background: var(--coffee);
  color: white;
  padding: var(--sp-3) var(--sp-2);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-align: left;
}

.comparison-table td {
  padding: var(--sp-3) var(--sp-2);
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-sm);
  vertical-align: middle;
}

.comparison-table tr:hover {
  background: var(--sage-light);
}

/* Table Badges */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: 700;
  font-size: var(--fs-xs);
  color: white;
}

.rank-1, .rank-2, .rank-3 { background: var(--coffee); }
.rank-4, .rank-5, .rank-6 { background: var(--sage); }
.rank-7, .rank-8, .rank-9, .rank-10 { background: var(--text-dim); }

.material-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: 500;
}

.material-badge.aluminum {
  background: #e5e7eb;
  color: #374151;
}

.material-badge.steel {
  background: #dbeafe;
  color: #1e40af;
}

.price-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: var(--fs-xs);
}

.price-badge.budget {
  background: #dcfce7;
  color: #166534;
}

.price-badge.mid {
  background: #fef3c7;
  color: #92400e;
}

.price-badge.premium {
  background: #fce7f3;
  color: #be185d;
}

.inductie-yes {
  color: #16a34a;
  font-weight: 600;
}

.inductie-no {
  color: #dc2626;
  font-weight: 600;
}

.rating-score {
  font-weight: 600;
  color: var(--coffee);
}

.btn-sm {
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--fs-xs);
  border-radius: var(--r-md);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

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

.btn-sm.btn-outline:hover {
  background: var(--coffee);
  color: white;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .comparison-table {
    font-size: var(--fs-xs);
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: var(--sp-2) var(--sp-1);
  }
  
  .quick-pick-card {
    margin-bottom: var(--sp-4);
  }
}

.comparison-table th {
  background: var(--surface-soft);
  padding: var(--sp-4);
  text-align: left;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--sage-light);
}

.comparison-table td {
  padding: var(--sp-4);
  border-bottom: 1px solid var(--sage-light);
  vertical-align: top;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:hover {
  background: var(--surface-soft);
}

/* Rating Badge */
.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--coffee);
  color: white;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-lg);
  font-size: var(--fs-sm);
  font-weight: 600;
}

/* Pros/Cons Lists */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
  margin: var(--sp-8) 0;
}

.pros,
.cons {
  background: var(--surface);
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.pros {
  border-left: 4px solid var(--success);
}

.cons {
  border-left: 4px solid var(--error);
}

.pros h4 {
  color: var(--success);
  margin-bottom: var(--sp-4);
}

.cons h4 {
  color: var(--error);
  margin-bottom: var(--sp-4);
}

.pros ul,
.cons ul {
  list-style: none;
  padding: 0;
}

.pros li,
.cons li {
  padding: var(--sp-2) 0;
  position: relative;
  padding-left: var(--sp-6);
}

.pros li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: bold;
}

.cons li::before {
  content: "✗";
  position: absolute;
  left: 0;
  color: var(--error);
  font-weight: bold;
}

/* FAQ Section */
.faq-item {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--sp-4);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: var(--sp-6);
  text-align: left;
  font-size: var(--fs-lg);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
}

.faq-question:hover {
  background: var(--surface-soft);
}

.faq-answer {
  padding: 0 var(--sp-6) var(--sp-6);
  color: var(--text-dim);
  line-height: 1.7;
}

/* Sticky CTA (Mobile) */
.sticky-cta {
  position: fixed;
  bottom: var(--sp-4);
  left: var(--sp-4);
  right: var(--sp-4);
  z-index: 50;
  display: none;
}

@media (max-width: 768px) {
  .sticky-cta {
    display: block;
  }
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

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

.breadcrumbs span {
  color: var(--text-light);
}

/* Table of Contents - SUPPRIMÉ (remplacé par .toc-sidebar optimisé) */

/* Footer */
.footer {
  background: var(--text);
  color: white;
  padding: var(--sp-16) 0 var(--sp-8);
  margin-top: var(--sp-24);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-8);
  margin-bottom: var(--sp-8);
}

.footer-section h4 {
  color: white;
  margin-bottom: var(--sp-4);
}

.footer-section a {
  color: #D1D5DB;
  font-size: var(--fs-sm);
  line-height: 2;
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: var(--sp-6);
  text-align: center;
  color: #9CA3AF;
  font-size: var(--fs-sm);
}

/* Responsive Design */
@media (max-width: 1024px) {
  :root {
    --fs-5xl: 2.5rem;
    --fs-4xl: 2rem;
    --sp-24: 4rem;
    --sp-20: 3rem;
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --fs-5xl: 2rem;
    --fs-4xl: 1.75rem;
    --fs-3xl: 1.5rem;
    --sp-24: 3rem;
    --sp-20: 2rem;
    --sp-16: 2rem;
    --sp-12: 1.5rem;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .pros-cons {
    grid-template-columns: 1fr;
  }
  
  .nav-menu {
    display: none;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }
  
  .comparison-table {
    font-size: var(--fs-sm);
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: var(--sp-2);
  }
}

/* Utilities */
.text-center {
  text-align: center;
}

.mb-4 {
  margin-bottom: var(--sp-4);
}

.mb-6 {
  margin-bottom: var(--sp-6);
}

.mb-8 {
  margin-bottom: var(--sp-8);
}

.mt-8 {
  margin-top: var(--sp-8);
}

.hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   AMÉLIORATIONS ESPACEMENT & RESPIRATION
   ======================================== */

/* Espacement amélioré pour les titres */
h1, h2, h3, h4, h5, h6 {
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-6);
}

/* Premier titre de section sans marge top */
.section h1:first-child,
.section h2:first-child,
.section h3:first-child,
.card-body h1:first-child,
.card-body h2:first-child,
.card-body h3:first-child {
  margin-top: 0;
}

/* Espacement amélioré pour les paragraphes */
p {
  margin-bottom: var(--sp-4);
  line-height: 1.7;
}

/* Derniers paragraphes sans marge bottom */
p:last-child {
  margin-bottom: 0;
}

/* Espacement amélioré pour les listes */
ul, ol {
  margin-bottom: var(--sp-4);
  padding-left: var(--sp-6);
}

li {
  margin-bottom: var(--sp-2);
  line-height: 1.6;
}

li:last-child {
  margin-bottom: 0;
}

/* Espacement amélioré pour les images */
img {
  margin: var(--sp-4) 0;
}

/* Images dans les cards avec plus d'espace */
.card-body img {
  margin: var(--sp-6) 0;
}

/* Images centrées avec plus d'espace */
.card-body.text-center img {
  margin: var(--sp-6) auto;
}

/* Espacement spécial pour les images de produits */
.product-image img,
.product-card img {
  margin: 0;
}

/* Espacement amélioré dans les grids */
.grid {
  gap: var(--sp-8);
}

/* Gap plus petit pour les grids compactes */
.grid.gap-4 {
  gap: var(--sp-4);
}

.grid.gap-6 {
  gap: var(--sp-6);
}

/* Espacement amélioré pour les cards */
.card {
  margin-bottom: var(--sp-8);
}

.card-body {
  padding: var(--sp-8);
}

/* Cards plus compactes */
.card.compact .card-body {
  padding: var(--sp-6);
}

/* Espacement amélioré pour les sections */
.section {
  padding: var(--sp-24) 0;
}

.section-sm {
  padding: var(--sp-16) 0;
}

/* Espacement amélioré pour les tableaux */
.comparison-table {
  margin: var(--sp-8) 0;
}

.comparison-table th,
.comparison-table td {
  padding: var(--sp-4) var(--sp-3);
}

/* Espacement amélioré pour les boutons */
.btn {
  margin-top: var(--sp-2);
  margin-bottom: var(--sp-2);
}

/* Groupes de boutons */
.btn + .btn {
  margin-left: var(--sp-3);
}

/* Espacement pour les éléments flex */
.flex.gap-4 {
  gap: var(--sp-4);
}

.flex.gap-6 {
  gap: var(--sp-6);
}

/* Espacement amélioré pour les breadcrumbs */
.breadcrumbs {
  margin-bottom: var(--sp-6);
}

/* Espacement pour les ratings */
.product-rating {
  margin: var(--sp-4) 0;
}

/* Espacement pour les prix */
.product-price {
  margin: var(--sp-3) 0 var(--sp-4) 0;
}

/* Espacement pour les FAQ */
.faq-item {
  margin-bottom: var(--sp-4);
}

.faq-answer {
  padding-top: var(--sp-4);
  margin-bottom: var(--sp-4);
}

/* Espacement pour les chips/badges */
.chip, .rating-badge {
  margin: var(--sp-1) var(--sp-2) var(--sp-1) 0;
}

/* Responsive - Réduire l'espacement sur mobile */
@media (max-width: 768px) {
  .section {
    padding: var(--sp-16) 0;
  }
  
  .section-sm {
    padding: var(--sp-12) 0;
  }
  
  .card-body {
    padding: var(--sp-6);
  }
  
  h1, h2, h3 {
    margin-top: var(--sp-6);
    margin-bottom: var(--sp-4);
  }
  
  .grid {
    gap: var(--sp-6);
  }
}
