/* ================================
MÉDIAS : vidéos en grand + liste de sons, sur fond d'IDE SuperCollider
================================ */

/* === FOND : FAUSSE CAPTURE D'ÉCRAN DE L'IDE SUPERCOLLIDER (thème sombre) === */
.sc-ide {
    --sc-fond: #272733;
    --sc-texte: #c0c8d4;
    position: fixed;
    inset: 0;
    z-index: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--sc-fond);
    color: var(--sc-texte);
    font-family: "DejaVu Sans Mono", ui-monospace, monospace;
    font-size: 15px;
    line-height: 1.45;
    user-select: none;
    pointer-events: none;
}

.sc-menus {
    display: flex;
    gap: 1.1rem;
    padding: 0.15rem 0.6rem;
    font-family: sans-serif;
    font-size: 13px;
    color: #d8d8e0;
    background: #2e2e3a;
    border-bottom: 1px solid #1a1a22;
}
.sc-menus span::first-letter { text-decoration: underline; }

.sc-onglets {
    display: flex;
    background: #18191f;
    font-family: sans-serif;
    font-size: 12px;
}
.sc-onglets span {
    flex: 0 0 220px;
    padding: 0.3rem 0.8rem;
    text-align: center;
    color: #9a9aa8;
    border-right: 1px solid #0e0e12;
}
.sc-onglets .actif { background: var(--sc-fond); color: #fff; font-weight: bold; }
.sc-onglets b { margin-left: 3rem; }

.sc-corps { flex: 1; display: flex; min-height: 0; }

/* éditeur : numéros de ligne générés en CSS */
.sc-code {
    flex: 1;
    margin: 0;
    padding: 0.4rem 0;
    counter-reset: ligne;
    white-space: pre;
    overflow: hidden;
    font: inherit;
}
.sc-ligne { counter-increment: ligne; }
.sc-ligne::before {
    content: counter(ligne);
    display: inline-block;
    width: 3.2em;
    margin-right: 1em;
    padding-right: 0.6em;
    text-align: right;
    color: #5c5f73;
    background: #22222c;
}

/* couleurs de la coloration syntaxique (relevées sur ton IDE) */
.sc-classe      { color: #7ce2fd; font-weight: bold; }
.sc-motcle      { color: #f077c3; font-weight: bold; }
.sc-symbole     { color: #6fc98a; }
.sc-nombre      { color: #b7a6f2; }
.sc-variable    { color: #e0a060; }
.sc-chaine      { color: #a8a8b4; }
.sc-commentaire { color: #6e7386; font-style: italic; }

.sc-post {
    flex: 0 0 34%;
    display: flex;
    flex-direction: column;
    border-left: 4px solid #18191f;
    background: #20202a;
}
.sc-post-titre {
    padding: 0.2rem 0.6rem;
    font-family: sans-serif;
    font-size: 12px;
    color: #d8d8e0;
    background: #2e2e3a;
}
.sc-post pre { margin: 0; padding: 0.4rem 0.6rem; font: inherit; font-size: 13px; color: #b8bcc8; }

.sc-statut {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    justify-content: flex-end;
    padding: 0.1rem 0.8rem;
    font-family: sans-serif;
    font-size: 12px;
    color: #d8d8e0;
    background: var(--sc-fond);
}
.sc-statut b { color: #28c128; background: #000; padding: 0 0.4rem; font-family: "DejaVu Sans Mono", monospace; }
.sc-statut .sc-actif { background: #28c128; color: #000; }

/* === TAPISSERIE : plein de fenêtres de l'IDE qui se chevauchent, par-dessus === */
.sc-tapisserie {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
    font-family: "DejaVu Sans Mono", ui-monospace, monospace;
}

/* fenêtres flottantes d'i3, couleurs de la config EndeavourOS (comme l'accueil) :
   $darkblue #08052b, $lightblue #5294e2, $grey #b0b5bd, $darkgrey #383c4a, $mediumgrey #8b8b8b */
.sc-fenetre {
    position: absolute;
    display: flex;
    flex-direction: column;
    background: #272733;
    border: 1px solid #383c4a;               /* child_border : fenêtre inactive */
}
.sc-fenetre.active { border-color: #8b8b8b; }   /* child_border : fenêtre active */

/* barre de titre i3 : le nom de la fenêtre seul, sans boutons */
.sc-fenetre-titre {
    padding: 0.05rem 0.4rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-family: "Noto Sans", "DejaVu Sans", sans-serif;
    font-size: 12px;
    line-height: 1.5;
    color: #b0b5bd;                          /* $grey */
    background: #08052b;                     /* $darkblue */
    border: 1px solid #08052b;
}
.sc-fenetre.active .sc-fenetre-titre {
    color: #fff;
    border-color: #5294e2;                   /* $lightblue */
}

.sc-fenetre-code {
    flex: 1;
    margin: 0;
    padding: 0.3rem 0;
    counter-reset: ligne;   /* numéros de ligne repartent à 1 dans chaque fenêtre */
    overflow: hidden;
    white-space: pre;
    font: inherit;
    font-size: 12px;
    line-height: 1.4;
    color: #c0c8d4;
}

/* la boîte laisse bien voir les fenêtres de code derrière
   (dernier chiffre = opacité : 0 = invisible, 1 = opaque) */
.boite-medias {
    background: rgba(28, 4, 32, 0.55);
}


/* === SECTIONS === */
.medias-section { margin-top: 3rem; }
.medias-section h2 span { color: var(--blanc); margin-right: 0.3rem; }

/* === VIDÉOS : la première en grand, les autres en dessous === */
.videos {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem 1.5rem;
}
.video-une { grid-column: 1 / -1; }

.video-cadre {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 1px solid var(--blanc);
    box-shadow: 8px 8px 0 rgba(241, 187, 187, 0.5);
    overflow: hidden;
}
/* vidéos filmées en hauteur (téléphone) */
.video-verticale .video-cadre { aspect-ratio: 9 / 16; }

.video-cadre video {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
}

/* couverture : l'image remplit tout le cadre, gros bouton lecture au centre */
.video-couverture {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: #000;
}
.video-couverture img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(0.85) brightness(0.85);
    transition: transform 0.5s ease, filter 0.3s;
}
.video-lecture {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    padding-left: 0.3rem;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    color: var(--violet-fonce);
    background: var(--rose);
    border: 2px solid var(--blanc);
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(241, 187, 187, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}
.video-une .video-lecture { width: 6rem; height: 6rem; font-size: 2.4rem; }

.video-couverture:hover img,
.video-couverture:focus-visible img { transform: scale(1.04); filter: saturate(1.1) brightness(1); }
.video-couverture:hover .video-lecture,
.video-couverture:focus-visible .video-lecture {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 0 12px rgba(241, 187, 187, 0.3);
}

.video-titre {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.8rem 0 0;
    font-weight: bold;
}
.video-une .video-titre { font-size: 1.2rem; }
.video-duree { font-weight: normal; opacity: 0.7; }

/* === SONS : un lecteur + la liste des morceaux, comme une face de cassette === */
.lecteur-son {
    display: block;
    width: 100%;
    border: 1px solid var(--blanc);
    box-shadow: 8px 8px 0 rgba(241, 187, 187, 0.5);
    margin-bottom: 1.5rem;
}

.sons {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid rgba(241, 187, 187, 0.4);
}
.sons li {
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(241, 187, 187, 0.4);
}

.son {
    flex: 1;
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 0.5rem;
    font: inherit;
    text-align: left;
    color: var(--blanc);
    background: none;
    border: 0;
    cursor: pointer;
}
.son:hover { background: rgba(241, 187, 187, 0.12); }
.son.actif { background: var(--rose); color: var(--violet-fonce); }
.son.actif .son-numero { color: var(--violet-fonce); }
.son.actif .son-titre::before { content: "▶ "; }

.son-numero {
    font-family: var(--police-titre);
    font-size: 1.8rem;
    color: var(--rose);
    text-align: right;
}
.son-titre { font-weight: bold; }
.son-source { font-size: 0.8rem; opacity: 0.75; }

.son-lien {
    padding: 0.7rem 1rem;
    text-decoration: none;
}

/* deuxième catégorie de sons, sous la première liste */
.boite .sons-categorie { margin-top: 3rem; }

@media (max-width: 900px) {
    .videos { grid-template-columns: minmax(0, 1fr); }
    .video-verticale { width: 100%; max-width: 420px; justify-self: center; }
    .sc-post { display: none; }
}
