/**
 * Accueil — macarteimprimee.com
 * Styles dédiés (header / bandeau menu : header.css, inchangés)
 */

.home-page main {
  padding-top: 0;
  padding-bottom: 0;
}

.home-page {
  background: var(--bg);
}

/* ========== HERO ========== */
/* Pattern standard : container--home centré, grille 2 colonnes ≥960px (DESIGN.md) */
.home-hero {
  position: relative;
  background: var(--card);
  border-bottom: 1px solid var(--b);
}

.home-hero--story {
  overflow: hidden;
}

.home-hero__viewport {
  position: relative;
  overflow: hidden;
  transition: height 360ms cubic-bezier(0.4, 0, 0.2, 1);
}

.home-hero__track {
  display: flex;
  flex-direction: column;
  transition: transform 720ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.home-hero.is-input-locked {
  touch-action: none;
}

.home-hero__panel {
  box-sizing: border-box;
}

.home-hero--story .home-hero__panel {
  flex: 0 0 auto;
}

.home-hero__shell {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
  padding-top: clamp(1rem, 3vw, 2rem);
  padding-bottom: clamp(1rem, 3vw, 2rem);
  box-sizing: border-box;
}

@media (min-width: 60rem) {
  .home-hero__shell {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(1rem, 2.5vw, 2.5rem);
    align-items: center;
    padding-top: clamp(0.75rem, 2vw, 1.5rem);
    padding-bottom: clamp(0.75rem, 2vw, 1.5rem);
  }
}

/* Grands écrans : la colonne de contenu utilise plus de largeur (aligne hero + strip + body) */
@media (min-width: 1536px) {
  .container--home {
    max-width: min(1440px, 100vw - 4rem);
  }
}

.home-hero__copy {
  min-width: 0;
  max-width: 38rem;
}

.home-hero__eyebrow {
  margin: 0 0 var(--space-md);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--a);
}

.home-hero__title {
  margin: 0 0 var(--space-md);
  font-family: var(--font-heading);
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--p);
  text-wrap: balance;
}

.home-hero__lead {
  margin: 0 0 var(--space-lg);
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.1875rem);
  line-height: 1.65;
  color: var(--m);
  max-width: 34rem;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  margin-bottom: var(--space-sm);
}

.home-hero__actions .btn-secondary.btn--lg {
  background: transparent;
  color: var(--a);
  border: 2px solid var(--a);
  box-shadow: none;
}

.home-hero__actions .btn-secondary.btn--lg:hover {
  background: var(--al);
  color: var(--a);
}

.home-hero__note {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.5;
}

/* Visuel : toute la colonne droite, sans carte, sans rognage */
.home-hero__art {
  position: relative;
  align-self: center;
  justify-self: stretch;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.home-hero__art > picture,
.home-hero__gallery-slide picture {
  display: block;
  width: 100%;
  height: auto;
}

.home-hero__img,
.home-hero__art img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center center;
}

.home-hero__art > .home-hero__gallery-viewport {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.home-hero__gallery-viewport {
  display: flex;
  overflow: hidden;
}

.home-hero__gallery-track {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.home-hero__gallery-slide {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.home-hero__gallery-slide .home-hero__img {
  max-height: 100%;
}

/* Storytelling : indicateur + hint */
.home-hero__progress {
  position: absolute;
  z-index: 2;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 10px 6px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--b);
  pointer-events: none;
  backdrop-filter: blur(6px);
}

@media (max-width: 59.9375rem) {
  .home-hero__progress {
    left: 50%;
    right: auto;
    bottom: var(--space-sm);
    top: auto;
    transform: translateX(-50%);
    flex-direction: row;
  }

  .home-hero__progress-dot--active {
    width: 22px;
    height: 6px;
  }
}

@media (min-width: 60rem) {
  .home-hero__progress {
    right: max(var(--space-md), env(safe-area-inset-right, 0px));
    top: 50%;
    transform: translateY(-50%);
    flex-direction: column;
  }

  .home-hero__progress-dot--active {
    height: 22px;
    width: 6px;
  }
}

.home-hero__progress-dot {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: var(--r-pill);
  background: rgba(17, 24, 39, 0.2);
  transition:
    width 320ms cubic-bezier(0.4, 0, 0.2, 1),
    height 320ms cubic-bezier(0.4, 0, 0.2, 1),
    background 320ms ease;
}

.home-hero__progress-dot--active {
  background: var(--a);
}

.home-hero__scroll-hint {
  position: absolute;
  left: 50%;
  bottom: var(--space-md);
  transform: translateX(-50%);
  margin: 0;
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--m);
  background: rgba(255, 255, 255, 0.88);
  border-radius: var(--r);
  pointer-events: none;
  transition: opacity var(--ease);
}

@media (max-width: 59.9375rem) {
  .home-hero--story .home-hero__scroll-hint {
    bottom: calc(var(--space-md) + 2.25rem);
  }
}

.home-hero__scroll-hint--hidden {
  opacity: 0;
}

/* ========== BANDEAU ENGAGEMENTS ========== */
.home-strip {
  background:
    linear-gradient(180deg, var(--bg) 0%, #f8fafc 100%);
  color: var(--p);
  padding: clamp(2.25rem, 5vw, 4rem) 0;
  border-bottom: 1px solid var(--b);
}

.home-strip__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
}

@media (min-width: 640px) {
  .home-strip__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .home-strip__list {
    grid-template-columns: repeat(4, 1fr);
  }
}

.home-strip__item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-height: clamp(11.25rem, 16vw, 13.25rem);
  padding: clamp(1.5rem, 2.5vw, 2rem) clamp(1.25rem, 2vw, 1.75rem) clamp(1.25rem, 2vw, 1.75rem);
  border-radius: 1.125rem;
  background: var(--bar-bg);
  color: #fff;
  box-shadow: 0 18px 38px -28px rgba(15, 23, 42, 0.55);
  isolation: isolate;
  overflow: visible;
}

.home-strip__item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(circle at 25% 0%, color-mix(in srgb, var(--a) 35%, transparent), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%);
  opacity: 0.9;
}

.home-strip__icon {
  position: absolute;
  top: clamp(1rem, 1.6vw, 1.25rem);
  right: clamp(1rem, 1.6vw, 1.25rem);
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.65rem;
  background: var(--cta);
  color: #fff;
  box-shadow: 0 10px 22px -14px rgba(2, 6, 23, 0.8);
}

.home-strip__icon .fa,
.home-strip__icon i {
  font-size: 1.35rem;
  line-height: 1;
}

.home-strip__label {
  max-width: calc(100% - 4rem);
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 1.5vw, 1.45rem);
  line-height: 1.12;
  font-weight: 800;
  color: #fff;
}

.home-strip__detail {
  margin-top: auto;
  font-size: var(--text-sm);
  line-height: 1.55;
  color: #cbd5e1;
}

/* ========== CORPS DE PAGE ========== */
.home-body {
  padding-bottom: var(--space-2xl);
}

.home-block {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.home-block--audience {
  background: var(--card);
}

.home-block--poles {
  background: var(--bg);
}

.home-block--catalog {
  background: var(--card);
  border-top: 1px solid var(--b);
}

.home-block--faq {
  background: var(--bg);
  border-top: 1px solid var(--b);
}

/* En-têtes de section */
.home-head {
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
  max-width: 42rem;
}

.home-head__kicker {
  margin: 0 0 var(--space-sm);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--a);
}

.home-head__title {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--p);
  line-height: 1.2;
}

.home-head__lead {
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.6;
}

.home-head__lead a {
  font-weight: 600;
}

/* ========== AUDIENCE ========== */
.home-audience__grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .home-audience__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.home-audience__tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-height: 100%;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--bg);
  border: 1px solid var(--b);
  border-radius: var(--r-lg);
  color: var(--p);
  text-decoration: none;
  overflow: hidden;
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.home-audience__tile:hover {
  border-color: color-mix(in srgb, var(--a) 40%, var(--b));
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--p);
}

.home-audience__tile--accent {
  background: linear-gradient(160deg, var(--al) 0%, var(--card) 55%);
}

.home-audience__num {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  color: color-mix(in srgb, var(--a) 18%, transparent);
  pointer-events: none;
}

.home-audience__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--p);
}

.home-audience__text {
  margin: 0;
  flex: 1;
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--m);
}

.home-audience__go {
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--a);
}

.home-audience__tile:hover .home-audience__go {
  color: var(--cta);
}

/* ========== PÔLES — tuiles magazine (image + overlay) ========== */
.home-poles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
}

@media (min-width: 640px) {
  .home-poles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .home-poles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.home-poles__link {
  display: block;
  height: 100%;
  border-radius: 1rem;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 16px 36px -24px rgba(15, 23, 42, 0.45);
  transition: box-shadow var(--ease), transform var(--ease);
}

.home-poles__link:hover {
  box-shadow: 0 22px 44px -20px rgba(15, 23, 42, 0.55);
  transform: translateY(-3px);
  color: #fff;
}

.home-poles__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  min-height: clamp(260px, 38vw, 360px);
  overflow: hidden;
  background: var(--bar-bg);
}

.home-poles__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.home-poles__media .home-poles__img {
  display: block;
  width: 100%;
  height: 100%;
}

.home-poles__img {
  object-fit: cover;
  object-position: center center;
  transition: transform 520ms cubic-bezier(0.4, 0, 0.2, 1);
}

.home-poles__link:hover .home-poles__img {
  transform: scale(1.04);
}

.home-poles__media--fallback {
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--a) 45%, transparent), transparent 50%),
    linear-gradient(145deg, var(--bar-bg) 0%, #0c4a5e 100%);
}

.home-poles__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: clamp(3rem, 8vw, 4.5rem);
}

.home-poles__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.12) 0%,
    rgba(15, 23, 42, 0.45) 38%,
    rgba(15, 23, 42, 0.82) 58%,
    rgba(15, 23, 42, 0.96) 100%
  );
  pointer-events: none;
}

.home-poles__overlay {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0) 0%,
    rgba(15, 23, 42, 0.88) 28%,
    rgba(15, 23, 42, 0.97) 100%
  );
}

.home-poles__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}

.home-poles__num {
  font-family: var(--font-heading);
  color: #fff;
}

.home-poles__tag {
  padding: 0.2rem 0.45rem;
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.home-poles__title {
  font-family: var(--font-heading);
  font-size: clamp(1.125rem, 1.6vw, 1.35rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 2px 14px rgba(0, 0, 0, 0.45);
}

.home-poles__desc {
  font-size: var(--text-sm);
  line-height: 1.5;
  color: #f1f5f9;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-poles__go {
  margin-top: 0.25rem;
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.home-poles__link:hover .home-poles__go {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Teinte charte en bas uniquement (ne pas éclaircir la zone texte) */
.home-poles__link--carte .home-poles__shade {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.12) 0%,
    rgba(15, 23, 42, 0.5) 40%,
    rgba(8, 70, 88, 0.9) 72%,
    rgba(15, 23, 42, 0.97) 100%
  );
}

.home-poles__link--acces .home-poles__shade {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.12) 0%,
    rgba(15, 23, 42, 0.5) 40%,
    rgba(17, 24, 39, 0.92) 72%,
    rgba(15, 23, 42, 0.97) 100%
  );
}

.home-poles__link--tag .home-poles__shade {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.12) 0%,
    rgba(15, 23, 42, 0.5) 40%,
    rgba(6, 78, 59, 0.9) 72%,
    rgba(15, 23, 42, 0.97) 100%
  );
}

.home-poles__link--accessoire .home-poles__shade {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.12) 0%,
    rgba(15, 23, 42, 0.5) 40%,
    rgba(120, 53, 35, 0.88) 72%,
    rgba(15, 23, 42, 0.97) 100%
  );
}

/* ========== CATALOGUE ACCUEIL ========== */
.home-catalog__group {
  padding-top: var(--space-2xl);
}

.home-catalog__group:first-of-type {
  padding-top: 0;
}

.home-catalog__heading {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  margin: 0 0 var(--space-sm);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--p);
}

.home-catalog__heading-num {
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--a);
  letter-spacing: 0.06em;
}

.home-catalog__note {
  margin: 0 0 var(--space-lg);
  max-width: 40rem;
}

.home-page .home-catalog__grid {
  margin-bottom: var(--space-md);
}

.home-page .catalog-card {
  border-radius: var(--r-lg);
  border-color: color-mix(in srgb, var(--b) 90%, var(--a));
  box-shadow: var(--shadow-xs);
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.home-page .catalog-card:hover {
  border-color: var(--a);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.home-page .catalog-card__media {
  border-radius: calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px) 0 0;
}

/* ========== FAQ ========== */
.home-faq__layout {
  display: grid;
  gap: var(--space-xl);
}

@media (min-width: 900px) {
  .home-faq__layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
    gap: clamp(2rem, 5vw, 4rem);
  }
}

.home-faq__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.home-faq__item {
  background: var(--card);
  border: 1px solid var(--b);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.home-faq__summary {
  cursor: pointer;
  padding: var(--space-md) var(--space-lg);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--p);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.home-faq__summary::-webkit-details-marker {
  display: none;
}

.home-faq__summary::after {
  content: '+';
  flex-shrink: 0;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--a);
  line-height: 1;
}

.home-faq__item[open] .home-faq__summary::after {
  content: '−';
}

.home-faq__body {
  padding: 0 var(--space-lg) var(--space-lg);
  border-top: 1px solid var(--b);
}

.home-faq__body p {
  margin: var(--space-md) 0 0;
  font-size: var(--text-sm);
  line-height: 1.65;
}

/* ========== RECHERCHE (?q=) ========== */
.home-page--search main {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-2xl);
}

.home-page--search .home-search {
  margin-bottom: var(--space-xl);
}

.home-search__intro {
  margin: 0 0 var(--space-md);
  font-size: var(--text-sm);
}

.home-search__intro a {
  color: var(--a);
  font-weight: 600;
}

.home-search__hint {
  margin: 0;
  padding: var(--space-md);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--w) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--w) 35%, transparent);
  font-size: var(--text-sm);
}

.home-search__summary {
  margin: 0 0 var(--space-md);
}

.home-search__empty {
  margin: 0;
  padding: var(--space-md);
  border-radius: var(--r-md);
  background: var(--al);
  font-size: var(--text-sm);
}

.home-search__empty a {
  color: var(--a);
  font-weight: 600;
}

.home-search__grid {
  margin-top: var(--space-md);
}

/* ========== ACCESSIBILITÉ ========== */
@media (prefers-reduced-motion: reduce) {
  .home-hero__gallery-track {
    transition: none;
  }

  .home-hero__gallery-viewport .home-hero__gallery-slide:not(:first-child) {
    display: none;
  }

  .home-hero--story .home-hero__track {
    transition: none;
  }

  .home-hero--story .home-hero__panel:not(.home-hero__panel--active) {
    display: none;
  }

  .home-hero__scroll-hint,
  .home-hero__progress {
    display: none;
  }

  .home-audience__tile:hover,
  .home-poles__link:hover,
  .home-page .catalog-card:hover {
    transform: none;
  }
}

@media (hover: none) {
  .home-audience__tile:hover,
  .home-poles__link:hover,
  .home-page .catalog-card:hover {
    transform: none;
  }
}
