/*
 * APC Homepage Test — CSS dediee
 * Tout est scope dans .apc-homepage-test pour ne pas conflicter avec Shoptimizer.
 * Charte : Bleu Onde, Sable Doux, Corail Pelage, Anthracite (cf charte-graphique.md)
 */

/* Empeche le scroll horizontal cause par les full-bleed sur cette page uniquement */
body.page-template-apc-homepage-test { overflow-x: hidden; }

.apc-homepage-test {
  --apc-bleu-onde: #2B7FB8;
  --apc-bleu-nuit: #1A5478;
  --apc-bleu-clair: #EAF3FA;
  --apc-sable: #F4ECDD;
  --apc-corail: #E89373;
  --apc-jaune: #E0A946;
  --apc-blanc-casse: #FBFAF7;
  --apc-anthracite: #1F2A37;
  --apc-gris-doux: #5B6573;

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--apc-anthracite);
  line-height: 1.6;
  width: 100%;
}
.apc-homepage-test * { box-sizing: border-box; }
.apc-homepage-test img { display: block; max-width: 100%; height: auto; }
.apc-homepage-test a { text-decoration: none; color: inherit; }

/* Full-bleed : chaque section prend toute la largeur du viewport,
   meme si elle est dans un container parent contraint */
.apc-homepage-test > section {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* HERO */
.apc-hero {
  background: var(--apc-bleu-clair);
  padding: 4rem 2rem 5rem;
}
.apc-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.apc-hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
  color: var(--apc-anthracite);
}
.apc-hero h1 .apc-accent {
  background: var(--apc-jaune);
  padding: 0 0.4rem;
  border-radius: 4px;
}
.apc-hero p {
  font-size: 1.1rem;
  color: var(--apc-gris-doux);
  margin: 0 0 2rem;
  max-width: 480px;
}
.apc-cta-primary {
  display: inline-block;
  background: var(--apc-bleu-onde);
  color: #fff !important;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s;
}
.apc-cta-primary:hover { background: var(--apc-bleu-nuit); color: #fff; }
.apc-hero-img img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(26, 84, 120, 0.18);
}

/* FILTRES */
.apc-filters {
  background: #fff;
  padding: 2.5rem 2rem;
  border-bottom: 1px solid #eee;
}
.apc-section-inner { max-width: 1280px; margin: 0 auto; }
.apc-filters-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--apc-gris-doux);
  margin: 0 0 1.25rem;
  font-weight: 600;
}
.apc-filters-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.apc-filter-card {
  background: var(--apc-blanc-casse);
  border: 1px solid #e5e5e5;
  padding: 1.25rem;
  border-radius: 12px;
  text-align: center;
  transition: all 0.2s;
  display: block;
}
.apc-filter-card:hover {
  border-color: var(--apc-bleu-onde);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(43, 127, 184, 0.1);
}
.apc-filter-card svg {
  width: 32px;
  height: 32px;
  stroke: var(--apc-bleu-nuit);
  margin: 0 auto 0.6rem;
  display: block;
}
.apc-filter-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
  color: var(--apc-anthracite);
}
.apc-filter-card p {
  font-size: 0.8rem;
  color: var(--apc-gris-doux);
  margin: 0;
}

/* PRODUITS */
.apc-products { padding: 4rem 2rem; background: #fff; }
.apc-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2.5rem;
}
.apc-section-head h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--apc-anthracite);
}
.apc-section-head a {
  color: var(--apc-bleu-onde);
  font-weight: 600;
  font-size: 0.95rem;
}
.apc-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.apc-product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
  transition: all 0.2s;
  display: block;
  color: inherit;
}
.apc-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--apc-bleu-onde);
}
.apc-product-img-wrap {
  aspect-ratio: 1;
  background: var(--apc-bleu-clair);
  overflow: hidden;
  position: relative;
}
.apc-product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.apc-product-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: var(--apc-corail);
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  z-index: 1;
}
.apc-product-body { padding: 1rem; }
.apc-product-cat {
  font-size: 0.75rem;
  color: var(--apc-gris-doux);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}
.apc-product-body h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
  line-height: 1.3;
  min-height: 2.5rem;
  color: var(--apc-anthracite);
}
.apc-product-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--apc-bleu-nuit);
}
.apc-product-price .screen-reader-text,
.apc-homepage-test .screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}
.apc-product-price del { opacity: 0.55; margin-right: 0.35rem; font-weight: 500; }
.apc-product-price ins { text-decoration: none; }

/* BANDEAU BLEU */
.apc-bigblue {
  background: var(--apc-bleu-onde);
  color: #fff;
  padding: 5rem 2rem;
}
.apc-bigblue-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 4rem;
  align-items: center;
}
.apc-bigblue h2 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  line-height: 1.1;
  color: #fff;
}
.apc-bigblue p {
  font-size: 1.05rem;
  opacity: 0.95;
  margin: 0 0 2rem;
  color: #fff;
}
.apc-cta-yellow {
  display: inline-block;
  background: var(--apc-jaune);
  color: var(--apc-anthracite) !important;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 700;
  transition: filter 0.2s;
}
.apc-cta-yellow:hover { filter: brightness(0.95); color: var(--apc-anthracite); }
.apc-bigblue-img img {
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  width: 100%;
}

/* EXPERTS */
.apc-experts {
  padding: 5rem 2rem;
  background: var(--apc-sable);
}
.apc-experts-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}
.apc-experts-img img { border-radius: 16px; width: 100%; }
.apc-experts-text h2 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  line-height: 1.15;
  color: var(--apc-anthracite);
}
.apc-experts-text p {
  color: var(--apc-gris-doux);
  font-size: 1.05rem;
  margin: 0 0 1rem;
}

/* RESPONSIVE */
@media (max-width: 980px) {
  .apc-hero-inner,
  .apc-bigblue-inner,
  .apc-experts-inner { grid-template-columns: 1fr; }
  .apc-hero h1 { font-size: 2.5rem; }
  .apc-filters-grid { grid-template-columns: 1fr 1fr; }
  .apc-products-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .apc-hero { padding: 3rem 1rem; }
  .apc-hero h1 { font-size: 2rem; }
  .apc-products-grid { grid-template-columns: 1fr 1fr; }
  .apc-bigblue,
  .apc-experts { padding: 3rem 1rem; }
}
