/* -----------------------------------
   STYLES GLOBAUX (en dehors des media queries)
----------------------------------- */


.interlinear-ui {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* ✅ à gauche */
    gap: 10px;
    width: 100%;
    position: relative;
    margin-top: 10px;
}

.interlinear-btn {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    border-radius: 10px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 26px;
    margin-left: 10px;
}

.interlinear-flags {
    display: flex;
    gap: 12px;
    align-items: center;
}

.interlinear-flag-btn {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    opacity: 0.85;
    transform: translateY(1px);
}

.interlinear-flag-btn.active {
    opacity: 1;
    transform: scale(1.05);
}

.interlinear-flag {
    width: 30px;
    height: 22px;
    border-radius: 3px;
}

.interlinear-close {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    border-radius: 10px;
    padding: 6px 10px;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

/* Bloc interlinéaire */
#interlinearBlock {
    margin-right: 10px;
    margin-top: 10px;
    margin-left: 20px;
    max-width: 92%;
    display: flex;
    flex-direction: column;
}

.interlinear-pair {
    margin-bottom: 10px;
    /* "un saut de ligne" après (orig + tr) */
}

.interlinear-pair.speaker-change {
    margin-top: 16px;
    /* espace entre interlocuteurs (seulement si ça change) */
}

.interlinear-line {
    line-height: 1.4;
}

.interlinear-line.tr {
    opacity: 0.9;
    font-style: italic;
    margin-top: 4px;
    color: rgba(170,210,255,0.92);
}

.interlinear-line.orig { 
    color: rgba(255,255,255,0.95); 
}

/* Mobile : bouton sous le titre */
@media (max-width: 699px) {
    .video-title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .interlinear-ui {
        width: 100%;
        justify-content: flex-start;
    }
}





body::before {
    content: "";
    position: fixed;
    inset: 0;  
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: 85%;
    background-repeat: no-repeat;
    z-index: -1;
}


body {
    background: linear-gradient(to bottom, #0a0f2c, #1e2a4a);
    background-image: url('/others-images/magicwallpaper2.png');
    background-size: cover;
    background-position: 10%;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow-x: hidden;
    min-height: 100vh;
    /* fallback pour anciens navigateurs */
    min-height: 100dvh;
    /* solution pour iPhone / Safari mobile */
    /*  color: #e0f7ff;*/
}

html {
    overflow-x: hidden;
}

.flag-icon {
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    align-self: flex-start;
}

.flag-icon:hover {
    transform: scale(1.1);
}


.tooltip-link {
    position: relative;
    font-weight: bold;
    color: royalblue;
    text-decoration: none;
    cursor: help;
}

.tooltip-box {
    position: absolute;
    top: 120%;
    left: 0;
    z-index: 100;
    background-color: #fff;
    color: black;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    white-space: normal;
    width: max-content;
    max-width: 300px;
    font-size: 14px;
    line-height: 1.4;
    display: none;
}

.tooltip-box {
    max-width: 450px;
    font-size: 14px;
}

.tooltip-link:hover .tooltip-box {
    display: block;
}

.mobile-tooltip {
    display: none;
    position: absolute;
    background: #fff;
    color: #000;
    padding: 14px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    font-family: Arial, sans-serif;
    max-width: 90vw;
    width: max-content;
    word-wrap: break-word;
}

#mobile-tooltip {
    transition: opacity 0.2s ease;
}

.tooltip-more {
    display: block;
    margin-top: 12px;
    color: royalblue;
    font-weight: bold;
    text-decoration: underline;
    text-align: right;
    font-size: 14px;
}

.tags-container {
    margin: -8px 0;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);

    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;   /* ✅ IMPORTANT */
    gap: 12px;

    width: 100%;
    box-sizing: border-box;

    opacity: 80% !important;
    color: white !important;
    background-color: #2f2a1a !important;
}

.tags-title {
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.tags-left{
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0; /* important pour que ça puisse rétrécir */
    flex: 1;
}

.tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.votes-row--card{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;

    margin-left: auto;       /* pousse à droite */
    flex-shrink: 0;          /* évite que ça s'écrase */
}

/* boutons vote (pouce au-dessus, chiffre dessous) */
.vote-btn{
    background: transparent;
    border: none;
    cursor: pointer;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 4px;
}

.vote-icon{
    width: 20px !important;
    height: 20px !important;
    display: block;
}

.vote-count{
    font-size: 12px;
    line-height: 1;
    color: #fff;
}


.vote-btn:hover {
    transform: scale(1.05);
}


.tag-chip {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    background-color: #e9ecef;
    color: #495057;
    border: 1px solid #ced4da;
    transition: all 0.2s ease;
}

.tag-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tag-easy {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.tag-medium {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

.tag-hard {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.tag-subtitle {
    background-color: #cce5ff;
    color: #004085;
    border-color: #b8daff;
}

.tag-meme {
    background-color: #e0cffc;
    color: #6741d9;
    border-color: #d6c1fc;
}

.no-tags {
    font-style: italic;
    color: #6c757d;
    font-size: 12px;
}

.return-text {
    margin-left: 10%;
    text-decoration: none;
    font-weight: bold;
    color: whitesmoke;
    margin-top: 20px;
}

.return-text img {
    width: 18px;
    margin-right: 5px;
}

.text-wrapper {
    background-color: rgba(47, 42, 26, 0.80) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.18);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.dialogue-block {
    display: flex;
    flex-direction: column;
}

.dialogue-line {
    line-height: 1.55;
}

/* espace UNIQUEMENT quand le speaker change */
.dialogue-line.speaker-change {
    margin-top: 10px;
}


.footer-custom {
    background-color: rgba(0, 0, 0, 0.4);
    color: #aad7ff;
}

.footer-link {
    background-color: rgba(255, 255, 255, 0.1);
    color: #aad7ff;
}

.footer-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.footer-custom {
    background-color: #1d1e27;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    gap: 30px;
    flex-wrap: wrap;
    font-family: sans-serif;
    margin-top: 20px;
}

.footer-left h2 {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.footer-left p {
    font-size: 14px;
    margin: 4px 0 0;
}

.footer-right {
    display: flex;
    align-items: center;
}

.linkedin-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: bold;
    color: whitesmoke;
}

.linkedin-icon {
    width: 25px;
    margin-right: 8px;
}

.footer-center {
    display: flex;
    gap: 10px;
}

.footer-link {
    background-color: #dae2ff;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    text-decoration: none;
    color: black;
    transition: background-color 0.3s;
}

.footer-link:hover {
    background-color: #c9d5ff;
}

.flag-icon {
    width: 20px;
    height: 14px;
    align-self: center;
}


/* Adaptation responsive */
@media (max-width: 768px) {
    .tags-container {
        padding: 10px;
        margin: 10px 0;
    }

    .tag-chip {
        padding: 4px 10px;
        font-size: 11px;
    }
}


body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* -----------------------------------
   MEDIA QUERIES (max-width: 699px)
----------------------------------- */

@media (max-width: 699px) {

    .tooltip-box {
        display: none !important;
    }

    .fade-toggle {
        transition: opacity 0.4s ease;
    }

    .hidden-fade {
        opacity: 0;
        pointer-events: none;
    }

    .return-text {
        margin-left: 5%;
        text-decoration: none;
        font-weight: bold;
        color: whitesmoke;
        margin-top: 10px;
        font-family: Arial, Helvetica, sans-serif;
    }

    .return-text img {
        width: 18px;
        margin-right: 5px;
    }

    .main-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }

    .video-area {
        position: relative;
        width: 100%;
        overflow: hidden;
    }

    .video-container {
        width: 100%;
        aspect-ratio: 6 / 9;
        position: relative;
        z-index: 1;
    }

    .video-container iframe {
        width: 87%;
        height: 81%;
        transform: none;
    }

    .text-wrapper {
        position: absolute;
        top: 0;
        right: -85%;
        /* cachée à droite */
        width: 100%;
        max-width: 500px;
        height: 100%;
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
        box-shadow: -4px 0 8px rgba(0, 0, 0, 0.2);
        overflow-y: auto;
        transition: right 0.4s ease-in-out;
        z-index: 10;
        box-sizing: border-box;
        overflow-x: hidden; 
    }

    .text-wrapper.active {
        right: 0px;
    }


    .video-title-video-page {
        font-size: 20px;
        font-weight: bold;
        font-family: Arial, Helvetica, sans-serif;
        margin-left: 20px;
    }

    .accordion-item summary {
        font-size: 17px;
        font-weight: bold;
        font-family: Arial, Helvetica, sans-serif;
        margin-left: 20px;
    }

    .accordion-item p {
        margin-right: 10px;
        margin-left: 20px;
    }

    .accordion-item {
        margin-bottom: 40px;
        font-family: Arial, Helvetica, sans-serif;
        margin-top: 25px;
    }

    #normalTextBlock {
        margin-left: 20px;
        margin-right: 10px;
        margin-top: 10px;
    }

    .translation-accordion .dialogue-block {
        margin-left: 20px;
        margin-right: 10px;
        margin-top: 10px;
    }

    #interlinearBlock {
        margin-left: 20px;
        margin-right: 10px;
    }


    .footer-custom {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 15px 10px;
        gap: 15px;
        margin-top: auto;
    }

    .footer-center {
        flex-direction: row;
        width: 100%;
        order: 3;
        justify-content: center;
    }

    .footer-left {
        order: 1;
    }

    .footer-link {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 10px 12px;
        width: 36%;
        flex-wrap: nowrap;
        overflow: hidden;
        gap: 8px;
    }

    .footer-link span {
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .footer-link svg {
        flex-shrink: 0;
    }


    .footer-right {
        order: 2;
    }

    .linkedin-icon-video-page {
        width: 25px;
        margin-right: 8px;
    }

    .flag-icon-video-page {
        width: 20px;
        height: 14px;
    }
}

/* -----------------------------------
   MEDIA QUERIES (min-width: 751px)
----------------------------------- */

@media (min-width: 751px) {
    .footer-custom-video-page {
        min-height: 150px;
    }

    .bookmark-logo-image {
        display: none;
    }
}

/* -----------------------------------
   MEDIA QUERIES (min-width: 700px max-width: 1199px)
----------------------------------- */

@media (max-width:1199px) and (min-width:700px) {

    .video-title-video-page {
        font-size: 20px;
        font-weight: bold;
    }

    .accordion-item {
        margin-bottom: 40px;
    }

    .accordion-item summary {
        font-size: 17px;
        font-weight: bold;
    }


    .main-content {
        display: flex;
        flex: 1;
        flex-direction: column;
        width: 85%;
        margin-left: 10%;
        margin-top: 10px;
    }

    .video-container {
        flex: 0 0 30%;
        max-width: 600px;
        height: 100%;
        box-sizing: border-box;
    }

    .video-container iframe {
        padding: 20px;
        width: 100%;
        height: 100%;
        aspect-ratio: 9 / 12.3;
    }

    .text-wrapper {
        width: 90%;
        margin-top: 25px;
        margin-left: 0;
        padding: 10px;
        border: 1px solid #ccc;
        height: min-content;
        border-radius: 5px;
    }

}

@media (max-width: 370px) {
    .video-container iframe {
        width: 87%;
        height: 81%;
        transform: none;
    }

    .video-area {
        position: relative;
        width: 109%;
        margin-left: -24px;
        overflow: hidden;
    }

    .text-wrapper.active {
        right: -18px;
    }

    .accordion-item {
        margin-right: 10px;
    }

    .tags-container {
        margin-left: 30px;
        width: 90%;
    }

}

/* -----------------------------------
   MEDIA QUERIES (min-width: 1200px)
----------------------------------- */

@media (min-width: 1200px) {

    .video-area {
        display: flex;
        flex: 1;
        flex-direction: row;
        width: 85%;
        margin-top: 10px;
        align-items: flex-start;
    }

    .accordion-item summary {
        font-size: 20px;
        font-weight: bold;
        margin-bottom: 12px;
    }

    .accordion-item {
        margin-bottom: 40px;
    }

    .video-title-row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        /* prend toute la largeur */
        gap: 10px;
        width: 100%;
        margin-top: 10px;
    }

    .video-title-video-page {
        font-size: 20px;
        font-weight: bold;
        margin-top: 6px;
        margin: 0;
    }

    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        margin: 0;
        font-family: Arial, sans-serif;
    }

    .main-content {
        display: flex;
        flex: 1;
        flex-direction: row;
        width: 85%;
        margin-left: 10%;
        margin-top: 10px;
    }

    .text-wrapper {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 10px;
        max-width: 70%;
        min-width: min-content;
        box-sizing: border-box;
        overflow-y: auto;
        margin-left: 20px;
        border: 1px solid #ccc;
        max-height: calc(100vh - 140px);
        border-radius: 5px;
    }

    .video-container {
        flex: 0 0 30%;
        max-width: 600px;
        height: auto;
        box-sizing: border-box;
    }

    .video-container iframe {
        padding: 20px;
        width: 100%;
        height: 100%;
        aspect-ratio: 9 / 11.3;
        min-height: 540px;
    }

    .footer-custom {
        margin-top: 125px;
    }
}