/* ============================================
   CaninÉdu - Blog d'Éducation Canine
   Design: Harmonie Naturelle (Biophilic)
   ============================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Nunito:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap');

/* ============================================
   CSS Variables - Harmonie Naturelle Palette
   ============================================ */
:root {
  /* Colors - Sage Green & Cream Palette */
  --primary: #8A9A5B;
  --primary-light: #A8B87D;
  --primary-dark: #6B7A47;
  --primary-bg: #F5F5DC;
  
  --secondary: #A0522D;
  --secondary-light: #C17A4A;
  --secondary-dark: #7A3A1F;
  
  --accent: #E0FFFF;
  --accent-dark: #7ECCC4;
  
  --background: #F9F8F5;
  --foreground: #3D3D3D;
  --text-muted: #7A7A7A;
  --border-color: #E8E6E1;
  
  /* Typography */
  --font-serif: 'Lora', serif;
  --font-sans: 'Nunito', sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  font-size: 16px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.25rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--text-muted);
}

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

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

/* ============================================
   Header & Navigation
   ============================================ */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(249, 248, 245, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: var(--spacing-md) 0;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  transition: opacity 0.3s ease;
}

.logo:hover {
  opacity: 0.8;
}

.logo-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

nav ul {
  display: flex;
  list-style: none;
  gap: var(--spacing-lg);
  align-items: center;
}

nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

nav a:hover,
nav a.active {
  color: var(--primary);
  font-weight: 600;
}

.subscribe-btn {
  background-color: var(--primary);
  color: white;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: 50px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

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

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

/* ============================================
   Container & Layout
   ============================================ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section {
  padding: var(--spacing-2xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.section-header h2 {
  margin-bottom: var(--spacing-md);
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  background-color: rgba(160, 82, 45, 0.05);
  padding: var(--spacing-2xl) 0;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-2xl);
  align-items: center;
}

.hero-text h1 {
  margin-bottom: var(--spacing-lg);
  font-size: 3.5rem;
}

.hero-text h1 .highlight {
  color: var(--primary);
}

.hero-text p {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-lg);
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.btn {
  padding: var(--spacing-md) var(--spacing-lg);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

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

.hero-image {
  position: relative;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 2rem;
  box-shadow: var(--shadow-xl);
  transform: rotate(2deg);
  transition: transform 0.3s ease;
}

.hero-image:hover img {
  transform: rotate(0deg);
}

.hero-decoration {
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
  filter: blur(40px);
}

.decoration-1 {
  width: 200px;
  height: 200px;
  background-color: var(--secondary);
  bottom: -50px;
  left: -50px;
}

.decoration-2 {
  width: 250px;
  height: 250px;
  background-color: var(--primary);
  top: -50px;
  right: -50px;
}

/* ============================================
   Categories Grid
   ============================================ */
.categories {
  background-color: var(--background);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
}

.category-card {
  background-color: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.category-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.category-content {
  padding: var(--spacing-lg);
}

.category-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  font-size: 1.5rem;
}

.icon-heart {
  background-color: rgba(138, 154, 91, 0.1);
  color: var(--primary);
}

.icon-brain {
  background-color: rgba(160, 82, 45, 0.1);
  color: var(--secondary);
}

.icon-sparkles {
  background-color: rgba(224, 255, 255, 0.5);
  color: var(--accent-dark);
}

.icon-bone {
  background-color: rgba(255, 200, 124, 0.2);
  color: #CC8844;
}

.category-card h3 {
  margin-bottom: var(--spacing-sm);
  color: var(--foreground);
}

.category-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ============================================
   Featured Article Section
   ============================================ */
.featured {
  background-color: rgba(160, 82, 45, 0.05);
}

.featured-card {
  background-color: white;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 300px;
}

.featured-content {
  padding: var(--spacing-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-badge {
  display: inline-block;
  background-color: rgba(138, 154, 91, 0.1);
  color: var(--primary);
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--spacing-md);
  width: fit-content;
}

.featured-content h2 {
  margin-bottom: var(--spacing-md);
}

.featured-content p {
  margin-bottom: var(--spacing-lg);
  font-size: 1.05rem;
}

/* ============================================
   Newsletter Section
   ============================================ */
.newsletter {
  background-color: var(--primary);
  color: white;
  position: relative;
  overflow: hidden;
}

.newsletter-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.newsletter h2 {
  color: white;
  margin-bottom: var(--spacing-md);
}

.newsletter p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--spacing-lg);
  font-size: 1.1rem;
}

.newsletter-form {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  justify-content: center;
  max-width: 400px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  min-width: 200px;
  padding: var(--spacing-md);
  border: none;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 1rem;
}

.newsletter-form button {
  padding: var(--spacing-md) var(--spacing-lg);
  background-color: var(--secondary);
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.newsletter-form button:hover {
  background-color: var(--secondary-dark);
}

.newsletter-pattern {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.1;
  pointer-events: none;
}

/* ============================================
   Footer
   ============================================ */
footer {
  background-color: var(--background);
  border-top: 1px solid var(--border-color);
  padding: var(--spacing-2xl) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-2xl);
}

.footer-section h3 {
  margin-bottom: var(--spacing-md);
  font-size: 1.1rem;
}

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

.footer-section ul li {
  margin-bottom: var(--spacing-sm);
}

.footer-section a {
  color: var(--text-muted);
  transition: color 0.3s ease;
}

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

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: var(--spacing-lg);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================
   Page Sections (Chiot, Comportement, etc.)
   ============================================ */
.page-header {
  background-color: rgba(160, 82, 45, 0.05);
  padding: var(--spacing-2xl) 0;
  margin-bottom: var(--spacing-2xl);
}

.page-header h1 {
  margin-bottom: var(--spacing-md);
}

.page-header p {
  max-width: 600px;
  font-size: 1.1rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--spacing-2xl);
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2xl);
}

.article-card {
  background-color: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.article-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.article-body {
  padding: var(--spacing-2xl);
}

.article-meta {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  background-color: rgba(138, 154, 91, 0.1);
  color: var(--primary);
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
}

.article-body h2 {
  margin-top: var(--spacing-lg);
}

.article-body ul {
  margin-left: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.article-body li {
  margin-bottom: var(--spacing-sm);
  display: flex;
  gap: var(--spacing-sm);
  align-items: flex-start;
}

.article-body li::before {
  content: "✓";
  color: var(--primary);
  font-weight: bold;
  flex-shrink: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.sidebar-card {
  background-color: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
}

.sidebar-card.highlight {
  background-color: var(--primary);
  color: white;
}

.sidebar-card.highlight h3 {
  color: white;
}

.sidebar-card.highlight p {
  color: rgba(255, 255, 255, 0.9);
}

.sidebar-card h3 {
  margin-bottom: var(--spacing-md);
}

.article-preview {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.article-preview:hover {
  opacity: 0.8;
}

.article-preview-image {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
}

.article-preview-text h4 {
  margin-bottom: var(--spacing-xs);
  font-size: 0.95rem;
}

.article-preview-text .time {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================
   Tricks & Games Section
   ============================================ */
.tricks-grid {
  display: grid;
  gap: var(--spacing-2xl);
}

.trick-card {
  background-color: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.trick-card:nth-child(even) {
  grid-template-columns: 1fr 1fr;
}

.trick-card:nth-child(even) .trick-image {
  order: 2;
}

.trick-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 300px;
}

.trick-content {
  padding: var(--spacing-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.trick-meta {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
}

.difficulty-badge {
  background-color: rgba(138, 154, 91, 0.1);
  color: var(--primary);
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
}

.trick-content h2 {
  margin-bottom: var(--spacing-md);
}

.trick-steps {
  list-style: none;
  counter-reset: step-counter;
}

.trick-steps li {
  counter-increment: step-counter;
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-lg);
  position: relative;
}

.trick-steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  background-color: var(--primary);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ============================================
   Comparison Cards (Récompense vs Punition)
   ============================================ */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
}

.comparison-card {
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  border: 2px solid;
}

.comparison-card.positive {
  background-color: rgba(138, 154, 91, 0.05);
  border-color: var(--primary);
}

.comparison-card.negative {
  background-color: rgba(200, 50, 50, 0.05);
  border-color: #C83232;
}

.comparison-card h3 {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.comparison-card.positive h3 {
  color: var(--primary);
}

.comparison-card.negative h3 {
  color: #C83232;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
  .header-container {
    padding: 0 var(--spacing-md);
  }

  nav ul {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  nav.mobile-open ul {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-lg);
    gap: var(--spacing-md);
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-text h1 {
    font-size: 2.25rem;
  }

  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .featured-card {
    grid-template-columns: 1fr;
  }

  .featured-image {
    height: 250px;
  }

  .featured-content {
    padding: var(--spacing-lg);
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .trick-card {
    grid-template-columns: 1fr;
  }

  .trick-card:nth-child(even) .trick-image {
    order: 0;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input,
  .newsletter-form button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-md);
  }

  .section {
    padding: var(--spacing-lg) 0;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero-text h1 {
    font-size: 1.75rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .article-preview {
    flex-direction: column;
  }

  .article-preview-image {
    width: 100%;
    height: 150px;
  }
}
