/* Custom Trustpilot Widget Styles */
.custom-trustpilot-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: inline-block;
    margin: 10px 0;
}

.custom-trustpilot-widget .ctp-loading {
    color: #666;
    font-size: 14px;
    padding: 10px;
}

.custom-trustpilot-widget .ctp-error {
    color: #d32f2f;
    font-size: 14px;
    padding: 10px;
    background-color: #ffebee;
    border-left: 4px solid #d32f2f;
    border-radius: 4px;
}

.custom-trustpilot-widget .ctp-rating-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.custom-trustpilot-widget .ctp-quality-text {
    font-weight: 600;
    font-size: 16px;
    color: #00B67A;
    margin-right: 8px;
}

.custom-trustpilot-widget .ctp-stars {
    display: inline-flex;
    align-items: center;
    margin: 0 8px;
    width: 80px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
}

/* Masquer les étoiles texte, on utilise l'image de fond */
.custom-trustpilot-widget .ctp-star {
    display: none;
}

.custom-trustpilot-widget .ctp-review-count {
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.custom-trustpilot-widget .ctp-review-text-block {
    text-decoration: underline;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.custom-trustpilot-widget .ctp-review-text-block:hover {
    color: #00B67A;
}

.custom-trustpilot-widget .ctp-text {
    font-size: 14px;
    color: #333;
    font-weight: 400;
}

.custom-trustpilot-widget .ctp-logo {
    display: inline-block;
    width: 80px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    text-indent: -9999px;
    overflow: hidden;
}

.custom-trustpilot-widget .ctp-logo::before {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .custom-trustpilot-widget .ctp-rating-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .custom-trustpilot-widget .ctp-quality-text {
        margin-right: 0;
        margin-bottom: 2px;
    }
    
    .custom-trustpilot-widget .ctp-stars {
        margin: 2px 0;
        width: 70px;
        height: 14px;
    }
    
    .custom-trustpilot-widget .ctp-logo {
        width: 70px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .custom-trustpilot-widget .ctp-quality-text {
        font-size: 14px;
    }
    
    .custom-trustpilot-widget .ctp-stars {
        width: 60px;
        height: 12px;
    }
    
    .custom-trustpilot-widget .ctp-logo {
        width: 60px;
        height: 16px;
    }
    
    .custom-trustpilot-widget .ctp-review-count,
    .custom-trustpilot-widget .ctp-text {
        font-size: 12px;
    }
}

/* Animation de chargement */
.custom-trustpilot-widget .ctp-loading {
    animation: ctpPulse 1.5s infinite;
}

@keyframes ctpPulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Style pour le lien vers Trustpilot */
.custom-trustpilot-widget a {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
}

.custom-trustpilot-widget a:hover {
    opacity: 0.8;
}

/* Styles pour l'administration WordPress */
.custom-trustpilot-admin .form-table th {
    width: 200px;
}

.custom-trustpilot-admin .regular-text {
    width: 400px;
}

.custom-trustpilot-admin .description {
    font-style: italic;
    color: #666;
}

/* Widget compact pour sidebar */
.widget .custom-trustpilot-widget {
    text-align: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.widget .custom-trustpilot-widget .ctp-rating-container {
    flex-direction: column;
    gap: 8px;
}

.widget .custom-trustpilot-widget .ctp-stars {
    margin: 5px 0;
}

.widget .custom-trustpilot-widget .ctp-review-text-block {
    justify-content: center;
}

/* Styles pour Elementor */
.elementor-widget-custom_trustpilot .custom-trustpilot-widget {
    width: 100%;
}

/* Préloader plus élégant */
.custom-trustpilot-widget .ctp-loading::after {
    content: "...";
    animation: ctpDots 1.5s infinite;
}

@keyframes ctpDots {
    0%, 20% { content: ""; }
    40% { content: "."; }
    60% { content: ".."; }
    80%, 100% { content: "..."; }
}