/**
 * Styles Frontend pour les widgets Elementor - Property Reviews
 * Version 2.2.0 - Avec designs prédéfinis et animations
 */

/* =====================================================
   LAYOUTS DE BASE
   ===================================================== */

.prw-loop-wrapper {
    width: 100%;
    position: relative;
}

.prw-slides-container {
    display: flex;
    flex-wrap: wrap;
}

/* Layout Grille */
.prw-loop-grid .prw-slides-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Layout Liste */
.prw-loop-list .prw-slides-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Layout Masonry */
.prw-loop-masonry .prw-slides-container {
    column-count: 3;
    column-gap: 24px;
}

.prw-loop-masonry .prw-loop-item {
    break-inside: avoid;
    margin-bottom: 24px;
}

/* Layout Carousel */
.prw-loop-carousel .prw-slides-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 20px;
    padding-bottom: 10px;
}

.prw-loop-carousel .prw-slides-container::-webkit-scrollbar {
    display: none;
}

.prw-loop-carousel .prw-loop-item {
    flex: 0 0 calc((100% - 40px) / 3);
    min-width: calc((100% - 40px) / 3);
}

/* =====================================================
   ITEM DE BASE
   ===================================================== */

.prw-loop-item {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* =====================================================
   GUILLEMETS / QUOTE
   ===================================================== */

.prw-quote-icon {
    font-size: 48px;
    line-height: 1;
    color: #e0e0e0;
    font-family: Georgia, serif;
    margin-bottom: 10px;
}

/* =====================================================
   COMMENTAIRE
   ===================================================== */

.prw-loop-comment {
    color: #555555;
    line-height: 1.7;
    margin-bottom: 20px;
    flex-grow: 1;
}

.prw-loop-comment.has-quotes {
    font-style: italic;
}

/* =====================================================
   AUTEUR (Avatar + Nom + Note)
   ===================================================== */

.prw-loop-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.prw-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    flex-shrink: 0;
}

.prw-avatar svg {
    width: 60%;
    height: 60%;
}

.prw-author-info {
    flex-grow: 1;
}

.prw-loop-name {
    font-size: 1.05em;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

/* =====================================================
   ÉTOILES / NOTE
   ===================================================== */

.prw-loop-stars {
    display: flex;
    gap: 2px;
    font-size: 16px;
}

.prw-loop-stars .star-filled {
    color: #FFD700;
}

.prw-loop-stars .star-empty {
    color: #e0e0e0;
}

.prw-rating-number {
    font-size: 14px;
    color: #FFD700;
}

.prw-rating-number strong {
    font-size: 1.2em;
}

/* =====================================================
   META (Date + Plateforme)
   ===================================================== */

.prw-loop-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    font-size: 0.85em;
}

.prw-loop-platform {
    display: flex;
    align-items: center;
    gap: 6px;
}

.prw-platform-logo {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    object-fit: contain;
}

.prw-platform-name {
    color: #666;
    font-weight: 500;
}

.prw-loop-date {
    color: #999999;
}

/* Lien Avis vérifié */
.prw-verified-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 14px;
    background: #f0fdf4;
    color: #16a34a;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 20px;
    border: 1px solid #bbf7d0;
    transition: all 0.3s ease;
}

.prw-verified-link:hover {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}

.prw-verified-link svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* =====================================================
   NAVIGATION CAROUSEL (Flèches + Points)
   ===================================================== */

.prw-carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 25px;
    padding: 10px 0;
}

/* Flèches */
.prw-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #333;
    flex-shrink: 0;
}

.prw-arrow:hover {
    background: #333;
    border-color: #333;
    color: #fff;
}

.prw-arrow svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

/* Points */
.prw-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

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

.prw-dot:hover {
    background: #999999;
}

.prw-dot.active {
    background: #333333;
    transform: scale(1.2);
}

/* Styles des points */
.prw-dots-square .prw-dot {
    border-radius: 2px;
}

.prw-dots-line .prw-dot {
    width: 24px;
    height: 4px;
    border-radius: 2px;
}

.prw-dots-line .prw-dot.active {
    width: 36px;
    transform: none;
}

.prw-dots-pill .prw-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
}

.prw-dots-pill .prw-dot.active {
    width: 24px;
    transform: none;
}

/* =====================================================
   EFFETS AU SURVOL
   ===================================================== */

/* Élévation */
.prw-hover-lift .prw-loop-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Zoom */
.prw-hover-scale .prw-loop-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Lueur */
.prw-hover-glow .prw-loop-item:hover {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

/* Bordure colorée */
.prw-hover-border .prw-loop-item {
    border: 2px solid transparent;
}

.prw-hover-border .prw-loop-item:hover {
    border-color: #3b82f6;
}

/* Inclinaison */
.prw-hover-tilt .prw-loop-item:hover {
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
}

/* =====================================================
   ANIMATIONS D'ENTRÉE
   ===================================================== */

@keyframes prw-fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes prw-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes prw-slide-left {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes prw-slide-right {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes prw-zoom-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes prw-bounce {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    60% {
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.prw-anim-fade-up {
    animation: prw-fade-up 0.6s ease forwards;
    opacity: 0;
}

.prw-anim-fade-in {
    animation: prw-fade-in 0.6s ease forwards;
    opacity: 0;
}

.prw-anim-slide-left {
    animation: prw-slide-left 0.6s ease forwards;
    opacity: 0;
}

.prw-anim-slide-right {
    animation: prw-slide-right 0.6s ease forwards;
    opacity: 0;
}

.prw-anim-zoom-in {
    animation: prw-zoom-in 0.6s ease forwards;
    opacity: 0;
}

.prw-anim-bounce {
    animation: prw-bounce 0.8s ease forwards;
    opacity: 0;
}

.prw-anim-none {
    opacity: 1;
}

/* =====================================================
   DESIGNS PRÉDÉFINIS
   ===================================================== */

/* Modern Clean (défaut) */
.prw-preset-modern .prw-loop-item {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.prw-preset-modern .prw-quote-icon {
    color: #3b82f6;
}

/* Elegant Dark */
.prw-preset-elegant .prw-loop-item {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    color: #ffffff;
    border-radius: 20px;
}

.prw-preset-elegant .prw-loop-name {
    color: #ffffff;
}

.prw-preset-elegant .prw-loop-comment {
    color: #b8b8d1;
}

.prw-preset-elegant .prw-loop-date,
.prw-preset-elegant .prw-platform-name {
    color: #8888a8;
}

.prw-preset-elegant .prw-quote-icon {
    color: #6366f1;
}

.prw-preset-elegant .prw-loop-meta {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.prw-preset-elegant .prw-avatar {
    background: rgba(255, 255, 255, 0.1);
    color: #b8b8d1;
}

/* Minimal White */
.prw-preset-minimal .prw-loop-item {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    box-shadow: none;
}

.prw-preset-minimal .prw-quote-icon {
    display: none;
}

.prw-preset-minimal .prw-loop-comment {
    font-style: normal;
}

/* Card Shadow */
.prw-preset-card_shadow .prw-loop-item {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border-left: 4px solid #f59e0b;
}

.prw-preset-card_shadow .prw-quote-icon {
    color: #f59e0b;
}

/* Gradient */
.prw-preset-gradient .prw-loop-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 20px;
}

.prw-preset-gradient .prw-loop-name {
    color: #ffffff;
}

.prw-preset-gradient .prw-loop-comment {
    color: rgba(255, 255, 255, 0.9);
}

.prw-preset-gradient .prw-loop-date,
.prw-preset-gradient .prw-platform-name {
    color: rgba(255, 255, 255, 0.7);
}

.prw-preset-gradient .prw-quote-icon {
    color: rgba(255, 255, 255, 0.3);
}

.prw-preset-gradient .prw-loop-meta {
    border-top-color: rgba(255, 255, 255, 0.2);
}

.prw-preset-gradient .prw-avatar {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.prw-preset-gradient .prw-loop-stars .star-filled {
    color: #fbbf24;
}

.prw-preset-gradient .prw-loop-stars .star-empty {
    color: rgba(255, 255, 255, 0.3);
}

/* Speech Bubble */
.prw-preset-bubble .prw-loop-item {
    background: #f8f9fa;
    border-radius: 20px 20px 20px 4px;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.prw-preset-bubble .prw-loop-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    width: 0;
    height: 0;
    border: 12px solid transparent;
    border-top-color: #f8f9fa;
    border-bottom: 0;
    margin-bottom: -12px;
}

.prw-preset-bubble .prw-quote-icon {
    color: #10b981;
}

/* Airbnb Style */
.prw-preset-airbnb .prw-loop-item {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    padding: 24px;
}

.prw-preset-airbnb .prw-quote-icon {
    display: none;
}

.prw-preset-airbnb .prw-loop-comment {
    font-style: normal;
    font-size: 16px;
    line-height: 1.5;
}

.prw-preset-airbnb .prw-loop-stars .star-filled {
    color: #FF385C;
}

.prw-preset-airbnb .prw-avatar {
    background: #FF385C;
    color: #ffffff;
}

/* =====================================================
   MESSAGE ÉDITEUR
   ===================================================== */

.prw-no-reviews-editor {
    padding: 50px;
    text-align: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    border: 2px dashed #ccc;
    border-radius: 12px;
    color: #666;
}

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

@media (max-width: 1024px) {
    .prw-loop-grid .prw-slides-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .prw-loop-masonry .prw-slides-container {
        column-count: 2;
    }
    
    .prw-loop-carousel .prw-loop-item {
        flex: 0 0 calc(50% - 10px);
        min-width: calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .prw-loop-grid .prw-slides-container {
        grid-template-columns: 1fr;
    }
    
    .prw-loop-masonry .prw-slides-container {
        column-count: 1;
    }
    
    .prw-loop-carousel .prw-loop-item {
        flex: 0 0 100%;
        min-width: 100%;
    }
    
    .prw-loop-carousel .prw-slides-container {
        gap: 0;
    }
    
    .prw-carousel-nav {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 15px;
    }
    
    .prw-carousel-nav .prw-arrow {
        width: 40px;
        height: 40px;
    }
    
    .prw-carousel-nav .prw-arrow svg {
        width: 18px;
        height: 18px;
    }
    
    .prw-loop-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .prw-loop-item {
        padding: 20px;
    }
}

/* =====================================================
   UTILITAIRES
   ===================================================== */

.prw-stars-wrapper {
    display: inline-flex;
    gap: 2px;
}

.prw-stars-wrapper span {
    display: inline-block;
}
