.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

/* Layout principal */
.main-layout {
    display: flex;
    width: 100%;
    height: auto;
    gap: 20px;
    margin-bottom: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

/* Section Offres avec adaptation dynamique */
.offers-section {
    flex: 1;
    padding: 15px;
    background: #fff9f0;
    min-width: 50%;
    overflow-y: auto;
}
.offers-title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 18px;
}
/* Grille adaptative pour les cartes */
.offers-grid-all {
    display: grid;
    gap: 15px;
    width: 100%;
}

/* Adaptation selon le nombre de cartes */
.offers-grid-all[data-count="1"] {
    grid-template-columns: 1fr;
}
.offers-grid-all[data-count="2"] {
    grid-template-columns: repeat(2, 1fr);
}
.offers-grid-all[data-count="3"] {
    grid-template-columns: repeat(3, 1fr);
}
.offers-grid-all[data-count="4"] {
    grid-template-columns: repeat(4, 1fr);
}

/* Version par défaut (si le JavaScript n'est pas chargé) */
.offers-grid-all:not([data-count]) {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.offer-card {
    background: white;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    text-align: center;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
    height: auto;
    position: relative;
}
.offer-card.popular {
    border-color: #27ae60;
    background: rgba(46, 204, 113, 0.05);
    border-width: 2px;
}
.offer-card.popular::before {
    content: "Recommandé";
    position: absolute;
    top: -10px;
    right: 10px;
    background: #27ae60;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    z-index: 1;
}
.offer-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}
.offer-icon {
    font-size: 28px;
    color: #3498db;
    margin-bottom: 10px;
}
.offer-card.popular .offer-icon {
    color: #27ae60;
}
.offer-card.abonnement .offer-icon {
    color: #9b59b6;
}
.offer-title {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 8px;
}
.offer-description {
    color: #7f8c8d;
    margin-bottom: 10px;
    font-size: 12px;
}
.offer-price {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
    margin: 10px 0;
}
.offer-features {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    text-align: left;
    font-size: 12px;
}
.offer-features li {
    padding: 4px 0;
    position: relative;
    padding-left: 20px;
    color: #555;
}
.offer-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}
.offer-button {
    display: block;
    padding: 8px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    color: white;
    background: #3498db;
    transition: background 0.2s;
}
.offer-card.basic .offer-button {
    background: #95a5a6;
}
.offer-card.abonnement .offer-button {
    background: #9b59b6;
}
.offer-card.popular .offer-button {
    background: #27ae60;
}
.offer-button:hover {
    opacity: 0.9;
}

/* Crédits seul */
.offers-grid-unique {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 400px; /* Espace vertical garanti */
    padding: 20px 0;
}

/* Carte de crédits - Style général */
.unique-card {
    width: 100%;
    max-width: 400px; /* Largeur maximale pour éviter l'étirement */
    margin: 0 auto;
    background: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Contenu de la carte - Centré et aéré */
.unique-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 25px;
    text-align: center;
    min-height: 320px; /* Hauteur minimale pour l'équilibre */
}

/* Icône */
.unique-card .offer-icon {
    font-size: 44px;
    color: #4CAF50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
}

/* Titre */
.unique-card .offer-title {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Montant des crédits */
.credit-amount {
    font-size: 18px;
    color: #4CAF50;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Description */
.unique-card .offer-description {
    color: #7f8c8d;
    margin-bottom: 25px;
    font-size: 14px;
    line-height: 1.5;
}

/* Bouton */
.unique-card .offer-button {
    width: 70%;
    padding: 12px;
    background: #4CAF50;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: auto;
}

.unique-card .offer-button:hover {
    background: #43A047;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Section produite selectionné*/
.selected-product-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.selected-product-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
    color: #333;
    text-align: center;
}

/* Reprise des styles des cartes pour cohérence */
.selected-product-card {
    text-align: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: white;
    max-width: 300px;
    margin: 0 auto;
}

.selected-product-card .titre {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
}

.selected-product-img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}


.selected-product-img {
    width: 120px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.selected-product-info {
    flex: 1;
}

.selected-product-name {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.3em;
    color: #333;
}

.price-credit, .price-euro {
    display: flex;
    align-items: center;
    font-size: 1.2em;
    font-weight: bold;
}

.price-credit {
    color: #ff9800;
}

.price-euro {
    color: #2196f3;
}

.price-credit i, .price-euro i {
    margin-right: 5px;
}

/* Pastille de difficulté */
.difficulty-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    background-color: #4CAF50; /* Vert pour "facile" */
}

.difficulty-badge.moyen {
    background-color: #FF9800; /* Orange pour "moyen" */
}

.difficulty-badge.difficile {
    background-color: #F44336; /* Rouge pour "difficile" */
}

/* Conteneur de l'image (position relative pour la pastille) */
.selected-product-image-container {
    position: relative;
    display: inline-block;
}

/* Description et compteur */
.selected-product-description {
    font-size: 14px;
    color: #555;
    margin: 10px 0;
}

.selected-product-count {
    font-weight: bold;
    color: #333;
}


.pastilles-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

/* Pastille de classe */
.classe-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: bold;
    color: white;
    height: 20px;
    line-height: 20px;
}

.classe-badge.simple {
    background-color: #95928d;
}

.classe-badge.complet {
    background-color: #21f3b1;
}

.difficulte, .classe-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.selected-product-prices {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
}


/* Responsive */
@media (max-width: 768px) {
    .offers-grid {
        min-height: 350px;
    }

    .unique-card-content {
        padding: 25px 20px;
        min-height: 300px;
    }

    .unique-card .offer-button {
        width: 80%;
    }

    .subscription-hint {
        width: 95%;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .unique-card .offer-title {
        font-size: 18px;
    }

    .credit-amount {
        font-size: 16px;
    }

    .unique-card .offer-button {
        width: 85%;
        padding: 10px;
    }
}







/* Responsive */
@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
    }
    .pdf-section, .offers-section {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    .pdf-viewer {
        height: 500px;
    }
    .pdf-viewer iframe {
        height: 500px;
    }
    /* Adaptation pour mobile */
    .offers-grid[data-count="1"],
    .offers-grid[data-count="2"],
    .offers-grid[data-count="3"],
    .offers-grid[data-count="4"] {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .pdf-viewer {
        height: 400px;
    }
    .pdf-viewer iframe {
        height: 400px;
    }
    .offer-card {
        padding: 10px;
    }
}