/**
 * H2J Reviews -- FO Experts pages CSS
 *
 * Sprint Expert sous-sprint #3 etape 3.6 (v1.0.55+).
 *
 * Couvre 2 surfaces :
 *   - /experts (annuaire grille cards)
 *   - /expert?id_profile=X (fiche profil individuelle)
 *
 * Doctrine : CSS externe obligatoire pour pages FO H2J (cf P-119 OOM Smarty
 * sur <style> inline geant avec {ldelim}/{rdelim} dans les .tpl).
 *
 * @author    H2J Ecosystem <info@2klove.fr>
 * @copyright 2024-2026 H2J sas RCS 978391720
 * @license   Commercial license
 */

/* ============================================================ */
/* PAGE ANNUAIRE -- /experts                                    */
/* ============================================================ */

.h2jr-experts-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 16px 48px;
}

/* HERO */
.h2jr-experts-page__hero {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--cubx-border, #e9d5ff);
}
.h2jr-experts-page__title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--cubx-text, #2d1b4e);
    letter-spacing: -0.02em;
}
.h2jr-experts-page__subtitle {
    font-size: 16px;
    color: var(--cubx-text-muted, #6b6779);
    margin: 0 0 16px;
    font-style: italic;
}
.h2jr-experts-page__count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: linear-gradient(135deg, #faf5ff, #f3e8ff);
    border: 1px solid #e9d5ff;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #8e44ad;
}
.h2jr-experts-page__count .material-icons {
    font-size: 16px;
}

/* GRID */
.h2jr-experts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* CARD */
.h2jr-expert-card {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--cubx-border, #e9d5ff);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.h2jr-expert-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(91, 44, 131, 0.15);
    border-color: #8e44ad;
    text-decoration: none;
    color: inherit;
}
.h2jr-expert-card:focus-visible {
    outline: 2px solid #8e44ad;
    outline-offset: 3px;
}
.h2jr-expert-card--ai {
    background: linear-gradient(180deg, #fff 0%, #faf5ff 100%);
}

/* PHOTO CARD */
.h2jr-expert-card__photo-wrap {
    position: relative;
    width: 96px;
    height: 96px;
    flex-shrink: 0;
}
.h2jr-expert-card__photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--cubx-bg, #fff);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.h2jr-expert-card__avatar-fallback {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #8e44ad 0%, #5b2c83 100%);
    box-shadow: 0 4px 12px rgba(91, 44, 131, 0.25);
}
.h2jr-expert-card__ai-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    background: linear-gradient(135deg, #8e44ad 0%, #5b2c83 100%);
    color: #fff;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(91, 44, 131, 0.3);
}
.h2jr-expert-card__ai-badge .material-icons {
    font-size: 12px;
}

/* INFO CARD */
.h2jr-expert-card__info {
    min-width: 0;
}
.h2jr-expert-card__name {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--cubx-text, #2d1b4e);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.h2jr-expert-card__job {
    font-size: 13px;
    color: var(--cubx-text-muted, #6b6779);
    margin: 0 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.h2jr-expert-card__stats {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #8e44ad;
    font-weight: 600;
}
.h2jr-expert-card__stats .material-icons {
    font-size: 16px;
}

/* ARROW */
.h2jr-expert-card__arrow {
    color: #c4b5d4;
    transition: color 0.15s ease, transform 0.15s ease;
}
.h2jr-expert-card:hover .h2jr-expert-card__arrow {
    color: #8e44ad;
    transform: translateX(4px);
}

/* EMPTY STATE */
.h2jr-experts-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--cubx-text-muted, #6b6779);
}
.h2jr-experts-empty__icon {
    font-size: 80px;
    color: #d4c5e8;
    display: block;
    margin-bottom: 16px;
}
.h2jr-experts-empty__title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--cubx-text, #2d1b4e);
}
.h2jr-experts-empty__text {
    font-size: 14px;
    margin: 0;
}

/* HOME LINK */
.h2jr-experts-page__bottom {
    text-align: center;
    margin-top: 32px;
}
.h2jr-btn-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 600;
}
.h2jr-btn-home .material-icons { font-size: 18px; }

/* RESPONSIVE ANNUAIRE */
@media (max-width: 600px) {
    .h2jr-experts-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .h2jr-expert-card {
        grid-template-columns: 72px 1fr auto;
        padding: 16px;
        gap: 12px;
    }
    .h2jr-expert-card__photo,
    .h2jr-expert-card__photo-wrap,
    .h2jr-expert-card__avatar-fallback {
        width: 72px;
        height: 72px;
        font-size: 28px;
    }
}

/* ============================================================ */
/* PAGE FICHE PROFIL -- /expert?id_profile=X                     */
/* ============================================================ */

.h2jr-expert-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 16px 48px;
}

/* HERO FICHE */
.h2jr-expert-hero {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 32px;
    padding: 32px;
    background: #fff;
    border: 1px solid var(--cubx-border, #e9d5ff);
    border-radius: 20px;
    margin-bottom: 32px;
    box-shadow: 0 4px 16px rgba(91, 44, 131, 0.08);
}
.h2jr-expert-hero--ai {
    background: linear-gradient(180deg, #fff 0%, #faf5ff 100%);
}
.h2jr-expert-hero__photo-col { flex-shrink: 0; }
.h2jr-expert-hero__photo-wrap {
    position: relative;
    width: 180px;
    height: 180px;
}
.h2jr-expert-hero__photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 8px 24px rgba(91, 44, 131, 0.2);
}
.h2jr-expert-hero__avatar-fallback {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #8e44ad 0%, #5b2c83 100%);
    box-shadow: 0 8px 24px rgba(91, 44, 131, 0.2);
}
.h2jr-expert-hero__ai-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #8e44ad 0%, #5b2c83 100%);
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(91, 44, 131, 0.35);
}
.h2jr-expert-hero__ai-badge .material-icons { font-size: 14px; }

.h2jr-expert-hero__info { min-width: 0; }
.h2jr-expert-hero__name {
    font-size: clamp(24px, 3.5vw, 32px);
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--cubx-text, #2d1b4e);
    letter-spacing: -0.01em;
}
.h2jr-expert-hero__job {
    font-size: 16px;
    color: #8e44ad;
    font-weight: 600;
    margin: 0 0 12px;
}
.h2jr-expert-hero__credentials {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--cubx-text-muted, #6b6779);
    margin: 0 0 16px;
    line-height: 1.5;
}
.h2jr-expert-hero__credentials .material-icons {
    font-size: 18px;
    color: #f5a623;
    flex-shrink: 0;
    margin-top: 1px;
}

/* SOCIAL LINKS */
.h2jr-expert-hero__socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.h2jr-expert-hero__social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--cubx-bg-soft, #f3e8ff);
    color: #8e44ad;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.15s ease;
    border: 1px solid transparent;
}
.h2jr-expert-hero__social:hover {
    background: #8e44ad;
    color: #fff;
    transform: translateY(-2px);
    text-decoration: none;
}
.h2jr-expert-hero__social .material-icons { font-size: 18px; }

.h2jr-expert-hero__stats {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #faf5ff, #f3e8ff);
    border: 1px solid #e9d5ff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #8e44ad;
}
.h2jr-expert-hero__stats .material-icons { font-size: 16px; }

/* SECTION TITLES */
.h2jr-expert-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--cubx-text, #2d1b4e);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--cubx-border, #e9d5ff);
}
.h2jr-expert-section-title .material-icons {
    color: #8e44ad;
    font-size: 24px;
}

/* BIO */
.h2jr-expert-bio {
    padding: 24px 28px;
    background: #fff;
    border: 1px solid var(--cubx-border, #e9d5ff);
    border-radius: 16px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.h2jr-expert-bio__content {
    font-size: 15px;
    line-height: 1.7;
    color: var(--cubx-text, #2d1b4e);
}
.h2jr-expert-bio__content p { margin: 0 0 12px; }
.h2jr-expert-bio__content p:last-child { margin-bottom: 0; }

/* REVIEWS LIST */
.h2jr-expert-reviews { margin-bottom: 32px; }
.h2jr-expert-reviews__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* REVIEW CARD */
.h2jr-expert-review-card {
    padding: 24px;
    background: #fff;
    border: 1px solid var(--cubx-border, #e9d5ff);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.h2jr-expert-review-card--featured {
    border-color: #f5a623;
    box-shadow: 0 4px 16px rgba(245, 166, 35, 0.15);
}
.h2jr-expert-review-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--cubx-border-soft, #f0eaf7);
    flex-wrap: wrap;
}
.h2jr-expert-review-card__product {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    flex: 1;
    min-width: 0;
    transition: color 0.15s ease;
}
.h2jr-expert-review-card__product:hover {
    color: #8e44ad;
    text-decoration: none;
}
.h2jr-expert-review-card__product-img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: contain;
    background: #f8fafc;
    border: 1px solid var(--cubx-border-soft, #f0eaf7);
    flex-shrink: 0;
}
.h2jr-expert-review-card__product-info { min-width: 0; flex: 1; }
.h2jr-expert-review-card__product-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cubx-text-muted, #6b6779);
    font-weight: 600;
    margin-bottom: 2px;
}
.h2jr-expert-review-card__product-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--cubx-text, #2d1b4e);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.h2jr-expert-review-card__rating {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 999px;
    color: #92400e;
    font-weight: 700;
    flex-shrink: 0;
}
.h2jr-expert-review-card__rating .material-icons {
    font-size: 18px;
    color: #f5a623;
    align-self: center;
}
.h2jr-expert-review-card__rating-value { font-size: 16px; }
.h2jr-expert-review-card__rating-max { font-size: 12px; opacity: 0.7; }

.h2jr-expert-review-card__title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.h2jr-expert-review-card__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--cubx-text, #2d1b4e);
    flex: 1;
    min-width: 200px;
}
.h2jr-expert-review-card__ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: linear-gradient(135deg, #8e44ad 0%, #5b2c83 100%);
    color: #fff;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.h2jr-expert-review-card__ai-badge .material-icons { font-size: 12px; }
.h2jr-expert-review-card__featured-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f5a623;
    color: #fff;
}
.h2jr-expert-review-card__featured-badge .material-icons { font-size: 16px; }

.h2jr-expert-review-card__text {
    font-size: 15px;
    line-height: 1.65;
    color: var(--cubx-text, #2d1b4e);
    margin-bottom: 16px;
}
.h2jr-expert-review-card__text p { margin: 0 0 10px; }
.h2jr-expert-review-card__text p:last-child { margin-bottom: 0; }

.h2jr-expert-review-card__answer {
    margin-top: 16px;
    padding: 14px 18px;
    background: var(--cubx-bg-soft, #faf5ff);
    border-left: 3px solid #8e44ad;
    border-radius: 0 8px 8px 0;
}
.h2jr-expert-review-card__answer-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #8e44ad;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}
.h2jr-expert-review-card__answer-label .material-icons { font-size: 14px; }
.h2jr-expert-review-card__answer-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--cubx-text, #2d1b4e);
    font-style: italic;
}

.h2jr-expert-review-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--cubx-border-soft, #f0eaf7);
    flex-wrap: wrap;
    gap: 12px;
}
.h2jr-expert-review-card__date {
    font-size: 12px;
    color: var(--cubx-text-muted, #6b6779);
}
.h2jr-expert-review-card__media-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #8e44ad;
    text-decoration: none;
}
.h2jr-expert-review-card__media-link:hover {
    color: #5b2c83;
    text-decoration: underline;
}
.h2jr-expert-review-card__media-link .material-icons { font-size: 18px; }

/* EMPTY REVIEWS */
.h2jr-expert-reviews__empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--cubx-text-muted, #6b6779);
}
.h2jr-expert-reviews__empty .material-icons {
    font-size: 56px;
    color: #d4c5e8;
    display: block;
    margin-bottom: 12px;
}

/* PAGINATION */
.h2jr-expert-pagination {
    margin-top: 28px;
    display: flex;
    justify-content: center;
}
.h2jr-expert-pagination__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.h2jr-expert-pagination__item--spacer {
    display: flex;
    align-items: center;
    padding: 0 8px;
    color: var(--cubx-text-muted, #6b6779);
}
.h2jr-expert-pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--cubx-border, #e9d5ff);
    color: var(--cubx-text, #2d1b4e);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.h2jr-expert-pagination__link:hover {
    background: #8e44ad;
    color: #fff;
    border-color: #8e44ad;
    text-decoration: none;
    transform: translateY(-1px);
}
.h2jr-expert-pagination__link--current {
    background: linear-gradient(135deg, #8e44ad 0%, #5b2c83 100%);
    color: #fff;
    border-color: #5b2c83;
    box-shadow: 0 2px 8px rgba(91, 44, 131, 0.3);
}
.h2jr-expert-pagination__link--current:hover { transform: none; }
.h2jr-expert-pagination__link--disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.h2jr-expert-pagination__link .material-icons { font-size: 20px; }

/* BOTTOM NAV */
.h2jr-expert-page__bottom {
    text-align: center;
    margin-top: 32px;
}
.h2jr-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 600;
}
.h2jr-btn-back .material-icons { font-size: 18px; }

/* RESPONSIVE FICHE */
@media (max-width: 700px) {
    .h2jr-expert-hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 24px;
        gap: 20px;
    }
    .h2jr-expert-hero__photo-col { display: flex; justify-content: center; }
    .h2jr-expert-hero__photo,
    .h2jr-expert-hero__photo-wrap,
    .h2jr-expert-hero__avatar-fallback {
        width: 140px;
        height: 140px;
        font-size: 52px;
    }
    .h2jr-expert-hero__socials { justify-content: center; }
    .h2jr-expert-review-card { padding: 18px; }
}
