/* ==========================================================
   PETSCOMPARE COMMUNITY - badges, leaderboard, profil scans
   ========================================================== */

/* === HERO === */
.community-hero {
    text-align: center;
    padding: 2.5rem 1rem 2rem;
    margin-bottom: 1rem;
}

.community-hero-overline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #047857;
    font-weight: 600;
}

.community-hero-h1 {
    font-family: 'Fraunces', serif;
    font-size: 2.2rem;
    line-height: 1.15;
    color: #1f2937;
    margin: .75rem 0 1rem;
    letter-spacing: -.02em;
    font-weight: 600;
}

.community-hero-sub {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #4b5563;
    max-width: 620px;
    margin: 0 auto 1.5rem;
}

.community-hero-cta {
    display: inline-block;
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    color: #fff;
    padding: .9rem 2rem;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(4, 120, 87, .25);
    transition: transform .15s;
}
.community-hero-cta:hover {
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

.community-section { margin: 2rem 0; }

/* === MES STATS === */
.community-mystats {
    background: #fff;
    border: 1px solid #f3e8d0;
    border-radius: 16px;
    padding: 1.75rem;
}

.community-badge-card {
    text-align: center;
    padding: 1.25rem;
    border: 3px solid;
    border-radius: 14px;
    background: #fff;
    margin-bottom: 1.5rem;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}

.community-badge-emoji {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: .5rem;
}

.community-badge-label {
    font-family: 'Fraunces', serif;
    font-size: 1.25rem;
    color: #1f2937;
    font-weight: 600;
}

.community-stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.community-stat-card {
    background: #fefaf2;
    border: 1px solid #f3e8d0;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
}

.community-stat-highlight {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #10b981;
}

.community-stat-num {
    font-family: 'Fraunces', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #047857;
    line-height: 1;
    margin-bottom: .25rem;
}

.community-stat-label {
    color: #6b7280;
    font-size: .85rem;
    line-height: 1.3;
}

.community-progress {
    background: #f9fafb;
    padding: 1rem 1.25rem;
    border-radius: 10px;
}

.community-progress-text {
    color: #4b5563;
    font-size: .92rem;
    margin-bottom: .65rem;
}

.community-progress-bar {
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.community-progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width .8s ease;
}

/* === EMPTY MY STATS === */
.community-empty-mystats {
    text-align: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #fefaf2 0%, #fff7ed 100%);
    border: 1px dashed #fde68a;
    border-radius: 14px;
}

.community-empty-cta {
    display: inline-block;
    margin-top: 1rem;
    background: #047857;
    color: #fff;
    padding: .8rem 1.5rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
}
.community-empty-cta:hover {
    background: #065f46;
    color: #fff;
    text-decoration: none;
}

/* === BADGES GRID === */
.community-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: .85rem;
    margin-top: 1rem;
}

.community-badge-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid #f3e8d0;
    border-radius: 12px;
    opacity: 0.5;
    transition: opacity .2s;
}

.community-badge-row.is-unlocked {
    opacity: 1;
    border-color: #10b981;
    background: linear-gradient(90deg, #f0fdf4 0%, #fff 100%);
}

.community-badge-row-emoji {
    font-size: 1.85rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid;
    border-radius: 50%;
    flex-shrink: 0;
}

.community-badge-row-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.community-badge-row-info strong {
    font-family: 'Fraunces', serif;
    font-size: 1rem;
    color: #1f2937;
}

.community-badge-row-info span {
    color: #6b7280;
    font-size: .82rem;
}

.community-badge-row-check {
    color: #10b981;
    font-size: 1.5rem;
    font-weight: 700;
}

/* === LEADERBOARD === */
.community-leaderboard {
    background: #fff;
    border: 1px solid #f3e8d0;
    border-radius: 14px;
    overflow: hidden;
    margin-top: 1rem;
}

.community-leader-row {
    display: grid;
    grid-template-columns: 50px 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: .85rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: .95rem;
}

.community-leader-row:last-child { border-bottom: none; }

.community-leader-row.is-podium {
    background: linear-gradient(90deg, #fef3c7 0%, #fff 30%);
}

.community-leader-rank {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: #6b7280;
}

.community-leader-row.is-podium .community-leader-rank {
    font-size: 1.75rem;
}

.community-leader-name {
    color: #1f2937;
    font-weight: 600;
}

.community-leader-badge {
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
}

.community-leader-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: .9rem;
    color: #047857;
    font-weight: 700;
    white-space: nowrap;
}

/* === STATS GLOBALES === */
.community-globals {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    color: #fff;
    padding: 2rem;
    border-radius: 18px;
}

.community-globals h2 {
    text-align: center;
    font-family: 'Fraunces', serif;
    margin: 0 0 1.5rem;
    font-weight: 600;
}

.community-globals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.community-global-card {
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}

.community-global-num {
    font-family: 'Fraunces', serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: .35rem;
}

.community-global-label {
    color: rgba(255, 255, 255, .85);
    font-size: .88rem;
}

/* === CTA FINAL === */
.community-final-cta {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: linear-gradient(135deg, #fefaf2 0%, #fff7ed 100%);
    border: 2px solid #fde68a;
    border-radius: 18px;
    margin: 2rem 0 3rem;
}

.community-final-cta h2 {
    font-family: 'Fraunces', serif;
    font-size: 1.65rem;
    color: #92400e;
    margin: 0 0 .75rem;
    font-weight: 600;
}

.community-final-cta p {
    color: #92400e;
    margin: 0 0 1.5rem;
    font-size: 1rem;
}

.community-final-cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(4, 120, 87, .25);
}
.community-final-cta-btn:hover {
    color: #fff;
    text-decoration: none;
}

/* Mobile */
@media (max-width: 640px) {
    .community-hero-h1 { font-size: 1.6rem; }
    .community-leader-row {
        grid-template-columns: 40px 1fr;
        gap: .5rem;
        padding: .75rem 1rem;
    }
    .community-leader-badge,
    .community-leader-count {
        grid-column: 2 / 3;
        font-size: .8rem;
    }
    .community-global-num { font-size: 1.85rem; }
}

/* ==========================================================
   Carte communaute dans /mon-compte
   ========================================================== */
.account-community-card {
    background: #fff;
    border: 2px solid;
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    margin-top: 1rem;
}

.account-community-badge {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .75rem;
}

.account-community-emoji {
    font-size: 2rem;
    line-height: 1;
}

.account-community-badge strong {
    font-family: 'Fraunces', serif;
    font-size: 1.2rem;
    color: #1f2937;
}

.account-community-stats {
    color: #4b5563;
    font-size: .95rem;
    margin-bottom: 1rem;
    display: flex;
    gap: .65rem;
    flex-wrap: wrap;
}
.account-community-stats strong { color: #047857; }

.account-community-next {
    background: #fefaf2;
    color: #92400e;
    padding: .65rem 1rem;
    border-radius: 8px;
    font-size: .9rem;
    margin-bottom: 1rem;
}
.account-community-next strong { color: #047857; }

.account-community-cta {
    display: inline-block;
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    color: #fff;
    padding: .65rem 1.25rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
}
.account-community-cta:hover {
    color: #fff;
    text-decoration: none;
}

.account-community-empty {
    background: linear-gradient(135deg, #fefaf2 0%, #fff7ed 100%);
    border: 1px dashed #fde68a;
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    text-align: center;
    margin-top: 1rem;
}
.account-community-empty p {
    color: #92400e;
    margin: 0 0 1rem;
    line-height: 1.55;
}

/* ==========================================================
   Bloc 'Prix vus en magasin' sur fiche produit
   ========================================================== */

.product-community-section {
    margin: 2rem 0;
}

.product-community-intro {
    color: #4b5563;
    font-size: .95rem;
    line-height: 1.55;
    margin: .5rem 0 1.25rem;
    max-width: 720px;
}

.product-community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.product-community-card {
    background: #fff;
    border: 1.5px solid #f3e8d0;
    border-radius: 12px;
    padding: 1.15rem 1.25rem;
    position: relative;
    transition: transform .15s, box-shadow .15s;
}
.product-community-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
}
.product-community-card.is-confident {
    border-color: #10b981;
    background: linear-gradient(180deg, #f0fdf4 0%, #fff 50%);
}

.product-community-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .55rem;
}

.product-community-store {
    font-family: 'Fraunces', serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1f2937;
}

.product-community-conf {
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.product-community-conf.is-high {
    background: #d1fae5;
    color: #047857;
}
.product-community-conf.is-medium {
    background: #f3f4f6;
    color: #4b5563;
}
.product-community-conf.is-low {
    background: #fef3c7;
    color: #92400e;
}
.product-community-conf.is-unreliable {
    background: #fee2e2;
    color: #b91c1c;
}

.product-community-price {
    font-family: 'Fraunces', serif;
    font-size: 1.85rem;
    font-weight: 700;
    color: #047857;
    line-height: 1;
    margin-bottom: .35rem;
}

.product-community-meta {
    color: #6b7280;
    font-size: .8rem;
    margin-bottom: .85rem;
    display: flex;
    gap: .25rem;
    flex-wrap: wrap;
}

.product-community-flag {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: #9ca3af;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: .78rem;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.product-community-flag:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}
.product-community-flag:disabled {
    opacity: .3;
    cursor: default;
}

.product-community-footer {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #fefaf2 0%, #fff7ed 100%);
    border: 1px solid #fde68a;
    border-radius: 10px;
    color: #92400e;
    font-size: .95rem;
}
.product-community-footer a {
    color: #047857;
    font-weight: 600;
}

@media (max-width: 640px) {
    .product-community-price { font-size: 1.5rem; }
    .product-community-store { font-size: .98rem; }
}
