/* ========================
   Variables & bases
   ======================== */
:root{
  --hero-black:#000000;
  --hero-black-hover:#333333;
  --hero-black-light:#2c2c2c;
  --hero-text:#1a1a1a;
  --hero-muted:#666666;
  --hero-border:rgba(0,0,0,0.1);
}

/* ========================
   HERO – style « split »
   ======================== */
.home-hero{ 
  position:relative; 
  overflow:hidden; 
  background: var(--hero-bg, #ffffff);
  margin:0; 
  padding:0; 
  width: 100%;
}
.hero-container{ 
  width: 100%; /* Largeur totale */
  margin:0 auto; 
  padding:0; /* Supprimer le padding horizontal */
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: stretch;
  min-height: clamp(520px, 70vh, var(--hero-min-h, 640px));
}

/* Colonne gauche */
.hero-content{ 
  background: var(--hero-left-bg, #F2E8E2); 
  display:flex; 
  align-items:center; 
  margin:0; 
  padding:0; 
  justify-content: center; /* Centrer le contenu horizontalement */
}

.hero-content > div { 
  width:100%; 
  max-width:560px; 
  padding: clamp(32px, 6vw, 64px); 
}

.hero-title{
  margin:0 0 12px 0; font-weight:500; color:var(--hero-text);
  letter-spacing:-0.02em; line-height:1.05; font-size: clamp(28px, 4.2vw, 48px);
}
.hero-rating{ display:inline-flex; align-items:center; gap:10px; margin:4px 0 18px 0; color:var(--hero-muted); font-size:0.95rem; }
.hero-rating .star{ display:inline-flex; font-size:1.05rem; line-height:1; color:#f4b400; }
.hero-description{ color:var(--hero-muted); font-size:1.1rem; line-height:1.6; margin:0 0 32px 0; font-weight:300; }

/* CTA */
.hero-buttons{ display:flex; gap:16px; flex-wrap:wrap; }
.btn-theme{
  display:inline-flex; align-items:center; justify-content:center; padding:1rem 2rem; font-weight:600; text-decoration:none;
  border-radius:8px; transition:all .3s cubic-bezier(.25,.46,.45,.94); will-change: transform; font-size:.9rem; letter-spacing:.02em; text-transform:uppercase;
  position:relative; overflow:hidden;
}
.btn-theme:focus-visible{ outline:3px solid var(--hero-black); outline-offset:2px; }

/* Bouton principal */
.btn-hero-primary{ background:var(--hero-black); color:#fff; border:2px solid var(--hero-black); box-shadow:0 4px 12px rgba(0,0,0,.15); }
.btn-hero-primary::before{
  content:''; position:absolute; top:0; left:-100%; width:100%; height:100%;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent); transition:left .6s ease;
}
.btn-hero-primary:hover{
  transform: translateY(-2px); box-shadow:0 8px 25px rgba(0,0,0,.25);
  background:var(--hero-black-hover); border-color:var(--hero-black-hover);
}
.btn-hero-primary:hover::before{ left:100%; }

/* Bouton secondaire */
.btn-hero-secondary{
  background:transparent; color:var(--hero-black); border:2px solid var(--hero-black); position:relative; z-index:1;
}
.btn-hero-secondary::before{
  content:''; position:absolute; top:0; left:0; width:0; height:100%;
  background:var(--hero-black); transition:width .3s cubic-bezier(.25,.46,.45,.94); z-index:-1;
}
.btn-hero-secondary:hover{ color:#fff; transform: translateY(-2px); box-shadow:0 6px 20px rgba(0,0,0,.15); }
.btn-hero-secondary:hover::before{ width:100%; }

/* Colonne droite (image) */
.hero-image{ 
  position:relative; 
  overflow:hidden; 
  margin:0; 
  padding:0; 
  width: 100%;
  height: 71vh; /* Hauteur fixe comme demandé */
  background-size: cover; /* Valeur par défaut - sera écrasée par le style inline */
  background-position: 50% 50%; /* Valeur par défaut - sera écrasée par le style inline */
  background-repeat: no-repeat;
}

/* Responsive HERO */
@media (max-width: 991.98px){
  .hero-container{ 
    grid-template-columns: 1fr; 
    min-height: unset; 
  }
  .hero-content{ order: 1; }
  .hero-image{ 
    order: 2; 
    height: clamp(320px, 48vh, 520px);
  }
  .hero-content > div { 
    margin: 0 auto; 
    text-align: center; 
  }
  .hero-buttons{ justify-content: center; gap: 12px; }
}
@media (max-width: 575.98px){
  .hero-content > div { padding: 28px 18px; }
  .hero-description{ font-size: 1.05rem; margin-bottom: 28px; }
  .hero-buttons{ flex-direction: column; gap: 12px; }
  .btn-theme{ width: 100%; padding: .9rem 1.5rem; }
}

/* Animation */
@keyframes btnSlideUp{
  from{ opacity:0; transform: translateY(20px); }
  to{ opacity:1; transform: translateY(0); }
}

/* ========================
   Nouveaux produits
   ======================== */
#new-products{ font-family: var(--np-font-family, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji); margin:0; padding:0; }
#new-products.np-hide-price .price{ display:none !important; }

/* ========================
   Catégories en cercles (DESIGN CIRCULAIRE)
   ======================== */
.home-category-cards{ background:#ffffff; margin:0; padding:0; }
.home-category-cards .row{ margin:0; }

.category-circle{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  text-decoration:none;
  outline:none;
  transition:all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.category-circle:focus-visible{
  outline:3px solid #111;
  outline-offset:8px;
  border-radius:50%;
}

.category-circle__media{
  width:220px;
  height:220px;
  border-radius:50%;
  overflow:hidden;
  background:#f5f5f5;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:24px;
  box-shadow:0 4px 20px rgba(0, 0, 0, 0.08);
  transition:all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position:relative;
  flex-shrink:0;
}

.category-circle__img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
  transition:transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.category-circle__title{
  margin:0;
  font-size:clamp(1.1rem, 2.2vw, 1.6rem);
  font-weight:700;
  color:#000000;
  letter-spacing:-0.01em;
  line-height:1.2;
  transition:color 0.35s ease;
  max-width:200px;
}

/* Hover effect */
.category-circle:hover .category-circle__media{
  transform:translateY(-8px);
  box-shadow:0 12px 32px rgba(0, 0, 0, 0.15);
}

.category-circle:hover .category-circle__img{
  transform:scale(1.08);
}

.category-circle:hover .category-circle__title{
  color:#333333;
}

/* Responsive CATÉGORIES */
@media (max-width: 991.98px){
  .category-circle__media{
    width:180px;
    height:180px;
    margin-bottom:20px;
  }

  .category-circle__title{
    font-size:clamp(1rem, 2vw, 1.3rem);
    max-width:170px;
  }
}

@media (max-width: 575.98px){
  .category-circle__media{
    width:140px;
    height:140px;
    margin-bottom:16px;
    box-shadow:0 2px 12px rgba(0, 0, 0, 0.1);
  }

  .category-circle__title{
    font-size:clamp(0.95rem, 2.2vw, 1.1rem);
    max-width:140px;
  }

  .category-circle:hover .category-circle__media{
    transform:translateY(-4px);
    box-shadow:0 8px 20px rgba(0, 0, 0, 0.12);
  }
}

/* ========================
   BANNIÈRE FAQ (split)
   ======================== */
.home-faq-banner{ background:#fff; padding: 3.5rem 0; margin:0; }
.faq-container{ max-width:1400px; margin:0 auto; padding:0 24px; }
.faq-grid{
  display:grid; align-items:stretch;
  grid-template-columns: 1fr 1.15fr;
  min-height: clamp(420px, 62vh, 560px);
}
.faq-left{ background: var(--faq-left-bg, #F5EFEA); display:flex; align-items:center; margin:0; padding:0; }
.faq-left-inner{ width:100%; max-width:560px; padding: clamp(32px, 5.5vw, 64px); }
.faq-title{
  margin:0 0 18px 0; font-weight:600; color:var(--hero-text);
  letter-spacing:-0.01em; line-height:1.12; font-size: clamp(24px, 3.2vw, 34px);
}

/* Accordéon (HTML natif <details>) */
.faq-accordion{ margin-top: 6px; border-top:1px solid var(--hero-border); }
.faq-item{ border-bottom:1px solid var(--hero-border); }
.faq-summary{
  cursor:pointer; display:flex; align-items:center; gap:10px;
  font-weight:600; color:#222; padding:12px 0; list-style:none; outline:none;
}
.faq-summary::-webkit-details-marker{ display:none; }
.faq-summary:focus-visible{ outline:3px solid #111; outline-offset:4px; }
.faq-item[open] > .faq-summary{ color:#111; }
.faq-summary::before{
  content:'▾'; display:inline-block; transform: rotate(-90deg); transition: transform .25s ease; color:#666;
}
.faq-item[open] > .faq-summary::before{ transform: rotate(0deg); }
.faq-content{ padding: 0 0 14px 22px; color:var(--hero-muted); line-height:1.6; }

/* Colonne droite : image */
.faq-right{ position:relative; overflow:hidden; margin:0; padding:0; }
.faq-media{ position:absolute; inset:0; }
.faq-image{ width:100%; height:100%; object-fit:cover; object-position:center; display:block; }

/* Responsive FAQ */
@media (max-width: 991.98px){
  .faq-grid{ grid-template-columns:1fr; min-height:unset; }
  .faq-left{ order:1; }
  .faq-right{ order:2; height: clamp(280px, 45vh, 420px); }
  .faq-left-inner{ margin:0 auto; }
}

/* ========================
   PRODUITS SUGGÉRÉS
   ======================== */
.home-suggested-products {
    padding: 4rem 0;
    background: #fff;
}

.suggested-products-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.suggested-products-title {
    text-align: center;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 3rem;
    color: var(--hero-text);
    letter-spacing: -0.01em;
}

.suggested-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.suggested-product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.suggested-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.suggested-product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.suggested-product-content {
    padding: 1.5rem;
}

.suggested-product-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--hero-text);
    line-height: 1.3;
}

.suggested-product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #000;
}

.suggested-product-price .price-old {
    text-decoration: line-through;
    color: var(--hero-muted);
    margin-right: 0.5rem;
    font-weight: 400;
}

.suggested-product-price .price-new {
    color: #e74c3c;
}

/* Responsive PRODUITS SUGGÉRÉS */
@media (max-width: 768px) {
    .home-suggested-products {
        padding: 3rem 0;
    }
    
    .suggested-products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .suggested-product-image {
        height: 200px;
    }
    
    .suggested-product-content {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .suggested-products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ========================
   STYLES SPÉCIFIQUES POUR LES OPTIONS BACKGROUND
   ======================== */

/* Style pour l'option background-size: contain */
.hero-image.bg-size-contain {
    background-size: contain !important;
}

/* Style pour l'option background-size: auto */
.hero-image.bg-size-auto {
    background-size: auto !important;
}

/* Style pour l'option background-size: cover (par défaut) */
.hero-image.bg-size-cover {
    background-size: cover !important;
}

/* Style pour l'option background-size personnalisée */
.hero-image.bg-size-custom {
    background-size: 100% 100% !important;
}

/* Styles responsive pour les différentes options de background-size */
@media (max-width: 991.98px) {
    .hero-image.bg-size-contain,
    .hero-image.bg-size-auto,
    .hero-image.bg-size-custom {
        background-position: center center !important;
    }
}

/* Amélioration de l'accessibilité pour les images de fond */
.hero-image[role="img"]:focus {
    outline: 2px solid var(--hero-black);
    outline-offset: 2px;
}

/* Support pour les navigateurs qui ne supportent pas les valeurs en pourcentage */
@supports not (background-position: 50% 50%) {
    .hero-image {
        background-position: center center;
    }
}

/* Optimisation des performances pour les images de fond */
.hero-image {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

/* ========================
   ANIMATIONS ET TRANSITIONS
   ======================== */

/* Transition fluide pour les changements de background */
.hero-image {
    transition: background-position 0.3s ease, background-size 0.3s ease;
}

/* Animation d'entrée pour la section hero */
.home-hero {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation pour les boutons */
.btn-theme {
    animation: btnSlideUp 0.6s ease-out;
}

/* ========================
   CORRECTIONS SPÉCIFIQUES
   ======================== */

/* Correction pour Safari iOS */
@supports (-webkit-touch-callout: none) {
    .hero-image {
        background-attachment: scroll;
    }
}

/* Correction pour les anciennes versions d'Internet Explorer */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    .hero-container {
        display: flex;
    }
    .hero-content {
        width: 50%;
    }
    .hero-image {
        width: 50%;
    }
}

/* Support pour les modes de contraste élevé */
@media (prefers-contrast: high) {
    .hero-title {
        color: #000000;
    }
    .hero-description {
        color: #333333;
    }
    .btn-hero-primary {
        background: #000000;
        border-color: #000000;
    }
    .btn-hero-secondary {
        color: #000000;
        border-color: #000000;
    }
}

/* Support pour la réduction des animations */
@media (prefers-reduced-motion: reduce) {
    .hero-image,
    .btn-theme,
    .category-circle,
    .suggested-product-card {
        transition: none;
    }
    
    .home-hero {
        animation: none;
    }
    
    .btn-theme {
        animation: none;
    }
}

/* ========================
   AMÉLIORATIONS RESPONSIVE
   ======================== */

/* Tablettes en mode portrait */
@media (max-width: 768px) {
    .faq-container,
    .suggested-products-container {
        padding: 0 16px;
    }
}

/* Très petits écrans */
@media (max-width: 360px) {
    .hero-content > div {
        padding: 20px 12px;
    }
    
    .hero-title {
        font-size: clamp(24px, 3.5vw, 32px);
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .category-circle__media {
        width: 120px;
        height: 120px;
    }
}

/* ========================
   OPTIMISATIONS D'IMPRESSION
   ======================== */
@media print {
    .home-hero {
        break-inside: avoid;
    }
    
    .hero-image {
        background: none !important;
    }
    
    .btn-theme {
        border: 1px solid #000 !important;
        background: none !important;
        color: #000 !important;
    }
}

/* ========================
   VARIABLES THÈMES SPÉCIFIQUES
   ======================== */

/* Thème classique */
.hero-theme-classic .hero-content {
}

.hero-theme-classic .hero-title {
    color: #1a1a1a;
}

.hero-theme-classic .hero-description {
    color: #666666;
}

/* Thème moderne */
.hero-theme-modern .hero-content {
    background: #F5F5F5;
}

.hero-theme-modern .hero-title {
    color: #000000;
    font-weight: 700;
}

.hero-theme-modern .hero-description {
    color: #555555;
}

/* Thème élégant */
.hero-theme-elegant .hero-content {
    background: #FAF7F2;
}

.hero-theme-elegant .hero-title {
    color: #2C2C2C;
    font-weight: 400;
    font-style: italic;
}

.hero-theme-elegant .hero-description {
    color: #777777;
    font-style: italic;
}

/* ========================
   ÉTATS INTERACTIFS
   ======================== */

/* États de focus améliorés */
.hero-buttons .btn-theme:focus {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* États actifs */
.hero-buttons .btn-theme:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* Loading state pour les images */
.hero-image.loading {
    background: #f5f5f5;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 0.6;
    }
}

/* ========================
   ACCESSIBILITÉ AVANCÉE
   ======================== */

/* Masquer visuellement mais garder accessible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Amélioration du contraste pour la lisibilité */
@media (prefers-contrast: high) {
    .hero-rating {
        color: #000000;
    }
    
    .faq-summary {
        color: #000000;
    }
    
    .faq-content {
        color: #333333;
    }
}

/* Support pour le mode sombre */
@media (prefers-color-scheme: dark) {

    .hero-content {
        background: #2d2d2d;
    }
    
    .hero-title {
        color: #ffffff;
    }
    
    .hero-description {
        color: #cccccc;
    }
}

/* ========================
   PERFORMANCE ET OPTIMISATIONS
   ======================== */

/* Optimisation pour les appareils mobiles */
@media (max-width: 768px) {
    .hero-image {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* Prévention du layout shift */
.hero-container {
    contain: layout style paint;
}

/* Optimisation des images de fond */
.hero-image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ========================
   FALLBACKS ET COMPATIBILITÉ
   ======================== */

/* Fallback pour les navigateurs sans support grid */
@supports not (display: grid) {
    .hero-container {
        display: flex;
    }
    
    .hero-content {
        width: 50%;
    }
    
    .hero-image {
        width: 50%;
    }
    
    .suggested-products-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .suggested-product-card {
        width: calc(33.333% - 2rem);
        margin: 1rem;
    }
}

/* Support pour les navigateurs très anciens */
.hero-image {
    /* Fallback pour les vieux navigateurs */
    background: no-repeat center center;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}