:root {
  --primary-color: #1a1a1a;
  --secondary-color: #d64545;
  --accent-color: #e8a87c;
  --light-gray: #f5f5f5;
  --border-color: #e0e0e0;
  --text-color: #333;
  --astuce-color: #EDB32C;
  --equip-color: #15D083;
  --saviez-color: #4338E9;
  --recette-color: #ED4C83;
}

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

html {
  scroll-behavior: smooth;
}

strong {
  font-weight: 700;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: #fff;
}

/* ═══════════════════════════════════════
   HEADER
   ═══════════════════════════════════════ */
header {
  background-color: var(--white);
  border-bottom: 1px solid #f0f0f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.header-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo img {
  width: 320px;
  height: auto;
}

nav {
  background-color: var(--white);
  border-bottom: 1px solid #f0f0f0;
  width: 100%;
}

nav ul {
  max-width: 1200px;
  margin: 0 auto;
  list-style: none;
  display: flex;
  padding: 0 1.5rem;
  justify-content: center;
}

nav li {
  position: relative;
}

nav a {
  display: block;
  padding: 0.9rem 1.3rem;
  color: var(--dark-text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
}

nav a:hover {
  color: #c23d3d;
  border-bottom-color: #c23d3d;
}

.search-icon {
  width: 20px;
  height: 20px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.search-icon:hover {
  opacity: 0.7;
}

/* ═══════════════════════════════════════
   CONTAINER
   ═══════════════════════════════════════ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ═══════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════ */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ═══════════════════════════════════════
   ARTICLE HEADER / HERO
   ═══════════════════════════════════════ */
.article-hero {
  margin-bottom: 0;
  margin-top: 0;
}

.article-eyebrow {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background-color: var(--astuce-color);
  color: white;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.article-eyebrow.equip { background-color: var(--equip-color); }
.article-eyebrow.saviez { background-color: var(--saviez-color); }
.article-eyebrow.recette { background-color: var(--recette-color); }

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  line-height: 1.4;
  padding-bottom: 20px;
}

.breadcrumb a {
  color: var(--secondary-color);
  text-decoration: none;
  padding: 0 0.2rem;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  color: #999;
  margin: 0 -0.1rem;
}

.breadcrumb-current {
  padding: 0 0.2rem;
}

.breadcrumb-current {
  color: var(--text-color);
  font-weight: 500;
}

/* Article headline */
.article-headline {
  font-size: 2.2rem;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-weight: 700;
}

.article-meta-bar {
  font-size: 0.9rem;
  color: #666;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.sep {
  color: #ddd;
}

/* Cover image */
.article-cover-wrap {
  margin-bottom: 2rem;
}

.article-cover {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.article-cover-caption {
  font-size: 0.85rem;
  color: #999;
  font-style: italic;
}

/* ═══════════════════════════════════════
   ARTICLE BODY
   ═══════════════════════════════════════ */
.article-body {
  font-size: 1rem;
  line-height: 1.6;
}

.article-body p {
  margin-bottom: 1rem;
}

.article-body h2 {
  font-size: 1.8rem;
  margin-top: 0rem;
  margin-bottom: 0.5rem;
  color: #4EBABC;
  font-weight: 700;
  line-height: 1.25em;
}

.article-body h3 {
  font-size: 1.3rem;
  margin-top: 0.8rem;
  margin-bottom: 0.4rem;
  color: var(--primary-color);
  font-weight: 600;
}

.article-body h4 {
  margin-bottom: 10px;
}

.article-body a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.article-body a:hover {
  border-bottom-color: var(--secondary-color);
}

/* Key takeaways */
.key-takeaways {
  background-color: var(--light-gray);
  border-left: 4px solid var(--secondary-color);
  padding: 1.5rem 1.5rem .5rem 1.5rem;
  margin: 2rem 0;
  border-radius: 4px;
}

.key-takeaways p {
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--primary-color);
}

.key-takeaways ul {
  list-style: none;
  padding-left: 0;
}

.key-takeaways li {
  margin-bottom: 0.8rem;
  padding-left: 1.5rem;
  position: relative;
}

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

/* Callout */
.callout {
  background-color: #fff9f0;
  border-left: 4px solid var(--accent-color);
  padding: 1rem 1.5rem;
  margin: 1rem 0 2rem;
  border-radius: 4px;
  font-size: 0.95rem;
}

/* Citation capsule */
.citation-capsule {
  background-color: #f0f0f0;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 4px;
  border-left: 4px solid var(--accent-color);
  font-style: italic;
}

.citation-capsule a {
  font-style: normal;
}

/* Images in article */
.article-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem 0;
  border-radius: 6px;
}

/* Figures */
figure {
	margin: 0;
	background-color: #fff !important;
	padding: 0;
	border-radius: 6px;
}

figcaption {
  font-size: 0.85rem;
  color: #666;
  margin-top: 1rem;
  font-style: italic;
}

/* Lists */
.article-body ul,
.article-body ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.article-body li {
  margin-bottom: 0.6rem;
}

/* FAQ */
.faq {
  margin: 1rem 0;
  background-color: var(--light-gray);
  padding: 2rem;
  border-radius: 6px;
}

.faq h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: #4EBABC;
}

.faq dl {
  display: grid;
  gap: 1.5rem;
}

.faq dt {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.faq dd {
  margin-left: 0;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Sources */
.sources {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
}

.sources h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #4EBABC;
}

.sources ul {
  list-style: none;
  padding-left: 0;
}

.sources li {
  margin-bottom: 0.8rem;
  padding-left: 1.5rem;
  position: relative;
}

.sources li:before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  font-size: 1.2rem;
}

.sources a {
  color: var(--secondary-color);
  text-decoration: none;
}

.sources a:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════
   SHARE SECTION
   ═══════════════════════════════════════ */
.share-section {
  margin: 1.5rem 0 2.5rem;
  padding: 2rem;
  background-color: #f9f9f9;
  border-radius: 8px;
}

.share-grid-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.share-grid-group {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.share-grid-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0;
}

.share-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.share-grid-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  background-color: #f0f0f0;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  color: #333;
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.share-grid-btn svg {
  flex-shrink: 0;
}

.share-grid-btn span {
  display: block;
  line-height: 1.2;
}

.share-grid-btn:hover {
  background-color: #e0e0e0;
}

/* ═══════════════════════════════════════
   AUTHOR SECTION
   ═══════════════════════════════════════ */
.author-box {
  background-color: var(--light-gray);
  padding: 2rem;
  border-radius: 6px;
  margin: 3rem 0;
  border-left: 4px solid var(--secondary-color);
}

.author-header {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: #ddd;
  overflow: hidden;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
}

.author-info h3 {
  margin-top: 0;
  margin-bottom: 0.2rem;
}

.author-info p {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

.author-bio {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #666;
}

/* ═══════════════════════════════════════
   RELATED ARTICLES
   ═══════════════════════════════════════ */
.related-wrap {
  margin: 4rem 0 0rem;
  padding: 2rem;
  background-color: var(--light-gray);
  border-radius: 6px;
}

.related-inner {
  max-width: 900px;
  margin: 0 auto;
}

.related-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.related-title {
  margin: 0;
  font-size: 1.6rem;
  color: var(--primary-color);
}

.related-cat-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 500;
}

.related-cat-link:hover {
  text-decoration: underline;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

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

.related-item {
  background-color: white;
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.related-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.related-item-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  margin: 0;
}

.related-item-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.related-item-category {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  background-color: var(--astuce-color);
  color: white;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  width: fit-content;
}
.related-item-category.recettes    { background-color: #ED4C83; }
.related-item-category.equipements { background-color: #15D083; }
.related-item-category.saviez-vous { background-color: #4338E9; }
.related-item-category.astuces     { background-color: #EDB32C; }

.related-item-title {
  font-weight: 600;
  color: var(--primary-color);
  line-height: 1.4;
  margin-bottom: 0.5rem;
  flex: 1;
}

.related-item-meta {
  font-size: 0.8rem;
  color: #999;
}

/* ═══════════════════════════════════════
   TOC SIDEBAR
   ═══════════════════════════════════════ */
#toc-sidebar {
  display: none;
}

@media (min-width: 1200px) {
  #toc-sidebar {
    display: block;
    position: fixed;
    left: calc(50% - 670px);
    top: 250px;
    width: 180px;
    max-height: 60vh;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .toc-panel {
    background-color: var(--light-gray);
    padding: 1.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
  }

  .toc-panel-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
  }

  .toc-panel ol {
    list-style: none;
    padding: 0;
  }

  .toc-panel li {
    margin-bottom: 0.25rem;
  }

  .toc-panel a {
    color: var(--text-color);
    text-decoration: none;
    display: block;
    padding: 0.3rem 0;
    border-left: 3px solid transparent;
    padding-left: 0.5rem;
    transition: all 0.2s ease;
  }

  .toc-panel a:hover {
    color: var(--secondary-color);
    border-left-color: var(--secondary-color);
  }
}

/* ═══════════════════════════════════════
   SHARE SIDEBAR
   ═══════════════════════════════════════ */
#share-sidebar {
  display: none;
}

@media (min-width: 1200px) {
  #share-sidebar {
    display: block;
    position: fixed;
    left: calc(50% + 490px);
    top: 250px;
    width: 190px;
    background-color: var(--light-gray);
    padding: 0.8rem;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .share-sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
  }

  .share-sidebar-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.6px;
  }

  .share-ai-sep {
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
    margin: 0.2rem 0;
  }

  .share-ai-label {
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.6px;
  }

  .share-sidebar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }

  .share-sidebar-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.3s ease;
    padding: 0;
  }

  .share-sidebar-btn:hover {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
  }
}

/* ═══════════════════════════════════════
   BACK TO TOP BUTTON
   ═══════════════════════════════════════ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  background-color: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: #b83333;
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
footer {
  background-color: #1f1f1f;
  color: var(--white);
  padding: 2.5rem 0 1rem;
  margin-top: 4rem;
}

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

.footer-section h4 {
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

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

.footer-section li {
  margin-bottom: 0.6rem;
}

.footer-section a {
  color: #9a9a9a;
  transition: color 0.2s;
  font-size: 0.9rem;
}

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

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

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
  .header-main {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 1.5rem;
  }

  .logo img {
    width: 250px;
  }

  nav ul {
    flex-wrap: wrap;
    padding: 0 1rem;
  }

  nav a {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  main {
    padding: 1.5rem 2%;
  }

  .article-headline {
    font-size: 1.6rem;
  }

  .article-body h2 {
    font-size: 1.4rem;
    margin-top: 1.8rem;
  }

  .related-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .author-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .author-avatar {
    width: 100px;
    height: 100px;
  }

  .breadcrumb {
    font-size: 0.75rem;
  }

  .article-meta-bar {
    font-size: 0.8rem;
  }

  .share-buttons {
    gap: 0.5rem;
  }

  .share-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .header-main {
    padding: 1rem 1.5rem;
  }

  .logo img {
    width: 200px;
  }

  nav ul {
    flex-direction: column;
    padding: 0 1rem;
  }

  nav a {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  main {
    padding: 1rem 1.5rem;
  }

  .article-headline {
    font-size: 1.3rem;
  }

  .article-body h2 {
    font-size: 1.2rem;
  }

  .share-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }

  .share-btn {
    width: 100%;
    justify-content: center;
  }

  footer {
    padding: 2rem 2%;
  }

  .footer-content {
    gap: 1.5rem;
  }
}
