/* Homepage : corrections de mise en page + carrousel blog */

/* Hero : titre + texte à gauche, globe en fond à droite */
#home #home-header { margin-top: 24px; }
#home .home-claim { width: 100%; min-width: 0; padding: 48px 0 64px 0; min-height: 420px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
#home .home-claim h1 { font-size: 2.4em; line-height: 1.15; }
#home .home-claim p { font-size: 1.05em; max-width: 560px; }
#home .home-claim .btn-square-header { display: inline-block; }

/* Sections */
#home .home-section { margin-top: 48px; }
#home #home-second { margin-top: 40px; }

/* Grilles produits homogènes (le thème prévoit une 3e colonne plus large et une dernière carte horizontale) */
#home .home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 1200px) {
  #home .home-grid .card-product:last-child { flex-direction: column; max-height: none; padding: 18px 18px 22px 18px; }
  #home .home-grid .card-product:last-child .card-product-img { order: 0; width: auto; }
  #home .home-grid .card-product:last-child .card-product-info { margin: 0; display: flex; flex-direction: column; flex: 1; }
  #home .home-grid .card-product:last-child .card-product-container-price { text-align: right; align-items: flex-end; }
}
@media (min-width: 576px) {
  #home .home-grid .card-product .card-product-img { height: 140px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
  #home .home-grid .card-product .card-product-img img { max-height: 100%; max-width: 100%; object-fit: contain; }
}
@media (max-width: 991.98px) {
  #home .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  #home .home-grid { grid-template-columns: minmax(0, 1fr); }
  #home .home-claim { padding: 20px 0 62% 0; min-height: 0; align-items: center; }
  #home .home-claim h1 { font-size: 1.8em; }
  #home .home-claim p { margin-left: auto; margin-right: auto; }
  #home .home-section, #home #home-header { padding-left: 16px; padding-right: 16px; }
}

/* Carrousel blog */
.blog-carousel { position: relative; margin-top: 8px; }
.blog-carousel-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3); gap: 24px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 8px 2px 16px 2px; scrollbar-width: none;
}
.blog-carousel-track::-webkit-scrollbar { display: none; }
.blog-card {
  scroll-snap-align: start; display: flex; flex-direction: column; overflow: hidden;
  background: #ffffff; border-radius: 15px; box-shadow: 1px 3px 15px 2px rgba(100,100,100,0.1);
  color: #2f4858; text-decoration: none;
}
.blog-card:hover { text-decoration: none; color: #2f4858; box-shadow: 1px 3px 18px 4px rgba(100,100,100,0.18); }
.blog-card-img { aspect-ratio: 3 / 2; background: #f2f4fa; overflow: hidden; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px 18px; }
.blog-card-date { font-size: 0.8em; color: #83869a; margin-bottom: 6px; }
.blog-card-title { font-weight: 600; line-height: 1.35; flex: 1; margin-bottom: 14px; }
.blog-card .card-article-read { align-self: flex-start; }
.blog-carousel-btn {
  position: absolute; top: 38%; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: #2f4858; color: #ffffff; font-size: 26px; line-height: 40px; padding: 0; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.blog-carousel-btn.prev { left: -20px; }
.blog-carousel-btn.next { right: -20px; }
@media (max-width: 991.98px) {
  .blog-carousel-track { grid-auto-columns: calc((100% - 24px) / 2); }
}
@media (max-width: 575.98px) {
  .blog-carousel-track { grid-auto-columns: 85%; gap: 16px; }
  .blog-carousel-btn { display: none; }
}

/* ── Refonte 2026-10 : hero recherche ─────────────────────────────────── */
#home .home-hero { margin-top: 28px; padding: 40px 0 36px 0; background-size: 230px auto; background-position: 100% 50%; text-align: left; }
#home .home-hero-inner { max-width: 760px; }
#home .home-hero h1 { font-size: 2.2em; line-height: 1.15; margin-bottom: 20px; }
.home-search { display: flex; align-items: center; background: #fff; border: 2px solid #2f4858; border-radius: 14px; padding: 6px 6px 6px 16px; box-shadow: 0 4px 18px rgba(47,72,88,0.12); }
.home-search i { color: #83869a; margin-right: 10px; }
.home-search input { flex: 1; min-width: 0; border: 0; outline: none; font-size: 1.15em; padding: 10px 0; background: transparent; }
.home-search button { flex-shrink: 0; border: 0; margin: 0; padding: 12px 22px; border-radius: 10px; cursor: pointer; }
.home-suggestions { list-style: none; padding: 0; margin: 14px 0 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.home-suggestions a { display: inline-block; background: #f2f4fa; border: 1px solid #e3e6f0; border-radius: 18px; padding: 5px 13px; font-size: 0.88em; color: #2f4858; text-decoration: none; }
.home-suggestions a:hover { background: #2f4858; color: #fff; }
.home-hero-cta { display: inline-block; margin-top: 18px; font-weight: 600; color: #2f4858; text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── En-têtes de section ─────────────────────────────────────────────── */
.home-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.home-section-intro { color: #5b6275; margin: 4px 0 18px 0; }
#home .home-section h2 { margin-bottom: 0; }

/* ── Promos ──────────────────────────────────────────────────────────── */
.promo-filter { display: inline-flex; border: 1px solid #d6dbe8; border-radius: 10px; overflow: hidden; }
.promo-filter button { border: 0; background: #fff; padding: 8px 14px; font-size: 0.88em; color: #2f4858; cursor: pointer; }
.promo-filter button.is-active { background: #2f4858; color: #fff; }
.promo-discount { position: absolute; top: 0; right: 0; z-index: 2; background: #d9412b; color: #fff; font-weight: 700; font-size: 0.9em; padding: 4px 8px; border-radius: 8px; }
.promo-card .card-product-container-price { text-align: right; }
.promo-old-price { display: block; text-decoration: line-through; color: #83869a; font-size: 0.9em; }
.promo-merchant { display: block; font-size: 0.8em; color: #5b6275; }

/* ── Accès par catégorie ─────────────────────────────────────────────── */
.home-cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.home-cat-tile { position: relative; display: block; border-radius: 15px; overflow: hidden; background: #fff; box-shadow: 1px 3px 15px 2px rgba(100,100,100,0.1); text-decoration: none; }
.home-cat-tile:hover { text-decoration: none; box-shadow: 1px 3px 18px 4px rgba(100,100,100,0.18); }
.home-cat-photo { display: block; aspect-ratio: 4 / 3; background-size: cover; background-position: center; background-color: #f2f4fa; }
.home-cat-photo.is-product { background-size: contain; background-repeat: no-repeat; background-origin: content-box; padding: 18px; background-color: #fff; }
.home-cat-label { display: block; padding: 12px 14px; font-family: Barlow, sans-serif; font-weight: 600; font-size: 1.05em; color: #2f4858; }
.home-cat-label i { color: #62b346; margin-right: 6px; }

/* ── Champions bas carbone ───────────────────────────────────────────── */
.champion-label { font-size: 0.78em; font-weight: 700; text-transform: uppercase; color: #1e8f4e; margin-bottom: 4px; }
#home .champions-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ── Score Carbone en bref ───────────────────────────────────────────── */
.home-score { display: flex; align-items: center; gap: 40px; background: #f2f4fa; border-radius: 18px; padding: 32px; }
.home-score-scale { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.home-score-scale span { display: flex; align-items: center; justify-content: flex-end; color: #fff; font-weight: 700; font-size: 1.3em; height: 36px; padding-right: 12px; border-radius: 0 8px 8px 0; }
.home-score-scale .carbon-A { width: 90px; background: #1e8f4e; }
.home-score-scale .carbon-B { width: 115px; background: #62b346; }
.home-score-scale .carbon-C { width: 140px; background: #e6b800; color: #2f4858; }
.home-score-scale .carbon-D { width: 165px; background: #ef8a2b; }
.home-score-scale .carbon-E { width: 190px; background: #d9412b; }
.home-score-text ul { padding-left: 18px; margin: 12px 0 14px 0; }
.home-score-text li { margin-bottom: 6px; }

/* ── Fondateurs et réseaux ───────────────────────────────────────────── */
.home-founders { margin-top: 10px; }
.home-social { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.home-social span { font-weight: 600; }
.home-social a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: #2f4858; font-size: 17px; text-decoration: none; }
.home-social a:hover { background: #f7d939; }

@media (max-width: 991.98px) {
  .home-cat-grid, #home .champions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #home .home-hero { background-size: 150px auto; background-position: 100% 0; }
}
@media (max-width: 575.98px) {
  #home .home-hero { padding: 20px 16px 24px 16px; background-image: none; text-align: left; }
  #home .home-hero h1 { font-size: 1.55em; }
  .home-search { padding: 4px 4px 4px 12px; }
  .home-search input { font-size: 1em; }
  .home-search button { padding: 10px 12px; font-size: 0.9em; }
  .home-suggestions { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .home-suggestions li { flex: 0 0 auto; }
  .home-cat-grid { gap: 10px; }
  #home .champions-grid { grid-template-columns: minmax(0, 1fr); }
  .home-score { flex-direction: column; align-items: flex-start; gap: 18px; padding: 20px; }
  .home-score-scale { flex-direction: row; }
  .home-score-scale span { width: auto !important; flex: 1; justify-content: center; padding: 0 10px; border-radius: 6px; }
}

#home #home-score { margin-bottom: 110px; }
.home-cat-photo:not([style]) { display: flex; align-items: center; justify-content: center; }
.home-cat-photo.is-icon { display: flex; align-items: center; justify-content: center; font-size: 56px; color: #62b346; background: #f2f4fa; }
@media (max-width: 575.98px) {
  /* promos et champions : carrousel horizontal au lieu d'une longue colonne */
  #home .promo-grid, #home .champions-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  #home .promo-grid .card-product, #home .champions-grid .card-product { scroll-snap-align: start; }
  .promo-discount { top: 30px; right: auto; left: 0; }
}

/* ── Concept ─────────────────────────────────────────────────────────── */
#home .home-concept { margin-top: 8px; }
.home-concept-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.home-concept-item { display: flex; gap: 12px; align-items: flex-start; background: #fff; border-radius: 14px; padding: 16px; box-shadow: 1px 3px 15px 2px rgba(100,100,100,0.08); }
.home-concept-item strong { color: #2f4858; display: block; margin-bottom: 4px; }
.home-concept-item p { margin: 0; font-size: 0.88em; color: #5b6275; }
.home-concept-icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: #e8f5ec; color: #1e8f4e; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.home-concept-free { margin: 14px 0 0 0; font-size: 0.85em; color: #5b6275; }
.home-score-method { background: #fff; border-radius: 12px; padding: 12px 14px; margin: 4px 0 14px 0; font-size: 0.92em; }
.home-score-method p { margin: 4px 0 0 0; }
@media (max-width: 991.98px) { .home-concept-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .home-concept-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; } .home-concept-item { padding: 12px; } }
