/* =========================================
   ENKI HELP CENTER — Base Stylesheet
   Breakpoints: 768px (tablet) | 1024px (desktop) | 1280px (wide)
   ========================================= */

/* --- Fonts LeroyMerlin --- */
@font-face {
  font-family: 'LeroyMerlinSans';
  src: url($assets-LeroyMerlinSans_Digital_Light-ttf) format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'LeroyMerlinSans';
  src: url($assets-LeroyMerlinSans_Digital_Light_Italic-ttf) format('truetype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'LeroyMerlinSans';
  src: url($assets-LeroyMerlinSans_Digital_Regular-ttf) format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'LeroyMerlinSans';
  src: url($assets-LeroyMerlinSans_Digital_Italic-ttf) format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'LeroyMerlinSans';
  src: url($assets-LeroyMerlinSans_Digital_SemiBold-ttf) format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'LeroyMerlinSans';
  src: url($assets-LeroyMerlinSans_Digital_SemiBold_Italic-ttf) format('truetype');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'LeroyMerlinSans';
  src: url($assets-LeroyMerlinSans_Digital_Bold-ttf) format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'LeroyMerlinSans';
  src: url($assets-LeroyMerlinSans_Digital_Bold_Italic-ttf) format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* --- Variables --- */
:root {
  --color-primary:            #188803;
  
  --color-background:         #F5E9E0;
  --color-background-hover:   #EAD4C4;
  --color-background-surface: #FFFFFF;

  --color-input-background:   var(--color-background);
  --color-input-border:       #EAD4C4;

  --color-text-primary:       #000000;
  --color-text-secondary:     #60544B;
  
  --color-border:             #EAD4C4;
  
  --color-white:              #FFFFFF;

  --font-base:         'LeroyMerlinSans', system-ui, -apple-system, sans-serif;
  --font-title-medium: 1.5rem;
  --font-body-large:   1.1rem;
  --font-body-medium:  1.0rem;
  --font-body-small:   0.9rem;

  --font-weight-light:     300;
  --font-weight-regular:   400;
  --font-weight-medium:    500;
  --font-weight-semibold:  600;
  --font-weight-bold:      700;
  --font-weight-extrabold: 800;

  --max-width:         1200px;
  --max-width-content:  992px;

  --radius-card:  24px;
  --radius-icon:  14px;
  --radius-pill:  50px;
  --radius-sm:    12px;

  --shadow-card: 0 1px 4px rgba(0,0,0,0.06);

  --gap: 1rem;
}

/* --- Dark theme --- */
[data-theme="dark"] {
  --color-primary:            #78BE20;

  --color-background:         #191919;
  --color-background-hover:   #4D4D4D;
  --color-background-surface: #333333;
  
  --color-border:             #4D4D4D;
  
  --color-input-background:   var(--color-background-hover);
  --color-input-border:       #666666;

  --color-text-primary:       #FFFFFF;
  --color-text-secondary:     #999999;

  --shadow-card:      0 1px 4px rgba(0,0,0,0.3);
}

/* ── Mode WebView ── */
.is-embed .header,
.is-embed .footer { display: none !important; }

/* --- Light reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; }
body { font-family: var(--font-base); color: var(--color-text-primary); background: var(--color-background); line-height: 1.6; font-size: var(--font-body-medium); }
a { color: var(--color-primary); text-decoration: none; transition: color 0.15s, border-color 0.15s; }
a:hover { color: var(--color-primary); text-decoration: none; }
ul { list-style: none; }
figure { margin: 0; }

/* =========================================
   LAYOUT
   ========================================= */
.container {
  width: 100%;
  padding: 0 1rem;
}

.list {
  box-shadow: none;
}

/* =========================================
   HEADER
   ========================================= */
.header {
  background: var(--color-background-surface);
  color: var(--color-text-primary);
  position: relative;
  top: 0;
  z-index: 100;
}

.header__inner {
  margin: 0;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-sizing: border-box;
  width: 100%;
}

.header__search {
  margin: 0;
  padding: 1.5rem 1rem;
  box-sizing: border-box;
  width: 100%;
}

.header__search .search {
  margin: 0;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.header__search .search input[type="search"] {
  border-radius: var(--radius-card);
  padding: 1.5rem 1.25rem 1.5rem 2.75rem;
  font-size: var(--font-body-medium);
  box-shadow: none;
  background: var(--color-input-background);
  color: var(--color-text-primary);
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.header__search .search input[type="search"]:focus {
  box-shadow: 0 0 0 3px var(--color-input-border);
  outline: none;
}

.header__search .search::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C8680' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}

.header__logo img { height: 30px; width: auto; }
[data-theme="dark"] .header__logo img { filter: brightness(0) invert(1); }

/* Nav */
.header__menus {
  display: none; /* hidden on mobile, opened via .is-nav-open */
  align-items: center;
  gap: 1rem;
}

.menu--list {
  display: none; /* hidden on mobile */
  flex-direction: column;
  gap: 0.25rem;
}

.menu--list .menu__item a {
  color: var(--color-text-primary);
  font-size: var(--font-body-small);
  white-space: nowrap;
}

.menu--list .menu__item a:hover {
  color: var(--color-primary);
}

.menu--icons { display: flex; align-items: center; gap: 0.5rem; }
.menu--icons svg { width: 18px; height: 18px; }

.header__site-link {
  font-size: var(--font-body-small);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
}
.header__site-link__text {
  transition: transform 0.2s;
}
.header__site-link__arrow {
  flex-shrink: 0;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 0.2s, transform 0.2s;
}
.header__site-link:hover {
  color: var(--color-primary);
  text-decoration: none;
}
.header__site-link:hover .header__site-link__text {
  transform: translateX(-3px);
}
.header__site-link:hover .header__site-link__arrow {
  opacity: 1;
  transform: translate(0, 0);
}

/* Bouton dark mode */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: transparent;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--color-primary);
}
/* Affiche lune en mode clair, soleil en mode sombre */
.theme-toggle__moon { display: block; }
.theme-toggle__sun  { display: none; }
[data-theme="dark"] .theme-toggle__moon { display: none; }
[data-theme="dark"] .theme-toggle__sun  { display: block; }
/* Force fill on toggle icons */
.theme-toggle svg path { fill: currentColor !important; stroke: none !important; }

/* Global transitions on theme change */
body, .header, .footer, .card, .list, .article-layout, .article-main, .article-sidebar {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* Inputs et selects en dark */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: var(--color-background-surface);
  color: var(--color-text-primary);
  border-color: var(--color-border);
}

/* Select chevron adapted for dark theme */
[data-theme="dark"] .request-form select,
[data-theme="dark"] .request-form .form-field select,
[data-theme="dark"] #new_request select,
[data-theme="dark"] #new_request .form-field select {
  background-color: var(--color-background-surface) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}
[data-theme="dark"] .request-form select:focus,
[data-theme="dark"] .request-form .form-field select:focus,
[data-theme="dark"] #new_request select:focus,
[data-theme="dark"] #new_request .form-field select:focus {
  box-shadow: 0 0 0 3px rgba(120, 190, 32, 0.2);
}

/* Language selector */
.header__locale {
  display: flex;
  align-items: center;
}

.locale-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.header__locale-icon {
  position: absolute;
  left: 0.65rem;
  pointer-events: none;
  color: var(--color-text-secondary);
  z-index: 1;
}

.header__locale select {
  appearance: none;
  background: transparent;
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  padding: 0.4rem 2rem 0.4rem 2.25rem;
  font-family: var(--font-base);
  font-size: var(--font-body-small);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  cursor: pointer;
  transition: border-color 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238C8680' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
}
.header__locale select:hover {
  border-color: var(--color-primary);
}
.header__locale select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(60,176,67,0.15);
}

/* Burger */
.menu-toggle {
  background: var(--color-background-surface);
  border: none;
  cursor: pointer;
  padding: 0.6rem;
  color: var(--color-text-primary);
  border-radius: var(--radius-pill);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-toggle svg { width: 18px; height: 18px; }
.menu-toggle__open  { display: block; }
.menu-toggle__close { display: none; }

/* Nav ouverte sur mobile */
.header.is-nav-open .header__menus {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-background-surface);
  border-top: 1px solid var(--color-border);
  padding: 1rem 1.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  z-index: 99;
}
.header.is-nav-open .menu--icons {
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
}
.header.is-nav-open .menu-toggle__open  { display: none; }
.header.is-nav-open .menu-toggle__close { display: block; }

/* =========================================
   COMPOSANTS
   ========================================= */

/* ── Bouton ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-base);
  font-size: var(--font-body-small);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: transparent;
}
.btn--primary:hover {
  background: color-mix(in srgb, var(--color-primary) 85%, #000);
  color: var(--color-white);
}

.btn--outline {
  background: transparent;
  color: var(--color-text-primary);
  border-color: var(--color-border);
  font-weight: var(--font-weight-medium);
}
.btn--outline:hover {
  border-color: var(--color-primary);
  color: var(--color-text-primary);
}

/* ── Champs texte ── */
.field-input,
.field-textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--color-input-background);
  color: var(--color-text-primary);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 0.7rem 1rem;
  font-family: var(--font-base);
  font-size: var(--font-body-small);
  appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field-input:focus,
.field-textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-input-border);
}
.field-textarea {
  min-height: 140px;
  resize: vertical;
}

/* =========================================
   MAIN CONTENT
   ========================================= */
.article {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.article-header {
  text-align: left;
}

.article-title {
  font-size: var(--font-title-medium);
  font-weight: var(--font-weight-extrabold);
  line-height: 1.2;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

.article-meta {
  font-size: var(--font-body-small);
  color: var(--color-text-secondary);
  margin-top: 0.4rem;
  font-weight: var(--font-weight-regular);
  display: block;
}

/* Section labels (categories, groups) */
.section-label,
h2.section-label {
  font-size: var(--font-body-small);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  text-transform: none;
  letter-spacing: 0.01em;
  margin: 1.5rem 0 0.5rem;
}

.article-body {
  font-size: var(--font-body-medium);
  line-height: 1.75;
  color: var(--color-text-primary);
}

h2 { font-size: 1.25rem; font-weight: var(--font-weight-bold); margin: 0; }
h3 { font-size: var(--font-body-large); font-weight: var(--font-weight-semibold); margin: 0; }
.article-body p  { margin-bottom: 0.5rem; }
.article-body ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 0.75rem; }
.article-body ol { list-style: decimal; padding-left: 2rem; margin-bottom: 0.75rem; }
.article-body li { margin-bottom: 0.25rem; }
.article-body img { border-radius: 0px; height: auto; max-width: 100%; }
.article-body iframe,
.article-body video {
  max-width: 100%;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-card);
  margin: 1rem 0;
  display: block;
}

/* =========================================
   DEVICE MOCKUP
   Usage:
     <div class="device-mockup device-mockup--ios">
       <div class="device-mockup__screen">
         <img src="..." alt="...">
       </div>
     </div>
   Replace --ios with --android for punch-hole style.
   ========================================= */
.device-mockup {
  position: relative;
  display: inline-block;
  border-radius: 44px;
  background: #1c1c1e;
  box-shadow:
    0 0 0 1.5px #3a3a3c,
    0 0 0 3px #1c1c1e,
    0 28px 56px rgba(0, 0, 0, 0.45);
  padding: 16px 12px;
  margin: 1.5rem auto;
}

/* Left side: volume buttons */
.device-mockup::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 96px;
  width: 4px;
  height: 32px;
  background: #3a3a3c;
  border-radius: 3px 0 0 3px;
  box-shadow: 0 46px 0 #3a3a3c, 0 90px 0 #3a3a3c;
}

/* Right side: power button */
.device-mockup::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 120px;
  width: 4px;
  height: 56px;
  background: #3a3a3c;
  border-radius: 0 3px 3px 0;
}

.device-mockup__screen {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  background: #000;
  min-width: 180px;
}

.device-mockup__screen img,
.device-mockup__screen video {
  display: block;
  width: 100%;
  height: auto;
}

/* iOS: Dynamic Island */
.device-mockup--ios .device-mockup__screen::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 28px;
  background: #1c1c1e;
  border-radius: 20px;
  z-index: 10;
}

/* iOS: home indicator */
.device-mockup--ios .device-mockup__screen::after {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 36%;
  height: 5px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 3px;
  z-index: 10;
}

/* Android: punch-hole camera */
.device-mockup--android .device-mockup__screen::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 11px;
  height: 11px;
  background: #1c1c1e;
  border-radius: 50%;
  z-index: 10;
}

/* =========================================
   SEARCH
   ========================================= */
.search { margin-bottom: 2rem; }

.search input[type="search"] {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--color-background-surface);
  font-size: var(--font-body-medium);
  color: var(--color-text-secondary);
  outline: none;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s;
}

.search input[type="search"]::placeholder { color: var(--color-text-secondary); }

/* ── Placeholder roller ─────────────────────────────────────── */
.search-placeholder-roller {
  position: absolute;
  top: 50%;
  left: 2.75rem;
  right: 1.25rem;
  transform: translateY(-50%);
  pointer-events: none;
  overflow: hidden;
  height: 1.5em;
  line-height: 1.5em;
  color: var(--color-text-secondary);
  font-size: var(--font-body-medium);
  user-select: none;
  z-index: 1;
}

.search-placeholder-roller__text {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateY(0);
  opacity: 1;
}

/* =========================================
   HOME PAGE
   ========================================= */
.home-grid {
  columns: 1;
  column-gap: 1rem;
}

.home-category {
  display: flex;
  flex-direction: column;
  break-inside: avoid;
  margin-bottom: 2rem;
}

.home-category > .block-label a {
  color: var(--color-text-secondary);
  font-size: var(--font-body-medium);
  font-weight: var(--font-weight-semibold);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.home-category > .block-label a:hover {
  color: var(--color-text-primary);
}

.home-category > .block-label a:hover .block-label__chevron {
  transform: translateX(2px);
}

@media (min-width: 768px) {
  .home-grid { columns: 2; }
}

/* =========================================
   LISTS (sections / articles)
   ========================================= */

/* List group — same style as the app's white blocks */
.list {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-card);
  overflow: hidden;
  gap: 2px;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--font-body-medium);
  font-weight: var(--font-weight-regular);
  padding: 1rem;
  color: var(--color-text-primary);
  border-radius: 4px;
  background: var(--color-background-surface);
  transition: background 0.15s;
}

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

.list-item:hover {
  background: var(--color-background-hover);
  cursor: pointer;
}

/* Icon in a rounded background — app style */
.list-item svg:not(.list-item__chevron) {
  flex-shrink: 0;
  background: var(--color-icon-surface);
  width: 20px;
  height: 20px;
  box-sizing: content-box;
}

/* Lien texte */
.list-item a {
  flex: 1;
  color: var(--color-text-primary);
  font-weight: var(--font-weight-regular);
}

/* Chevron → */
.list-item__chevron {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: var(--color-text-secondary);
  margin-left: auto;
  align-self: center;
  transition: transform 0.15s;
}

.list-item:hover .list-item__chevron {
  transform: translateX(2px);
}

/* Star icon */
.icon-star {
  color: var(--color-primary);
  flex-shrink: 0;
}

/* Folder icon */
.icon-folder {
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

/* Lock icon */
.icon-lock {
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

/* =========================================
   BREADCRUMBS
   ========================================= */
.breadcrumbs {
  font-size: var(--font-body-small);
  background: transparent;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumbs ol,
.breadcrumbs ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--color-text-primary);
  font-weight: var(--font-weight-regular);
}

.breadcrumbs li:last-child {
  color: var(--color-text-secondary);
}

.breadcrumbs li:last-child a {
  color: var(--color-text-secondary);
  pointer-events: none;
  cursor: default;
}

/* Separator › between items */
.breadcrumbs li + li::before,
.breadcrumbs span.separator {
  content: '›';
  color: var(--color-text-secondary);
  font-size: var(--font-body-medium);
  line-height: 1;
}

.breadcrumbs a {
  color: var(--color-text-primary);
  white-space: nowrap;
}

.breadcrumbs a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.breadcrumbs__separator {
  color: var(--color-text-secondary);
  font-size: var(--font-body-medium);
  line-height: 1;
}

/* The {{breadcrumbs}} helper generates a nested nav — reset to inline */
.breadcrumbs nav,
.breadcrumbs .breadcrumbs {
  display: contents;
}

/* =========================================
   NEW REQUEST PAGE — Generative Answers
   ========================================= */
.new-request-generative {
  margin-bottom: 2rem;
}

/* Main container for the generated answer */
.new-request-generative [data-garden-id="generative_answers.answer_bot_answer"],
.new-request-generative .answer-bot-container {
  background: var(--color-background-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.5rem;
  font-size: var(--font-body-medium);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-card);
}

/* Titre / label IA */
.new-request-generative [data-garden-id="generative_answers.answer_bot_answer"] h2,
.new-request-generative .answer-bot-title {
  font-size: var(--font-body-medium);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

/* Boutons de feedback (utile / pas utile) */
.new-request-generative [data-garden-id*="button"] {
  border-radius: var(--radius-pill);
  font-size: var(--font-body-small);
  font-weight: var(--font-weight-semibold);
  padding: 0.4rem 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  background: var(--color-background);
  border-top: 3px solid var(--color-border);
  color: var(--color-text-primary);
}

.footer-inner {
  margin: 0 auto;
  padding: 4rem 2rem;
}

/* Ligne principale : logo | nav1 | nav2 | sociaux */
.footer-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer__brand {
  flex-shrink: 0;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.footer__logo img {
  height: 30px;
  width: auto;
}
[data-theme="dark"] .footer__logo img { filter: brightness(0) invert(1); }

.footer__tagline {
  font-size: var(--font-body-small);
  color: var(--color-text-secondary);
}

/* Colonnes de nav */
.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  list-style: none;
}

.footer__nav a { font-size: 0.875rem; color: #5a5450; }
.footer__nav a:hover { color: var(--color-primary); }

/* Social networks */
.footer__social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  list-style: none;
}

.footer__social-item a {
  color: var(--color-background-hover);
  display: flex;
  align-items: center;
}

.footer__social-item a:hover { color: var(--color-text-dk); }

.footer__social-item svg {
  width: 15px;
  height: 15px;
}

/* Legal bar */
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid #ddd8d3;
  padding-top: 1.25rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
}

.footer-links li + li::before {
  content: '|';
  margin: 0 0.75rem;
  color: #c8c2bc;
}

.footer-links a {
  font-size: 0.8rem;
  color: #8c8480;
  text-decoration: none;
}

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

.footer__partner {
  margin: 0rem;
}

.footer__partner img {
  height: 22px;
  width: auto;
}

/* Surcharge globale : les liens dans le footer ne sont jamais verts */
.footer a { color: inherit; text-decoration: none; }

/* =========================================
   SCREEN READER ONLY
   ========================================= */
.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* =========================================
   SECTION PAGE
   ========================================= */
.section-page {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Category page — sections avec titre */
.category-section {
  display: flex;
  flex-direction: column;
}

.category-section .block-label a {
  color: var(--color-text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.block-label__chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.category-section .block-label a:hover .block-label__chevron {
  transform: translateX(2px);
}

.category-see-more a {
  color: var(--color-primary);
  font-size: var(--font-body-medium);
  font-weight: var(--font-weight-semibold);
}

/* =========================================
   ARTICLE PAGE — Layout 2 colonnes
   ========================================= */
.article-page {
  padding: 2rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Layout: main column + sidebar, stacked on mobile */
.article-layout {
  display: flex;
  flex-direction: column;
}

/* ── Colonne principale ── */
.article-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 0;
}

.article-divider {
  border: none;
  border-top: 3px solid var(--color-border);
}

.article-body {
  font-size: var(--font-body-medium);
  line-height: 1.8;
  color: var(--color-text-primary);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: var(--font-body-small);
  overflow: hidden;
}
.article-body th {
  background: var(--color-background);
  text-align: left;
  padding: 0.7rem 1rem;
  font-weight: var(--font-weight-semibold);
  border-bottom: 2px solid var(--color-border);
}
.article-body td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

/* Section label (Related / Need help) */
.block-label {
  font-size: var(--font-body-medium);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  margin-left: 1rem;
  margin-bottom: 0.25rem;
}

/* Attachments */
.attachment-size {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.list-item__download {
  flex-shrink: 0;
  color: var(--color-text-secondary);
  transition: color 0.15s, transform 0.15s;
}

.list-item:hover .list-item__download {
  color: var(--color-primary);
  transform: translateY(2px);
}

/* Bloc Besoin d'aide */
.article-need-help {
  background: var(--color-border);
  border-radius: var(--radius-card);
  padding: 2rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.article-need-help__title {
  font-size: var(--font-body-medium);
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-semibold);
}

.article-need-help__btn {
  /* Alias de .btn.btn--primary */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-base);
  font-size: var(--font-body-small);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  background: var(--color-primary);
  color: var(--color-white);
  transition: background 0.15s;
}

.article-need-help__btn:hover {
  background: color-mix(in srgb, var(--color-primary) 85%, #000);
  color: var(--color-white);
  text-decoration: none;
}

/* =========================================
   FORMULAIRE (new_request_page)
   ========================================= */
.request-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── Nesty (dropdown custom Zendesk) ─────────────────────────── */
.nesty {
  position: relative;
  width: 100%;
}

.nesty-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  background-color: var(--color-input-background);
  color: var(--color-text-primary);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 0.7rem 2.25rem 0.7rem 1rem;
  font-family: var(--font-base);
  font-size: var(--font-body-small);
  font-weight: var(--font-weight-regular);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  /* Chevron SVG custom */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238C8680' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  min-height: 44px;
}
.nesty-input::after {
  display: none;
}
.nesty-input:hover {
  border-color: var(--color-input-border);
  text-decoration: none;
}
.nesty-input:focus,
.nesty.is-open .nesty-input {
  outline: none;
  border-color: var(--color-input-border);
  box-shadow: 0 0 0 3px rgba(24, 136, 3, 0.15);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* Dark mode */
[data-theme="dark"] .nesty-input {
  background-color: var(--color-background-surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}
[data-theme="dark"] .nesty-input:focus,
[data-theme="dark"] .nesty.is-open .nesty-input {
  box-shadow: 0 0 0 3px rgba(120, 190, 32, 0.2);
}
[data-theme="dark"] .nesty-panel {
  background: var(--color-background-surface);
}

/* Chaque champ */
.request-form .form-field {
  gap: 0.5rem;
}

.request-form label {
  font-size: var(--font-body-small);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

/* Fields inherit from .field-input / .field-textarea */
.request-form input[type="text"],
.request-form input[type="email"] {
  width: 100%;
  box-sizing: border-box;
  background: var(--color-input-background);
  color: var(--color-text-primary);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 0.7rem 1rem;
  font-family: var(--font-base);
  font-size: var(--font-body-small);
  appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* Selects: custom chevron (inspired by the locale selector) */
.request-form select,
.request-form .form-field select,
#new_request select,
#new_request .form-field select {
  width: 100%;
  box-sizing: border-box;
  background-color: var(--color-input-background) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238C8680' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  color: var(--color-text-primary) !important;
  border: 1.5px solid var(--color-border) !important;
  border-radius: var(--radius-card) !important;
  padding: 0.7rem 2.25rem 0.7rem 1rem !important;
  font-family: var(--font-base) !important;
  font-size: var(--font-body-small) !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.request-form select:hover,
.request-form .form-field select:hover,
#new_request select:hover,
#new_request .form-field select:hover {
  border-color: var(--color-input-border) !important;
}

.request-form textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--color-input-background);
  color: var(--color-text-primary);
  border: 1.5px solid var(--color-input-border);
  border-radius: var(--radius-card);
  padding: 0.7rem 1rem;
  font-family: var(--font-base);
  font-size: var(--font-body-small);
  min-height: 140px;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.request-form input[type="text"]:focus,
.request-form input[type="email"]:focus,
.request-form textarea:focus,
.request-form select:focus,
.request-form .form-field select:focus,
#new_request select:focus,
#new_request .form-field select:focus {
  outline: none;
  border-color: var(--color-input-border) !important;
  box-shadow: 0 0 0 1.5px rgba(24, 136, 3, 0.15);
}

/* Submit button: inherits from .btn.btn--primary */
.request-form input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-base);
  font-size: var(--font-body-small);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  text-decoration: none;
  background: var(--color-primary);
  color: var(--color-white);
  transition: background 0.15s;
}
.request-form input[type="submit"]:hover {
  background: color-mix(in srgb, var(--color-primary) 85%, #000);
}

/* Pied du formulaire (bouton annuler) */
.request-form__footer {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Suggestion list (articles suggested while typing) */
.suggestion-list h2 { display: none; }
.suggestion-list ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
  border-radius: var(--radius-card); overflow: hidden; gap: 2px;
}
.suggestion-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--font-body-medium);
  font-weight: var(--font-weight-regular);
  padding: 1rem;
  color: var(--color-text-primary);
  background: var(--color-background-surface);
  transition: background 0.15s;
  border-radius: 4px;
}
.suggestion-list li:hover { background: var(--color-background-hover); cursor: pointer; }
.suggestion-list li::after {
  content: '';
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-left: auto;
  align-self: center;
  background-color: var(--color-text-secondary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.15s;
}
.suggestion-list li:hover::after { transform: translateX(2px); }
.suggestion-list a {
  flex: 1;
  color: var(--color-text-primary);
  font-weight: var(--font-weight-regular);
  text-decoration: none;
}
.suggestion-list a:hover { text-decoration: none; }

/* =========================================
   SEARCH RESULTS (search_results)
   ========================================= */
.search-results {
  display: flex;
  flex-direction: column;
}

.search-results__empty {
  font-size: var(--font-body-small);
  color: var(--color-text-secondary);
}
.search-results__empty a {
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
}

/* Result item — extension of .list-item */
.list-item.search-result {
  align-items: center;
  gap: 1rem;
  padding: 1rem 1rem 0.85rem;
}

.search-result__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.search-result__title-row a {
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  font-size: var(--font-body-medium);
}

.search-result__description {
  font-size: var(--font-body-small);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result__breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}
.search-result__breadcrumbs li + li::before {
  content: "›";
  margin-right: 0.25rem;
  color: var(--color-text-secondary);
}
.search-result__breadcrumbs a {
  color: var(--color-text-secondary);
  text-decoration: none;
}
.search-result__breadcrumbs a:hover {
  color: var(--color-primary);
}

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 2rem 0 0.5rem;
  flex-wrap: wrap;
}

.pagination ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pagination ul li a,
.pagination ul li span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 0.4rem;
  border-radius: var(--radius-sm);
  font-size: var(--font-body-small);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  background: var(--color-background-surface);
  border: 1px solid var(--color-border);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.pagination ul li a:hover {
  background: var(--color-background-hover);
}

.pagination ul li.pagination-current span {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  cursor: default;
  pointer-events: none;
}

/* Previous / Next buttons */
.pagination-prev-page,
.pagination-next-page {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-background-surface);
  text-decoration: none;
  font-size: 0; /* masque le texte Zendesk */
  color: transparent;
  transition: background 0.15s;
  flex-shrink: 0;
}

.pagination-prev-page:hover,
.pagination-next-page:hover {
  background: var(--color-background-hover);
}

/* Icône Material chevron_left */
.pagination-prev-page::before,
/* Icône Material chevron_right */
.pagination-next-page::before {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  background-color: var(--color-text-primary);
  flex-shrink: 0;
}

.pagination-prev-page::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6z'/%3E%3C/svg%3E") center / 20px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6z'/%3E%3C/svg%3E") center / 20px no-repeat;
}

.pagination-next-page::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6z'/%3E%3C/svg%3E") center / 20px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6z'/%3E%3C/svg%3E") center / 20px no-repeat;
}

/* Generative AI */
.search-generative:empty { display: none; }
[data-test-id="generative-answers-container"] { border-radius: var(--radius-card); overflow: hidden; }

/* ── Upload de fichier ───────────────────────────────────────── */
.request-form .form-field input[type="file"],
#new_request .form-field input[type="file"],
input[type="file"].upload-v2 {
  /* Overlay the entire dropzone — ensures click works on all browsers incl. Safari/iOS */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  margin: 0;
  padding: 0;
}

/* Zone drop / label visible */
.request-form .form-field .upload,
#new_request .form-field .upload,
.upload-dropzone {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  box-sizing: border-box;
  background-color: var(--color-input-background);
  border: 1.5px dashed var(--color-input-border);
  border-radius: var(--radius-card);
  padding: 0.85rem 1rem;
  font-family: var(--font-base);
  font-size: var(--font-body-small);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.request-form .form-field .upload:hover,
#new_request .form-field .upload:hover,
.upload-dropzone:hover {
  border: 1.5px dashed var(--color-input-border);
  color: var(--color-text-primary);
}

.request-form .form-field .upload:focus-within,
#new_request .form-field .upload:focus-within,
.upload-dropzone:focus-within {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(24, 136, 3, 0.15);
}

/* Drag-over state (class added by Zendesk JS) */
.request-form .form-field .upload.drag-over,
#new_request .form-field .upload.drag-over {
  border-color: var(--color-primary);
  background-color: var(--color-background-hover);
  box-shadow: 0 0 0 3px rgba(24, 136, 3, 0.15);
}

/* Inline upload SVG icon */
.upload::before,
.upload-dropzone::before {
  content: "";
  flex-shrink: 0;
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238C8680' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.7;
}

.upload-dropzone a {
  font-size: var(--font-body-small);
}

.upload-dropzone span {
  color: var(--color-text-primary);
}

/* Dark mode */
[data-theme="dark"] .request-form .form-field .upload,
[data-theme="dark"] #new_request .form-field .upload,
[data-theme="dark"] .upload-dropzone {
  background-color: var(--color-background-surface);
}
[data-theme="dark"] .request-form .form-field .upload:focus-within,
[data-theme="dark"] #new_request .form-field .upload:focus-within,
[data-theme="dark"] .upload-dropzone:focus-within {
  box-shadow: 0 0 0 3px rgba(120, 190, 32, 0.2);
}
[data-theme="dark"] .upload::before,
[data-theme="dark"] .upload-dropzone::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23999999' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E");
}

/* ── Listed attached files ──────────────────────────────────── */
.attachments { display: flex; flex-direction: column; gap: 0.5rem; }
.attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--color-background-surface);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  box-shadow: var(--shadow-card);
  font-size: var(--font-body-small);
}
.attachment-meta { display: flex; gap: 1rem; color: var(--color-text-secondary); font-size: 0.82rem; }

/* ── Sidebar ── */
.article-sidebar {
  display: none;
  flex-shrink: 0;
  flex-direction: column;
  gap: 1rem;
}

/* In the sidebar, the list reuses the standard style but without shadow (already in the card) */
.article-sidebar .list {
  box-shadow: none;
  border-radius: 0;
}

.toc-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--color-border);
}

.toc-item { list-style: none; }

.toc-link {
  display: block;
  font-size: var(--font-body-small);
  font-weight: var(--font-weight-regular);
  color: var(--color-text-secondary);
  padding: 0.5rem 0 0.5rem 1rem;
  margin-left: -2px;
  border-left: 2px solid transparent;
  text-decoration: none;
  line-height: 1.4;
}

.toc-item--h3 .toc-link {
  padding-left: 1.75rem;
  font-size: 0.85rem;
}

.toc-link:hover {
  color: var(--color-text-primary);
  text-decoration: none;
}

.toc-link--active {
  color: var(--color-text-primary);
  border-left-color: var(--color-text-primary);
}

/* ── Mobile TOC dropdown ── */
.toc-mobile {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.toc-mobile__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  font-size: var(--font-body-small);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.toc-mobile__toggle::-webkit-details-marker { display: none; }

.toc-mobile__chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.toc-mobile[open] .toc-mobile__chevron {
  transform: rotate(180deg);
}

.toc-mobile__nav {
  border-top: 1px solid var(--color-border);
  padding: 0.25rem 0;
  max-height: 60vh;
  overflow-y: auto;
}

.toc-mobile .toc-list { border-left: none; }

.toc-mobile .toc-link {
  padding-left: 1rem;
  border-left: none;
}

.toc-mobile .toc-link--active {
  font-weight: var(--font-weight-semibold);
  border-left: none;
}

/* =========================================
   BREAKPOINT — TABLET (≥ 768px)
   ========================================= */
@media (min-width: 768px) {

  .footer { display: block; }

  .header__search { padding: 1.5rem 2rem; }

  .header__inner { padding: 0.75rem 2rem; }

  .menu--list {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
  }

  .menu-toggle { display: none; }

  .header__menus { display: flex; }

  .article-page { padding: 2rem 2rem 4rem; }

  .article-title { font-size: 1.75rem; }

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

  .footer-main {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .footer__social {
    justify-content: flex-start;
  }

  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* =========================================
   BREAKPOINT — DESKTOP (≥ 1024px)
   ========================================= */
@media (min-width: 1024px) {

  .header__inner {
    max-width: var(--max-width-content);
    margin: 0 auto;
  }

  .header__search {
    max-width: var(--max-width-content);
    margin: 0 auto;
    padding: 1rem 2rem 2rem;
  }

  .container {
    max-width: var(--max-width);
    margin: 0 auto;
  }

  .article-page {
    max-width: var(--max-width-content);
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
  }

  .article-title { font-size: 2rem; }

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

  /* Article page — 2 colonnes */
  .article-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
  }

  .article-main {
    flex: 1;
    min-width: 0;
  }

  .article-sidebar {
    display: flex;
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 80px - 2rem);
    overflow-y: auto;
  }

  .toc-mobile { display: none; }

  .footer-inner {
    max-width: var(--max-width-content);
    padding: 4rem 2rem;
  }
}
