/*
 * LV Projets – Témoignages
 * Tous les styles du module sont centralisés dans ce fichier.
 * Version 1.7.0
 */

/* =========================================================
   ADMINISTRATION
   ========================================================= */

/* Interface d'édition volontairement épurée : aucun éditeur/description WordPress par défaut. */
body.post-type-lvp_temoignage #titlediv,
body.post-type-lvp_temoignage #postdiv,
body.post-type-lvp_temoignage #postdivrich,
body.post-type-lvp_temoignage #postexcerpt,
body.post-type-lvp_temoignage .editor-post-title,
body.post-type-lvp_temoignage .edit-post-visual-editor {
    display: none !important;
}

.lvp-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
    padding: 6px 0;
}

.lvp-field label {
    display: block;
    margin-bottom: 6px;
}

.lvp-field-full {
    grid-column: 1 / -1;
}

.lvp-field textarea {
    min-height: 160px;
}

.lvp-years-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
}

.lvp-years-header label {
    margin-bottom: 0;
}

.lvp-years-header a {
    white-space: nowrap;
}

.lvp-years {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 4px;
}

.lvp-year-option {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    margin: 0 !important;
    font-weight: 400;
}

@media (max-width: 782px) {
    .lvp-admin-grid {
        grid-template-columns: 1fr;
    }

    .lvp-field-full {
        grid-column: auto;
    }

    .lvp-years-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}

/* =========================================================
   AFFICHAGE PUBLIC
   ========================================================= */

.lvp-testimonials {
    --lvp-gap: 64px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 50px 14px;
}

.lvp-testimonials *,
.lvp-testimonials *::before,
.lvp-testimonials *::after {
    box-sizing: border-box;
}

.lvp-testimonials__viewport {
    overflow: hidden;
    width: 100%;
}

.lvp-testimonials__track {
    display: flex;
    gap: var(--lvp-gap);
    align-items: flex-start;
    transition: transform .55s cubic-bezier(.22,.61,.36,1);
    will-change: transform;
}

/*
 * Vitesse du mouvement du carrousel.
 * Ces trois valeurs correspondent au réglage disponible dans WPBakery.
 * Elles restent ici, dans style.css, pour que tout le rendu visuel soit modifiable
 * depuis un seul fichier.
 */
.lvp-testimonials--speed-fast .lvp-testimonials__track {
    transition-duration: .30s;
}

.lvp-testimonials--speed-normal .lvp-testimonials__track {
    transition-duration: .55s;
}

.lvp-testimonials--speed-slow .lvp-testimonials__track {
    transition-duration: .90s;
}

.lvp-testimonial {
    flex: 0 0 calc((100% - var(--lvp-gap)) / 2);
    min-width: 0;
    padding: 0;
    color: inherit;
}

/*
 * Le JS applique, sur desktop, la même min-height à tous les blocs citation.
 * Le nom, la catégorie et l'année commencent donc toujours à la même hauteur,
 * calculée d'après le témoignage le plus haut.
 */
.lvp-testimonial__quote {
    position: relative;
    border-left: 1px solid rgba(0,0,0,.16);
    padding: 12px 18px 0 26px;
    margin-bottom: 16px;
}

.lvp-testimonial__text {
    font-style: italic;
    line-height: 1.7;
    font-size: 15px;
}

.lvp-testimonial__text p {
    margin: 0 0 .65em;
}

.lvp-testimonial__text p:last-child {
    margin-bottom: 0;
}

/* Guillemets replacés à l'intérieur du bloc pour éviter leur rognage par le viewport. */
.lvp-testimonial__quote-mark {
    position: absolute;
    left: 10px;
    top: 1px;
    font-family: Georgia, serif;
    font-size: 34px;
    line-height: 1;
    color: rgba(0,0,0,.22);
    font-style: normal;
}

/* Le guillemet fermant reste dans le flux du texte : il suit donc le dernier
 * caractère du témoignage, même lorsque les blocs sont égalisés en hauteur. */
.lvp-testimonial__quote-mark--end {
    position: static;
    display: inline;
    margin-left: 4px;
    font-size: 28px;
    line-height: 0;
    vertical-align: -0.18em;
}

.lvp-testimonial__meta {
    min-width: 0;
}

.lvp-testimonial__identity {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.35;
    margin-bottom: 5px;
}

.lvp-testimonial__category {
    font-size: 15px;
    line-height: 1.35;
}

.lvp-testimonial__years {
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.35;
    color: rgba(0,0,0,.65);
}

/* Navigation : grande flèche seule, sans cercle. */
.lvp-testimonials__arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 64px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #333;
    padding: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: none;
    transition: transform .2s ease, opacity .2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.lvp-testimonials__arrow:hover,
.lvp-testimonials__arrow:focus-visible {
    transform: translateY(-50%) scale(1.08);
    outline: none;
}

.lvp-testimonials__arrow:focus-visible {
    outline: 1px dotted currentColor;
    outline-offset: 2px;
}

.lvp-testimonials__arrow span {
    display: block;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 50px;
    font-weight: 300;
    line-height: .75;
    transform: translateY(-1px);
}

.lvp-testimonials__arrow--prev {
    left: 0;
}

.lvp-testimonials__arrow--next {
    right: 0;
}

.lvp-testimonials[data-count="1"] .lvp-testimonials__arrow,
.lvp-testimonials.is-static .lvp-testimonials__arrow {
    display: none;
}

/* Les clones servant à la boucle infinie restent visuellement identiques mais sont ignorés des lecteurs d'écran. */
.lvp-testimonial.is-clone {
    pointer-events: none;
}

@media (max-width: 767px) {
    .lvp-testimonials {
        --lvp-gap: 24px;
        padding-left: 38px;
        padding-right: 38px;
    }

    .lvp-testimonial {
        flex-basis: 100%;
    }

    .lvp-testimonial__quote {
        min-height: 0 !important;
    }

    .lvp-testimonial__text,
    .lvp-testimonial__identity,
    .lvp-testimonial__category {
        font-size: 14px;
    }

    .lvp-testimonial__years {
        font-size: 13px;
    }

    .lvp-testimonials__arrow {
        width: 36px;
        height: 56px;
    }

    .lvp-testimonials__arrow span {
        font-size: 44px;
    }
}
