/* ========================================
   OKLOCAL Reviews Widget - Structure Trustindex/Elfsight
   ======================================== */

/* ===== CONTENEUR PRINCIPAL ===== */
.oklocal-widget,
.okl-widget {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    overflow: visible;
    box-sizing: border-box;
    position: relative;
    padding: 20px 20px 5px 20px;
}

.oklocal-widget *,
.okl-widget * {
    box-sizing: border-box;
}

/* ===== BADGE DE GAUCHE (FIXE) ===== */
.oklocal-badge,
.okl-rating-card {
    width: 200px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #fdfefe, #edf2ff);
    border-radius: 12px;
    border: 1px solid #eceef3;
    padding: 26px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: flex-start;
    min-height: 205px;
    align-self: flex-end;
    margin-bottom: 5px;
}

/* ===== ZONE SLIDER (VIEWPORT) ===== */
.oklocal-slider-viewport,
.okl-reviews-section {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.oklocal-slider-viewport .okl-carousel-container,
.oklocal-slider-container {
    position: relative;
    overflow: hidden;
    padding: 0 8px 8px;
}

/* ===== TRACK DES CARTES ===== */
.oklocal-track,
.okl-carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.3s ease;
    will-change: transform;
}

/* ===== CARTES D'AVIS ===== */
.oklocal-card,
.okl-review-card {
    flex: 0 0 33.33%;
    max-width: 33.33%;
    background: #ffffff;
    border: 1px solid #eceef3;
    border-radius: 8px;
    padding: 15px;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 175px;
    height: 100%;
}

.oklocal-card:hover,
.okl-review-card:hover {
    transform: translateY(-4px);
}

/* ===== RESPONSIVE TABLETTE ===== */
@media (max-width: 900px) {
    .oklocal-card,
    .okl-review-card {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 600px) {
    .oklocal-widget,
    .okl-widget {
        flex-direction: column;
        align-items: center;
    }
    
    .oklocal-badge,
    .okl-rating-card {
        width: 100%;
        max-width: 300px;
        margin-bottom: 20px;
    }
    
    .oklocal-card,
    .okl-review-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ===== STYLES INTERNES DES CARTES ===== */
.okl-excellent-text {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

.okl-stars {
    display: flex;
    gap: 4px;
    margin: 0 0 15px 0;
}

.okl-star {
    width: 24px;
    height: 24px;
    fill: #ffc107;
}

.okl-star-empty {
    fill: #e0e0e0;
}

.okl-reviews-count {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 0;
}

.okl-google-logo {
    width: 80px;
    height: auto;
    margin-top: auto;
}

/* Header carte avis */
.okl-review-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.okl-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    flex-shrink: 0;
}

.okl-avatar-purple { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.okl-avatar-green { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.okl-avatar-orange { background: linear-gradient(135deg, #e67e22, #d35400); }
.okl-avatar-blue { background: linear-gradient(135deg, #3498db, #2980b9); }
.okl-avatar-red { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.okl-avatar-teal { background: linear-gradient(135deg, #1abc9c, #16a085); }

.okl-reviewer-info {
    flex: 1;
}

.okl-reviewer-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px 0;
}

.okl-review-date {
    font-size: 12px;
    color: #888;
    margin: 0;
}

.okl-card-google-logo {
    width: 20px;
    height: auto;
    opacity: 0.7;
}

.okl-review-stars {
    display: flex;
    gap: 3px;
    margin-bottom: 12px;
}

.okl-review-stars .okl-star {
    width: 16px;
    height: 16px;
    fill: #facc15;
}

.okl-review-text {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.okl-review-text.expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

.okl-read-more {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    color: #3498db;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    font-weight: 500;
}

.okl-read-more:hover {
    text-decoration: underline;
}

/* ===== NAVIGATION ===== */
.okl-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
    transition: all 0.3s ease;
    z-index: 10;
}

.okl-nav-button:hover {
    background: #f0f4ff;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.2);
}

.okl-nav-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.okl-nav-button svg {
    width: 20px;
    height: 20px;
    fill: #1f2937;
}

.okl-nav-prev { left: 8px; top: calc(50% + 60px); }
.okl-nav-next { right: 8px; top: calc(50% + 60px); }

@media (max-width: 768px) {
    .okl-nav-prev { left: 4px; top: calc(50% + 60px); }
    .okl-nav-next { right: 4px; top: calc(50% + 60px); }
}

/* ===== BADGE CONFIANCE ===== */
.okl-trust-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 8px 17px;
    background-color: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 7px;
    font-weight: 500;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
}

.okl-trust-badge:hover {
    background-color: #1d4ed8;
    color: white;
    text-decoration: none;
}

.okl-trust-badge-text {
    font-size: 12px;
    color: white;
}

/* ===== LOADING & ERREURS ===== */
.okl-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.okl-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: okl-spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes okl-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.okl-error {
    text-align: center;
    padding: 40px 20px;
    color: #e74c3c;
    background: #fee;
    border-radius: 8px;
}

/* ===== ACCESSIBILITÉ ===== */
.oklocal-widget:focus-visible,
.okl-widget:focus-visible,
.okl-nav-button:focus-visible,
.okl-read-more:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}
