html, body {
    font-family: "Manrope", "Segoe UI", sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Custom Deals Styles */
:root {
    --primary-color: #d97706;
    --primary-hover: #b45309;
    --primary-soft: #fff0d8;
    --accent-color: #0f766e;
    --bg-color: #f7f2ea;
    --card-bg: #ffffff;
    --panel-bg: rgba(255, 255, 255, 0.82);
    --text-main: #241911;
    --text-muted: #645647;
    --discount-color: #e11d48;
    --radius: 22px;
    --radius-sm: 14px;
    --shadow-sm: 0 10px 24px rgba(36, 25, 17, 0.08);
    --shadow-md: 0 18px 40px rgba(36, 25, 17, 0.12);
    --shadow-lg: 0 24px 52px rgba(36, 25, 17, 0.18);
}

body {
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 28%),
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 22%),
        linear-gradient(180deg, #fbf7f1 0%, var(--bg-color) 100%);
    color: var(--text-main);
}

/* Header */
.page-hero {
    position: relative;
    overflow: hidden;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: calc(var(--radius) + 6px);
    color: white;
    box-shadow: var(--shadow-md);
}

.page-hero::before,
.page-hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.page-hero::before {
    width: 240px;
    height: 240px;
    top: -100px;
    right: -60px;
    background: rgba(255, 255, 255, 0.08);
}

.page-hero::after {
    width: 180px;
    height: 180px;
    bottom: -70px;
    left: -30px;
    background: rgba(255, 255, 255, 0.06);
}

.page-hero-promos {
    background:
        radial-gradient(circle at top right, rgba(250, 204, 21, 0.28), transparent 28%),
        linear-gradient(135deg, #2f1c12 0%, #140d0a 48%, #6b3410 100%);
}

.page-hero-releases {
    background:
        radial-gradient(circle at top right, rgba(125, 211, 252, 0.22), transparent 28%),
        linear-gradient(135deg, #112930 0%, #10201d 50%, #1b4d49 100%);
}

.page-hero__brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.page-hero__logo {
    width: min(180px, 34vw);
    max-height: 160px;
    object-fit: contain;
    mix-blend-mode: screen;
    filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.22));
}

.page-hero__copy {
    max-width: 760px;
}

.page-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.9rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-hero__title {
    margin: 0;
    font-family: "Outfit", "Avenir Next", sans-serif;
    font-size: clamp(2rem, 4vw, 4.15rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
    font-weight: 800;
}

.page-hero__subtitle {
    max-width: 60ch;
    margin: 1rem 0 0;
    color: rgba(255, 249, 243, 0.82);
    font-size: 1.08rem;
    line-height: 1.6;
}

.page-hero__metrics {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.hero-metric {
    padding: 1rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(14px);
}

.hero-metric__value {
    display: block;
    font-size: 1.65rem;
    font-weight: 800;
}

.hero-metric__label {
    display: block;
    margin-top: 0.2rem;
    color: rgba(255, 249, 243, 0.72);
    font-size: 0.95rem;
}

/* Controls */
.controls-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid rgba(133, 77, 14, 0.1);
    border-radius: var(--radius);
    background: var(--panel-bg);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(14px);
}

.sort-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.sort-label {
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 0.5rem;
}

.sort-btn {
    border: 1px solid rgba(133, 77, 14, 0.1);
    background: rgba(255, 255, 255, 0.92);
    padding: 0.6rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-btn:hover {
    background: #fff7ed;
    border-color: rgba(217, 119, 6, 0.18);
    color: var(--text-main);
}

.filter-controls {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.discount-filters {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.retailer-filter {
    display: flex;
    align-items: center;
}

.custom-select {
    padding: 0.5rem 2rem 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(133, 77, 14, 0.1);
    background-color: rgba(255, 255, 255, 0.92);
    color: var(--text-main);
    font-weight: 700;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2364748b%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem top 50%;
    background-size: 0.65rem auto;
    transition: all 0.2s ease;
}

.custom-select:hover {
    border-color: rgba(217, 119, 6, 0.18);
}

.custom-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.sort-btn.active {
    background: linear-gradient(135deg, #f59e0b 0%, var(--primary-color) 100%);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 12px 24px rgba(217, 119, 6, 0.22);
}

.stats {
    font-weight: 700;
    color: var(--text-muted);
}

/* Grid */
.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
    gap: 1.75rem;
}

/* Card */
.deal-card {
    background: var(--card-bg);
    border: 1px solid rgba(133, 77, 14, 0.08);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.deal-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-lg);
}

.deal-image-container {
    position: relative;
    min-height: 250px;
    width: 100%;
    padding: 1.35rem 1.35rem 0.85rem;
    background:
        linear-gradient(180deg, rgba(255, 245, 230, 0.92) 0%, rgba(255, 255, 255, 0.92) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.deal-image-container::before {
    content: "";
    position: absolute;
    inset: 16px;
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 248, 241, 0.82));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.deal-image-container img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 220px;
    object-fit: contain;
    object-position: center;
    transition: transform 0.4s ease;
    filter: drop-shadow(0 16px 22px rgba(44, 26, 18, 0.18));
}

.deal-card:hover .deal-image-container img {
    transform: translateY(-4px) scale(1.02);
}

.placeholder-image,
.no-image {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 100%;
    height: 220px;
    border: 1px dashed rgba(100, 86, 71, 0.24);
    border-radius: 18px;
    color: #a8a29e;
    font-size: 1rem;
    font-weight: 700;
}

.discount-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    background: linear-gradient(135deg, #f43f5e 0%, var(--discount-color) 100%);
    color: white;
    font-weight: 800;
    padding: 0.38rem 0.82rem;
    border-radius: 999px;
    font-size: 0.9rem;
    box-shadow: 0 12px 22px rgba(225, 29, 72, 0.28);
}

.retailer-badge {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 2;
    background: rgba(36, 25, 17, 0.82);
    color: white;
    backdrop-filter: blur(10px);
    padding: 0.36rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.deal-content {
    padding: 1.3rem 1.3rem 1.1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.deal-kicker {
    margin-bottom: 0.65rem;
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.deal-title {
    font-size: 1.16rem;
    font-weight: 800;
    margin: 0 0 0.95rem 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-main);
}

.deal-prices {
    margin-bottom: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.current-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.deal-pricing {
    margin-bottom: 0.95rem;
}

.price-current {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--primary-color);
}

.initial-price {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.deal-description {
    margin: 0 0 1rem;
    color: var(--text-muted);
    line-height: 1.55;
    flex-grow: 1;
}

.deal-meta {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    background: #f6efe5;
    font-size: 0.84rem;
    color: var(--text-muted);
    font-weight: 700;
}

.bgg-rating svg { color: #eab308; }
.complexity svg { color: var(--accent-color); }

.tracking-stats {
    display: contents;
}

.deal-actions {
    padding: 0 1.3rem 1.3rem;
}

.buy-button {
    display: block;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, #f59e0b 0%, var(--primary-color) 100%);
    color: white;
    padding: 0.88rem;
    border-radius: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 14px 24px rgba(217, 119, 6, 0.2);
}

.buy-button:hover {
    background: var(--primary-hover);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(217, 119, 6, 0.26);
}

/* Loading state */
.loading-state, .empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    border: 3px solid #e2e8f0;
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
    .page-hero {
        padding: 1.4rem;
    }

    .page-hero__brand {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-hero__metrics {
        grid-template-columns: 1fr;
    }

    .controls-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .deals-grid {
        gap: 2.5rem; /* Espace plus grand entre les cartes pour bien les différencier */
    }

    .deal-card {
        box-shadow: var(--shadow-md);
    }

    .deal-image-container {
        min-height: 230px;
    }

    .deal-image-container img,
    .placeholder-image,
    .no-image {
        height: 200px;
    }
}
