/**
 * Eltéor - Widget avis site
 * Bandeau premium + carrousel automatique.
 *
 * IMPORTANT :
 * La mécanique du carrousel repose sur :
 * - .elteor-avis-defilants__viewport en overflow:hidden ;
 * - .elteor-avis-defilants__grille en flex / nowrap ;
 * - le gap CSS lu par le JavaScript ;
 * - les cartes en flex-shrink:0.
 */

.elteor-avis-defilants {
    --elteor-avis-gap: 16px;
    --elteor-avis-resume-width: 205px;
    --elteor-avis-hauteur: 206px;

    position: relative;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
    font-family: inherit;
}

.elteor-avis-defilants *,
.elteor-avis-defilants *::before,
.elteor-avis-defilants *::after {
    box-sizing: border-box;
}


/* ==========================================================
 * Bloc résumé Eltéor fixe à gauche
 * ========================================================== */

.elteor-avis-defilants__resume {
    position: relative;
    z-index: 2;
    display: flex;
    flex: 0 0 var(--elteor-avis-resume-width);
    width: var(--elteor-avis-resume-width);
    min-width: var(--elteor-avis-resume-width);
    height: var(--elteor-avis-hauteur);
    align-items: stretch;
    background: #ffffff;
    border: 1px solid rgba(15, 36, 55, 0.10);
    border-radius: 16px;
    box-shadow: 0 7px 24px rgba(15, 36, 55, 0.07);
}

.elteor-avis-defilants__resume-lien {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    padding: 18px 16px;
    color: #102637;
    text-align: center;
    text-decoration: none;
}

.elteor-avis-defilants__resume-lien:hover,
.elteor-avis-defilants__resume-lien:focus {
    color: #102637;
    text-decoration: none;
}

.elteor-avis-defilants__logo {
    display: block;
    width: 64px;
    height: 64px;
    margin: 0 auto 8px;
    object-fit: contain;
}

.elteor-avis-defilants__resume-etoiles {
    margin-bottom: 3px;
    color: #b67a3c;
    font-size: 17px;
    line-height: 1;
    letter-spacing: 1px;
    white-space: nowrap;
}

.elteor-avis-defilants__note {
    margin-top: 3px;
    color: #102637;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.15;
}

.elteor-avis-defilants__note span {
    font-size: 14px;
    font-weight: 500;
}

.elteor-avis-defilants__nombre {
    margin-top: 5px;
    color: #52616d;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.elteor-avis-defilants__voir {
    margin-top: 9px;
    color: #b67a3c;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}


/* ==========================================================
 * Zone carrousel
 *
 * min-width:0 est indispensable : la piste ne doit jamais
 * imposer sa largeur intrinsèque au conteneur Elementor.
 * ========================================================== */

.elteor-avis-defilants__carrousel {
    position: relative;
    flex: 1 1 auto;
    width: auto;
    max-width: 100%;
    min-width: 0;
    margin-left: var(--elteor-avis-gap);
    overflow: hidden;
}

.elteor-avis-defilants__viewport {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.elteor-avis-defilants__grille {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: var(--elteor-avis-gap);

    width: 100%;
    max-width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;

    will-change: transform;
}


/* ==========================================================
 * Cartes
 * ========================================================== */

.elteor-avis-card {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    min-width: 0;
    height: var(--elteor-avis-hauteur);
    padding: 21px 22px;
    background: #ffffff;
    border: 1px solid rgba(15, 36, 55, 0.10);
    border-radius: 16px;
    box-shadow: 0 7px 24px rgba(15, 36, 55, 0.07);
    color: #102637;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;    
}

.elteor-avis-card:hover,
.elteor-avis-card:focus,
.elteor-avis-card:visited {
    color: #102637;
    text-decoration: none;
}

.elteor-avis-card__haut {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.elteor-avis-card__etoiles {
    display: flex;
    align-items: center;
    gap: 2px;
    line-height: 1;
    white-space: nowrap;
}

.elteor-avis-card__etoile {
    font-size: 17px;
    color: #d9dde0;
}

.elteor-avis-card__etoile--active {
    color: #b67a3c;
}

.elteor-avis-card__verification {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    color: #52616d;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    position: relative;
    cursor: help;
}

.elteor-avis-card__info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    margin-left: 2px;
    border: 1px solid #8a969d;
    border-radius: 50%;
    color: #52616d;
    font-family: Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}

.elteor-avis-card__verification::after {
    content: attr(data-elteor-tooltip);

    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    right: 0;

    width: 260px;
    max-width: calc(100vw - 48px);
    padding: 10px 12px;

    background: #102637;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(15, 36, 55, 0.20);

    color: #ffffff;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.45;
    white-space: normal;
    text-align: left;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(-3px);

    transition:
        opacity 0.15s ease,
        transform 0.15s ease,
        visibility 0.15s ease;
}

.elteor-avis-card__verification:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.elteor-avis-card__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    border-radius: 50%;
    background: #102637;
    color: #ffffff;
    font-size: 11px;
    line-height: 1;
}

.elteor-avis-card__registered {
    position: relative;
    top: -0.15em;
    margin-left: 1px;
    font-size: 7px;
    font-weight: 600;
    line-height: 1;
}

.elteor-avis-card__titre {
    margin: 0 0 8px;
    padding: 0;
    color: #102637;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.elteor-avis-card__texte {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    margin: 0 0 18px;
    color: #485963;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
    margin: 0 0 14px;
}

.elteor-avis-card__bas {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 11px;
    border-top: 1px solid #edf0f2;
}

.elteor-avis-card__auteur {
    color: #102637;
    font-size: 13px;
    font-weight: 700;
}

.elteor-avis-card__date {
    flex-shrink: 0;
    color: #8a969d;
    font-size: 11px;
}


/* ==========================================================
 * Responsive
 * Le JS continue de gérer 3 / 2 / 1 cartes visibles.
 * ========================================================== */

@media (max-width: 1024px) {

    .elteor-avis-defilants {
        --elteor-avis-gap: 14px;
        --elteor-avis-resume-width: 180px;
    }

    .elteor-avis-defilants__resume-lien {
        padding: 16px 13px;
    }

    .elteor-avis-defilants__logo {
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 767px) {

    .elteor-avis-defilants {
        --elteor-avis-gap: 12px;

        display: block;
    }

    .elteor-avis-defilants__resume {
        width: 100%;
        min-width: 0;
        margin-bottom: 16px;
        height : auto;
    }

    .elteor-avis-defilants__resume-lien {
        display: grid;
        grid-template-columns: auto auto;
        grid-template-areas:
            "logo stars"
            "logo note"
            "logo count"
            "logo link";
        justify-content: center;
        column-gap: 14px;
        padding: 14px 16px;
        text-align: left;
    }

    .elteor-avis-defilants__logo {
        grid-area: logo;
        width: 62px;
        height: 62px;
        margin: 0;
        align-self: center;
    }

    .elteor-avis-defilants__resume-etoiles {
        grid-area: stars;
        align-self: end;
        margin: 0;
    }

    .elteor-avis-defilants__note {
        grid-area: note;
        margin-top: 2px;
        font-size: 20px;
    }

    .elteor-avis-defilants__nombre {
        grid-area: count;
        margin-top: 2px;
        font-size: 12px;
    }

    .elteor-avis-defilants__voir {
        grid-area: link;
        margin-top: 4px;
        font-size: 11px;
    }

    .elteor-avis-defilants__carrousel {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
    }

    .elteor-avis-card {
        padding: 18px 20px;
    }

    .elteor-avis-card__haut {
       margin-bottom: 10px;
    }

    .elteor-avis-card__verification {
        font-size: 10px;
    }
}
