/* ========================================
   LIBNER PRODUITS - DESIGN ÉLÉGANT RAFFINÉ
   Fond subtil | Contrastes marqués | Premium
   ======================================== */

:root {
  --navy-deep: #1a2742;
  --blue-primary: #2c5698;
  --blue-accent: #3d6ba8;
  --gold: #c9a961;
  --cream: #f8f6f3;
  --white: #ffffff;
  --text-dark: #1a1a1a;
  --shadow-soft: 0 4px 20px rgba(26, 39, 66, 0.08);
  --shadow-medium: 0 8px 30px rgba(26, 39, 66, 0.12);
  --shadow-strong: 0 16px 50px rgba(26, 39, 66, 0.18);
}

/* BODY - FOND ÉLÉGANT SUBTIL */
body.page-template-page-produits-acf,
.page-template-page-produits-acf #primary {
  background: linear-gradient(to bottom, #f4f5f7 0%, #e8eaed 100%);
  background-attachment: fixed;
}

.page-template-page-produits-acf .conteneur_large {
  background: transparent !important;
}

/* Effet de texture subtile */
body.page-template-page-produits-acf::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(44, 86, 152, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(201, 169, 97, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* BANDEAU - ÉLÉGANT */
#bandeau.bandeau_produit {
  background: linear-gradient(180deg, #15203d 0%, #2c5698 100%) !important;
  padding: 80px 0 60px;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}

#bandeau.bandeau_produit::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(135deg, transparent 0%, rgba(201, 169, 97, 0.05) 100%);
  pointer-events: none;
}

#bandeau.bandeau_produit h1 {
  color: var(--white);
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  position: relative;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

#bandeau.bandeau_produit #breadcrumbs {
  color: rgba(255, 255, 255, 0.8);
  margin-top: 16px;
  font-size: 14px;
}

#bandeau.bandeau_produit #breadcrumbs a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.3s ease;
}

#bandeau.bandeau_produit #breadcrumbs a:hover {
  color: var(--gold);
}

/* INTRO SECTION - CARTE ÉLÉGANTE */
#intro_lp {
  max-width: 1600px;
  margin: -40px auto 80px;
  padding: 56px 80px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-medium);
  text-align: center;
  position: relative;
  z-index: 10;
  border: 1px solid rgba(26, 39, 66, 0.06);
}

/* Accent doré en haut */
#intro_lp::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: linear-gradient(180deg, #15203d 0%, #2c5698 100%) !important;
  border-radius: 0 0 4px 4px;
}

#intro_lp .editor-titre-moyen {
  font-size: 38px;
  font-weight: 700;
  color: var(--navy-deep);
  letter-spacing: -0.01em;
  margin-bottom: 28px;
  line-height: 1.3;
}

#intro_lp .contenu {
  font-size: 18px;
  line-height: 1.9;
  color: #4a5568;
  margin-top: 24px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

#intro_lp .contenu p {
  margin-bottom: 18px;
}

#intro_lp .contenu p:last-child {
  margin-bottom: 0;
}

/* GRILLE PRODUITS - 3 COLONNES ÉLÉGANTES */
.products-grid-wrapper {
  max-width: 1400px;
  margin: 0 auto 120px;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  position: relative;
  z-index: 1;
}

/* CARTE PRODUIT - DESIGN PREMIUM */
.product-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(26, 39, 66, 0.08);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Bordure dorée animée */
.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(180deg, #15203d 0%, #2c5698 100%) !important;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 10;
}

.product-card:hover::before {
  transform: scaleX(1);
}

.product-card:hover {
  transform: translateY(-16px) scale(1.01);
  box-shadow: var(--shadow-strong);
  border-color: rgba(201, 169, 97, 0.2);
}

/* LIEN */
.product-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
  flex: 1;
}

/* IMAGE PRODUIT - ÉLÉGANTE */
.product-image {
  position: relative;
  width: 100%;
  height: 280px;
  background: linear-gradient(135deg, #fafbfc 0%, #f0f2f5 100%);
  overflow: hidden;
}

/* Overlay subtil */
.product-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26, 39, 66, 0) 0%,
    rgba(26, 39, 66, 0.03) 60%,
    rgba(26, 39, 66, 0.08) 100%
  );
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 1;
}

.product-card:hover .product-image::after {
  opacity: 1;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 24px;
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 8px 20px rgba(26, 39, 66, 0.12));
}

.product-card:hover .product-image img {
  transform: scale(1.06);
  filter: drop-shadow(0 12px 28px rgba(26, 39, 66, 0.16));
}

/* CONTENU PRODUIT - BLEU ÉLÉGANT */
.product-content {
  padding: 36px 32px 80px 32px;
  background: linear-gradient(180deg, #15203d 0%, #2c5698 100%) !important;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  position: relative;
  flex: 1;
}

/* Séparateur doré */
.product-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 32px;
  right: 32px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(201, 169, 97, 0.4) 50%,
    transparent
  );
}

/* TITRE PRODUIT - BLANC ÉCLATANT */
.product-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  margin: 0 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.product-card:hover .product-title {
  color: #ffffff;
  transform: translateX(6px);
}

/* DESCRIPTION - TEXTE CLAIR */
.product-description {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 0 0;
  padding-right: 70px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* FLÈCHE - BLANCHE TOUJOURS VISIBLE */
.product-arrow {
  position: absolute;
  bottom: 32px;
  right: 32px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  opacity: 1;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.product-card:hover .product-arrow {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.product-arrow svg {
  width: 24px;
  height: 24px;
  color: #ffffff;
  stroke: #ffffff;
  stroke-width: 2.5;
  transition: all 0.4s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.product-card:hover .product-arrow svg {
  transform: translateX(4px);
}

/* ANIMATIONS ENTRÉE ÉLÉGANTES */
@keyframes fadeInUpElegant {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.98);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.product-card {
  animation: fadeInUpElegant 1s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }
.product-card:nth-child(7) { animation-delay: 0.35s; }
.product-card:nth-child(8) { animation-delay: 0.4s; }
.product-card:nth-child(9) { animation-delay: 0.45s; }

/* ========================================
   RESPONSIVE
   ======================================== */

/* MOBILE */
@media (max-width: 767px) {
  /* Conteneur sans padding sur mobile */
  .conteneur_large {
    padding: 0 !important;
  }

  #bandeau.bandeau_produit {
    padding: 30px 15px 25px;
  }

  #bandeau.bandeau_produit h1 {
    font-size: 20px;
    line-height: 1.3;
  }

  #bandeau.bandeau_produit #breadcrumbs {
    font-size: 11px;
    margin-top: 10px;
  }

  .products-grid-wrapper {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 15px;
    margin-bottom: 60px;
  }

  #intro_lp {
    margin-left: 15px;
    margin-right: 15px;
    margin-top: -15px;
    margin-bottom: 40px;
    padding: 24px 20px;
    border-radius: 10px;
    max-width: none;
    width: auto;
  }

  #intro_lp::before {
    width: 60px;
    height: 2px;
  }

  #intro_lp .editor-titre-moyen {
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 16px;
  }

  #intro_lp .contenu {
    font-size: 14px;
    line-height: 1.6;
  }

  #intro_lp .contenu p {
    margin-bottom: 10px;
  }

  .product-image {
    height: 180px;
  }

  .product-image img {
    padding: 16px;
  }

  .product-content {
    padding: 20px 18px 56px 18px;
    min-height: 140px;
  }

  .product-content::before {
    left: 18px;
    right: 18px;
  }

  .product-title {
    font-size: 17px;
    margin-bottom: 10px;
    letter-spacing: 0.01em;
  }

  .product-description {
    font-size: 13px;
    line-height: 1.5;
    padding-right: 0;
    -webkit-line-clamp: 3;
  }

  .product-arrow {
    width: 42px;
    height: 42px;
    bottom: 18px;
    right: 18px;
  }

  .product-arrow svg {
    width: 16px;
    height: 16px;
    color: blanc;

  }

  .product-card:hover {
    transform: translateY(-6px) scale(1);
  }
}

/* TABLETTE */
@media (min-width: 768px) and (max-width: 1023px) {
  #bandeau.bandeau_produit h1 {
    font-size: 40px;
  }

  .products-grid-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
    padding: 0 32px;
  }

  .product-image {
    height: 260px;
  }

  #intro_lp {
    margin: -35px auto 70px;
    padding: 48px 64px;
    max-width: calc(100% - 64px);
  }

  #intro_lp .editor-titre-moyen {
    font-size: 34px;
  }

  #intro_lp .contenu {
    font-size: 17px;
    line-height: 1.85;
  }
}

/* DESKTOP STANDARD */
@media (min-width: 1024px) and (max-width: 1399px) {
  .products-grid-wrapper {
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
  }

  .product-image {
    height: 270px;
  }
}

/* LARGE DESKTOP */
@media (min-width: 1400px) {
  .products-grid-wrapper {
    max-width: 1500px;
    gap: 44px;
  }

  .product-image {
    height: 300px;
  }

  .product-content {
    padding: 40px 36px 88px 36px;
  }

  .product-content::before {
    left: 36px;
    right: 36px;
  }

  .product-title {
    font-size: 28px;
  }

  .product-description {
    font-size: 16px;
    padding-right: 80px;
  }

  #intro_lp .editor-titre-moyen {
    font-size: 42px;
  }

  #intro_lp .contenu {
    font-size: 19px;
    line-height: 2;
  }

  .product-arrow {
    bottom: 36px;
    right: 36px;
  }
}

/* ========================================
   ACCESSIBILITÉ & PERFORMANCE
   ======================================== */

.product-card:focus-within {
  outline: 3px solid var(--gold);
  outline-offset: 6px;
}

.product-link:focus {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .product-card,
  .product-image img,
  .product-title,
  .product-arrow,
  .product-image::after {
    animation: none !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
  }
  
  .product-card:hover {
    transform: translateY(-8px);
  }
}

@media print {
  body.page-template-page-produits-acf {
    background: white;
  }

  #bandeau.bandeau_produit {
    background: var(--navy-deep);
  }

  .products-grid-wrapper {
    display: block;
  }
  
  .product-card {
    page-break-inside: avoid;
    margin-bottom: 20px;
    box-shadow: none;
  }
  
  .product-arrow {
    display: none;
  }
}

/* OPTIMISATION GPU */
.product-card,
.product-image img,
.product-arrow {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}