/* Tubixe v2 : tube sombre, accent rose (cle tx_design_v2).
   Rappel : style.css (pages d'origine) cible [class*=row] et [class*=col-] : pas de ces mots dans les classes v2. */
:root {
  --tx-bg: #121216;
  --tx-bg2: #1a1a20;
  --tx-card: #1f1f26;
  --tx-line: #2e2e37;
  --tx-txt: #ececf1;
  --tx-mute: #9a9aa8;
  --tx-rose: #ff2f7d;
  --tx-rose2: #ff5c9a;
  --tx-font: Outfit, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
body.tx { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--tx-bg); color: var(--tx-txt); font: 15px/1.5 var(--tx-font); -webkit-font-smoothing: antialiased; }
body.tx a { color: inherit; text-decoration: none; }
body.tx > .tx-foot { margin-top: auto; }
.tx-wrap { box-sizing: border-box; width: 100%; max-width: 1680px; margin: 0 auto; padding: 0 22px; }

/* ---------- en-tete ---------- */
.tx-head { position: sticky; top: 0; z-index: 50; background: rgba(18, 18, 22, .92); backdrop-filter: saturate(150%) blur(10px); -webkit-backdrop-filter: saturate(150%) blur(10px); border-bottom: 1px solid var(--tx-line); }
.tx-head__bar { display: flex; align-items: center; gap: 20px; height: 66px; }
.tx-logo { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
/* l'ancienne feuille met a[href$="/site/"] en bloc centre avec marge : le logo pointe sur /site/ */
.tx a.tx-logo { display: inline-flex !important; margin: 0 !important; text-align: left; }
.tx-logo__mark { display: block; flex: 0 0 auto; }
.tx-logo__mark { width: 38px; height: 38px; filter: drop-shadow(0 6px 16px rgba(255, 47, 125, .35)); }
.tx-logo__word { font: 800 28px/1 var(--tx-font); letter-spacing: -.8px; color: #fff; }
.tx-logo__word b { color: var(--tx-rose); font-weight: 800; }
.tx-logo--small .tx-logo__mark { width: 30px; height: 30px; }
.tx-logo--small .tx-logo__word { font-size: 22px; }

.tx-search { position: relative; display: flex; flex: 1 1 auto; max-width: 560px; margin: 0 0 0 auto; }
.tx .tx-search input {
  box-sizing: border-box; width: 100%; height: 42px; margin: 0; padding: 0 52px 0 18px;
  background: var(--tx-bg2); color: var(--tx-txt); border: 1px solid var(--tx-line); border-radius: 999px;
  font: 15px var(--tx-font); outline: none; box-shadow: none; transition: border-color .15s;
}
.tx .tx-search input::placeholder { color: var(--tx-mute); }
.tx .tx-search input:focus { border-color: var(--tx-rose); }
.tx .tx-search button { position: absolute; right: 4px; top: 4px; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: linear-gradient(135deg, var(--tx-rose2), var(--tx-rose)); cursor: pointer; }
.tx-search svg { width: 17px; height: 17px; fill: #fff; }

/* ---------- titres, grille ---------- */
.tx-main { padding-top: 24px; padding-bottom: 30px; }
.tx .tx-h { margin: 0 0 20px; font: 700 21px/1.25 var(--tx-font); color: var(--tx-txt); letter-spacing: -.2px; text-align: left; }
.tx-empty { color: var(--tx-mute); font-size: 16px; }

.tx-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px 16px; }
/* 24 par page (18 en videos similaires) : 6, 4, 3 et 2 colonnes, jamais de case vide en bas */
@media (max-width: 1150px) { .tx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .tx-grid--related { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px)  { .tx-grid, .tx-grid--related { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .tx-grid, .tx-grid--related { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; } }

.tx-card { min-width: 0; }
.tx-card__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 12px; background: var(--tx-card); }
.tx-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease, filter .35s; }
.tx-card__media img.is-broken { opacity: 0; }
.tx-card:hover .tx-card__media img { transform: scale(1.05); filter: brightness(1.08); }
.tx-card__media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .2s; }
.tx-card:hover .tx-card__media::after { box-shadow: inset 0 0 0 2px var(--tx-rose); }
.tx-card__time { position: absolute; right: 8px; bottom: 8px; padding: 3px 7px; border-radius: 6px; background: rgba(0, 0, 0, .78); color: #fff; font: 600 12px/1 var(--tx-font); letter-spacing: .3px; }
.tx-live { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; background: #e8202f; color: #fff; font: 700 11.5px/1 var(--tx-font); letter-spacing: .3px; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); }
.tx-live i { width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.tx-flag { position: absolute; left: 8px; top: 8px; padding: 4px 9px; border-radius: 999px; background: var(--tx-rose); color: #fff; font: 700 11.5px/1 var(--tx-font); }
.tx .tx-card__title { margin: 9px 0 0; font: 600 14.5px/1.3 var(--tx-font); color: var(--tx-txt); white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tx .tx-card__title a { color: var(--tx-txt); }
.tx .tx-card:hover .tx-card__title a { color: var(--tx-rose2); }
.tx-card__meta { margin: 4px 0 0; color: var(--tx-mute); font-size: 12.5px; }
.tx-card__meta::first-letter { text-transform: uppercase; }

/* pagination CI */
.tx-pager { margin-top: 34px; }
.tx-pager .pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tx-pager .pagination li { list-style: none; }
.tx .tx-pager a, .tx .tx-pager strong, .tx .tx-pager .page-link {
  display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 13px; margin: 0;
  border-radius: 12px; background: var(--tx-card); border: 1px solid var(--tx-line); color: var(--tx-txt); font: 600 14px var(--tx-font);
}
.tx .tx-pager a:hover { border-color: var(--tx-rose); color: var(--tx-rose2); }
.tx .tx-pager strong, .tx .tx-pager .active a, .tx .tx-pager .active .page-link { background: var(--tx-rose); border-color: var(--tx-rose); color: #fff; }

/* ---------- article ---------- */
.tx-article { max-width: 1240px; }
.tx-article__top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.tx-back { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--tx-card); border: 1px solid var(--tx-line); font-weight: 600; font-size: 14px; }
.tx-back::before { content: "←"; }
.tx-back:hover { border-color: var(--tx-rose); color: var(--tx-rose2); }
.tx .tx-article__title { margin: 0; font: 700 28px/1.2 var(--tx-font); letter-spacing: -.4px; color: #fff; }
.tx-article__desc { color: var(--tx-mute); font-size: 16px; }
.tx-player { border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
.tx-player .video-js { width: 100%; }
.tx-embed { position: relative; height: 0; padding-bottom: 56%; overflow: hidden; }
.tx-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tx-images { list-style: none; margin: 18px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tx-images .image-wrapper { position: relative; overflow: hidden; border-radius: 12px; }
.tx-images .articleimage { width: 100%; display: block; }
.tx-images .photonumber { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .7); color: #fff; font-weight: 700; font-size: 13px; }
.tx-warn { padding: 10px 14px; border-radius: 10px; background: #8a4b00; color: #fff; }
.tx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0 6px; }
.tx-actions:empty { display: none; }
.tx-btn { display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 12px; background: var(--tx-card); border: 1px solid var(--tx-line); font-weight: 600; }
.tx-btn:hover { border-color: var(--tx-rose); color: var(--tx-rose2); }
.tx .tx-btn--hot { background: linear-gradient(135deg, var(--tx-rose2), var(--tx-rose)); border: 0; color: #fff; box-shadow: 0 8px 22px rgba(255, 47, 125, .3); }
.tx .tx-btn--hot:hover { color: #fff; filter: brightness(1.06); }
.tx-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 6px; }
.tx-tag { padding: 6px 13px; border-radius: 999px; background: var(--tx-card); border: 1px solid var(--tx-line); font-size: 13.5px; font-weight: 600; color: var(--tx-mute); }
.tx-tag:hover { border-color: var(--tx-rose); color: #fff; }
.tx-grid--related { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--tx-line); }

/* ---------- pied ---------- */
.tx-foot { margin-top: 40px; padding: 26px 0 30px; background: #0c0c0f; border-top: 1px solid var(--tx-line); color: var(--tx-mute); font-size: 14px; }
.tx-foot__intro { max-width: 900px; margin: 0 auto 20px; text-align: center; line-height: 1.6; }
.tx-foot__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 26px; }
.tx-foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.tx-foot__links a:hover { color: var(--tx-rose2); }
.tx-foot__dom { opacity: .7; }

/* ---------- pages d'origine (contact, auth...) ---------- */
.tx-legacy { display: block; box-sizing: border-box; width: 100%; max-width: 1240px; margin: 0 auto; padding: 26px 22px 10px; }
.tx--legacy .navbar { display: none; }
.tx--legacy h1, .tx--legacy header.title h1 { font: 700 30px/1.2 var(--tx-font); color: #fff; }
.tx--legacy h2 { font-family: var(--tx-font); }
.tx--legacy form[action*="/contact"] { background: var(--tx-bg2); border-color: var(--tx-line); border-radius: 16px; }
.tx--legacy form[action*="/contact"] input[type="text"], .tx--legacy form[action*="/contact"] textarea { background: var(--tx-bg); color: var(--tx-txt); border-color: var(--tx-line); border-radius: 10px; }
.tx--legacy form[action*="/contact"] input:focus, .tx--legacy form[action*="/contact"] textarea:focus { border-color: var(--tx-rose); box-shadow: 0 0 0 3px rgba(255, 47, 125, .2); }
.tx--legacy form[action*="/contact"] input[type="submit"] { background: linear-gradient(135deg, var(--tx-rose2), var(--tx-rose)); border-radius: 12px; }
.tx--legacy a[href$="/site/"] { color: var(--tx-rose2); }

/* ---------- mobile ---------- */
@media (max-width: 700px) {
  .tx-wrap { padding: 0 12px; }
  .tx-head__bar { height: 60px; gap: 12px; }
  .tx-logo__mark { width: 32px; height: 32px; }
  .tx-logo__word { font-size: 23px; }
  .tx .tx-search input { height: 38px; padding-right: 44px; font-size: 14px; }
  .tx .tx-search button { width: 30px; height: 30px; }
  .tx .tx-h { font-size: 17px; }
  .tx .tx-card__title { font-size: 13.5px; }
  .tx .tx-article__title { font-size: 21px; }
  .tx-article__top { align-items: flex-start; flex-direction: column; gap: 10px; }
  .tx-player { border-radius: 12px; }
}
@media (max-width: 340px) {
  .tx-logo__word { display: none; }
}
.tx--legacy .contact-erreur { max-width: 640px; margin: 0 auto 12px; padding: 10px 14px; border-radius: 10px; background: rgba(232, 32, 47, .15); border: 1px solid rgba(232, 32, 47, .5); color: #ffb3bb; }
.tx--legacy #recaptcha-widget { min-height: 78px; }

/* page DMCA (formulaire commun, theme sombre) aux couleurs tubixe */
.tx .dm--sombre { --dm-card: var(--tx-card); --dm-line: var(--tx-line); --dm-text: var(--tx-txt); --dm-muted: var(--tx-mute); --dm-field: var(--tx-bg); --dm-accent: var(--tx-rose); }
.tx .dm--sombre .dm-btn { background: linear-gradient(135deg, var(--tx-rose2), var(--tx-rose)) !important; box-shadow: 0 8px 22px rgba(255, 47, 125, .3) !important; }
.tx .dm { font-family: var(--tx-font); }
.tx-page-dmca .tx-main, .tx-page-dmca > .dm { padding-top: 26px; }
@media (max-width: 800px) { .tx-page-dmca > .dm { box-sizing: border-box; width: calc(100% - 24px); } }
