/* AvisRadar - Custom Styles */
:root {
    --ac-primary: #00b67a;
    --ac-primary-dark: #009567;
    --ac-primary-light: #e6f9f1;
    --ac-secondary: #1a1a2e;
    --ac-accent: #ff6b35;
    --ac-star: #ffc107;
    --ac-bg: #f8f9fa;
    --ac-text: #2d3436;
    --ac-text-muted: #636e72;
    --ac-border: #e9ecef;
    --ac-affiliate-bg: linear-gradient(135deg, #ff6b35 0%, #e55a2b 100%);
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--ac-text);
    background-color: var(--ac-bg);
}

/* Navbar */
.bg-ac-primary {
    background: linear-gradient(135deg, var(--ac-secondary) 0%, #16213e 100%) !important;
}

.navbar-brand {
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.navbar-brand i {
    color: var(--ac-primary);
}

.nav-search-form .form-control {
    border-radius: 20px 0 0 20px;
    border: none;
    font-size: 0.9rem;
}

.nav-search-form .btn {
    border-radius: 0 20px 20px 0;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

/* Autocomplete dropdown */
.autocomplete-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    z-index: 1055;
    max-height: 400px;
    overflow-y: auto;
}

.autocomplete-dropdown.show {
    display: block;
}

.ac-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--ac-text);
    border-bottom: 1px solid var(--ac-border);
    transition: background 0.15s;
}

.ac-item:last-child {
    border-bottom: none;
}

.ac-item:hover,
.ac-item.active {
    background: var(--ac-primary-light);
    color: var(--ac-text);
}

.ac-img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.ac-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: var(--ac-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--ac-text-muted);
    font-size: 0.9rem;
}

.ac-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ac-name {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ac-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
}

.ac-empty {
    padding: 14px;
    text-align: center;
    color: var(--ac-text-muted);
    font-size: 0.85rem;
}

/* Affiliate Sticky Banner */
.affiliate-sticky-wrapper {
    position: sticky;
    top: 56px;
    z-index: 1020;
}

.affiliate-banner-sticky {
    background: var(--ac-affiliate-bg);
    color: #fff;
    padding: 14px 0;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.affiliate-banner-sticky .h4 {
    color: #fff;
    font-weight: 700;
}

.affiliate-banner-sticky p {
    color: rgba(255,255,255,0.85);
}

.btn-affiliate-cta {
    background: #fff;
    color: var(--ac-accent);
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 50px;
    border: none;
    font-size: 1rem;
    white-space: nowrap;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-affiliate-cta:hover {
    background: var(--ac-secondary);
    color: #fff;
    transform: scale(1.07);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn-affiliate-cta i {
    transition: transform 0.25s ease;
}

.btn-affiliate-cta:hover i {
    transform: translateX(5px);
}

/* Buttons */
.btn-ac-primary {
    background-color: var(--ac-primary);
    border-color: var(--ac-primary);
    color: #fff;
}

.btn-ac-primary:hover {
    background-color: var(--ac-primary-dark);
    border-color: var(--ac-primary-dark);
    color: #fff;
}

.btn-ac-accent {
    background: var(--ac-affiliate-bg);
    border: none;
    color: #fff;
    font-weight: 600;
}

.btn-ac-accent:hover {
    background: linear-gradient(135deg, #e55a2b 0%, #d04a1f 100%);
    color: #fff;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--ac-secondary) 0%, #16213e 60%, var(--ac-primary-dark) 100%);
    color: #fff;
    padding: 4rem 0;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.hero-search-bar {
    max-width: 600px;
    margin: 0 auto;
}

.hero-search-form {
    align-items: stretch;
}

.hero-search-bar .search-wrapper {
    flex: 1 1 0%;
}

.hero-search-bar .form-control {
    border-radius: 30px 0 0 30px;
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    border: none;
    height: 100%;
}

.hero-search-bar .btn {
    border-radius: 0 30px 30px 0;
    padding: 0.8rem 1.5rem;
    background-color: var(--ac-primary);
    border: none;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
}

.hero-search-bar .btn:hover {
    background-color: var(--ac-primary-dark);
}

.hero-search-bar .autocomplete-dropdown {
    border-radius: 0 0 16px 16px;
    text-align: left;
}

/* Stars */
.stars-display {
    display: inline-flex;
    gap: 2px;
}

.stars-display i {
    font-size: 0.9rem;
}

.stars-lg i {
    font-size: 1.3rem;
}

.text-warning {
    color: var(--ac-star) !important;
}

/* Star Rating Input */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    cursor: pointer;
    font-size: 1.8rem;
    color: #ddd;
    transition: color 0.15s;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: var(--ac-star);
}

/* Cards */
.card-brand, .card-product, .card-review, .card-blog {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.card-brand:hover, .card-product:hover, .card-blog:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.card-brand .card-body, .card-product .card-body {
    padding: 1.25rem;
}

.brand-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
    border: 1px solid var(--ac-border);
}

.brand-logo-lg {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    padding: 12px;
    border: 1px solid var(--ac-border);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Review Cards */
.card-review {
    border-left: 4px solid var(--ac-primary);
}

.card-review .review-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--ac-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.review-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Author link */
.author-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.15s;
}

.author-link:hover {
    color: var(--ac-primary);
}

.author-link .review-avatar,
.author-link .review-avatar-img {
    transition: transform 0.15s;
}

.author-link:hover .review-avatar,
.author-link:hover .review-avatar-img {
    transform: scale(1.1);
}

/* Affiliate Banner */
.affiliate-banner {
    background: var(--ac-affiliate-bg);
    color: #fff;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.affiliate-banner .btn {
    background: #fff;
    color: var(--ac-accent);
    font-weight: 700;
    padding: 0.6rem 2rem;
    border-radius: 30px;
    border: none;
    font-size: 1.1rem;
}

.affiliate-banner .btn:hover {
    background: #f0f0f0;
    transform: scale(1.02);
}

/* Rating Distribution Bar */
.rating-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.rating-bar-label {
    width: 20px;
    text-align: right;
    font-weight: 600;
    font-size: 0.85rem;
}

.rating-bar-fill {
    flex: 1;
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.rating-bar-fill .fill {
    height: 100%;
    background-color: var(--ac-primary);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.rating-bar-count {
    width: 30px;
    font-size: 0.85rem;
    color: var(--ac-text-muted);
}

/* Trust Score Badge */
.trust-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trust-badge.excellent { background: #d4edda; color: #155724; }
.trust-badge.remarquable { background: #cce5ff; color: #004085; }
.trust-badge.bien { background: #fff3cd; color: #856404; }
.trust-badge.moyen { background: #ffeeba; color: #856404; }
.trust-badge.insuffisant { background: #f8d7da; color: #721c24; }
.trust-badge.pas-encore-noté { background: #e9ecef; color: #6c757d; }

/* Category Cards */
.category-card {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.2s;
    text-decoration: none;
    color: var(--ac-text);
    display: block;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    color: var(--ac-primary);
}

.category-card i {
    font-size: 2.5rem;
    color: var(--ac-primary);
    margin-bottom: 1rem;
    display: block;
}

/* Blog Cards */
.card-blog .card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-blog .blog-category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--ac-primary);
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Section Titles */
.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--ac-primary);
    border-radius: 2px;
}

/* Page header */
.page-header {
    background: linear-gradient(135deg, var(--ac-secondary) 0%, #16213e 100%);
    color: #fff;
    padding: 2rem 0;
}

.page-header h1 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.breadcrumb {
    --bs-breadcrumb-divider: '\00BB';
}

.page-header .breadcrumb {
    margin-bottom: 0;
}

.page-header .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.5);
}

.page-header .breadcrumb-item a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

.page-header .breadcrumb-item.active {
    color: rgba(255,255,255,0.5);
}

/* Brand/Product Detail Page */
.detail-header {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.rating-big {
    font-size: 3rem;
    font-weight: 700;
    color: var(--ac-text);
    line-height: 1;
}

/* Helpful Button */
.btn-helpful {
    border: 1px solid var(--ac-border);
    background: #fff;
    color: var(--ac-text-muted);
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.btn-helpful:hover {
    background: var(--ac-primary-light);
    border-color: var(--ac-primary);
    color: var(--ac-primary);
}

/* Sidebar */
.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
}

.sidebar-widget h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--ac-primary);
    font-size: 0.95rem;
}

/* Sidebar Filters */
.filter-categories {
    max-height: 280px;
    overflow-y: auto;
}

.filter-categories .form-check {
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
}

.filter-categories .form-check-label {
    font-size: 0.85rem;
}

.rating-filter .form-check {
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

.rating-filter .form-check-label .stars {
    font-size: 0.8rem;
}

/* Double range slider */
.price-range-container {
    padding: 0 2px;
}

.price-range-track {
    position: relative;
    height: 30px;
}

.price-range-input {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    height: 30px;
    margin: 0;
}

.price-range-input::-webkit-slider-runnable-track {
    height: 4px;
    background: var(--ac-border);
    border-radius: 2px;
}

.price-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ac-primary);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    pointer-events: all;
    margin-top: -7px;
}

.price-range-input::-moz-range-track {
    height: 4px;
    background: var(--ac-border);
    border-radius: 2px;
    border: none;
}

.price-range-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ac-primary);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    pointer-events: all;
}

/* Auth Forms */
.auth-card {
    max-width: 450px;
    margin: 3rem auto;
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.auth-card h2 {
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
}

/* Admin */
.admin-sidebar {
    background: var(--ac-secondary);
    min-height: 100vh;
    padding-top: 1rem;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    margin-bottom: 2px;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.admin-sidebar .nav-link i {
    width: 22px;
    text-align: center;
    margin-right: 8px;
}

.stat-card {
    border: none;
    border-radius: 12px;
    padding: 1.5rem;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: 0.3;
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Placeholder images */
.placeholder-img {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
}

.placeholder-img i {
    font-size: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 2.5rem 0;
    }
    .hero-section h1 {
        font-size: 1.8rem;
    }
    .nav-search-form {
        margin: 0.5rem 0;
    }
    .affiliate-banner {
        text-align: center;
    }
    .rating-big {
        font-size: 2.2rem;
    }
}

/* No-logo placeholder */
.no-logo {
    width: 80px;
    height: 80px;
    background: var(--ac-primary-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ac-primary);
}

.no-logo-lg {
    width: 120px;
    height: 120px;
    background: var(--ac-primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--ac-primary);
}
