/* ========================
   BANNIÈRE FAQ (split) - Style amélioré
   ======================== */
.home-faq-banner{ 
    background:#fff; 
    padding: 3.5rem 0; 
    margin:0; 
    position: relative;
    overflow: hidden;
}

.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);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.faq-left{ 
    background: var(--faq-left-bg, #F5EFEA); 
    display:flex; 
    align-items:center; 
    margin:0; 
    padding:0; 
    position: relative;
}

.faq-left::before {
    content: '';
    position: absolute;
    top: 0;
    right: -1px;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.1), transparent);
    z-index: 2;
}

.faq-left-inner{ 
    width:100%; 
    max-width:560px; 
    padding: clamp(32px, 5.5vw, 64px); 
    position: relative;
    z-index: 1;
}

.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);
    position: relative;
}

.faq-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--hero-black), transparent);
    border-radius: 2px;
}

/* Accordéon (HTML natif <details>) */
.faq-accordion{ 
    margin-top: 28px; 
    border-top:1px solid var(--hero-border); 
}

.faq-item{ 
    border-bottom:1px solid var(--hero-border); 
    position: relative;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-summary{
    cursor:pointer; 
    display:flex; 
    align-items:center; 
    gap:12px;
    font-weight:600; 
    color:#222; 
    padding:16px 0; 
    list-style:none; 
    outline:none;
    transition: all 0.3s ease;
    position: relative;
}

.faq-summary:hover {
    color: var(--hero-black);
    transform: translateX(4px);
}

.faq-summary::-webkit-details-marker{ display:none; }

.faq-summary:focus-visible{ 
    outline:3px solid var(--hero-black); 
    outline-offset:4px; 
    border-radius: 4px;
}

.faq-item[open] > .faq-summary{ 
    color:var(--hero-black); 
}

.faq-summary::before{
    content:'▸'; 
    display:inline-block; 
    transform: rotate(0deg); 
    transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1); 
    color:var(--hero-black);
    font-size: 1.1em;
    font-weight: bold;
    min-width: 16px;
}

.faq-item[open] > .faq-summary::before{ 
    transform: rotate(90deg); 
}

.faq-content{ 
    padding: 0 0 20px 28px; 
    color:var(--hero-muted); 
    line-height:1.6; 
    animation: fadeInUp 0.3s ease-out;
}

.faq-content p {
    margin: 0;
    font-size: 0.95rem;
}

/* Colonne droite : image avec background */
.faq-right{ 
    position:relative; 
    overflow:hidden; 
    margin:0; 
    padding:0;
    background: #f8f8f8;
}

.faq-media{ 
    position:absolute; 
    inset:0; 
}

.faq-image{ 
    width:100%; 
    height:100%; 
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    position: relative;
    transition: all 0.3s ease;
}

/* Overlay subtil sur l'image */
.faq-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0,0,0,0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* Styles pour les différentes options de background-size */
.faq-image.bg-size-contain {
    background-size: contain !important;
}

.faq-image.bg-size-auto {
    background-size: auto !important;
}

.faq-image.bg-size-cover {
    background-size: cover !important;
}

.faq-image.bg-size-custom {
    background-size: 100% 100% !important;
}

/* Animation pour l'accordéon */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive FAQ */
@media (max-width: 991.98px){
    .faq-grid{ 
        grid-template-columns:1fr; 
        min-height:unset; 
        border-radius: 12px;
    }
    
    .faq-left{ 
        order:1; 
    }
    
    .faq-right{ 
        order:2; 
        height: clamp(280px, 45vh, 420px); 
    }
    
    .faq-left-inner{ 
        margin:0 auto; 
        text-align: center;
    }
    
    .faq-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .faq-left::before {
        display: none;
    }
}

@media (max-width: 768px){
    .home-faq-banner {
        padding: 2.5rem 0;
    }
    
    .faq-container {
        padding: 0 16px;
    }
    
    .faq-left-inner {
        padding: 32px 24px;
    }
    
    .faq-accordion {
        margin-top: 24px;
    }
    
    .faq-summary {
        padding: 14px 0;
        font-size: 0.95rem;
    }
    
    .faq-content {
        padding: 0 0 16px 24px;
    }
}

@media (max-width: 575.98px){
    .home-faq-banner {
        padding: 2rem 0;
    }
    
    .faq-grid {
        border-radius: 8px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    }
    
    .faq-left-inner {
        padding: 24px 20px;
    }
    
    .faq-title {
        font-size: clamp(20px, 2.8vw, 24px);
        margin-bottom: 16px;
    }
    
    .faq-title::after {
        width: 40px;
        height: 2px;
    }
    
    .faq-accordion {
        margin-top: 20px;
    }
    
    .faq-summary {
        padding: 12px 0;
        font-size: 0.9rem;
        gap: 10px;
    }
    
    .faq-content {
        padding: 0 0 14px 20px;
    }
    
    .faq-content p {
        font-size: 0.9rem;
    }
}

/* Support pour les modes de contraste élevé */
@media (prefers-contrast: high) {
    .faq-summary {
        color: #000000;
    }
    
    .faq-item[open] > .faq-summary {
        color: #000000;
    }
    
    .faq-content {
        color: #333333;
    }
    
    .faq-title::after {
        background: #000000;
    }
}

/* Support pour la réduction des animations */
@media (prefers-reduced-motion: reduce) {
    .faq-summary,
    .faq-image,
    .faq-content {
        transition: none;
        animation: none;
    }
    
    .faq-summary:hover {
        transform: none;
    }
}

/* Support pour le mode sombre */
@media (prefers-color-scheme: dark) {
    .home-faq-banner {
        background: #1a1a1a;
    }
    
    .faq-left {
        background: #2d2d2d;
    }
    
    .faq-title {
        color: #ffffff;
    }
    
    .faq-summary {
        color: #e0e0e0;
    }
    
    .faq-item[open] > .faq-summary {
        color: #ffffff;
    }
    
    .faq-content {
        color: #b0b0b0;
    }
    
    .faq-accordion {
        border-top-color: #444;
    }
    
    .faq-item {
        border-bottom-color: #444;
    }
    
    .faq-title::after {
        background: linear-gradient(90deg, #ffffff, transparent);
    }
}

/* Amélioration de l'accessibilité */
.faq-summary:focus {
    outline: 2px solid var(--hero-black);
    outline-offset: 2px;
}

.faq-image[role="img"]:focus {
    outline: 2px solid var(--hero-black);
    outline-offset: 2px;
}

/* États interactifs améliorés */
.faq-item[open] .faq-summary {
    font-weight: 700;
}

/* Loading state pour les images */
.faq-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;
    }
}

/* Optimisation des performances */
.faq-image {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

/* Transition fluide pour les changements de background */
.faq-image {
    transition: background-position 0.3s ease, background-size 0.3s ease;
}

/* Correction pour Safari iOS */
@supports (-webkit-touch-callout: none) {
    .faq-image {
        background-attachment: scroll;
    }
}

/* Support pour les navigateurs très anciens */
.faq-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;
}