/* Médias Facile — écrit sans variables CSS ni grille pour marcher aussi sur les vieilles tablettes (Chrome 46). */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #14161c; color: #eceef3; font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
body { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; color: inherit; }
.cache { display: none !important; }

/* ------------------------------------------------------------ en-tête */
#haut { position: fixed; top: 0; left: 0; right: 0; z-index: 10; height: 60px; display: flex; align-items: center; padding: 0 24px;
        background: rgba(20,22,28,.94); border-bottom: 1px solid #23262f; }
.marque { font-size: 20px; letter-spacing: .2px; display: flex; align-items: center; margin-right: 28px; white-space: nowrap; }
.marque b { color: #ff7a59; font-weight: 700; margin-left: 5px; }
.pastille { display: inline-block; width: 30px; height: 30px; line-height: 30px; text-align: center; border-radius: 9px; margin-right: 10px;
            background: #ff7a59; color: #14161c; font-size: 14px; }
nav { display: flex; }
nav a { padding: 8px 14px; margin-right: 4px; border-radius: 8px; color: #a9afbd; font-size: 15px; }
nav a:hover { color: #fff; background: #1f222b; }
nav a.actif { color: #fff; background: #262a35; }
#recherche { margin-left: auto; width: 240px; padding: 8px 14px; border-radius: 20px; border: 1px solid #2c303b; background: #1b1e26; outline: none; }
#recherche:focus { border-color: #ff7a59; }

#etat { position: fixed; top: 60px; left: 0; right: 0; z-index: 9; padding: 7px 24px; background: #2a2118; color: #ffc9b6; font-size: 14px; }
#etat:before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff7a59; margin-right: 10px; vertical-align: 1px;
               -webkit-animation: battement 1.2s infinite; animation: battement 1.2s infinite; }
@-webkit-keyframes battement { 50% { opacity: .2; } }
@keyframes battement { 50% { opacity: .2; } }

main { padding: 84px 24px 60px; }

/* ------------------------------------------------------------ rangées et grilles */
h2 { font-size: 20px; font-weight: 600; margin: 26px 0 12px; }
h2 small { color: #8b91a0; font-weight: 400; font-size: 14px; margin-left: 8px; }
.rangee { display: flex; overflow-x: auto; padding-bottom: 10px; -webkit-overflow-scrolling: touch; }
.rangee .carte { flex: 0 0 auto; margin-right: 16px; }
.grille { display: flex; flex-wrap: wrap; margin-right: -16px; }
.grille .carte { margin: 0 16px 22px 0; }

.carte { width: 160px; cursor: pointer; }
.carte .image { position: relative; width: 160px; height: 240px; border-radius: 10px; overflow: hidden; background: #22252e center/cover no-repeat;
                box-shadow: 0 4px 14px rgba(0,0,0,.35); -webkit-transition: -webkit-transform .15s; transition: transform .15s; }
.carte:hover .image { -webkit-transform: translateY(-3px); transform: translateY(-3px); outline: 2px solid #ff7a59; }
.carte .sans { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; padding: 14px;
               text-align: center; font-size: 15px; color: #c3c8d3; background: #262a35; }
.carte .nom { margin-top: 8px; font-size: 14px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte .sous { font-size: 13px; color: #8b91a0; }
.carte .vu { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 50%;
             background: #ff7a59; color: #14161c; font-size: 13px; font-weight: 700; }
.carte .compte { position: absolute; top: 8px; right: 8px; min-width: 24px; height: 24px; line-height: 24px; padding: 0 7px; text-align: center; border-radius: 12px;
                 background: #ff7a59; color: #14161c; font-size: 13px; font-weight: 700; }
.progres { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(0,0,0,.55); }
.progres div { height: 100%; background: #ff7a59; }

.carte.large { width: 280px; }
.carte.large .image { width: 280px; height: 158px; }

/* ------------------------------------------------------------ accueil vide */
.bienvenue { max-width: 620px; margin: 70px auto; text-align: center; }
.bienvenue .grosse { font-size: 64px; color: #ff7a59; }
.bienvenue h1 { font-size: 30px; margin: 10px 0; }
.bienvenue p { color: #a9afbd; font-size: 17px; line-height: 1.55; }

.bouton { display: inline-block; padding: 11px 22px; border-radius: 10px; border: 0; background: #ff7a59; color: #14161c; font-weight: 600; font-size: 16px; cursor: pointer; margin: 4px 8px 4px 0; }
.bouton:hover { background: #ff9274; }
.bouton.gris { background: #2a2e39; color: #eceef3; }
.bouton.gris:hover { background: #343947; }
.bouton.petit { padding: 7px 14px; font-size: 14px; }

/* ------------------------------------------------------------ fiche (film ou série) */
.fiche { position: relative; margin: -84px -24px 0; padding: 120px 40px 40px; min-height: 480px; background: #14161c center top/cover no-repeat; }
.fiche:before { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
                background: linear-gradient(to right, rgba(20,22,28,.97) 30%, rgba(20,22,28,.55) 70%, rgba(20,22,28,.3)),
                            linear-gradient(to top, #14161c 2%, rgba(20,22,28,0) 50%); }
.fiche .dedans { position: relative; display: flex; align-items: flex-start; }
.fiche .affiche { flex: 0 0 230px; width: 230px; height: 345px; border-radius: 12px; background: #22252e center/cover no-repeat; box-shadow: 0 10px 30px rgba(0,0,0,.5); margin-right: 36px; }
.fiche .texte { max-width: 720px; }
.fiche h1 { font-size: 38px; margin: 0 0 8px; line-height: 1.15; }
.fiche .details { color: #b5bac6; font-size: 15px; margin-bottom: 18px; }
.fiche .details span { margin-right: 14px; }
.fiche .resume { font-size: 16px; line-height: 1.6; color: #d7dae2; margin: 18px 0 0; }
.fiche .fichier { margin-top: 16px; color: #6f7584; font-size: 13px; word-break: break-all; }

.saisons { margin: 26px 0 8px; display: flex; flex-wrap: wrap; }
.saisons button { margin: 0 8px 8px 0; padding: 7px 16px; border-radius: 18px; border: 1px solid #2f3340; background: #1b1e26; cursor: pointer; }
.saisons button.actif { background: #ff7a59; border-color: #ff7a59; color: #14161c; font-weight: 600; }

.episode { display: flex; align-items: center; padding: 12px; border-radius: 12px; cursor: pointer; margin-bottom: 6px; }
.episode:hover { background: #1d2028; }
.episode .image { position: relative; flex: 0 0 200px; width: 200px; height: 113px; border-radius: 8px; background: #262a35 center/cover no-repeat; margin-right: 18px; overflow: hidden; }
.episode .image .num { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #5d6372; }
.episode h3 { margin: 0 0 6px; font-size: 16px; }
.episode h3 .vu-txt { color: #ff7a59; font-size: 13px; font-weight: 400; margin-left: 8px; }
.episode p { margin: 0; color: #a9afbd; font-size: 14px; line-height: 1.45; max-height: 61px; overflow: hidden; }

/* ------------------------------------------------------------ réglages */
.panneau { max-width: 820px; background: #1b1e26; border: 1px solid #262a35; border-radius: 14px; padding: 22px 24px; margin-bottom: 22px; }
.panneau h2 { margin-top: 0; }
.panneau p { color: #a9afbd; line-height: 1.55; }
.dossier { display: flex; align-items: center; padding: 12px 0; border-top: 1px solid #262a35; }
.dossier .chemin { flex: 1; word-break: break-all; }
.dossier .type { color: #ff9b80; font-size: 13px; margin-right: 14px; white-space: nowrap; }
.dossier .absent { color: #ff6b6b; font-size: 13px; margin-left: 6px; }
.adresse { display: inline-block; font-family: Consolas, monospace; font-size: 18px; background: #14161c; padding: 8px 14px; border-radius: 8px; margin: 4px 8px 4px 0; color: #ffb39f; }
.ajout { display: flex; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.ajout input[type=text] { flex: 1; min-width: 220px; padding: 10px 12px; border-radius: 8px; border: 1px solid #2f3340; background: #14161c; margin: 4px 8px 4px 0; }
.ajout select { padding: 10px 12px; border-radius: 8px; border: 1px solid #2f3340; background: #14161c; margin: 4px 8px 4px 0; }
.alerte { color: #ffb39f; }
.vide { color: #8b91a0; padding: 30px 0; font-size: 16px; }

/* ------------------------------------------------------------ lecteur */
#lecteur { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 50; background: #000; }
#lecteur.repos { cursor: none; }
#video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #000; }
#soustitre { position: absolute; left: 6%; right: 6%; bottom: 9%; text-align: center; pointer-events: none; -webkit-transition: bottom .2s; transition: bottom .2s; }
#lecteur:not(.repos) #soustitre { bottom: 150px; }
#soustitre span { display: inline-block; background: rgba(0,0,0,.72); color: #fff; font-size: 30px; line-height: 1.3; padding: 4px 14px; border-radius: 6px; white-space: pre-line; }
#attente { position: absolute; top: 50%; left: 50%; margin: -28px 0 0 -28px; }
.roue { width: 56px; height: 56px; border-radius: 50%; border: 5px solid rgba(255,255,255,.2); border-top-color: #ff7a59;
        -webkit-animation: tourne .9s linear infinite; animation: tourne .9s linear infinite; }
@-webkit-keyframes tourne { to { -webkit-transform: rotate(360deg); } }
@keyframes tourne { to { transform: rotate(360deg); } }
#lecteur #gros-jouer { position: absolute; z-index: 2; top: 50%; left: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px; padding: 0 0 0 8px;
                       border-radius: 50%; background: rgba(255,122,89,.92); color: #14161c; font-size: 42px; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
#lecteur #gros-jouer:hover { background: #ff9274; }
#commandes { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; justify-content: space-between;
             -webkit-transition: opacity .25s; transition: opacity .25s; pointer-events: none; }
#lecteur.repos #commandes { opacity: 0; }
#commandes > div { pointer-events: auto; }
.ligne-haut { display: flex; align-items: center; padding: 18px 24px 40px; background: linear-gradient(rgba(0,0,0,.75), rgba(0,0,0,0)); }
#titre-lecture { font-size: 20px; margin-left: 14px; }
#titre-lecture small { display: block; color: #b5bac6; font-size: 14px; }
.ligne-bas { padding: 40px 24px 18px; background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.8)); }
#lecteur button { background: rgba(255,255,255,.08); border: 0; border-radius: 8px; padding: 9px 14px; margin-right: 8px; cursor: pointer; font-size: 16px; }
#lecteur button:hover { background: rgba(255,255,255,.2); }
#lecteur select { background: rgba(255,255,255,.08); border: 0; border-radius: 8px; padding: 9px 10px; margin-right: 8px; max-width: 190px; }
#lecteur select option { background: #1b1e26; }
.boutons { display: flex; align-items: center; margin-top: 12px; }
.espace { flex: 1; }
#temps { font-size: 15px; color: #d7dae2; margin-left: 6px; white-space: nowrap; }
#volume { width: 90px; margin-right: 10px; }
#barre { position: relative; height: 22px; cursor: pointer; }
#barre:before, #charge, #rempli { content: ""; position: absolute; left: 0; top: 9px; height: 5px; border-radius: 3px; }
#barre:before { right: 0; background: rgba(255,255,255,.22); }
#charge { background: rgba(255,255,255,.35); width: 0; }
#rempli { background: #ff7a59; width: 0; }
#curseur { position: absolute; top: 4px; width: 15px; height: 15px; margin-left: -7px; border-radius: 50%; background: #fff; left: 0; }
#bulle { position: absolute; bottom: 26px; margin-left: -30px; width: 60px; text-align: center; background: #1b1e26; border-radius: 6px; padding: 3px 0; font-size: 13px; }

/* ------------------------------------------------------------ petits écrans */
@media (max-width: 760px) {
  #haut { padding: 0 12px; height: auto; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .marque { font-size: 18px; margin-right: 10px; }
  nav a { padding: 6px 9px; font-size: 14px; }
  #recherche { width: 100%; margin: 8px 0 0; }
  #etat { top: 106px; padding: 7px 16px; }
  main { padding: 122px 16px 50px; }
  .carte, .carte .image { width: 120px; }
  .carte .image { height: 180px; }
  .grille { margin-right: -12px; }
  .grille .carte { margin: 0 12px 18px 0; }
  .carte.large, .carte.large .image { width: 220px; }
  .carte.large .image { height: 124px; }
  .fiche { margin: -122px -16px 0; padding: 140px 16px 24px; }
  .fiche .dedans { flex-direction: column; }
  .fiche .affiche { flex: 0 0 auto; width: 150px; height: 225px; margin: 0 0 18px; }
  .fiche h1 { font-size: 28px; }
  .episode .image { flex: 0 0 130px; width: 130px; height: 73px; margin-right: 12px; }
  .episode p { display: none; }
  .ligne-bas, .ligne-haut { padding-left: 12px; padding-right: 12px; }
  #recul, #avance, #volume { display: none; }
  #soustitre span { font-size: 19px; }
  #lecteur:not(.repos) #soustitre { bottom: 120px; }
  .boutons { flex-wrap: wrap; }
}

/* ------------------------------------------------------------ doublons : plusieurs versions du même film */
.carte .nbv { position: absolute; left: 8px; bottom: 10px; padding: 2px 8px; border-radius: 10px; background: rgba(20,22,28,.85); color: #ffb39f; font-size: 12px; }
.versions { margin: 14px 0 0; color: #b5bac6; }
.versions select { padding: 9px 10px; border-radius: 8px; border: 1px solid #2f3340; background: #1b1e26; max-width: 100%; margin-left: 6px; }
