/* Yaztop : feuille commune. Valeurs = tokens de DESIGN-SYSTEM.md (section 3). */

:root {
  /* Marque */
  --jaune: #f1e517;
  --menthe: #56f4e1;
  --noir: #1f1f1f;
  --noir-pur: #000;

  /* Accent d'univers : les deux seules couleurs à surcharger */
  --accent-univers: var(--jaune);
  --sur-accent-univers: var(--noir);

  /* Surfaces */
  --fond: #fff;
  --fond-entete: #efefef;
  --fond-survol: #f8f5ef;
  --bordure: #ddd;
  --bordure-legere: #f2f2f2;

  /* Textes */
  --texte: #1f1f1f;
  --texte-courant: #444;
  --texte-secondaire: #555;
  --texte-discret: #666;
  --lien-nav: #2d3e50;

  /* Polices (pas de police externe : repli système) */
  --police-titre: "Roboto Slab", Georgia, "Times New Roman", serif;
  --police-texte: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --police-nav: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Arrondis */
  --rayon-image: 6px;
  --rayon-carte: 8px;
  --rayon-bloc: 12px;
  --rayon-pilule: 999px;

  /* Ombres */
  --ombre-faq: 0 2px 6px rgba(0, 0, 0, .03);
  --ombre-carte: 0 4px 10px rgba(0, 0, 0, .08);
  --ombre-recherche: 0 4px 10px rgba(0, 0, 0, .1);
  --ombre-bouton: 0 4px 10px rgba(0, 0, 0, .15);
  --ombre-menu: 0 4px 12px rgba(0, 0, 0, .15);

  /* Gabarit */
  --largeur-page: 960px;
  --marge-mobile: 16px;
  --marge-bureau: 24px;
  --espace-section: 32px;
}

/* ===== RESET MINIMAL ===== */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--police-texte);
  background: var(--fond);
  color: var(--texte);
  line-height: 1.5;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--noir); outline-offset: 2px; }

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 50;
  padding: 8px 12px;
  background: var(--noir);
  color: var(--fond);
  border-radius: var(--rayon-carte);
}
.skip-link:focus { top: 8px; }

/* ===== LAYOUT ===== */
.container { max-width: 98vw; margin: 0 auto; padding: 0 var(--marge-mobile); }

.page {
  display: block;
  max-width: var(--largeur-page);
  margin: 0 auto;
  padding: 10px var(--marge-mobile) 48px;
}

h1, h2, h3 { font-family: var(--police-titre); margin: 0 0 8px; color: var(--texte); }
p { margin: 0 0 12px; }

/* ===== EN-TÊTE ===== */
.site-header {
  padding: 12px var(--marge-mobile) 8px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--fond-entete);
}

.topbar { display: flex; align-items: center; gap: 12px; }

.logo { display: inline-flex; align-items: center; gap: 4px; }

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 3px solid var(--noir);
  border-radius: 50%;
  background: var(--fond);
  font-family: var(--police-titre);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.logo-label {
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--accent-univers);
  color: var(--sur-accent-univers);
  font-family: var(--police-titre);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.icon-button {
  background: none;
  border: none;
  padding: 6px;
  border-radius: var(--rayon-pilule);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-button:hover, .icon-button:active { background: rgba(0, 0, 0, .06); }

.icon { display: inline-flex; width: 20px; height: 20px; }

/* ===== RECHERCHE ===== */
.search-bar {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 0;
  background: var(--fond);
  padding: 12px var(--marge-mobile);
  box-shadow: var(--ombre-recherche);
  z-index: 30;
}
.search-bar.is-visible { display: block; }

.search-input {
  width: 100%;
  padding: 10px 16px;
  border: 2px solid var(--noir);
  border-radius: var(--rayon-pilule);
  font-size: 14px;
  font-family: var(--police-texte);
}

/* ===== NAVIGATION BUREAU ===== */
.main-nav { display: none; }

.main-nav > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 16px;
  font-size: 14px;
}
.main-nav > ul > li { position: relative; }

.main-nav a {
  font-family: var(--police-nav);
  font-weight: 700;
  color: var(--texte);
  padding: 4px 0;
  display: block;
}
.main-nav > ul > li > a:hover { text-decoration: underline; text-underline-offset: 4px; }

.has-submenu > a { display: inline-flex; align-items: center; gap: 4px; }
.has-submenu > a::after {
  content: "";
  width: 12px;
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%231F1F1F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s ease;
}
.has-submenu:hover > a::after, .has-submenu:focus-within > a::after { transform: rotate(180deg); }

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--fond);
  box-shadow: var(--ombre-menu);
  border-radius: var(--rayon-carte);
  padding: 8px 0;
  min-width: 200px;
  margin-top: 4px;
  list-style: none;
  z-index: 100;
}
/* Ouverture au survol et au clavier */
.has-submenu:hover .submenu, .has-submenu:focus-within .submenu { display: block; }

.has-submenu::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 8px;
}

.submenu a {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 400;
  color: var(--lien-nav);
  white-space: nowrap;
}
.submenu a:hover, .submenu a:focus-visible { background: var(--fond-survol); color: var(--texte); }

/* ===== MENU MOBILE ===== */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s ease;
  z-index: 40;
}
.menu-overlay.is-open { opacity: 1; visibility: visible; }

.menu-panel {
  position: absolute;
  inset: 0 0 0 auto;
  width: 100%;
  background: var(--fond);
  padding: var(--marge-mobile);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.menu-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.menu-title { font-family: var(--police-titre); font-size: 18px; margin: 0; }
.menu-close { background: none; border: none; font-size: 28px; line-height: 1; padding: 4px 10px; cursor: pointer; }

.menu-section-label {
  margin: 16px 0 8px;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--texte-discret);
}

.menu-link {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--bordure-legere);
}
.menu-link-children { padding-left: 10px; font-size: 13px; color: var(--texte-secondaire); }

/* ===== FIL D'ARIANE ===== */
.breadcrumb-wrapper {
  margin-top: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  scrollbar-width: none;
}
.breadcrumb-wrapper::-webkit-scrollbar { display: none; }

.breadcrumb {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
  color: var(--texte-discret);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb a { color: var(--lien-nav); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { opacity: .6; }
.breadcrumb-current { font-weight: 600; }

/* ===== SECTIONS ===== */
.category-intro { margin-bottom: 24px; }
.category-intro p, .section-block p { font-size: 14px; color: var(--texte-courant); }
.section-block { margin-bottom: var(--espace-section); }

.section-title-wrapper { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.section-title-wrapper h2 { margin: 0; }

/* ===== BADGES ===== */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--rayon-pilule);
  font-family: var(--police-texte);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.section-label.label-new { background: var(--accent-univers); color: var(--sur-accent-univers); }
.section-label.label-hot { background: var(--noir); color: var(--fond); }
.section-label.label-choice { background: var(--menthe); color: var(--noir); }
.section-label .label-icon { display: inline-flex; width: 12px; height: 12px; }

/* ===== BOUTONS ===== */
.btn-primary {
  background: var(--noir);
  color: var(--jaune);
  border: none;
  border-radius: var(--rayon-pilule);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background .15s ease, transform .1s ease, box-shadow .1s ease;
}
.btn-primary:hover { background: var(--noir-pur); box-shadow: var(--ombre-bouton); transform: translateY(-1px); }

.btn-secondary, .btn-grid {
  background: var(--noir);
  color: var(--menthe);
  border: 2px solid var(--menthe);
  border-radius: var(--rayon-pilule);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, color .15s ease;
}
.btn-secondary { padding: 8px 16px; font-size: 14px; font-weight: 500; }
.btn-grid { padding: 6px 12px; font-size: 13px; font-weight: 500; gap: 4px; }
.btn-secondary:hover, .btn-grid:hover { background: var(--menthe); color: var(--noir); }
.btn-grid .icon { width: 14px; height: 14px; }

/* ===== CARTES DÉFILANTES (TOP) ===== */
.cards-scroller {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 var(--marge-mobile) 12px;
  margin: 0 calc(-1 * var(--marge-mobile)) 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.product-card {
  background: var(--fond);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-carte);
  box-shadow: var(--ombre-carte);
  padding: 10px;
  width: 220px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-image-wrapper {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--fond);
  border-radius: var(--rayon-image);
  overflow: hidden;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-image-wrapper img { width: auto; height: 100%; object-fit: contain; transition: transform .3s ease; }
.product-image-wrapper:hover img { transform: scale(1.1); }

.product-title { font-size: 14px; margin-bottom: 4px; }
.product-title a:hover { text-decoration: underline; }
.product-excerpt { font-size: 13px; color: var(--texte-secondaire); margin-bottom: 8px; }
.product-card-footer { margin-top: auto; }

/* ===== GRILLE ===== */
.products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }

.grid-product-card {
  background: var(--fond);
  border-radius: var(--rayon-carte);
  box-shadow: var(--ombre-carte);
  padding: 10px;
  display: flex;
  flex-direction: column;
}
.grid-product-card .product-title { margin-bottom: 8px; flex: 1; }
.grid-product-card-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.product-category-label { font-size: 11px; color: var(--texte-discret); margin-bottom: 8px; font-style: italic; }

/* ===== CONSEILS ===== */
.selection-list { list-style: none; padding: 0; margin: 12px 0 0; font-size: 14px; }
.selection-list li { margin-bottom: 6px; }

/* ===== TABLEAU COMPARATIF ===== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px 0 20px; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--texte-courant); }
.table-wrap th, .table-wrap td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--bordure); }
.table-wrap th { background: var(--fond-entete); color: var(--texte); font-weight: 600; }

/* ===== BLOCS D'ACCROCHE ===== */
.highlight-block, .highlight-black {
  margin: 20px 0;
  border-radius: var(--rayon-bloc);
  padding: 16px;
  font-weight: 600;
  font-size: 14px;
}
.highlight-block { background: var(--accent-univers); color: var(--sur-accent-univers); }
.highlight-black { background: var(--noir-pur); color: var(--fond); }

/* ===== FAQ ===== */
.faq-list { margin: 16px 0 0; padding: 0; list-style: none; }

.faq-item {
  border-radius: var(--rayon-carte);
  background: var(--fond);
  margin-bottom: 8px;
  box-shadow: var(--ombre-faq);
  overflow: hidden;
}
.faq-heading { margin: 0; font-size: 14px; }

.faq-question {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: var(--police-titre);
  font-size: 14px;
  font-weight: 700;
}
.faq-icon { margin-left: 10px; font-size: 16px; line-height: 1; color: var(--texte-discret); transition: transform .2s ease; }
.faq-answer { padding: 0 12px 10px; font-size: 14px; color: var(--texte-courant); display: none; }
.faq-item.is-open .faq-answer { display: block; }
.faq-item.is-open .faq-icon { transform: rotate(90deg); }

/* ===== PIED DE PAGE ===== */
.site-footer {
  border-top: 1px solid rgba(0, 0, 0, .06);
  padding: 16px;
  background: var(--fond);
  font-size: 13px;
  color: var(--texte-discret);
}
.footer-inner {
  max-width: var(--largeur-page);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.footer-socials { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.footer-socials a:hover { text-decoration: underline; }
.footer-affiliation { max-width: var(--largeur-page); margin: 12px auto 0; font-size: 12px; }

.no-scroll { overflow: hidden; touch-action: none; }

/* ===== BANDEAU DE CONSENTEMENT ===== */
.consent-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  max-width: 720px;
  margin: 0 auto;
  background: var(--fond);
  border: 1px solid var(--noir);
  border-radius: var(--rayon-bloc);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  font-size: 14px;
}
.consent-banner[hidden] { display: none; }
.consent-inner { padding: 16px 20px; }
.consent-inner p { margin: 0 0 8px; }
.consent-inner a { text-decoration: underline; }
.consent-title { font-weight: 700; }
.consent-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* Refuser et Accepter ont le même poids visuel (recommandation CNIL) */
.consent-btn {
  min-width: 120px;
  border: 1px solid var(--noir);
  border-radius: var(--rayon-pilule);
  padding: 9px 16px;
  background: var(--noir);
  color: var(--fond);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.consent-btn:hover, .consent-btn:focus-visible { background: var(--fond); color: var(--noir); }

@media (max-width: 480px) {
  .consent-banner { left: 8px; right: 8px; bottom: 8px; font-size: 13px; }
  .consent-inner { padding: 12px 14px; }
  .consent-actions { margin-top: 8px; }
  .consent-actions .consent-btn { flex: 1; min-width: 0; }
}

/* ===== BUREAU ===== */
@media (min-width: 768px) {
  .page { padding: 10px var(--marge-bureau) 64px; }
  .site-header { padding: 12px 32px 10px; }
  .main-nav { display: block; margin-left: 24px; flex: 1; }
  .top-actions .menu-toggle { display: none; }
  .menu-overlay { display: none !important; }
  .search-bar { padding: 12px 32px; }

  .category-intro p, .section-block p { font-size: 15px; }
  .highlight-block { font-size: 15px; padding: 18px 20px; }
  .product-card { width: 240px; }
  .cards-scroller { margin: 0 calc(-1 * var(--marge-bureau)) 4px; padding: 0 var(--marge-bureau) 12px; }
  .products-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ===== MOUVEMENT RÉDUIT ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .product-image-wrapper:hover img { transform: none; }
}
