/* =============================================================================
   ttk-avis.css — page publique /Avis (mur de témoignages)
   -----------------------------------------------------------------------------
   Page à style unique (charte graphique) : tout le transverse vient de
   `ttk-foundation.css` (carte, notation, avatar, badge, barre de progression,
   bouton, modale, état vide). Ce fichier ne porte QUE la mise en page propre au
   mur d'avis : hero + carte de synthèse, grille des avis, bandeau d'appel.
   Préfixe : `ttk-avis-`.
   ============================================================================= */

/* =============================================================================
   1. HERO + CARTE DE SYNTHÈSE
   ============================================================================= */
.ttk-avis-hero {
    position: relative;
    padding: var(--ttk-space-10) 0 var(--ttk-space-8);
    overflow: hidden;
}

/* Halo indigo derrière le hero (décor, non cliquable). */
.ttk-avis-hero-glow {
    position: absolute;
    inset: 0;
    background: var(--ttk-gradient-glow);
    pointer-events: none;
}

.ttk-avis-hero-content {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--ttk-space-8);
    align-items: center;
}

.ttk-avis-hero-title {
    margin: var(--ttk-space-4) 0 var(--ttk-space-3);
}

.ttk-avis-hero-subtitle {
    max-width: 32rem;
    color: var(--ttk-text-secondary);
    line-height: var(--ttk-leading-relaxed);
    margin: 0;
}

.ttk-avis-summary {
    min-width: 300px;
}

.ttk-avis-summary-main {
    text-align: center;
    padding-bottom: var(--ttk-space-5);
    border-bottom: 1px solid var(--ttk-border);
    margin-bottom: var(--ttk-space-5);
}

.ttk-avis-score {
    margin: 0 0 var(--ttk-space-3);
    line-height: var(--ttk-leading-tight);
}

.ttk-avis-score-value {
    font-family: var(--ttk-font-title);
    font-size: var(--ttk-text-3xl);
    font-weight: var(--ttk-weight-extrabold);
    letter-spacing: -0.02em;
    color: var(--ttk-text);
}

.ttk-avis-score-max {
    font-size: var(--ttk-text-lg);
    font-weight: var(--ttk-weight-regular);
    color: var(--ttk-text-muted);
}

.ttk-avis-score-stars {
    justify-content: center;
    margin-bottom: var(--ttk-space-3);
}

.ttk-avis-count {
    font-size: var(--ttk-text-sm);
    color: var(--ttk-text-muted);
    margin: 0;
}

.ttk-avis-count strong {
    color: var(--ttk-text-secondary);
}

/* -- Répartition des notes (5 → 1) -- */
.ttk-avis-breakdown {
    display: flex;
    flex-direction: column;
    gap: var(--ttk-space-2);
}

.ttk-avis-breakdown-row {
    display: flex;
    align-items: center;
    gap: var(--ttk-space-2);
}

.ttk-avis-breakdown-label {
    width: 0.75rem;
    font-size: var(--ttk-text-xs);
    color: var(--ttk-text-secondary);
    text-align: right;
}

/* L'étoile de notation est pleine (≠ icône stroke) — cf. charte .ttk-rating. */
.ttk-avis-breakdown-star {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--ttk-warning);
    fill: currentColor;
}

.ttk-avis-breakdown-bar {
    flex: 1;
}

.ttk-avis-breakdown-count {
    width: 1.5rem;
    font-size: var(--ttk-text-xs);
    color: var(--ttk-text-muted);
    text-align: right;
}

/* =============================================================================
   2. GRILLE DES AVIS
   ============================================================================= */
.ttk-avis-section {
    padding: var(--ttk-space-8) 0 var(--ttk-space-10);
}

.ttk-avis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--ttk-space-5);
}

.ttk-avis-item {
    position: relative;
    display: flex;
    flex-direction: column;
}

.ttk-avis-item:hover {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: var(--ttk-shadow-lg);
}

/* Guillemets décoratifs en filigrane, dans l'angle de la carte. */
.ttk-avis-item-quote {
    position: absolute;
    top: var(--ttk-space-4);
    right: var(--ttk-space-4);
    color: var(--ttk-primary);
    opacity: 0.2;
}

.ttk-avis-item-rating {
    margin-bottom: var(--ttk-space-4);
}

.ttk-avis-item-title {
    font-family: var(--ttk-font-title);
    font-size: var(--ttk-text-md);
    font-weight: var(--ttk-weight-semibold);
    color: var(--ttk-text);
    line-height: var(--ttk-leading-normal);
    margin: 0 0 var(--ttk-space-3);
    padding-right: var(--ttk-space-8);
}

.ttk-avis-item-content {
    flex-grow: 1;
    font-size: var(--ttk-text-sm);
    color: var(--ttk-text-secondary);
    line-height: var(--ttk-leading-relaxed);
    margin: 0 0 var(--ttk-space-4);
    padding: 0;
    border: none;
}

.ttk-avis-item-more {
    align-self: flex-start;
    margin-bottom: var(--ttk-space-4);
    padding-left: 0;
    padding-right: 0;
    color: var(--ttk-primary-light);
}

.ttk-avis-item-footer {
    display: flex;
    align-items: center;
    gap: var(--ttk-space-3);
    padding-top: var(--ttk-space-4);
    border-top: 1px solid var(--ttk-border-subtle);
    margin-top: auto;
}

.ttk-avis-item-author {
    flex: 1;
    min-width: 0;
}

.ttk-avis-item-author-name {
    display: block;
    font-size: var(--ttk-text-sm);
    font-weight: var(--ttk-weight-semibold);
    color: var(--ttk-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ttk-avis-item-author-date {
    display: block;
    font-size: var(--ttk-text-xs);
    color: var(--ttk-text-muted);
    text-transform: capitalize;
}

.ttk-avis-load-more {
    display: flex;
    justify-content: center;
    margin-top: var(--ttk-space-8);
}

.ttk-avis-load-more-btn {
    min-width: 200px;
}

/* =============================================================================
   3. BANDEAU D'APPEL À TÉMOIGNER
   ============================================================================= */
.ttk-avis-cta {
    padding: 0 0 var(--ttk-space-10);
}

.ttk-avis-cta-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ttk-space-6);
    padding: var(--ttk-space-6) var(--ttk-space-8);
    background: var(--ttk-gradient-hero);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--ttk-radius-xl);
}

.ttk-avis-cta-title {
    margin: 0 0 var(--ttk-space-2);
}

.ttk-avis-cta-text {
    color: var(--ttk-text-secondary);
    margin: 0;
}

.ttk-avis-cta-actions {
    display: flex;
    gap: var(--ttk-space-4);
    flex-shrink: 0;
}

/* =============================================================================
   4. MODALE « AVIS COMPLET »
   ============================================================================= */
.ttk-avis-modal-rating {
    margin-bottom: var(--ttk-space-4);
}

.ttk-avis-modal-text {
    color: var(--ttk-text-secondary);
    font-size: var(--ttk-text-base);
    line-height: var(--ttk-leading-relaxed);
    margin: 0 0 var(--ttk-space-5);
    padding: 0;
    border: none;
}

.ttk-avis-modal-author {
    display: flex;
    align-items: center;
    gap: var(--ttk-space-4);
    padding-top: var(--ttk-space-4);
    border-top: 1px solid var(--ttk-border);
}

/* =============================================================================
   5. RESPONSIVE
   ============================================================================= */
@media (max-width: 992px) {
    .ttk-avis-hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .ttk-avis-hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .ttk-avis-summary {
        max-width: 400px;
        margin: 0 auto;
    }

    .ttk-avis-cta-card {
        flex-direction: column;
        text-align: center;
        padding: var(--ttk-space-6);
    }

    .ttk-avis-cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .ttk-avis-cta-actions .ttk-btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .ttk-avis-hero {
        padding: var(--ttk-space-6) 0 var(--ttk-space-5);
    }

    .ttk-avis-section {
        padding: var(--ttk-space-5) 0 var(--ttk-space-6);
    }

    .ttk-avis-grid {
        grid-template-columns: 1fr;
    }

    .ttk-avis-cta {
        padding: 0 0 var(--ttk-space-6);
    }
}
