/**
 * Page d'accueil — layout TechNest
 * Charte YAYEMATY : variables définies dans variables.css / style.css
 */

.page-accueil {
  --home-container: min(1200px, calc(100% - 40px));
  --home-text-muted: rgba(255, 255, 255, 0.72);
  --home-border: rgba(255, 255, 255, 0.08);
  background: var(--color-blanc);
  color: var(--color-noir);
}

/* ── Utilitaires ─────────────────────────────────────────────── */
.home-container {
  width: var(--home-container);
  margin: 0 auto;
}

.home-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--color-orange);
  color: var(--color-blanc) !important;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.home-btn-primary:hover {
  background: var(--color-orange-dark);
  transform: translateY(-1px);
  box-shadow: var(--ombre-promo);
}

.home-section-title {
  margin: 0 0 40px;
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-noir);
  letter-spacing: -0.02em;
}

/* ── Alertes ─────────────────────────────────────────────────── */
.home-alerts {
  width: var(--home-container);
  margin: 0 auto;
  padding-top: 16px;
}

.home-alert {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-alert--success {
  background: var(--color-success-bg);
  border-left: 4px solid var(--color-jaune);
  color: var(--color-noir);
}

.home-alert--error {
  background: var(--color-error-bg);
  border-left: 4px solid var(--color-orange);
  color: var(--color-noir);
}

/* ── Hero + Slider admin ─────────────────────────────────────── */
.home-hero {
  background: var(--color-noir);
  padding: 0;
  overflow: hidden;
}

.home-hero-slider {
  width: 100%;
  max-height: 520px;
  min-height: 280px;
}

.home-hero-slider .slider-item {
  position: relative;
  width: 100%;
  max-height: 520px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-noir);
}

.home-hero-slider .slider-item img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  min-height: 280px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.home-hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(var(--color-noir-rgb), 0.78) 0%,
    rgba(var(--color-noir-rgb), 0.35) 55%,
    rgba(var(--color-noir-rgb), 0.15) 100%
  );
  display: flex;
  align-items: center;
}

.home-hero-slide-content {
  width: var(--home-container);
  margin: 0 auto;
  padding: 40px 20px;
}

.home-hero-slide-content h1 {
  margin: 0 0 14px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  color: var(--color-blanc);
  letter-spacing: -0.02em;
  max-width: 620px;
}

.home-hero-slide-content p {
  margin: 0 0 24px;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  line-height: 1.65;
  color: var(--home-text-muted);
  max-width: 520px;
}

/* Fallback hero statique (sans slides admin) */
.home-hero-inner {
  width: var(--home-container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
  padding: clamp(40px, 6vw, 80px) 20px;
}

.home-hero-content h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.12;
  color: var(--color-blanc);
  letter-spacing: -0.03em;
}

.home-hero-content p {
  margin: 0 0 28px;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.65;
  color: var(--home-text-muted);
  max-width: 480px;
}

.home-hero-visual img {
  width: 100%;
  max-width: 520px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(var(--shadow-lg));
}

/* Owl Carousel — hero */
.home-hero-slider.owl-carousel .owl-nav button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(var(--color-orange-rgb), 0.9) !important;
  color: var(--color-blanc) !important;
  border: none;
  font-size: 18px;
  transition: background 0.2s ease;
}

.home-hero-slider.owl-carousel .owl-nav button:hover {
  background: var(--color-orange-dark) !important;
}

.home-hero-slider.owl-carousel .owl-nav .owl-prev {
  left: 16px;
}

.home-hero-slider.owl-carousel .owl-nav .owl-next {
  right: 16px;
}

.home-hero-slider.owl-carousel .owl-dots {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
}

.home-hero-slider.owl-carousel .owl-dots .owl-dot span {
  background: rgba(255, 255, 255, 0.45);
}

.home-hero-slider.owl-carousel .owl-dots .owl-dot.active span,
.home-hero-slider.owl-carousel .owl-dots .owl-dot:hover span {
  background: var(--color-orange);
}

/* ── Barre de confiance ──────────────────────────────────────── */
.home-trust-bar {
  background: var(--color-noir);
  border-top: 1px solid var(--home-border);
  padding: 28px 20px;
}

.home-trust-inner {
  width: var(--home-container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.home-trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  text-align: left;
}

.home-trust-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(var(--color-orange-rgb), 0.15);
  color: var(--color-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.home-trust-item span {
  color: var(--color-blanc);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.4;
}

/* Barre de confiance — tablette : taille réduite */
@media (min-width: 768px) and (max-width: 1023px) {
  .home-trust-bar {
    padding: 1.6rem 1.2rem;
  }

  .home-trust-inner {
    gap: 1.2rem;
  }

  .home-trust-item {
    gap: 1rem;
  }

  .home-trust-icon {
    width: 3.6rem;
    height: 3.6rem;
    font-size: 1.4rem;
  }

  .home-trust-item span {
    font-size: 1.2rem;
    line-height: 1.35;
  }
}

/* Barre de confiance — mobile : icônes uniquement */
@media (max-width: 767px) {
  .home-trust-bar {
    padding: 1.2rem 0.8rem;
  }

  .home-trust-inner {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
  }

  .home-trust-item {
    justify-content: center;
    gap: 0;
  }

  .home-trust-item span {
    display: none;
  }

  .home-trust-icon {
    width: 4.2rem;
    height: 4.2rem;
    font-size: 1.7rem;
  }
}

/* ── Produits en vedette ─────────────────────────────────────── */
.home-featured {
  padding: clamp(48px, 6vw, 72px) 20px;
  background: var(--color-blanc);
}

.home-featured,
.home-our-products {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-products-grid {
  width: min(1200px, 100%);
  margin-inline: auto;
  gap: 24px;
}

.home-product-card {
  background: var(--color-blanc);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--color-orange-rgb), 0.25);
}

.home-product-image {
  position: relative;
  aspect-ratio: 1;
  background: var(--color-bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.home-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-blanc);
}

.home-product-badge--new {
  background: var(--color-bleu);
}

.home-product-badge--sale {
  background: var(--color-orange);
}

.home-product-body {
  padding: 18px 16px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  text-align: center;
}

.home-product-name {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-noir);
  line-height: 1.35;
}

.home-product-name a {
  color: inherit;
  text-decoration: none;
}

.home-product-name a:hover {
  color: var(--color-bleu);
}

.home-product-price {
  margin: 0 0 16px;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-noir);
}

.home-product-price .price-old {
  text-decoration: line-through;
  color: var(--color-gris);
  font-weight: 500;
  font-size: 14px;
  margin-right: 6px;
}

.home-product-price .price-sale {
  color: var(--color-orange);
}

.home-product-card form {
  margin: 0;
  padding: 0 16px 16px;
}

.home-product-card form .home-btn-primary {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
}

/* ── Bannière principale ─────────────────────────────────────── */
.home-banner-primary {
  position: relative;
  min-height: 320px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  margin: 0;
}

.home-banner-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(var(--color-noir-rgb), 0.72) 0%,
    rgba(var(--color-noir-rgb), 0.25) 100%
  );
}

.home-banner-primary-content {
  position: relative;
  z-index: 1;
  width: var(--home-container);
  margin: 0 auto;
  padding: 60px 20px;
}

.home-banner-primary h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--color-blanc);
  max-width: 520px;
  line-height: 1.15;
}

.home-banner-primary p {
  margin: 0 0 24px;
  color: var(--home-text-muted);
  font-size: 16px;
  max-width: 440px;
}

/* ── Bannières duo ───────────────────────────────────────────── */
.home-banners-duo {
  padding: 0 20px 48px;
  background: var(--color-blanc);
}

.home-banners-duo-inner {
  width: var(--home-container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.home-banner-card {
  position: relative;
  min-height: 280px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 32px 24px;
  text-decoration: none;
}

.home-banner-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(var(--color-noir-rgb), 0.1) 0%,
    rgba(var(--color-noir-rgb), 0.65) 100%
  );
}

.home-banner-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 16px;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 800;
  color: var(--color-blanc);
  text-align: center;
}

.home-banner-card .home-btn-primary {
  position: relative;
  z-index: 1;
}

/* ── Nos produits ────────────────────────────────────────────── */
.home-our-products {
  padding: clamp(48px, 6vw, 72px) 20px;
  background: var(--color-bg-subtle);
  border-top: 1px solid var(--color-border-light);
}

.home-our-products-empty {
  flex: 1 1 100%;
  width: 100%;
  text-align: center;
  color: var(--color-gris);
  margin: 0;
}

.home-our-products-cta {
  width: var(--home-container);
  margin: 36px auto 0;
  text-align: center;
}

.home-btn-primary--outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent !important;
  color: var(--color-orange) !important;
  border: 2px solid var(--color-orange);
  box-shadow: none;
}

.home-btn-primary--outline:hover {
  background: var(--color-orange) !important;
  color: var(--color-blanc) !important;
}

/* ── Newsletter ──────────────────────────────────────────────── */
.home-newsletter {
  background: var(--color-noir);
  padding: 48px 20px;
}

.home-newsletter-inner {
  width: var(--home-container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.home-newsletter-text h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-blanc);
}

.home-newsletter-text p {
  margin: 0;
  color: var(--home-text-muted);
  font-size: 0.875rem;
}

.home-newsletter-form {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 22rem;
}

.home-newsletter-form input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--color-blanc);
  font-size: 0.875rem;
  line-height: 1.25;
  outline: none;
  color: var(--color-noir);
}

.home-newsletter-form input[type="email"]:focus {
  border-color: var(--color-orange);
}

.home-newsletter-form button,
.home-newsletter-form .home-btn-primary {
  flex: 0 0 auto;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.25;
  white-space: nowrap;
  min-height: unset;
  transform: none;
  box-shadow: none;
}

/* ── Footer sombre (page accueil) ────────────────────────────── */
.page-accueil .footer {
  margin-top: 0;
  background: var(--color-noir);
  border-top: 1px solid var(--home-border);
  box-shadow: none;
  padding: 56px 20px 0;
}

.page-accueil .footer_item_titl,
.page-accueil .footer_logo,
.page-accueil .footer_p,
.page-accueil .footer_list_item,
.page-accueil .footer_list_item a,
.page-accueil .footer_list_item span {
  color: rgba(255, 255, 255, 0.85);
}

.page-accueil .footer_logo:hover,
.page-accueil .footer_list_item a:hover {
  color: var(--color-orange);
}

.page-accueil .footer_list_item i,
.page-accueil .footer_logo i,
.page-accueil .footer_logo_fallback i {
  color: var(--color-orange);
}

.page-accueil .footer_bottom {
  background: var(--color-noir-soft);
  border-top: 1px solid var(--home-border);
  margin-top: 40px;
}

.page-accueil .footer_copy {
  color: rgba(255, 255, 255, 0.55);
}

.page-accueil .footer_social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.page-accueil .footer_social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(var(--color-bleu-rgb), 0.18);
  color: var(--color-bleu-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.page-accueil .footer_social a:hover {
  background: var(--color-bleu);
  color: var(--color-blanc);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 992px) {
  .home-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .home-hero-content p,
  .home-hero-slide-content p {
    margin-left: auto;
    margin-right: auto;
  }

  .home-hero-slide-content h1 {
    max-width: none;
  }

  .home-banners-duo-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .home-newsletter {
    padding: 2rem 1rem;
  }

  .home-newsletter-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
  }

  .home-newsletter-text h2 {
    font-size: 1.25rem;
  }

  .home-newsletter-form {
    max-width: none;
    flex-direction: row;
    flex-wrap: nowrap;
  }

  .home-newsletter-form input[type="email"] {
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    padding: 0.4375rem 0.625rem;
    font-size: 0.875rem;
  }

  .home-newsletter-form input[type="email"]:focus {
    border-right-color: transparent;
  }

  .home-newsletter-form button,
  .home-newsletter-form .home-btn-primary {
    width: auto;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 0.4375rem 0.75rem;
    font-size: 0.875rem;
  }

  .home-newsletter-form button:hover,
  .home-newsletter-form .home-btn-primary:hover {
    transform: none;
  }

  .home-hero-slider,
  .home-hero-slider .slider-item,
  .home-hero-slider .slider-item img {
    min-height: 220px;
    max-height: 360px;
  }

  .page-accueil .footer_container {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 576px) {
  .page-accueil .footer_container {
    grid-template-columns: 1fr;
  }
}
