/* Carte produit compacte */
.tb-carte-produit {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    background: #fff;
}

.tb-carte-produit-inner {
    display: flex;
    gap: 12px;
}

.tb-carte-image img {
    max-width: 140px;
    height: auto;
    display: block;
}

.tb-carte-contenu {
    flex: 1;
}

.tb-carte-titre {
    margin: 0 0 6px;
    font-size: 1.1em;
}

.tb-carte-note {
    font-size: 0.95em;
    margin: 4px 0;
}

.tb-carte-prix {
    font-size: 1.1em;
    margin: 6px 0;
}

/* Bouton Amazon */
.tb-bouton-amazon {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid #ff9900;
}

/* Tableau comparatif */
.tb-comparatif-produit {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.tb-comparatif-produit th,
.tb-comparatif-produit td {
    border: 1px solid #ddd;
    padding: 8px;
}

.tb-comparatif-produit th {
    background: #f5f5f5;
    text-align: left;
}

/* Top produits */
.tb-top-produits .tb-top-liste {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.tb-top-produits .tb-top-item {
    margin-bottom: 16px;
}

/* Avantages / Inconvénients */
.tb-avis-produit {
    display: flex;
    gap: 20px;
}

.tb-avis-col {
    flex: 1;
    border: 2px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    background: #fff;
}

.tb-avis-plus {
    border-color: #4CAF50;
}

.tb-avis-moins {
    border-color: #E53935;
}

.tb-avis-titre {
    font-size: 1.4em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 18px;
    position: relative;
    padding-top: 18px;
}

.tb-icon-plus,
.tb-icon-moins {
    display: inline-block;
    width: 38px;
    height: 38px;
    line-height: 36px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
}

.tb-icon-plus {
    background: #4CAF50;
    color: #fff;
    border: 3px solid #4CAF50;
}

.tb-icon-moins {
    background: #E53935;
    color: #fff;
    border: 3px solid #E53935;
}

/* Fiche produit : prix sur une ligne */
.tb-produit-prix-ligne > div {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.ancien-prix s {
    color: #888;
    font-size: 0.9em;
}

.prix-actuel .prix {
    color: #d60000;
    font-size: 1.6em;
    font-weight: bold;
}

.reduction {
    color: #0a7c00;
    font-weight: bold;
}

/* rating */
.tb-produit-rating {
	display: inline-flex;
	align-items: center;
	gap: .35em;
	font-size: 1.2em;
	line-height: 1;
}

.tb-stars-svg {
	display: inline-flex;
	align-items: center;
}

.tb-star svg {
	width: 1.1em;
	height: 1.1em;
	display: block;
}

.tb-rating-count {
	margin-left: .15em;
	font-size: .9em;
	color: #444;
}
.tb-rating-mini {
	font-size: .95em;
}

.tb-carte-rating {
	margin: .3em 0 .4em;
}

.tb-comparatif-grille {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.2em;
}

.tb-top-produit {
	border: 1px solid #e5e5e5;
	padding: 1em;
	border-radius: .6em;
	text-align: center;
	background: #fff;
}

.tb-top-classement {
	display: flex;
	justify-content: space-between;
	font-weight: bold;
	margin-bottom: .5em;
}

.tb-promo {
	color: #c00;
}

.tb-top-image img {
	margin: 0 auto;
}

.tb-top-rating {
	margin: .4em 0;
}

/* Conteneur des cartes */
.tb-comparatif-grille {
    display: grid;
    gap: 1.5rem;                  /* espace entre les cartes */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

/* Chaque carte produit */
.tb-top-produit {
    border: 1px solid #e5e5e5;
    border-radius: .6em;
    padding: 1em;
    background: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: .6em;
}

/* Classement + promo */
.tb-top-classement {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    margin-bottom: .3em;
}

.tb-rank {
    font-size: 1.1em;
}

.tb-promo {
    color: #c00;
}

/* Image centrée */
.tb-top-image img {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* Rating + prix + bouton bien espacés */
.tb-top-rating,
.tb-top-prix,
.tb-top-bouton {
    margin-top: .2em;
}

/* RESPONSIVE : 2 colonnes sur tablette */
@media (max-width: 1024px) {
    .tb-comparatif-grille {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* RESPONSIVE : 1 colonne sur mobile */
@media (max-width: 640px) {
    .tb-comparatif-grille {
        grid-template-columns: 1fr;
    }
}


.tb-prix-ligne {
	display: flex;
	justify-content: center;
	align-items: baseline;
	gap: .5em;
	font-weight: 600;
}

.tb-prix-public {
	color: #999;
	font-size: .95em;
}

.tb-prix-actuel {
	color: #c00;
	font-size: 1.3em;
}

.tb-prix-economie {
	color: #c00;
	font-size: .85em;
}
.tb-top-image {
	width: 100%;
	height: 300px;               /* taille du cadre */
	display: flex;
	align-items: center;         /* centrage vertical */
	justify-content: center;     /* centrage horizontal */
	overflow: hidden;
}

.tb-top-image img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;         /* PAS de recadrage */
}
.tb-top-produit {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}
/* Conteneur global de la présentation produit */
.tb-produit-presentation {
    display: grid;
    grid-template-columns: 1fr 320px;
    grid-template-areas:
        "contenu image"
        "avantages avantages"
        "bouton bouton";
    gap: 2rem;
    margin: 3rem 0;
}

/* Zones */
.tb-prod-contenu     { grid-area: contenu; }
.tb-prod-image       { grid-area: image; }
.tb-prod-avantages   { grid-area: avantages; }
.tb-prod-bouton      { grid-area: bouton; }

section .tb-comparatif-autres { padding:0 }

/* h3+gros */
.tb-prod-contenu h3   { font-size:150% }

/* Image alignée en haut */
.tb-prod-image {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.tb-prod-image img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .tb-produit-presentation {
        grid-template-columns: 1fr;
        grid-template-areas:
            "image"
            "contenu"
            "avantages"
            "bouton";
    }

    .tb-prod-image {
        justify-content: center;
        margin-bottom: 1rem;
    }
}
