/* Nouvelle fiche smartphone : reprend les variables de couleur de SmartMag (mode clair et sombre). */
.ts-fiche, .ts-liste-fiches, .ts-onglets, .ts-recherche, .ts-articles, .ts-encadre {
	--ts-accent: var(--c-main, #2463eb);
	--ts-texte: var(--c-contrast-900, #161616);
	--ts-doux: var(--c-contrast-650, #5b5b5b);
	--ts-bord: var(--c-contrast-100, #e6e6e6);
	--ts-fond: var(--c-contrast-50, #f6f6f7);
	color: var(--ts-texte);
	margin-bottom: 40px;
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
}
.ts-fiche *, .ts-fiche *::before, .ts-fiche *::after { box-sizing: border-box; }
.ts-tete > * { min-width: 0; }
.ts-fiche h2 { font-size: 1.35rem; margin: 0 0 14px; }

.ts-ariane { font-size: 13px; color: var(--ts-doux); margin: 4px 0 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.ts-ariane a { color: inherit; }
.ts-ariane a:hover { color: var(--ts-accent); }

/* En-tête : visuel + résumé */
.ts-tete { display: grid; grid-template-columns: minmax(180px, 34%) 1fr; gap: 28px; align-items: start; margin-bottom: 28px; }
.ts-visuel { background: var(--ts-fond); border-radius: 12px; padding: 18px; text-align: center; }
.ts-visuel img { max-width: 100%; height: auto; max-height: 420px; width: auto; object-fit: contain; }
.ts-titre { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; margin: 0 0 8px; }
.ts-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ts-doux); margin: 0 0 18px; }
.ts-statut { background: var(--ts-accent); color: #fff; border-radius: 99px; padding: 1px 10px; font-weight: 600; }

.ts-essentiels { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ts-ess { border: 1px solid var(--ts-bord); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ts-ess-libelle { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ts-doux); }
.ts-ess strong { font-size: 1.05rem; line-height: 1.25; }
.ts-ess-detail { font-size: 13px; color: var(--ts-doux); line-height: 1.35; }

.ts-prix { background: var(--ts-fond); border-radius: 12px; padding: 14px 16px; }
.ts-prix .ts-prix-titre { font-size: 1rem; margin: 0 0 8px; }
.ts-prix ul { list-style: none; margin: 0; padding: 0; }
.ts-prix li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 6px 0; margin: 0; font-size: 15px; border-bottom: 1px solid var(--ts-bord); }
.ts-prix li:last-child { border-bottom: 0; }
.ts-prix li strong { color: var(--ts-accent); white-space: nowrap; }
.ts-prix-note { font-size: 12px; color: var(--ts-doux); margin: 8px 0 0; }

.ts-offres, .ts-specs, .ts-description, .ts-autres { margin: 0 0 32px; }
.ts-pub { margin: 0 0 32px; text-align: center; }

/* Où acheter (offres d'affiliation) */
.ts-ou-acheter { margin: 0 0 32px; border: 1px solid var(--ts-bord, #e6e6e6); border-radius: 12px; padding: 16px; }
.ts-ou-acheter h2 { font-size: 1.15rem; margin: 0 0 10px; }
.ts-ou-acheter ul { list-style: none; margin: 0; padding: 0; }
.ts-ou-acheter li { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 12px; padding: 10px 0; margin: 0; border-bottom: 1px solid var(--ts-bord, #e6e6e6); }
.ts-ou-acheter li:last-child { border-bottom: 0; }
.ts-marchand { font-weight: 800; color: var(--ts-m); letter-spacing: -.01em; font-size: 1.05rem; }
.ts-variante { font-size: 14px; color: var(--ts-doux, #5b5b5b); min-width: 0; }
.ts-bouton { display: inline-block; background: var(--ts-accent, #2463eb); color: #fff !important; font-weight: 700; font-size: 14px; border-radius: 8px; padding: 9px 16px; white-space: nowrap; text-decoration: none !important; }
.ts-bouton:hover { filter: brightness(1.1); }
.ts-mention { font-size: 12px; color: var(--ts-doux, #5b5b5b); margin: 10px 0 0; }
@media (max-width: 767px) {
	.ts-ou-acheter li { grid-template-columns: 1fr auto; gap: 4px 12px; }
	.ts-ou-acheter .ts-variante { grid-column: 1; grid-row: 2; }
	.ts-ou-acheter .ts-bouton { grid-column: 2; grid-row: 1 / span 2; }
}

/* Tableau unique, une section par groupe */
.ts-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 15px; margin: 0; border: 0; }
.ts-table th, .ts-table td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--ts-bord); }
.ts-table tbody th[scope="row"] { width: 34%; font-weight: 600; color: var(--ts-doux); }
.ts-table .ts-section th { background: var(--ts-fond); color: var(--ts-texte); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; padding-top: 12px; border-bottom: 2px solid var(--ts-accent); }
.ts-table td p { margin: 0 0 4px; }
.ts-table td ul { margin: 2px 0 6px 18px; padding: 0; }
.ts-table td li { margin: 0; }

/* Cartes de fiches : autres de la marque, similaires, [fiches] */
.ts-liste-fiches { margin: 0 0 24px; }
.ts-cartes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ts-similaires .ts-cartes { grid-template-columns: repeat(6, 1fr); }
@media (min-width: 768px) and (max-width: 1100px) { .ts-similaires .ts-cartes { grid-template-columns: repeat(3, 1fr); } }
.ts-cartes li { margin: 0; padding: 0; }
.ts-cartes li::before { display: none; }
.ts-similaires-note { font-size: 14px; color: var(--ts-doux, #5b5b5b); margin: -6px 0 12px; }
.ts-carte-prix { font-size: 13px; font-weight: 700; color: var(--ts-accent, #2463eb); }
.ts-cartes a { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 14px; font-weight: 600; color: inherit; border: 1px solid var(--ts-bord); border-radius: 10px; padding: 10px; height: 100%; }
.ts-cartes a:hover { border-color: var(--ts-accent); color: var(--ts-accent); }
.ts-cartes img { display: block; width: auto !important; max-width: 100%; height: 130px !important; object-fit: contain; margin: 0 auto; }

@media (max-width: 767px) {
	.ts-tete { grid-template-columns: 1fr; gap: 18px; }
	.ts-visuel img { max-height: 300px; }
	.ts-cartes, .ts-similaires .ts-cartes { grid-template-columns: repeat(2, 1fr); }
	.ts-similaires .ts-cartes li:nth-child(n+5) { display: none; }
	.ts-cartes img { height: 110px !important; }
	.ts-table { font-size: 14px; }
	.ts-table th, .ts-table td { padding: 8px; }
	.ts-table tbody th[scope="row"] { width: 38%; }
	.ts-essentiels { gap: 8px; }
	.ts-ess { padding: 8px 10px; }
}

/* Meilleur prix */
.ts-ou-acheter li.ts-meilleur { background: color-mix(in srgb, var(--ts-accent, #2463eb) 7%, transparent); border-radius: 8px; padding-left: 8px; padding-right: 8px; }
.ts-variante em { font-style: normal; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #fff; background: #16a34a; border-radius: 99px; padding: 1px 8px; margin-left: 6px; white-space: nowrap; }
.ts-ou-acheter .ts-bouton { min-width: 110px; text-align: center; }

/* Prix en France automatique */
.ts-prix-detail { display: block; font-size: 12px; color: var(--ts-doux, #5b5b5b); }
.ts-prix li strong a { color: inherit; text-decoration: none; }
.ts-prix li strong a:hover { text-decoration: underline; }

/* Comparatifs [comparatif a b] */
.ts-comparatif { margin: 1.5em 0; }
.ts-comp-tete { display: flex; align-items: stretch; justify-content: center; gap: 12px; }
.ts-comp-carte { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; border: 1px solid var(--ts-bord); border-radius: 12px; padding: 14px 12px; }
.ts-comp-visuel { display: block; background: var(--ts-fond); border-radius: 10px; padding: 10px; width: 100%; }
.ts-comp-visuel img { display: block; width: auto !important; max-width: 100%; height: 170px !important; object-fit: contain; margin: 0 auto; }
.ts-comp-nom { font-weight: 700; font-size: 17px; color: inherit !important; text-decoration: none !important; line-height: 1.25; }
.ts-comp-nom:hover { color: var(--ts-accent) !important; }
.ts-comp-prix { font-weight: 700; font-size: 20px; color: var(--ts-accent); line-height: 1.2; }
.ts-comp-prix small { display: block; font-size: 12px; font-weight: 400; color: var(--ts-doux); }
.ts-comp-carte .ts-bouton { margin-top: auto; }
.ts-comp-vs { align-self: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--ts-texte); color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; text-transform: uppercase; }
.ts-comp-table-wrap { margin-top: 1em; }
.ts-comp-table thead th { font-size: 14px; color: var(--ts-accent); border-bottom: 0; }
.ts-comp-table thead td { border-bottom: 0; }
.ts-comp-table tbody th[scope="row"] { width: 24%; color: var(--ts-doux); font-weight: 600; }
.ts-comp-table .ts-vide { color: var(--ts-doux); }
.ts-comp-erreur { border: 1px dashed #dc2626; color: #dc2626; padding: 8px 12px; border-radius: 8px; }
@media (max-width: 767px) {
	.ts-comp-tete { gap: 6px; }
	.ts-comp-carte { padding: 10px 6px; }
	.ts-comp-visuel img { height: 120px !important; }
	.ts-comp-nom { font-size: 15px; }
	.ts-comp-prix { font-size: 17px; }
	.ts-comp-carte .ts-bouton { white-space: normal; padding: 8px 10px; font-size: 13px; }
	.ts-comp-vs { width: 28px; height: 28px; font-size: 11px; }
	.ts-comp-3 .ts-comp-vs { display: none; }
	/* Sur mobile, le libellé passe au-dessus des valeurs, qui gardent toute la largeur. */
	.ts-comp-table, .ts-comp-table thead, .ts-comp-table tbody { display: block; }
	.ts-comp-table tr { display: grid; grid-template-columns: repeat(var(--ts-n, 2), minmax(0, 1fr)); }
	.ts-comp-3 tr { --ts-n: 3; }
	.ts-comp-table thead td { display: none; }
	.ts-comp-table tbody th[scope="row"] { grid-column: 1 / -1; width: auto; border-bottom: 0; padding-bottom: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
	.ts-comp-table .ts-section th { grid-column: 1 / -1; }
}

/* Onglets par marque [fiches-onglets] (accueil) */
.ts-onglets { margin: 0 0 24px; display: grid; grid-template-columns: minmax(0, 1fr); max-width: 100%; }
.ts-onglets-barre { display: none; }
.ts-onglets-actif .ts-onglets-barre { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--ts-bord, #e6e6e6); margin: 0 0 16px; }
.ts-onglets-barre button { background: none !important; box-shadow: none !important; border: 0 !important; border-bottom: 3px solid transparent !important; margin: 0 0 -2px; padding: 10px 16px; font: inherit; font-weight: 600; font-size: 15px; line-height: 1.3; text-transform: none; letter-spacing: normal; color: var(--ts-texte, #222) !important; cursor: pointer; border-radius: 0 !important; min-height: 0; }
.ts-onglets-barre button:hover { color: var(--ts-accent, #ff5c00) !important; }
.ts-onglets-barre button[aria-selected="true"] { color: var(--ts-accent, #ff5c00) !important; border-bottom-color: var(--ts-accent, #ff5c00) !important; }
.ts-onglets-titre { font-size: 1.1rem; margin: 16px 0 10px; }
.ts-onglets-actif .ts-onglets-titre { display: none; }
.ts-onglets-plus { margin: 10px 0 0; text-align: right; font-size: 14px; font-weight: 600; }
@media (max-width: 767px) {
	.ts-onglets-actif .ts-onglets-barre { flex-wrap: nowrap; overflow-x: auto; }
	.ts-onglets-barre button { white-space: nowrap; padding: 10px 12px; }
}

/* Recherche de smartphones [recherche-fiches] (archive « Parcourir les téléphones ») */
.ts-recherche { position: relative; display: flex; gap: 8px; margin: 0 0 20px; }
.ts-recherche input[type="search"] { flex: 1 1 auto; min-width: 0; height: 42px; padding: 0 14px; border: 1px solid var(--ts-bord); border-radius: 6px; font: inherit; font-size: 15px; background: #fff; color: var(--ts-texte); }
.ts-recherche select { flex: 0 0 180px; height: 42px; padding: 0 10px; border: 1px solid var(--ts-bord); border-radius: 6px; font: inherit; font-size: 14px; background: #fff; color: var(--ts-texte); }
.ts-recherche > button { flex: 0 0 46px; height: 42px; padding: 0; border: 0 !important; border-radius: 6px !important; background: var(--ts-accent) !important; color: #fff !important; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ts-recherche input:focus, .ts-recherche select:focus { outline: 2px solid var(--ts-accent); outline-offset: -1px; }
.ts-recherche-resultats { position: absolute; z-index: 50; top: 48px; left: 0; right: 0; background: #fff; border: 1px solid var(--ts-bord); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 6px; max-height: 70vh; overflow-y: auto; }
.ts-recherche-resultats ul { list-style: none; margin: 0; padding: 0; }
.ts-recherche-resultats li a { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 6px; color: var(--ts-texte); text-decoration: none; }
.ts-recherche-resultats li a:hover, .ts-recherche-resultats li a:focus { background: var(--ts-fond); }
.ts-recherche-resultats img { width: 40px; height: 40px; object-fit: contain; flex: 0 0 40px; }
.ts-recherche-resultats span { flex: 1 1 auto; font-weight: 600; font-size: 14px; }
.ts-recherche-resultats .ts-carte-prix { font-size: 13px; font-weight: 600; color: var(--ts-accent); white-space: nowrap; }
.ts-recherche-vide { margin: 8px; color: var(--ts-doux); font-size: 14px; }
.ts-recherche-tout { display: block; width: 100%; margin: 6px 0 0; padding: 8px; border: 0 !important; border-top: 1px solid var(--ts-bord) !important; background: none !important; color: var(--ts-accent) !important; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border-radius: 0 !important; }
@media (max-width: 600px) {
	.ts-recherche { flex-wrap: wrap; }
	.ts-recherche input[type="search"] { flex: 1 1 100%; }
	.ts-recherche select { flex: 1 1 auto; }
}

/* Listes d'articles compactes [articles] (colonnes du modèle « Parcourir les téléphones ») */
.ts-articles { list-style: none; margin: 0 0 20px; padding: 0; }
.ts-articles li { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--ts-bord); }
.ts-articles li:first-child { padding-top: 0; }
.ts-articles li:last-child { border-bottom: 0; }
.ts-articles a { display: flex; gap: 10px; color: var(--ts-texte); text-decoration: none; }
.ts-articles a:hover .ts-articles-titre { color: var(--ts-accent); }
.ts-articles-image { flex: 0 0 64px; }
.ts-articles-image img { display: block; width: 64px !important; height: 64px !important; object-fit: cover; border-radius: 6px; margin: 0 !important; }
.ts-articles-texte { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ts-articles-titre { font-size: 13.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; hyphens: auto; }
.ts-articles time { font-size: 12px; color: var(--ts-doux); }
.ts-articles-carte a { flex-direction: column; gap: 8px; }
.ts-articles-carte .ts-articles-image { flex: none; }
.ts-articles-carte .ts-articles-image img { width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; }
.ts-articles-carte .ts-articles-titre { font-size: 14px; }
.ts-articles-vide { display: block; width: 64px; height: 64px; border-radius: 6px; background: var(--ts-fond); }
.ts-articles-carte .ts-articles-vide { width: 100%; height: auto; aspect-ratio: 16 / 9; }

/* Encadré d'achat des articles [encadre-achat] (remplace les encadrés Jet Elements) */
.ts-encadre { margin: 0 0 1.5em; }
.ts-encadre ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ts-encadre li { display: flex; align-items: center; gap: 14px; margin: 0; padding: 6px 6px 6px 8px; border: 1px solid var(--ts-bord); border-radius: 10px; background: #fff; }
.ts-encadre-logo { flex: 0 0 32px; width: 32px !important; height: 32px !important; object-fit: contain; margin: 0 !important; border-radius: 4px; }
.ts-encadre-initiale { display: flex; align-items: center; justify-content: center; background: var(--ts-fond); font-weight: 700; color: var(--ts-doux); }
.ts-encadre-nom { flex: 1 1 auto; min-width: 0; font-weight: 600; font-size: 15px; color: var(--ts-texte); }
.ts-encadre-nom small { font-weight: 400; color: var(--ts-doux); margin-left: 4px; }
.ts-encadre-bouton { flex: 0 0 auto; min-width: 150px; padding: 7px 12px; border-radius: 8px; background: var(--ts-accent); color: #fff !important; font-weight: 600; font-size: 15px; text-align: center; text-decoration: none !important; white-space: nowrap; }
.ts-encadre-bouton:hover { filter: brightness(0.92); }
.ts-encadre-mention { margin: 6px 2px 0; font-size: 12px; line-height: 1.4; color: var(--ts-doux); }
@media (max-width: 600px) {
	.ts-encadre li { gap: 10px; }
	.ts-encadre-bouton { min-width: 105px; font-size: 14px; padding: 7px 8px; }
}
