/* ==========================================
   Résines CBD — L'Encyclopédie
   Professional Encyclopedia Design
   ========================================== */

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

:root {
  --green-dark: #1a3a2a;
  --green-medium: #2d5a3f;
  --green-light: #3d7a55;
  --brown-warm: #8B6914;
  --brown-light: #a67c00;
  --cream: #f5f1e8;
  --cream-dark: #e8e0d0;
  --white: #ffffff;
  --text-dark: #1a1a1a;
  --text-medium: #4a4a4a;
  --text-light: #6a6a6a;
  --border: #d4cfc4;
  --shadow: rgba(26, 58, 42, 0.1);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --transition: 0.3s ease;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green-medium); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brown-warm); }

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

/* ==========================================
   Typography
   ========================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--green-dark);
}

h1 { font-size: 2.2rem; margin-bottom: 1rem; }
h2 { font-size: 1.6rem; margin: 2rem 0 0.8rem; border-bottom: 2px solid var(--brown-warm); padding-bottom: 0.4rem; }
h3 { font-size: 1.25rem; margin: 1.5rem 0 0.6rem; color: var(--green-medium); }
p { margin-bottom: 1rem; }
ul, ol { margin: 0.5rem 0 1rem 1.5rem; }
li { margin-bottom: 0.3rem; }

/* ==========================================
   Layout
   ========================================== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.content-wrapper { display: grid; grid-template-columns: 1fr; gap: 2rem; padding: 2rem 0; }

@media (min-width: 768px) {
  .content-wrapper { grid-template-columns: 1fr 300px; }
}

.main-content { min-width: 0; }

/* ==========================================
   Header & Navigation
   ========================================== */
.site-header {
  background: var(--green-dark);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px var(--shadow);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo span { color: var(--brown-warm); }

/* Navigation */
.main-nav { display: none; }

.main-nav.active { display: flex; }

@media (min-width: 768px) {
  .main-nav {
    display: flex !important;
    align-items: center;
    gap: 0;
  }
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}

@media (min-width: 768px) {
  .nav-toggle { display: none; }
}

/* Mobile nav */
@media (max-width: 767px) {
  .main-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--green-dark);
    flex-direction: column;
    padding: 1rem;
    border-top: 1px solid var(--green-medium);
  }
}

.nav-item { position: relative; }

.nav-link {
  color: rgba(255,255,255,0.9);
  padding: 0.7rem 1rem;
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover { color: var(--brown-warm); }

/* Dropdown */
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 240px;
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  padding: 0.5rem 0;
  z-index: 100;
}

@media (max-width: 767px) {
  .nav-dropdown {
    position: static;
    box-shadow: none;
    background: rgba(255,255,255,0.05);
    border-radius: 0;
  }
  .nav-dropdown a { color: rgba(255,255,255,0.8) !important; padding-left: 2rem !important; }
}

.nav-item:hover .nav-dropdown { display: block; }

.nav-dropdown a {
  display: block;
  padding: 0.5rem 1.2rem;
  color: var(--text-dark);
  font-size: 0.85rem;
  transition: var(--transition);
}

.nav-dropdown a:hover { background: var(--cream); color: var(--brown-warm); }

/* ==========================================
   Breadcrumbs
   ========================================== */
.breadcrumbs {
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--text-light);
}

.breadcrumbs a { color: var(--green-medium); }
.breadcrumbs a:hover { color: var(--brown-warm); }
.breadcrumbs span { margin: 0 0.4rem; }

/* ==========================================
   Hero Section
   ========================================== */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-medium) 100%);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  color: var(--white);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
}

@media (max-width: 767px) {
  .hero { padding: 2.5rem 0; }
  .hero h1 { font-size: 1.8rem; }
}

/* ==========================================
   Cards
   ========================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 12px var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(26, 58, 42, 0.15);
}

.card-image {
  height: 200px;
  background: linear-gradient(135deg, var(--green-dark), var(--green-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.3);
  font-size: 3rem;
  overflow: hidden;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.card:hover .card-image img {
  transform: scale(1.05);
}
.card-emoji {
  font-size: 3rem;
}

.card-body { padding: 1.2rem; }

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 0.4rem;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.6rem;
}

.card-excerpt {
  font-size: 0.9rem;
  color: var(--text-medium);
  line-height: 1.5;
}

.card-tag {
  display: inline-block;
  background: var(--cream);
  color: var(--green-medium);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 0.3rem;
  margin-bottom: 0.3rem;
}

/* ==========================================
   Section Headings
   ========================================== */
.section {
  padding: 3rem 0;
}

.section-title {
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--green-dark);
  border: none;
  padding: 0;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.section--alt { background: var(--white); }

/* ==========================================
   Resin Detail Page
   ========================================== */
.resin-header {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-medium) 100%);
  color: var(--white);
  padding: 3rem 0;
}

.resin-header h1 { color: var(--white); }

.resin-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.info-table th,
.info-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.info-table th {
  width: 35%;
  font-weight: 600;
  color: var(--green-dark);
  background: var(--cream);
}

.info-table td { color: var(--text-medium); }

/* ==========================================
   Sidebar
   ========================================== */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }

.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 2px 12px var(--shadow);
}

.sidebar-widget h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--brown-warm);
}

.sidebar-list { list-style: none; margin: 0; padding: 0; }

.sidebar-list li {
  margin-bottom: 0;
  border-bottom: 1px solid var(--cream-dark);
}

.sidebar-list li:last-child { border-bottom: none; }

.sidebar-list a {
  display: block;
  padding: 0.6rem 0;
  font-size: 0.9rem;
  color: var(--text-medium);
}

.sidebar-list a:hover { color: var(--brown-warm); }

/* ==========================================
   Article Content
   ========================================== */
.article-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 2px 12px var(--shadow);
}

.article-content h2 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
}

.article-content h2:first-child { margin-top: 0; }

.article-content h3 { font-size: 1.15rem; }

.article-content ul, .article-content ol { margin: 0.8rem 0 1.2rem 1.5rem; }

.article-content strong { color: var(--green-dark); }

/* ==========================================
   Fun Facts
   ========================================== */
.fun-facts {
  background: var(--cream);
  border-left: 4px solid var(--brown-warm);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
}

.fun-facts h3 { color: var(--brown-warm); margin-top: 0; }
.fun-facts ul { margin-bottom: 0; }

/* ==========================================
   Method Steps
   ========================================== */
.steps-list {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.steps-list li {
  counter-increment: step;
  padding: 0.8rem 0 0.8rem 3rem;
  position: relative;
  border-bottom: 1px solid var(--cream-dark);
}

.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  width: 2rem;
  height: 2rem;
  background: var(--green-dark);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

/* ==========================================
   Pros & Cons
   ========================================== */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 1.5rem 0; }

@media (max-width: 600px) { .pros-cons { grid-template-columns: 1fr; } }

.pros, .cons {
  padding: 1.2rem;
  border-radius: var(--radius);
}

.pros { background: #f0f7f0; border-left: 4px solid var(--green-medium); }
.cons { background: #fdf5f0; border-left: 4px solid #c0392b; }

.pros h4 { color: var(--green-medium); margin-bottom: 0.6rem; }
.cons h4 { color: #c0392b; margin-bottom: 0.6rem; }
.pros ul, .cons ul { margin: 0; padding-left: 1.2rem; }

/* ==========================================
   Footer
   ========================================== */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.8);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

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

.footer-col h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--brown-warm);
}

.footer-col p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
}

.footer-col ul { list-style: none; padding: 0; margin: 0; }

.footer-col li { margin-bottom: 0.4rem; }

.footer-col a {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  transition: var(--transition);
}

.footer-col a:hover { color: var(--brown-warm); }

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

/* ==========================================
   Utility Classes
   ========================================== */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

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

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

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

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

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 767px) {
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.3rem; }
  .article-content { padding: 1.2rem; }
  .container { padding: 0 1rem; }
  .card-grid { grid-template-columns: 1fr; }
  .section { padding: 2rem 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* Resin hero card */
.resin-hero {
  padding: 2rem 0 1rem;
}
.resin-card-main {
  background: linear-gradient(135deg, #1a3a2a 0%, #0f2a1a 100%);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 480px 1fr;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}
.resin-card-img {
  position: relative;
  overflow: hidden;
}
.resin-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  min-height: 450px;
  background: #0a1a10;
}
.resin-card-origin-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}
.resin-card-body {
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.resin-card-body h1 {
  font-size: 2.4rem;
  color: #fff;
  margin: 0 0 0.4rem;
  font-family: Georgia, 'Times New Roman', serif;
}
.resin-tagline {
  color: #a8b5a0;
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Stats grid */
.resin-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}
.resin-stat {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255,255,255,0.06);
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
}
.resin-stat-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}
.resin-stat-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8a9a82;
}
.resin-stat-value {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #e8e0d0;
}
.resin-stat-link {
  color: #D4A855 !important;
  text-decoration: none;
}
.resin-stat-link:hover {
  text-decoration: underline;
}

/* Characteristics */
.resin-characteristics {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.resin-char {
  background: rgba(139,105,20,0.1);
  border-left: 3px solid #8B6914;
  padding: 0.7rem 1rem;
  border-radius: 0 10px 10px 0;
}
.resin-char-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #D4A855;
  margin-bottom: 0.25rem;
}
.resin-char p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #c8c0b0;
}

/* Fun facts */
.fun-facts {
  background: linear-gradient(135deg, #f5f1e8 0%, #ebe5d8 100%);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin-top: 1.5rem;
  border-left: 4px solid #8B6914;
}
.fun-facts h3 {
  margin-top: 0;
  color: #1a3a2a;
}
.fun-facts ul {
  margin: 0;
  padding-left: 1.2rem;
}
.fun-facts li {
  margin-bottom: 0.4rem;
  color: #3a3a2a;
}

/* Responsive */
@media (max-width: 900px) {
  .resin-card-main {
    grid-template-columns: 1fr;
  }
  .resin-card-img img {
    min-height: 280px;
    max-height: 350px;
  }
  .resin-card-body {
    padding: 1.5rem;
  }
  .resin-card-body h1 {
    font-size: 1.8rem;
  }
  .resin-stats-grid {
    grid-template-columns: 1fr;
  }
}
