/* Recherche vidéo — ServicesHub.ca : palette du hub (même base que le Convertisseur et le Compresseur) */
:root {
  --nuit: #070d24; --nuit-2: #0d1838; --nuit-3: #14225a; --bleu: #2f6bff; --ciel: #38bdf8; --lis: #f6c744;
  --menthe: #34d399; --rouge: #f87171; --texte: #dbe4ff; --doux: #93a3d1; --ligne: rgba(255,255,255,.12); --verre: rgba(255,255,255,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--nuit); color: var(--texte); font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
body { min-height: 100vh; background: radial-gradient(900px 500px at 85% -10%, rgba(47,107,255,.25), transparent 60%), var(--nuit); }
a { color: var(--ciel); }
h3 { font-size: 15px; margin: 16px 0 4px; color: #fff; }
button, input, select { font: inherit; color: inherit; }
button, .bouton { background: var(--verre); border: 1px solid var(--ligne); border-radius: 8px; padding: 7px 14px; cursor: pointer; white-space: nowrap; text-decoration: none; color: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button:hover, .bouton:hover { border-color: var(--ciel); }
button:disabled { opacity: .45; cursor: default; }
.principal { background: var(--bleu) !important; border-color: var(--bleu) !important; color: #fff !important; font-weight: 600; }
.principal:hover { background: #4a7fff !important; }
button.icone { padding: 6px 11px; }
select, input[type=search] { background: var(--nuit-2); border: 1px solid var(--ligne); border-radius: 8px; padding: 8px 10px; color: var(--texte); }
input[type=search]::placeholder { color: #5f6f9d; }
select:focus, input:focus { outline: none; border-color: var(--ciel); }
[hidden] { display: none !important; }
.indice { color: var(--doux); font-size: 13px; margin: 0; }
.ligne { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.centre { text-align: center; margin-top: 18px; }

#entete { position: sticky; top: 0; z-index: 5; height: 56px; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: rgba(13,24,56,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--ligne); }
.retour { color: var(--doux); text-decoration: none; font-size: 13px; white-space: nowrap; }
.retour:hover { color: #fff; }
.marque { font-size: 17px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marque b { color: var(--ciel); }

.cadre { width: min(1180px, 94vw); margin: 0 auto; padding: 22px 0 40px; }
.intro { font-size: 16px; margin: 0 0 16px; }
.intro b { color: var(--menthe); font-weight: 600; }

.barre-recherche { display: flex; gap: 8px; }
.barre-recherche input { flex: 1; min-width: 0; font-size: 17px; padding: 12px 16px; border-radius: 12px; }
.barre-recherche button { padding: 0 24px; border-radius: 12px; font-size: 16px; }

.filtres { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 6px; }
.puces { display: flex; gap: 6px; flex-wrap: wrap; }
.puces button { border-radius: 999px; padding: 5px 13px; font-size: 13px; }
.puces button.actif { background: rgba(47,107,255,.35); border-color: var(--ciel); color: #fff; }
.selects { display: flex; gap: 10px; flex-wrap: wrap; }
.selects label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--doux); }
.selects select { padding: 5px 8px; font-size: 13px; }

.accueil { margin-top: 20px; }
.accueil .indice { margin-bottom: 8px; }
.etat { color: var(--doux); font-size: 14px; min-height: 1.4em; margin: 16px 0 10px; }
.rond { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--ciel); border-right-color: transparent; border-radius: 50%; animation: tourne .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes tourne { to { transform: rotate(360deg); } }

.grille { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.video { border-radius: 14px; overflow: hidden; background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); border: 1px solid var(--ligne); cursor: pointer; transition: transform .15s, border-color .15s; display: flex; flex-direction: column; }
.video:hover, .video:focus-visible { transform: translateY(-2px); border-color: var(--ciel); outline: none; }
.vignette { position: relative; aspect-ratio: 16 / 9; background: #02040c; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.vignette img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.vignette .sans { position: absolute; font-size: 34px; opacity: .5; }
.vignette .duree { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.78); color: #fff; font-size: 12px; padding: 1px 6px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.vignette .lire { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 38px; color: #fff; opacity: 0; transition: opacity .15s; background: rgba(0,0,0,.25); }
.video:hover .lire { opacity: 1; }
.video .t { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.video b { color: #fff; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.video small { color: var(--doux); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src { color: var(--ciel) !important; }

.ailleurs { text-align: center; color: var(--doux); margin-top: 22px; }
.credit { margin-top: 26px; text-align: center; }

dialog { background: var(--nuit-2); color: var(--texte); border: 1px solid var(--ligne); border-radius: 14px; padding: 0; width: min(640px, 94vw); max-height: 90vh; }
dialog::backdrop { background: rgba(0,0,0,.7); }
#fenetre { width: min(980px, 96vw); }
.dh { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--ligne); font-weight: 600; color: #fff; }
.dh span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db { padding: 8px 18px 18px; overflow-y: auto; }
.db p { margin: 0 0 8px; }
.db ul { margin: 4px 0 8px; padding-left: 20px; }
.fermer { padding: 3px 9px; flex: none; }
.ecran { aspect-ratio: 16 / 9; background: #000; display: flex; align-items: center; justify-content: center; color: var(--doux); }
.ecran video, .ecran iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
#fActions { margin: 8px 0; }
#fLien { word-break: break-all; font-family: Consolas, monospace; font-size: 12px; }
.desc { white-space: pre-line; font-size: 14px; max-height: 180px; overflow-y: auto; }

#toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--nuit-3); border: 1px solid var(--ligne); border-radius: 10px; padding: 10px 16px; box-shadow: 0 10px 40px rgba(0,0,0,.45); z-index: 20; max-width: 92vw; }

@media (max-width: 600px) {
  .retour { display: none; }
  .barre-recherche button { padding: 0 14px; }
  .grille { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
}
