/* pages.css — styles des pages générées au build (catalogue, rayons,
   fiches produits, pages de destination). Complète style.css et réutilise
   ses variables de thème. */

/* ---- Grille et cartes produits (auparavant en <style> inline) ---- */

.page-header {
  padding-top: 120px;
  padding-bottom: 32px;
  text-align: center;
}
.page-header p {
  max-width: 68ch;
  margin: 12px auto 0;
  color: var(--color-text);
  opacity: .85;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
  padding-bottom: 56px;
}

.product-card {
  background: #fff;
  border-radius: var(--radius-card);
  padding: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  display: block;
  color: inherit;
  transition: transform .3s, box-shadow .3s;
}
.product-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-soft); }
.product-card:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 3px; }

.product-img {
  height: 180px;
  width: 100%;
  object-fit: contain;
  margin: 34px 0 18px;
  filter: drop-shadow(0 5px 15px rgba(0,0,0,.1));
}
.product-info h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.25;
  margin: 0;
  color: #1a1a2e;
  text-wrap: balance;
}
.product-price { font-weight: 700; color: var(--color-primary); font-size: 1.1rem; margin-top: 8px; }

.product-category {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--color-primary);
  color: #1a1a2e;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  z-index: 2;
}

/* ---- Recherche ---- */

.search-bar { max-width: 500px; margin: 0 auto 28px; position: relative; }
.search-bar input {
  width: 100%;
  padding: 14px 20px 14px 50px;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-family: var(--font-body);
  background: #fff;
  color: #333;
  outline: none;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  transition: box-shadow .3s;
}
.search-bar input::placeholder { color: #aaa; }
.search-bar input:focus { box-shadow: 0 0 0 3px var(--color-primary); }
.search-bar svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #aaa;
  pointer-events: none;
}
.no-result { text-align: center; padding: 30px 0 60px; font-size: 1.1rem; }

/* ---- Fil d'Ariane ---- */

.breadcrumb { padding-top: 110px; font-size: .86rem; }
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  color: var(--color-text);
  opacity: .7;
}
.breadcrumb li + li::before { content: "›"; margin-right: 6px; opacity: .6; }
.breadcrumb a { text-decoration: underline; text-underline-offset: 2px; }
.breadcrumb [aria-current] { opacity: .8; }
.breadcrumb + .page-header { padding-top: 24px; }

/* ---- Blocs de texte ---- */

.prose {
  max-width: 68ch;
  margin: 0 auto;
  padding-bottom: 48px;
  color: var(--color-text);
}
.prose--landing { padding-top: 24px; }
.prose h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.05;
  margin: 0 0 16px;
  text-wrap: balance;
}
.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  line-height: 1.15;
  margin: 40px 0 12px;
  text-wrap: balance;
}
.prose p { margin: 0 0 16px; line-height: 1.75; }
.prose .lede { font-size: 1.12rem; opacity: .92; }
.prose a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 3px; }
.prose img.cover {
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: var(--radius-card);
  margin: 24px 0 8px;
  object-fit: contain;
  background: rgba(127,127,127,.08);
}

.link-list { padding-left: 20px; margin: 0 0 20px; }
.link-list li { margin-bottom: 7px; line-height: 1.6; }
.link-list--dense { columns: 2; column-gap: 32px; }
.link-list--dense li { break-inside: avoid; font-size: .92rem; }

/* ---- Liens de filtre ---- */

.filter-links { text-align: center; margin: 0 0 32px; opacity: .85; font-size: .94rem; }
.filter-links a { text-decoration: underline; text-underline-offset: 3px; }

.center-cta { text-align: center; padding-bottom: 48px; }

/* ---- FAQ ---- */

.faq { max-width: 68ch; margin: 0 auto 56px; }
.faq h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  margin: 0 0 16px;
}
.faq details {
  border-top: 1px solid rgba(127,127,127,.3);
  padding: 14px 0;
}
.faq details:last-of-type { border-bottom: 1px solid rgba(127,127,127,.3); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-display); font-size: 1.3rem; opacity: .6; }
.faq details[open] summary::after { content: "–"; }
.faq summary:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
.faq details p { margin: 10px 0 0; line-height: 1.7; opacity: .9; }

/* ---- Fiche produit ---- */

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 48px;
  align-items: start;
  padding: 28px 0 48px;
}
.product-detail__media {
  background: #fff;
  border-radius: var(--radius-card);
  padding: 28px;
  text-align: center;
}
.product-detail__media img {
  width: 100%;
  height: auto;
  max-width: 420px;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.12));
}
.product-detail__info h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.05;
  margin: 6px 0 16px;
  text-wrap: balance;
}
.kicker {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 0;
}
.product-detail__info .lede { line-height: 1.75; margin: 0 0 24px; }

.specs { margin: 0 0 24px; padding: 0; }
.specs > div {
  display: flex;
  gap: 14px;
  padding: 9px 0;
  border-top: 1px solid rgba(127,127,127,.25);
}
.specs > div:last-child { border-bottom: 1px solid rgba(127,127,127,.25); }
.specs dt { flex: 0 0 120px; font-weight: 600; opacity: .7; margin: 0; }
.specs dd { margin: 0; }
.specs a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 3px; }

.product-cta { line-height: 1.7; }
.product-cta .btn { margin-top: 14px; }

/* ---- Accueil ---- */

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  opacity: .75;
  margin: 0 0 14px;
  letter-spacing: .01em;
}
.hero-links { margin-top: 22px; }

/* ---- Utilitaire ---- */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---- Thème clair ---- */

[data-theme="light"] .product-card { background: #fff; }
[data-theme="light"] .product-detail__media { background: #fff; }
[data-theme="light"] .product-info h3 { color: var(--color-dark); }

/* ---- Responsive ---- */

@media (max-width: 860px) {
  .product-detail { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .product-card { padding: 14px; }
  .product-img { height: 130px; margin: 26px 0 12px; }
  .product-info h3 { font-size: .98rem; }
  .link-list--dense { columns: 1; }
  .specs dt { flex-basis: 96px; }
  .breadcrumb { padding-top: 96px; }
  .page-header { padding-top: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  .product-card { transition: none; }
  .product-card:hover { transform: none; }
}

/* ---- Réinitialisations liées au passage de <div> à <button> ---- */

.hamburger {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  color: inherit;
  cursor: pointer;
}
.hamburger:focus-visible,
.theme-toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Le bouton de thème doit rester neutre hors de son style d'origine. */
.theme-toggle { background: none; border: 0; }
