/**
 * CSS de Production Final - Système d'Avis Salnea
 * Thème: Apple Luxe (étoiles jaunes/dorées)
 * Layout: Carousel horizontal
 * Flèches: Style Airbnb (cercles blancs)
 * Modal: Hybride Apple x Airbnb
 * 
 * Version optimisée - Tous les autres styles supprimés
 * Date: 05 Octobre 2025
 */

/* ========================================
   THEME APPLE LUXE - ÉTOILES JAUNES/DORÉES
   ======================================== */

.salnea-reviews-container {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    /* PAS de max-width ici - on le met seulement sur le titre */
}

/* Titre de la section - ALIGNÉ avec les autres titres */
.reviews-section-title,
.trustpilot-title {
    font-size: 22px !important;
    font-weight: 600 !important;
    color: #000 !important;
    margin: 0 auto 20px auto !important; /* Centré avec auto */
    letter-spacing: -0.3px !important;
    max-width: 1000px !important; /* Largeur limitée comme les autres titres */
    padding: 0 !important; /* AUCUN padding */
}

/* Cartes d'avis - Style Apple Luxe */
.review-card-trustpilot {
    max-width: 320px;
    width: 320px;
    border: none;
    background: #fbfbfd;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    padding: 30px;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.review-card-trustpilot:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

/* ÉTOILES JAUNES/DORÉES - STYLE APPLE LUXE */

/* Header de la carte avec étoiles */
.review-card-header {
    margin-bottom: 16px;
}

.review-stars-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 2px !important;
    margin-bottom: 12px !important;
}

.star-trustpilot {
    width: 14px;
    height: 14px;
    background: #D4AF37 !important; /* OR/JAUNE */
    clip-path: polygon(
        50% 0%, 
        61% 35%, 
        98% 35%, 
        68% 57%, 
        79% 91%, 
        50% 70%, 
        21% 91%, 
        32% 57%, 
        2% 35%, 
        39% 35%
    );
}

.star-trustpilot.empty {
    background: #f0f0f0 !important;
}

/* Texte note (ex: "5/5") à côté des étoiles */
.review-rating-text {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1d1d1f !important;
    margin-left: 8px !important;
    letter-spacing: -0.02em !important;
}

/* Contenu de la carte */
.review-card-content {
    font-size: 13px;
    line-height: 1.6;
    font-weight: 300;
    color: #424245;
    margin: 15px 0;
}

.review-card-title {
    font-size: 15px;
    font-weight: 500;
    color: #1d1d1f;
    margin: 12px 0 8px 0;
}

.review-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.review-author-name {
    font-size: 12px;
    font-weight: 500;
    color: #1d1d1f;
}

.review-date-badge {
    font-size: 11px;
    color: #86868b;
    font-weight: 400;
}

/* Bouton "Écrire un avis" */
.btn-write-review,
#toggle-review-form-btn {
    background: #000 !important;
    color: white !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.btn-write-review:hover,
#toggle-review-form-btn:hover {
    background: #333 !important;
    transform: translateY(-1px) !important;
}

/* ========================================
   CAROUSEL - LAYOUT HORIZONTAL
   ======================================== */

/* Container principal - pas de padding supplémentaire (géré par la section) */
.layout-carousel .reviews-carousel-container {
    position: relative !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
}

/* Viewport - CRUCIAL pour masquer le débordement */
.layout-carousel .carousel-viewport {
    position: relative !important;
    width: calc(100% - 120px) !important; /* Espace pour les boutons */
    margin: 0 auto !important;
    overflow: hidden !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
}

/* Track - conteneur des cartes qui bouge */
.layout-carousel .reviews-carousel-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 20px !important;
    transition: transform 0.4s ease !important;
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
}

/* Cartes avec taille fixe */
.layout-carousel .review-card-trustpilot {
    flex: 0 0 320px !important;
    width: 320px !important;
    min-width: 320px !important;
    max-width: 320px !important;
    height: auto !important;
}

/* ========================================
   FLÈCHES NAVIGATION - STYLE AIRBNB
   ======================================== */

/* Supprimer les anciennes flèches du PHP */
.layout-carousel .carousel-viewport button.carousel-nav-prev,
.layout-carousel .carousel-viewport button.carousel-nav-next {
    display: none !important;
}

/* Nouvelles flèches - Style Airbnb (cercles blancs avec bordure) */
.layout-carousel .carousel-nav-prev,
.layout-carousel .carousel-nav-next,
.carousel-nav-prev,
.carousel-nav-next {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 44px !important;
    height: 44px !important;
    background: white !important;
    border: 1px solid #ddd !important;
    border-radius: 50% !important;
    font-size: 24px !important;
    cursor: pointer !important;
    z-index: 100 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    transition: all 0.2s ease !important;
}

.layout-carousel .carousel-nav-prev,
.carousel-nav-prev {
    left: 20px !important;
}

.layout-carousel .carousel-nav-next,
.carousel-nav-next {
    right: 20px !important;
}

.layout-carousel .carousel-nav-prev:hover:not(:disabled),
.layout-carousel .carousel-nav-next:hover:not(:disabled),
.carousel-nav-prev:hover:not(:disabled),
.carousel-nav-next:hover:not(:disabled) {
    background: #f5f5f5 !important;
    border-color: #333 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    transform: translateY(-50%) scale(1.05) !important;
}

.layout-carousel .carousel-nav-prev:disabled,
.layout-carousel .carousel-nav-next:disabled,
.carousel-nav-prev:disabled,
.carousel-nav-next:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
}

/* Cacher les boutons du wrapper s'ils existent */
.layout-carousel .carousel-wrapper button {
    display: none !important;
}

/* Garder seulement les boutons directs du container */
.layout-carousel > button.carousel-nav-prev,
.layout-carousel > button.carousel-nav-next {
    display: flex !important;
}

/* S'assurer que le transform s'applique au track */
.layout-carousel .reviews-carousel-track[style*="transform"] {
    transform: var(--carousel-transform) !important;
}

/* ========================================
   SECTION AVIS
   ======================================== */

.reviews-trustpilot-section {
    padding: 40px 0 !important; /* Pas de padding latéral - le carousel prend toute la largeur */
}

.reviews-actions-bottom {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    max-width: 1000px !important; /* Largeur limitée */
    margin-left: auto !important; /* Centré */
    margin-right: auto !important; /* Centré */
    padding: 0 60px !important; /* Padding identique */
}

.view-all-reviews-btn {
    background: transparent !important;
    color: #0071e3 !important;
    border: 1px solid #0071e3 !important;
    padding: 10px 24px !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.view-all-reviews-btn:hover {
    background: #0071e3 !important;
    color: white !important;
}

/* Message "Aucun avis" */
.no-reviews {
    text-align: center;
    padding: 60px 20px;
}

.no-reviews p {
    font-size: 16px;
    color: #86868b;
    margin-bottom: 20px;
}

/* ========================================
   PAGINATION DOTS (optionnel)
   ======================================== */

.carousel-pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 25px;
}

.pagination-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d0d0d0;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.pagination-dot:hover {
    background: #999;
}

.pagination-dot.active {
    background: #000;
    width: 24px;
    border-radius: 4px;
}

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

@media (max-width: 968px) {
    .layout-carousel .carousel-viewport {
        width: calc(100% - 90px) !important;
    }
    
    .layout-carousel .review-card-trustpilot {
        flex: 0 0 280px !important;
        width: 280px !important;
        min-width: 280px !important;
        max-width: 280px !important;
    }
    
    .layout-carousel .carousel-nav-prev,
    .layout-carousel .carousel-nav-next,
    .carousel-nav-prev,
    .carousel-nav-next {
        width: 36px !important;
        height: 36px !important;
        font-size: 20px !important;
    }
    
    .layout-carousel .carousel-nav-prev,
    .carousel-nav-prev {
        left: 10px !important;
    }
    
    .layout-carousel .carousel-nav-next,
    .carousel-nav-next {
        right: 10px !important;
    }
    
    .reviews-section-title,
    .trustpilot-title {
        font-size: 24px;
    }
    
    .reviews-actions-bottom {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .layout-carousel .review-card-trustpilot {
        flex: 0 0 260px !important;
        width: 260px !important;
        min-width: 260px !important;
        max-width: 260px !important;
        padding: 20px;
    }
    
    .review-card-content {
        font-size: 12px;
    }
}

/* ========================================
   ANIMATIONS & TRANSITIONS
   ======================================== */

.reviews-carousel-track {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Empêcher le débordement */
.description-block#customer-reviews-section {
    position: relative;
    overflow: hidden;
}

/* Limiter la zone du carousel */
.layout-carousel .reviews-carousel-container {
    max-width: 100%;
    position: relative;
}

/* ========================================
   RESET & BOX SIZING
   ======================================== */

.layout-carousel * {
    box-sizing: border-box !important;
}

/* ========================================
   MODAL STYLE SWITCHER - DÉSACTIVÉ
   ======================================== */

/* Masquer le sélecteur de styles de modal (style Hybride fixé) */
.modal-style-switcher,
.style-switcher-toggle,
.style-switcher-panel {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* ========================================
   MODAL FORMULAIRE D'AVIS - ESSENTIEL
   ======================================== */

.review-form-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999 !important;
    padding: 40px;
    overflow-y: auto;
}

.review-form-modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.review-form-content {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    animation: slideUp 0.3s ease;
    z-index: 100000 !important;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-form-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f7;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: #86868b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100001 !important;
}

.close-form-btn:hover {
    background: #e8e8ed;
    color: #1d1d1f;
}

/* Styles du formulaire */
.review-form h3 {
    margin: 0 0 30px 0;
    color: #1d1d1f;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1d1d1f;
    font-size: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f5f5f7;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0071e3;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

/* Rating input - ANCIEN SYSTÈME DÉSACTIVÉ */
/* Remplacé par star-rating-simple.css (système from scratch) */
/*
.rating-group {
    margin-bottom: 30px;
}

.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 8px;
}

.star-rating-input input {
    display: none;
}

.star-rating-input label {
    cursor: pointer;
    margin: 0 !important;
}

.star-rating-input label .dashicons,
.star-rating-input label span {
    font-size: 28px;
    color: #d2d2d7;
    transition: color 0.2s ease;
}

.star-rating-input input:checked + label .dashicons,
.star-rating-input input:checked + label span {
    color: #D4AF37 !important;
}

.star-rating-input input:checked ~ label .dashicons,
.star-rating-input input:checked ~ label span {
    color: #D4AF37 !important;
}

.star-rating-input label:hover .dashicons,
.star-rating-input label:hover span {
    color: #D4AF37 !important;
}

.star-rating-input label:hover ~ label .dashicons,
.star-rating-input label:hover ~ label span {
    color: #D4AF37 !important;
}

.rating-text {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: #86868b;
    min-height: 20px;
}
*/

/* Rating group - Minimal styling conservé */
.rating-group {
    margin-bottom: 30px;
}

/* Submit button */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-submit-review {
    background: #0071e3 !important;
    color: white !important;
    border: none !important;
    padding: 12px 32px !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    flex: 1 !important;
    transition: all 0.3s ease !important;
}

.btn-submit-review:hover {
    background: #0077ed !important;
}

.btn-submit-review:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
}

.btn-submit-review .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-cancel {
    background: #f5f5f7 !important;
    color: #1d1d1f !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.btn-cancel:hover {
    background: #e8e8ed !important;
}

/* Messages */
.form-message {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
}

.form-message.success {
    background: #d1f4d1;
    color: #1d5c1d;
    border: 1px solid #b3e6b3;
}

.form-message.error {
    background: #ffd1d1;
    color: #8b0000;
    border: 1px solid #ffb3b3;
}

/* Compteur de caractères */
.char-counter {
    text-align: right;
    margin-top: 5px;
    font-size: 12px;
    color: #86868b;
}

.char-counter .current {
    font-weight: 600;
    color: #1d1d1f;
}

/* Champ honeypot (anti-spam) */
.form-group.honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* Responsive modal */
@media (max-width: 768px) {
    .review-form-modal {
        padding: 20px;
    }
    
    .review-form-content {
        padding: 30px 20px;
        border-radius: 16px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-submit-review,
    .btn-cancel {
        width: 100% !important;
    }
}
