/* TGSD Torrents V2 — ajoutée après assets/style.css, palette orange TGSD */
.ks-torrent-hero{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:space-between;gap:28px;min-height:250px;margin:4px 0 28px;padding:34px 38px;overflow:hidden;border:1px solid #503326;border-radius:23px;background:radial-gradient(circle at 77% 15%,rgba(240,120,34,.22),transparent 33%),linear-gradient(115deg,#2c1b16 0%,#171b25 57%,#121723 100%);box-shadow:0 18px 40px rgba(0,0,0,.19)}
.ks-torrent-hero h1,.ks-upload-heading h1{margin:8px 0 10px;font-size:clamp(31px,4vw,45px);line-height:1.08;letter-spacing:-.035em}.ks-torrent-hero h1 em,.ks-upload-heading h1 em{color:#f07822;font-style:normal}.ks-torrent-hero p,.ks-upload-heading p{max-width:650px;color:#b9c0cd;margin:0}.ks-torrent-eyebrow{display:inline-block;color:#ffb06f;text-transform:uppercase;letter-spacing:.16em;font-size:11px;font-weight:850}.ks-torrent-hero-actions{display:flex;align-items:center;flex-wrap:wrap;gap:14px;margin-top:22px}.ks-torrent-safe-note{font-size:12px;color:#aeb7c6}.ks-torrent-hero-art{position:relative;flex:0 0 210px;height:180px;display:grid;place-items:center}.ks-art-ring{position:absolute;width:158px;height:158px;border:1px solid rgba(255,176,111,.28);border-radius:42px;transform:rotate(24deg);box-shadow:0 0 0 20px rgba(240,120,34,.04),0 0 0 42px rgba(240,120,34,.025)}.ks-art-icon{position:relative;display:grid;place-items:center;width:104px;height:104px;border-radius:30px;background: linear-gradient(145deg, #d3c0b2, #5b321e);color:#fff;font-size:63px;line-height:1;box-shadow:0 17px 35px rgba(240,120,34,.24);transform:rotate(-7deg)}.ks-art-chip{position:absolute;background:#121722;border:1px solid #5c3a2a;border-radius:8px;padding:7px 10px;font-size:10px;font-weight:900;letter-spacing:.11em;color:#ffd3b1;box-shadow:0 8px 20px #0004}.ks-art-chip-one{top:16px;right:4px;transform:rotate(7deg)}.ks-art-chip-two{bottom:11px;left:6px;transform:rotate(-8deg)}
.ks-torrent-toolbar{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:16px;padding:14px;background:#121722;border:1px solid #293243;border-radius:15px}.ks-torrent-filters{display:grid;grid-template-columns:minmax(190px,1.4fr) minmax(145px,.8fr) minmax(135px,.7fr) auto;gap:10px;flex:1;align-items:center}.ks-search-field{display:flex;align-items:center;gap:9px;margin:0;padding:0 12px;border:1px solid #394355;background:#0e121a;border-radius:9px;color:#ffb06f}.ks-search-field input{border:0;padding:10px 0;background:transparent;min-width:0;outline:none;box-shadow:none}.ks-search-field span{font-size:23px;line-height:1}.ks-torrent-filters select,.ks-torrent-filters button{min-height:43px}.ks-view-toggle{display:flex;gap:4px;padding:4px;border-radius:10px;background:#0c1017;border:1px solid #293243}.ks-view-toggle a{display:grid;place-items:center;width:38px;height:35px;border-radius:7px;color:#acecf3;font-size:20px}.ks-view-toggle a.is-active{background: linear-gradient(145deg, #d3c0b2, #5b321e);color:white;box-shadow:0 4px 11px #f078223b}.ks-torrent-results-line{color:#aab3c2;font-size:13px;margin:16px 2px 20px}.ks-torrent-results-line strong{color:#fff}.ks-torrent-results-line span{color:#f07822;margin:0 5px}
.ks-torrent-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}








.ks-torrent-card{
min-width: 0;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(165deg, #3986a1, #614c3b6e);
    border: 1px solid #2c3545;
    transition: transform .2s, border-color .2s, box-shadow .2s;

}








.ks-torrent-card:hover{transform:translateY(-3px);border-color:#78452a;box-shadow:0 12px 28px #0003}.ks-torrent-cover{display:block;position:relative;aspect-ratio:2/2.65;overflow:hidden;background:#202634;border-bottom:1px solid #2d3544}.ks-torrent-cover img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .3s}.ks-torrent-card:hover .ks-torrent-cover img{transform:scale(1.04)}.ks-cover-open{position:absolute;left:12px;right:12px;bottom:12px;padding:8px 10px;text-align:center;border:1px solid #ffffff35;border-radius:9px;background:#0b0d12df;opacity:0;transform:translateY(5px);transition:.2s;font-size:12px;font-weight:800}.ks-cover-tracker-stats{position:absolute;top:10px;left:10px;right:10px;display:flex;flex-wrap:wrap;gap:5px;pointer-events:none}.ks-cover-tracker-stats span{display:inline-flex;align-items:center;max-width:100%;border-radius:7px;padding:6px 7px;font-size:10px;font-weight:900;box-shadow:0 3px 10px #0005;backdrop-filter:blur(5px)}.ks-torrent-card:hover .ks-cover-open,.ks-torrent-card:focus-within .ks-cover-open{opacity:1;transform:none}.ks-no-cover{width:100%;height:100%;min-height:170px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:radial-gradient(circle at 50% 30%,#3f281f 0,transparent 45%),linear-gradient(135deg,#1d2431,#11151e);color:#ffb06f}.ks-no-cover span{font-size:56px;font-weight:300;line-height:1}.ks-no-cover small{font-size:10px;font-weight:900;letter-spacing:.2em}.ks-torrent-card-body{padding:15px 15px 13px}.ks-torrent-category{display:inline-flex;align-items:center;max-width:100%;padding:4px 8px;border:1px solid #64412d;background:#32231c;color:#ffbc8c;border-radius:6px;font-size:13px;text-transform:uppercase;letter-spacing:.08em;font-weight:850}.ks-torrent-card h2{font-size:15px;line-height:1.35;margin:10px 0 7px;overflow-wrap:anywhere}.ks-torrent-card h2 a:hover{color:#ffb06f}.ks-torrent-card-desc{font-size:13px;line-height:1.5;color:#b0dfc3;margin:0 0 13px;min-height:36px;overflow-wrap:anywhere}.ks-torrent-card-meta,.ks-torrent-card-bottom{display:flex;flex-wrap:wrap;justify-content:space-between;gap:7px;font-size:11px;color:#b9c0cd}.ks-torrent-card-meta{border-top:1px solid #2b3444;padding-top:10px}.ks-torrent-card-bottom{border-top:1px solid #242c39;margin-top:10px;padding-top:9px;color:#8792a5}.ks-torrent-live-stats{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-top:10px}.ks-torrent-live-stats span{display:inline-flex;align-items:center;border-radius:6px;padding:5px 7px;font-size:10px;font-weight:850;letter-spacing:.01em}.ks-seeder-count{color:#8ce3ac;background:#173324;border:1px solid #24583b}.ks-leecher-count{color:#ff9e95;background:#3a2022;border:1px solid #6a3337}.ks-tracker-status{color:#aab3c2;background:#202735;border:1px solid #374154}





.ks-torrent-table-wrap{
overflow:auto;
border:1px solid #2b3444;
border-radius:14px;
background:#131823}



.ks-torrent-table{
width:100%;
border-collapse:collapse;
min-width:780px
border-collapse: separate;
border-spacing: 0 10px;

}



.ks-torrent-table th{padding:13px 15px;background:#1c2330;color:#ffb06f;text-transform:uppercase;letter-spacing:.08em;font-size:10px;white-space:nowrap}.ks-torrent-table td{padding:13px 15px;border-top:1px solid #293243;color:#c9d0db;font-size:13px;vertical-align:middle}.ks-torrent-table tbody tr:hover{background:#1b2230}.ks-list-torrent{display:flex;align-items:center;gap:12px;min-width:220px}.ks-list-torrent img,.ks-list-no-cover{flex:0 0 43px;width:43px;height:58px;object-fit:cover;border-radius:6px;border:1px solid #394355;background:#222936}.ks-list-no-cover{display:grid;place-items:center;font-size:25px;color:#ffb06f}


.ks-list-title{
display:block;
max-width:350px;
font-weight:500;
color:#ebe3d3;
font-size: 15px;
overflow-wrap:anywhere
}






.ks-list-torrent small{display:block;color:#8995a8;font-size:13px;margin-top:4px}.ks-torrent-pagination{display:flex;justify-content:center;gap:7px;flex-wrap:wrap;margin:28px 0}.ks-torrent-pagination a,.ks-torrent-pagination span{display:grid;place-items:center;min-width:38px;height:38px;padding:0 10px;border:1px solid #30394a;border-radius:9px;background:#151a24;color:#d4dae3}.ks-torrent-pagination [aria-current=page]{background:#f07822;color:#fff;border-color:#f07822;font-weight:900}.ks-torrent-empty{padding:48px 20px;margin:24px 0;text-align:center;border:1px dashed #394355;border-radius:17px;background:#121722}.ks-empty-icon{display:grid;place-items:center;width:58px;height:58px;margin:0 auto 15px;border-radius:17px;background:#33231c;color:#ffb06f;font-size:30px}.ks-torrent-empty h2{margin:0 0 9px}.ks-torrent-empty p{color:#aab3c2;margin:0 auto 18px;max-width:480px}
.ks-torrent-detail-heading{margin:8px 0 22px}.ks-back-link{display:inline-block;color:#ffb06f;font-weight:750;font-size:13px;margin-bottom:12px}.ks-detail-hero{display:grid;grid-template-columns:minmax(220px,310px) minmax(0,1fr);gap:30px;margin:10px 0 24px}.ks-detail-cover{overflow:hidden;align-self:start;border:1px solid #30394a;border-radius:17px;background:#141923;box-shadow:0 16px 36px #0003}.ks-detail-cover img{display:block;width:100%;height:auto;max-height:490px;object-fit:cover}.ks-no-cover-large{min-height:360px}.ks-detail-main{padding:8px 0}.ks-detail-main h1{font-size:clamp(28px,4vw,40px);line-height:1.14;letter-spacing:-.03em;margin:13px 0}.ks-detail-subtitle{color:#aab3c2;font-size:13px}.ks-detail-subtitle strong{color:#f2f4f8}.ks-detail-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:23px 0}.ks-detail-stats div{padding:14px 12px;background:rgba(21,27,38,.28);border:1px solid rgba(70,82,102,.42);border-radius:12px;min-width:0;backdrop-filter:blur(1px);-webkit-backdrop-filter:blur(1px)}.ks-detail-stats strong{display:block;color:#ffb06f;font-size:16px;overflow-wrap:anywhere}.ks-detail-stats span{display:block;font-size:13px;color:#e5d2b9;margin-top:5px}.ks-detail-actions{display:flex;flex-wrap:wrap;gap:10px;margin:22px 0}.ks-detail-note{font-size:13px;color:#cba778;max-width:650px}.ks-detail-panel{padding:22px;background:#141923;border:1px solid #2b3444;border-radius:16px;margin:18px 0}.ks-detail-panel h2{margin-top:0}.ks-torrent-description{white-space:normal;overflow-wrap:anywhere;color:#f3e1d8;
font-size:15px;line-height:1.8}.ks-hash-line{display:flex;align-items:center;gap:12px;flex-wrap:wrap;border-top:1px solid #2b3444;padding-top:15px;margin-top:20px;color:#9da8b8;font-size:12px}.ks-hash-line code{color:#ffbc8c;overflow-wrap:anywhere}
.ks-upload-heading{margin:12px 0 22px}.ks-upload-heading .ks-back-link{display:block;margin-bottom:22px}.ks-upload-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;align-items:start;gap:22px}.ks-upload-main.panel{margin:0;padding:27px}.ks-upload-section-head{display:flex;align-items:center;gap:13px;margin-bottom:20px}.ks-upload-section-head>span{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:12px;background:#34231d;border:1px solid #6c422d;color:#ffb06f;font-weight:900}.ks-upload-section-head h2{font-size:18px;margin:0 0 3px}.ks-upload-section-head p{font-size:12px;color:#9da8b8;margin:0}.ks-upload-section-spaced{margin-top:30px}.ks-upload-main .field{margin:16px 0}.ks-field-help{font-size:11px;color:#8f9aac}.ks-file-drop{display:flex;flex-direction:column;align-items:flex-start;gap:9px;padding:22px;border:1px dashed #795036;border-radius:13px;background:linear-gradient(125deg,#211a18,#151b26);margin:14px 0}.ks-file-drop-icon{display:grid;place-items:center;width:43px;height:43px;border-radius:13px;background:#3a251b;color:#ffb06f;font-size:29px}.ks-file-drop label{font-size:15px;color:#f5f7fb}.ks-file-drop input{background:transparent;border:0;padding:8px 0}.ks-file-drop>span{color:#9da8b8;font-size:11px}.ks-required{color:#ff9973}.ks-upload-aside{display:grid;gap:14px}.ks-upload-aside-card,.ks-upload-warning{padding:21px;border:1px solid #2b3444;border-radius:15px;background:#141923}.ks-aside-icon{display:grid;place-items:center;width:43px;height:43px;margin-bottom:14px;border-radius:14px;background:#203229;border:1px solid #2d6d50;color:#7ee0a9;font-size:23px}.ks-upload-aside-card h2{margin:0 0 10px;font-size:17px}.ks-upload-aside-card ul{margin:0;padding-left:18px;color:#aab3c2;font-size:12px;line-height:1.75}.ks-upload-aside-card li{margin:7px 0}.ks-upload-warning{border-color:#63462c;background:#211b18}.ks-upload-warning strong{color:#ffbc8c}.ks-upload-warning p{margin:8px 0 0;color:#b9b4b0;font-size:12px;line-height:1.7}
@media(max-width:1000px){.ks-torrent-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.ks-upload-layout{grid-template-columns:minmax(0,1fr) 260px}.ks-torrent-filters{grid-template-columns:minmax(140px,1fr) minmax(130px,.8fr) minmax(125px,.7fr) auto}}
@media(max-width:760px){.ks-torrent-hero{padding:25px 22px;min-height:0}.ks-torrent-hero-art{display:none}.ks-torrent-toolbar{align-items:stretch;flex-direction:column}.ks-torrent-filters{grid-template-columns:1fr 1fr}.ks-search-field{grid-column:1/-1}.ks-torrent-filters button{grid-column:1/-1}.ks-view-toggle{align-self:flex-end}.ks-torrent-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.ks-torrent-card-body{padding:11px}.ks-torrent-card h2{font-size:13px}.ks-torrent-card-desc{font-size:11px}.ks-detail-hero{grid-template-columns:1fr;gap:18px}.ks-detail-cover{max-width:310px}.ks-detail-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.ks-upload-layout{grid-template-columns:1fr}.ks-upload-main.panel{padding:19px}.ks-torrent-table-wrap{margin-right:-4px}}
@media(max-width:390px){.ks-torrent-grid{grid-template-columns:1fr}.ks-torrent-cover{aspect-ratio:3/2}.ks-torrent-cover img{object-position:center 30%}.ks-torrent-filters{grid-template-columns:1fr}.ks-search-field{grid-column:auto}}


/* Genres / sous-catégories des torrents TGSD */
.ks-torrent-genre {
  display: inline-flex;
  align-items: center;
  margin: 4px 4px 4px 0;
  padding: 4px 9px;
  border: 1px solid rgba(240, 120, 34, .30);
  border-radius: 999px;
  background: rgba(240, 120, 34, .10);
  color: #ffb16f;
  font-size: .98rem;
  line-height: 1.3;
}
.ks-torrent-genre-text { color: #e99a5b; }


/* TGSD : mise en page compacte du catalogue torrents */
.ks-torrent-grid {
  grid-template-columns: repeat(auto-fill, minmax(175px, 200px));
  justify-content: center;
  column-gap: 28px;
  row-gap: 36px;
  align-items: stretch;
}
.ks-torrent-card {
  width: 100%;
  max-width: 200px;
  justify-self: center;
}
.ks-torrent-cover {
  aspect-ratio: 2 / 2.65;
}
.ks-torrent-card-body {
  padding: 12px 12px 11px;
}
.ks-torrent-card h2 {
  font-size: 14px;
}

/* La vue liste : lignes distinctes avec espace visible entre elles */
.ks-torrent-table-wrap {
  background: transparent;
  border: 0;
  overflow-x: auto;
}
.ks-torrent-table {
  border-collapse: separate;
  border-spacing: 0 10px;
}
.ks-torrent-table thead th {
  border: 0;
}
.ks-torrent-table tbody tr td {
  background: #131823;
  border-top: 1px solid #293243;
  border-bottom: 1px solid #293243;
}
.ks-torrent-table tbody tr td:first-child {
  border-left: 1px solid #293243;
  border-radius: 10px 0 0 10px;
}
.ks-torrent-table tbody tr td:last-child {
  border-right: 1px solid #293243;
  border-radius: 0 10px 10px 0;
}
.ks-torrent-table tbody tr:hover td {
  background: #1b2230;
}

@media (max-width: 1000px) {
  .ks-torrent-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 195px));
    column-gap: 22px;
    row-gap: 30px;
  }
  .ks-torrent-card {
    max-width: 195px;
  }
}
@media (max-width: 760px) {
  .ks-torrent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 24px;
    justify-content: stretch;
  }
  .ks-torrent-card {
    max-width: none;
  }
  .ks-torrent-card-body {
    padding: 10px;
  }
  .ks-torrent-table {
    border-spacing: 0 8px;
  }
}
@media (max-width: 390px) {
  .ks-torrent-grid {
    grid-template-columns: 1fr;
    row-gap: 20px;
  }
  .ks-torrent-card {
    max-width: 260px;
  }
}


/* Actions de gestion sur la fiche torrent */
.ks-torrent-owner-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:14px 0 18px}
.ks-torrent-owner-actions form{margin:0}
.ks-torrent-owner-actions .button{display:inline-flex;align-items:center;justify-content:center;gap:6px;text-decoration:none;cursor:pointer}
.ks-torrent-edit-button{border:1px solid #ff7a00!important;color:#ff7a00!important;background:transparent}
.ks-torrent-delete-button{border:1px solid #c0392b!important;color:#c0392b!important;background:transparent}


/* TGSD — fiche torrent cinéma enrichie depuis TMDB */
.ks-detail-hero.ks-tmdb-cinematic{
  position:relative;isolation:isolate;grid-template-columns:minmax(220px,300px) minmax(0,1fr);
  gap:34px;margin:0 -10px 24px;padding:22px 18px 30px;min-height:440px;
  border:0;border-radius:0;overflow:hidden;background:#211412;
}
.ks-detail-hero.ks-tmdb-cinematic:before{
  content:"";position:absolute;z-index:-2;inset:0;
  background-image:var(--tmdb-backdrop);background-size:cover;background-position:center 30%;background-repeat:no-repeat;
  opacity:.60;
}
.ks-detail-hero.ks-tmdb-cinematic:after{
  content:"";position:absolute;z-index:-1;inset:0;
  background:linear-gradient(90deg,rgba(25,12,10,.97) 0%,rgba(29,15,13,.88) 35%,rgba(24,13,12,.68) 70%,rgba(20,12,12,.77) 100%),linear-gradient(0deg,rgba(16,11,10,.95),transparent 60%);
}
.ks-tmdb-cinematic .ks-detail-cover{background:transparent;border:0;border-radius:8px;box-shadow:0 16px 40px #0006;overflow:hidden}
.ks-tmdb-cinematic .ks-detail-cover img{max-height:560px;object-fit:cover;border-radius:8px}
.ks-tmdb-cinematic .ks-detail-main{color:#f8f4f2;text-shadow:0 1px 2px #0008}
.ks-tmdb-cinematic .ks-detail-main h1{color:#fff;font-size:clamp(30px,3.3vw,43px);margin:10px 0 8px}
.ks-tmdb-cinematic .ks-detail-main h1 .ks-tmdb-year{color:#d8d0cd;font-weight:450}
.ks-tmdb-cinematic .ks-detail-subtitle{color:#eee1dc}
.ks-tmdb-cinematic .ks-detail-subtitle strong{color:#fff}
.ks-tmdb-cinematic .ks-torrent-category{background:#fff1e6;color:#92400e;border-color:#f4c7a4}
.ks-tmdb-cinematic .ks-torrent-genre{background:#102d43dd;color:#fff;border-color:#ffffff26}
.ks-tmdb-rating{display:flex;align-items:center;gap:10px;margin:18px 0;color:#fff}
.ks-tmdb-rating strong{display:grid;place-items:center;width:60px;height:60px;border:4px solid #25c993;border-radius:50%;font-size:18px;background:#101b20}
.ks-tmdb-rating span{font-size:13px;font-weight:750}
.ks-tmdb-tagline{margin:22px 0 8px;color:#e7d5cd;font-style:italic}
.ks-tmdb-detail{background:#151923;border-color:#2c3545}
.ks-tmdb-detail .ks-torrent-description{color:#f0e7e2;line-height:1.8}
.ks-tmdb-detail .muted{color:#b9c0cd}
.ks-tmdb-people{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 22px;margin:22px 0}
.ks-tmdb-people>div,.ks-tmdb-cast>div{display:flex;flex-direction:column;gap:3px;font-size:13px}
.ks-tmdb-people strong,.ks-tmdb-cast strong{color:#fff}
.ks-tmdb-people span,.ks-tmdb-cast span{color:#55433b}
.ks-tmdb-detail h3{margin:22px 0 12px;color:#fff}
.ks-tmdb-cast{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 22px}
.ks-tmdb-trailer{position:relative;max-width:900px;width:100%;aspect-ratio:16/9;overflow:hidden;border-radius:10px;background:#000}
.ks-tmdb-trailer iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
@media(max-width:760px){
 .ks-detail-hero.ks-tmdb-cinematic{grid-template-columns:1fr;gap:20px;margin:0 -5px;padding:18px 14px 24px}
 .ks-tmdb-cinematic .ks-detail-cover{max-width:230px}
 .ks-tmdb-people,.ks-tmdb-cast{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:440px){
 .ks-tmdb-people,.ks-tmdb-cast{grid-template-columns:1fr}
}


/* V3 — affiche à gauche du synopsis TMDB et suppression du doublon descriptif */
.ks-tmdb-presentation-layout{
 display:grid;grid-template-columns:minmax(170px,240px) minmax(0,1fr);gap:28px;align-items:start;
}
.ks-tmdb-presentation-poster{min-width:0;position:sticky;top:18px}
.ks-tmdb-presentation-poster img{
 display:block;width:100%;height:auto;max-height:520px;object-fit:cover;border-radius:10px;
 border:1px solid #ffffff24;box-shadow:0 12px 32px #0005;
}
.ks-tmdb-presentation-poster .ks-no-cover-large{min-height:300px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}
.ks-tmdb-presentation-content{min-width:0}
.ks-tmdb-presentation-content h2{margin-top:0}
.ks-tmdb-presentation-content .ks-tmdb-trailer{margin-top:12px}
.ks-tmdb-presentation-content .ks-torrent-description{white-space:normal;overflow-wrap:anywhere}
.ks-torrent-technical{padding-top:10px;padding-bottom:10px}
@media(max-width:760px){
 .ks-tmdb-presentation-layout{grid-template-columns:minmax(0,1fr);gap:20px}
 .ks-tmdb-presentation-poster{position:static;max-width:230px}
}


/* Qualité du torrent : visible en grille, liste et fiche détaillée */
.ks-torrent-quality {
  display: inline-flex;
  align-items: center;
  margin: 4px 4px 4px 0;
  padding: 4px 9px;
  border: 1px solid rgba(90, 190, 150, .38);
  border-radius: 999px;
  background: rgba(30, 140, 95, .16);
  color: #8ce0b5;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.3;
}
.ks-torrent-quality-text { color: #1a7b49; font-weight: 700; }
.ks-tmdb-cinematic .ks-torrent-quality { background: #104b3add; color: #c4ffe0; border-color: #8ce0b555; }

/* TGSD — troisième affichage : liste compacte horizontale, sans affiche */
.ks-view-toggle a { text-decoration: none; }
.ks-compact-row {display:grid;grid-template-columns:78px minmax(180px,1.7fr) minmax(150px,1.25fr) 92px 66px 66px 82px;align-items:center;gap:12px;min-width:780px;min-height:54px;margin:0 0 8px;padding:9px 14px;border:1px solid #ded6ca;border-radius:11px;background:#fffdf9;color:#18304a;box-shadow:0 2px 7px rgba(30,40,55,.035)}
.ks-compact-row:hover{border-color:#e6a16c;background:#fff9f1}
.ks-compact-type{display:inline-flex;justify-content:center;align-items:center;min-width:58px;width:fit-content;max-width:78px;padding:5px 7px;border:1px solid #f2c49f;border-radius:8px;background:#fff2e8;color:#b95312;font-size:10px;font-weight:900;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap}
.ks-compact-type-series{background:#edf4ff;border-color:#c8d9f5;color:#315e9b}.ks-compact-type-documentaires{background:#f1edff;border-color:#d9cef7;color:#66509a}.ks-compact-type-musique{background:#fff0f5;border-color:#f1cbd9;color:#a43d69}.ks-compact-type-jeux{background:#eef9ef;border-color:#c8e7ce;color:#287342}.ks-compact-type-logiciels{background:#eef6f8;border-color:#c9e0e5;color:#286777}.ks-compact-type-livres{background:#fff7df;border-color:#f0dfaa;color:#8b6812}
.ks-compact-title{min-width:0;overflow:hidden;color:#173653;font-size:14px;font-weight:500;text-overflow:ellipsis;white-space:nowrap;text-decoration:none}.ks-compact-title:hover{color:#d45e17;text-decoration:underline}
.ks-compact-tags{display:flex;align-items:center;gap:6px;min-width:0;overflow:hidden}
.ks-compact-genre,.ks-compact-quality{display:inline-flex;align-items:center;max-width:100%;padding:4px 8px;border-radius:999px;font-size:11px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ks-compact-genre{color:#b85b1c;background:#fff1e7;border:1px solid #f3d1b8}.ks-compact-quality{color:#16734a;background:#eaf7ef;border:1px solid #c6e7d2;font-weight:800}
.ks-compact-size,.ks-compact-seeders,.ks-compact-leechers,.ks-compact-completed{text-align:center;font-size:12px;font-weight:650;white-space:nowrap;font-variant-numeric:tabular-nums}
.ks-compact-size{color:#40546a}.ks-compact-seeders{color:#16804a}.ks-compact-leechers{color:#c43e42}.ks-compact-completed{color:#526b87}
@media(max-width:900px){.ks-torrent-compact-list{overflow-x:auto;padding-bottom:5px}.ks-compact-row{grid-template-columns:72px minmax(180px,1.5fr) minmax(135px,1fr) 82px 58px 58px 72px;gap:8px}}


/* Correction thèmes — la liste compacte suit les couleurs du thème actif.
   Les couleurs proviennent des variables globales définies par style.css/theme.css. */
body .ks-compact-row {
  background: var(--panel, #141923) !important;
  color: var(--text, #f5f7fb) !important;
  border-color: var(--line, #2b3444) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
body .ks-compact-row:hover {
  background: var(--panel2, #1b2230) !important;
  border-color: var(--orange, #f07822) !important;
}
body .ks-compact-title { color: var(--text, #f5f7fb) !important; }
body .ks-compact-title:hover { color: var(--orange, #f07822) !important; }
body .ks-compact-size { color: var(--muted, #aab3c2) !important; }
body .ks-compact-genre {
  color: var(--orange, #ffb06f) !important;
  background: var(--panel2, #1b2230) !important;
  border-color: var(--line, #2b3444) !important;
}
body .ks-compact-quality {
  color: #16804a !important;
  background: rgba(30, 140, 95, .13) !important;
  border-color: rgba(30, 140, 95, .35) !important;
}

/* Thème cinéma : fond brun/noir et contrastes adaptés à son ambiance. */
body.theme-tgsd-cinema .ks-compact-row {
  background: var(--panel, #171714) !important;
  color: var(--text, #f8f5ed) !important;
  border-color: var(--line, #393329) !important;
}
body.theme-tgsd-cinema .ks-compact-row:hover {
  background: var(--panel2, #24221d) !important;
  border-color: var(--orange, #d9952e) !important;
}
body.theme-tgsd-cinema .ks-compact-title { color: var(--text, #f8f5ed) !important; }
body.theme-tgsd-cinema .ks-compact-size { color: var(--muted, #b9b2a5) !important; }

/* Thème Kinon-CP : conserve sa palette beige/brun. */
body.theme-kinon-cp .ks-compact-row {
  background: #f7f3eb !important;
  color: #514638 !important;
  border-color: #b8ad9e !important;
}
body.theme-kinon-cp .ks-compact-title { color: #514638 !important; }
body.theme-kinon-cp .ks-compact-row:hover { background: #eee7da !important; }

/* Thèmes clairs : rangées claires, texte foncé, bordures discrètes. */
body.theme-tgsd-clair .ks-compact-row,
body.theme-christmas .ks-compact-row {
  background: var(--panel, #fffefa) !important;
  color: var(--text, #262a30) !important;
  border-color: var(--line, #ded8cd) !important;
}
body.theme-tgsd-clair .ks-compact-title,
body.theme-christmas .ks-compact-title { color: var(--text, #262a30) !important; }


/* NFO badge */
.ks-nfo-badge{display:inline-flex;align-items:center;justify-content:center;margin:3px 4px;padding:3px 8px;border:1px solid var(--orange,#e87522);border-radius:6px;background:rgba(232,117,34,.10);color:var(--orange,#d96b1c);font-size:10px;font-weight:850;letter-spacing:.06em;text-decoration:none;vertical-align:middle}.ks-nfo-badge:hover{background:var(--orange,#e87522);color:#fff}.ks-nfo-panel{margin-top:18px}.ks-nfo-panel h2{margin-top:0}


/* Tigers-DL — navigation horizontale des catégories du catalogue */
.ks-torrent-category-nav{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:0 0 10px;
  padding:2px 0 5px;
}
.ks-torrent-category-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:6px 13px;
  border:1px solid #d8cabb;
  border-radius:8px;
  background:linear-gradient(180deg,#f1cd99,#f1ede8);
  color:#28313c;
  font-size:13px;
  font-weight:700;
  line-height:1.2;
  text-decoration:none;
  white-space:nowrap;
  transition:background .15s ease,border-color .15s ease,color .15s ease,transform .15s ease;
}
.ks-torrent-category-pill:hover{
  border-color:#e97825;
  color:#c95b12;
  transform:translateY(-1px);
}
.ks-torrent-category-pill.is-active{
  border-color:#d96518;
  background:linear-gradient(135deg,#ef8a35,#ce5a12);
  color:#fff;
  box-shadow:0 3px 9px rgba(207,91,18,.18);
}
@media(max-width:760px){
  .ks-torrent-category-nav{
    flex-wrap:nowrap;
    overflow-x:auto;
    overflow-y:hidden;
    padding:2px 1px 9px;
    margin-bottom:8px;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:thin;
  }
  .ks-torrent-category-pill{flex:0 0 auto}
}


/* NFO : badge compact, toujours accolé au titre du torrent */
.ks-card-title-row{display:flex;align-items:center;gap:8px;min-width:0;margin:10px 0 7px}
.ks-card-title-row h2{flex:1;min-width:0;margin:0!important}
.ks-nfo-inline{flex:0 0 auto;margin:0!important;white-space:nowrap}
.ks-list-title-wrap{display:flex;flex-direction:column;align-items:flex-start;min-width:0;gap:3px}
.ks-list-title-line{display:flex;align-items:center;gap:7px;min-width:0;max-width:100%}
.ks-list-title-line .ks-list-title{min-width:0}
.ks-list-title-line .ks-nfo-inline{font-size:9px;padding:2px 6px}


/* Correctif NFO catalogue : le badge reste dans la cellule du titre */
.ks-card-title-row {
  display:flex !important;
  align-items:flex-start !important;
  justify-content:flex-start !important;
  flex-wrap:nowrap !important;
  gap:7px !important;
  width:100%;
  min-width:0;
  margin:8px 0 6px !important;
}
.ks-card-title-row h2 {
  display:block !important;
  flex:1 1 auto !important;
  min-width:0 !important;
  width:auto !important;
  margin:0 !important;
}
.ks-card-title-row h2 a {
  display:inline !important;
}
.ks-card-title-row .ks-nfo-inline {
  display:inline-flex !important;
  flex:0 0 auto !important;
  width:auto !important;
  min-width:0 !important;
  margin:1px 0 0 !important;
}
.ks-torrent-card-desc {
  display:block !important;
  clear:both;
  margin:0 0 10px !important;
}

/* Vue liste compacte : titre + NFO forment un seul élément de grille */
.ks-compact-title-line {
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:7px !important;
  min-width:0 !important;
  width:100%;
  overflow:hidden;
}
.ks-compact-title-line .ks-compact-title {
  display:block !important;
  flex:0 1 auto !important;
  min-width:0 !important;
  width:auto !important;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.ks-compact-title-line .ks-nfo-inline {
  display:inline-flex !important;
  flex:0 0 auto !important;
  width:auto !important;
  min-width:0 !important;
  margin:0 !important;
  padding:2px 6px !important;
  line-height:1.2 !important;
}


/* Correctif final des cartes avec NFO : le badge reste dans la ligne du titre
   et la description conserve toujours sa propre ligne dans le flux normal. */
.ks-torrent-card-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}
.ks-card-title-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start !important;
  column-gap: 7px !important;
  width: 100%;
  min-width: 0;
  margin: 9px 0 7px !important;
}
.ks-card-title-row h2 {
  min-width: 0 !important;
  width: auto !important;
  margin: 0 !important;
  overflow-wrap: anywhere;
}
.ks-card-title-row .ks-nfo-inline {
  justify-self: end;
  align-self: start;
  margin: 1px 0 0 !important;
}
.ks-torrent-card-body > .ks-torrent-card-desc {
  display: block !important;
  position: static !important;
  float: none !important;
  clear: both !important;
  width: 100%;
  min-width: 0;
  height: auto !important;
  max-height: none;
  overflow: visible;
  margin: 0 0 13px !important;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}


/* Catalogue adulte — affiches et badges colorés dans la vue liste */
.ks-adult-list-table .ks-adult-list-torrent{
  display:flex;align-items:center;gap:12px;min-width:260px;
}
.ks-adult-list-table .ks-adult-list-poster{
  display:flex;align-items:center;justify-content:center;flex:0 0 48px;
  width:48px;height:66px;overflow:hidden;border-radius:7px;
  border:1px solid rgba(128,128,128,.35);background:rgba(128,128,128,.10);
}
.ks-adult-list-table .ks-adult-list-poster img{
  display:block;width:100%;height:100%;object-fit:cover;
}
.ks-adult-list-table .ks-adult-list-no-poster{
  display:grid;place-items:center;width:100%;height:100%;font-size:24px;
  background:linear-gradient(145deg,#351b2b,#1c1724);
}
.ks-adult-list-table .ks-adult-list-title{
  display:block;min-width:0;max-width:430px;font-weight:650;
  line-height:1.4;overflow-wrap:anywhere;
}
.ks-adult-type-badge{
  display:inline-flex;align-items:center;gap:6px;white-space:nowrap;
  padding:6px 10px;border:1px solid;border-radius:8px;
  font-size:11px;font-weight:850;letter-spacing:.035em;
}
.ks-adult-type-badge.is-film{
  color:#2563eb;background:#eff6ff;border-color:#bfdbfe;
}
.ks-adult-type-badge.is-bd{
  color:#7c3aed;background:#f5f3ff;border-color:#ddd6fe;
}
.ks-adult-type-badge.is-xxx{
  color:#be123c;background:#fff1f2;border-color:#fecdd3;
}
@media(max-width:760px){
  .ks-adult-list-table .ks-adult-list-torrent{min-width:220px;gap:9px}
  .ks-adult-list-table .ks-adult-list-poster{flex-basis:40px;width:40px;height:56px}
  .ks-adult-list-table .ks-adult-list-title{font-size:12px}
  .ks-adult-type-badge{padding:5px 7px;font-size:10px}
}



/* Tigers-DL — aperçu flottant partagé : une seule fenêtre pour tout le catalogue.
   Le contenu est déplacé hors des lignes/tableaux afin de préserver le scroll. */
.ks-torrent-hover-wrap{display:inline;position:static}
.ks-torrent-hover-title{color:inherit;text-decoration:none;font-weight:inherit}
.ks-torrent-hover-title:hover,.ks-torrent-hover-title:focus{color:#d85b12;text-decoration:underline;text-underline-offset:3px}
.ks-torrent-hover-card-global{
  position:fixed !important;z-index:2147483000 !important;left:12px;top:12px;
  display:flex;gap:13px;box-sizing:border-box;max-width:calc(100vw - 24px);
  padding:12px;border:1px solid rgba(190,145,105,.55);border-radius:14px;
  background:#fffefa;box-shadow:0 8px 22px rgba(40,28,18,.16);
  color:#263342;text-align:left;white-space:normal;opacity:0;visibility:hidden;
  pointer-events:none;transition:opacity .08s ease;
}
.ks-torrent-hover-card-global.is-visible{opacity:1;visibility:visible}
.ks-torrent-hover-poster,.ks-torrent-hover-no-poster{
  flex:0 0 104px;width:104px;height:148px;object-fit:cover;border-radius:10px;
  border:1px solid rgba(120,90,65,.24);box-shadow:0 5px 14px rgba(30,20,10,.16)
}
.ks-torrent-hover-no-poster{display:grid;place-items:center;background:#eadbca;font-size:34px}
.ks-torrent-hover-content{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:12px;line-height:1.55}
.ks-torrent-hover-content strong{font-size:14px;line-height:1.35;color:#243447}
.ks-torrent-hover-content small{font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#d45a13}
.ks-torrent-hover-content>span{display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
@media(max-width:760px){.ks-torrent-hover-card-global{display:none !important}}
@media(prefers-reduced-motion:reduce){.ks-torrent-hover-card-global{transition:none}}
