/* Styles pour la page des offres */
.offers-page {
    padding: 40px 30px 60px 30px; /* Padding haut réduit */
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
    background-color: transparent; /* Assure que le fond est transparent */
}

.offers-header {
    text-align: center;
    padding: 60px 30px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.offers-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 24, 40, 0.55); /* Superposition assombrie, mais plus transparente */
}

.offers-header h1 {
    color: var(--primary-blue);
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
}

.offers-header-content {
    position: relative; /* Pour passer au-dessus de la superposition */
    z-index: 2;
}

.offers-header p {
    font-size: 1.1em;
    color: var(--text-color-muted);
    max-width: 700px;
    margin: 0 auto;
}

.game-page-logo {
    height: 100px;
    margin-bottom: 20px;
}

.processor-spec {
    font-weight: 600;
    color: var(--text-color-light);
    margin-bottom: 15px;
}

.specs-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
    flex-grow: 1; /* Pousse le prix et le bouton vers le bas */
}

.specs-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.specs-list i {
    color: var(--primary-blue);
    margin-right: 10px;
    width: 20px; /* Pour un alignement parfait */
    text-align: center;
}

.search-bar-container {
    position: relative;
    max-width: 500px;
    margin: 30px auto 0 auto;
}

.search-bar-container i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color-muted);
}

#game-search {
    width: 100%;
    padding: 12px 20px 12px 45px; /* Espace pour l'icône */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--dark-bg-primary);
    color: var(--text-color-light);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

#game-search:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.offer-category-selector {
    display: flex;
    justify-content: center;
    background-color: var(--dark-bg-primary);
    border-radius: 8px;
    padding: 5px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 40px;
    margin-bottom: 40px;
}

.category-btn {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background-color: transparent;
    color: var(--text-color-muted);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.category-btn.active {
    background-color: var(--primary-blue);
    color: var(--text-color-light);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    display: none; /* Caché par défaut */
}

.offers-grid.active {
    display: grid; /* Affiché si actif */
}

.offer-card {
    background-color: var(--dark-bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    position: relative; /* Ajouté pour positionner correctement le statut */
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.offer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.15);
}

.offer-card-banner {
    height: 150px;
    background-size: cover;
    background-position: center;
}

.offer-card-logo {
    width: 80px;
    height: 80px;
    background-color: var(--dark-bg-primary);
    border-radius: 8px;
    padding: 10px;
    margin: -40px auto 0 auto;
    position: relative;
    border: 4px solid var(--dark-bg-secondary);
    box-sizing: border-box;
}

.offer-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.offer-card-content {
    padding: 20px 30px 30px 30px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.offer-card-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.5em;
    color: var(--text-color-light);
}

.offer-price {
    margin-bottom: 20px;
    font-size: 1.1em;
}

.offer-price strong {
    color: var(--primary-blue);
    font-weight: 700;
}

/* --- Styles pour le statut de l'offre --- */
.offer-status {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-color-light);
    text-transform: uppercase;
}

.offer-status.available {
    background-color: rgba(0, 123, 255, 0.8); /* Bleu */
}

.offer-status.unavailable {
    background-color: rgba(220, 53, 69, 0.8); /* Rouge */
}

/* Styles pour les cartes non disponibles */
.offer-card.is-unavailable {
    opacity: 0.6;
    filter: grayscale(50%);
}

.offer-card.is-unavailable:hover {
    transform: none;
    box-shadow: none;
}

.btn.is-unavailable {
    background-color: #6c757d; /* Gris */
    border-color: #6c757d;
    color: #ccc;
    cursor: not-allowed;
    pointer-events: none; /* Désactive complètement les clics */
}

.btn.is-unavailable:hover {
    transform: none;
    box-shadow: none;
}

@media (max-width: 768px) {
    .offers-grid {
        grid-template-columns: 1fr; /* Une seule colonne sur mobile */
    }
}

/* CSS pour l'infobulle sur les prix */
.offer-price {
    display: flex;
    align-items: center;
    justify-content: center; /* Centre le prix et l'icône */
    gap: 8px; /* Espace entre le prix et l'icône */
}

.price-info-tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.price-info-tooltip .fa-info-circle {
    color: var(--primary-blue);
    font-size: 1em;
}

.price-info-tooltip .tooltip-text {
    visibility: hidden;
    width: 160px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%; /* Position au-dessus de l'icône */
    left: 50%;
    margin-left: -80px; /* Centrer l'infobulle */
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85em;
    line-height: 1.4;
    font-weight: normal; /* Assure que le texte n'est pas en gras */
}

.price-info-tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.price-info-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}
