/* =========================
   RESET / BASE
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: sans-serif;
}

/* Optionnel overlay (si tu l'utilises vraiment) */
body::before {
    pointer-events: none;
    content: "";
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background-image: url("/others-images/magicwallpaper2.png");
    background-size: cover;
    background-position: 85%;
    background-repeat: no-repeat;
    z-index: -1;
}

/* =========================
   THEME / BACKGROUND
========================= */
body {
    background: linear-gradient(to bottom, #0a0f2c, #1e2a4a);
    background-image: url("/others-images/testbibli10.png");
    background-size: cover;
    background-position: 10%;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    min-height: 100dvh;
}

/* =========================
   TYPO COLORS (night theme)
========================= */
.explanation h1,
.explanation-mobile h1,
.explanation h2,
.explanation-mobile h2,
.main-text-videos-desktop h2,
.second-main-text-mobile h2,
.no-results-message p,
.link-desktop,
.link-mobile {
    color: #e0f7ff !important;
}

.explanation h1,
.explanation h2,
.current-language-text,
.other-lang-title {
    font-family: "Rajdhani", sans-serif;
}

/* =========================
   LOGO
========================= */
.linguateka-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    margin-top: 15px;
    margin-left: 10px;
    gap: 10px;
}

.linguateka-logo-image {
    margin-left: 5px;
    width: 47px;
}

.linguateka-logo h1 {
    font-size: 22px;
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    background: linear-gradient(to right, #3b82f6, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 25px;
    margin-left: 10px;
}

/* =========================
   TOP CONTROLS (desktop icons + burger)
========================= */
.top-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-direction: column;
    gap: 30px;
    padding: 10px;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 9999;
}

.combo-box {
    display: flex;
    align-items: center;
    background-color: #dae2ff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.burger-wrapper {
    display: flex;
    align-items: center;
}

.burger-wrapper button {
    background-color: transparent;
    border: none;
    padding: 8px 12px;
    font-size: 18px;
    cursor: pointer;
    color: #000;
}

#burger-content {
    position: absolute;
    width: 165px;
    top: 60px;
    right: 10px;
    background-color: #f5f7ff;
    border: 1px solid #dae2ff;
    border-radius: 8px;
    padding: 10px;
    display: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

#burger-content a {
    display: block;
    padding: 8px 0;
    text-decoration: none;
    color: #333;
}

#burger-content a:hover {
    text-decoration: underline;
}

.flag-icon-burger {
    width: 19px;
    height: 14px;
    margin-left: 4px;
    border: 1px solid #ccc;
}

.first-icon-burger-wrapper,
.second-icon-burger-wrapper,
.third-icon-burger-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.other-icon-top-controls {
    width: 30px;
}

.second-icon-burger-wrapper a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.second-icon-burger-wrapper a img {
    display: block;
    width: 100%;
    height: 100%;
}

/* =========================
   EXPLANATION (desktop)
========================= */
.explanation {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: -30px;
}

.explanation h1 {
    font-size: 30px;
    font-weight: 600;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
}

.explanation h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
}

.explanation-mobile {
    display: none;
}

/* =========================
   LANGUAGE HEADER
========================= */
.top-language-section {
    position: relative;
    margin-top: 30px;
    width: 100%;
}

.top-language-section-mobile {
    display: none;
}

.current-language-block {
    display: flex;
    justify-content: center;
    width: 100%;
}

.current-language-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.current-language-text {
    font-size: 26px;
    font-weight: 600;
    color: white;
}

/* ---- OTHER LANGUAGES ---- */
.other-languages-block {
    position: absolute;
    right: 12%;
    top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s ease;
}

.other-languages-block:hover {
    transform: translateY(-3px);
}

.other-lang-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    height: 55px;
}

.other-lang-title {
    font-family: "Rajdhani", sans-serif !important;
    font-size: 18px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #0b0b18;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px 0;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6);
    display: none;
    z-index: 50;
}

@media (hover: hover) and (pointer: fine) {
    .other-lang-wrapper:hover .language-dropdown {
        display: block;
    }
}

.language-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    text-decoration: none;
    font-family: "Rajdhani", sans-serif;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
    white-space: nowrap;
}

.language-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.language-flag {
    width: 22px;
    height: auto;
    border-radius: 3px;
}

.flag-color-wrapper {
    padding: 6px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, #3b82f6, #22c55e, #8b5cf6);
    background-size: 300% 300%;
    animation: flagGlow 5s ease-in-out infinite alternate;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.rotating-flag {
    width: 50px;
    height: auto;
    border-radius: 6px;
    display: block;
    opacity: 1;
    transition: opacity 0.25s ease-in-out;
}

@keyframes flagGlow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

/* =========================
   BANNER
========================= */

.hero-stack{
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;              /* ✅ 0px entre bannière et search */
}

.banner-wrapper{
  margin: 0;           /* ✅ enlève marges qui créent des espaces */
  padding: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.polish-banner-image {
    width: 450px;
    height: auto;
}

/* =========================
   SEARCH + FILTERS (desktop)
========================= */
.top-bar-desktop {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.searchBarWrapperDesktop {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: static; 
    transform: none; 
    width: fit-content;
    gap: 10px;
    z-index: 1;
}

#searchBar {
    width: 475px;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 5px;
    font-size: 12px;
    margin-right: 3%;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid #4acfff;
    color: #ffffff;
}

/* panel desktop (toujours visible chez toi) */
#filter-panel {
    position: static;
    background-color: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    width: 90%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#filter-panel.hidden {
    display: none;
}

.difficulty-filter {
    margin-top: 5px;
    display: flex;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.difficulty-btn {
    flex: 1;
    min-width: 0;
    padding: 6px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
}

/* Couleurs par difficulté (desktop) */
.difficulty-btn[data-difficulty="easy"] {
    background-color: #b3ff9b;
}

.difficulty-btn[data-difficulty="easy"].active {
    background-color: #00ff00;
    color: white;
}

.difficulty-btn[data-difficulty="medium"] {
    background-color: #ffff9b;
}

.difficulty-btn[data-difficulty="medium"].active {
    background-color: #ffff00;
    color: white;
}

.difficulty-btn[data-difficulty="hard"] {
    background-color: #ff9f9b;
}

.difficulty-btn[data-difficulty="hard"].active {
    background-color: #ff0000;
    color: white;
}

.secondary-filters {
    margin-top: 8px;
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 85%;
    align-items: stretch
}

.tag-btn {
    flex: 1;
    padding: 6px 0;
    background-color: #c4e1ff;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.subtitleFilter {
    font-size: 14px;
    color: #e0f7ff;
    display: flex;
    justify-content: center;
    width: auto;
    flex: 1;
    display: flex;
}

.subtitleFilter input {
    display: none;
}

.subtitleFilter span {
    background-color: #e5d4ff;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    align-items: center;
    padding: 6px 12px;
    line-height: 1;
    box-sizing: border-box;
    font-weight: 500;
    padding: 6px 0;
    transition: background 0.2s;
    color: #000;
    width: 100%;
}

.subtitleFilter input:checked+span {
    background-color: #b48cff;
    color: #fff;
}

.tag-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #0056b3;
}

/* =========================
   CONTRIBUTE + TITLE (desktop)
   (tu as séparé le titre All Videos dans .all-videos-wrapper)
========================= */

/* switch blocs */
.contribute-and-title--mobile {
    display: none;
}

.contribute-and-title--desktop {
    display: flex;
}

/* desktop contribute */
.contribute-and-title--desktop {
    display: flex;
    align-items: flex-start;
    max-width: 1200px;
    margin: -11.5rem auto 2.8rem auto;
    /* ton ancien “effet” */
    padding: 0 1rem;
}

.contribute-and-title--desktop .contribute-left {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-width: 260px;
}

.contrib-main-text {
    font-family: "Rajdhani", sans-serif;
    font-weight: 700;
    font-size: 1.7rem;
    color: #ffffff;
}

.contrib-sub-text {
    font-family: "Rajdhani", sans-serif;
    font-weight: 500;
    font-size: 1.2rem;
    color: #ffffff;
}

/* bouton pill (desktop + mobile, avec overrides dans mobile) */
.add-video-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.6rem;
    margin-top: 0.4rem;
    border-radius: 999px;
    text-decoration: none;
    font-family: "Rajdhani", sans-serif;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #2fd0ff, #60ff9c);
    color: #021018;
    border: 2px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 16px rgba(96, 255, 156, 0.9);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.add-video-pill:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 0 22px rgba(96, 255, 156, 1);
    filter: brightness(1.05);
}

.add-video-pill:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 0 10px rgba(96, 255, 156, 0.7);
}

/* titre “All Videos” desktop */
.all-videos-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    margin-top: 45px;
}

.videos-title-desktop {
    margin: 0;
    font-family: "Rajdhani", sans-serif;
    font-weight: 600;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #f5f5ff;
}

/* =========================
   CARDS GRID (desktop)
========================= */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 100px 70px;
    justify-content: center;
    margin-top: 100px;
    margin-left: 18%;
    margin-right: 18%;
}

.card {
    width: 100px;
    overflow: hidden;
    position: relative;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: scale(1.02);
    box-shadow: 0 0 16px rgba(138, 180, 248, 0.5);
}

.image-card-wrapper {
    position: relative;
    width: 100%;
    height: 100px;
}

.card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.play-button-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
}

.video-title {
    color: #aad7ff;
    margin-left: 4px;
    margin-top: 2px;
    font-family: "Rajdhani", sans-serif;
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
}

.votes-row--card.is-hidden {
    display: none;
}

.votes-row--card {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 6px;
}

.vote-count {
    font-size: 12px;
    line-height: 1;
    color: white;
    margin-top: 3px;
}

.card .votes-row--card .vote-icon {
    width: 20px !important;
    height: 20px !important;
}

.vote-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    flex-direction: column;
    color: #ffffff;
    font-size: 14px;
    gap: 2px;
}


/* =========================
   NO RESULTS
========================= */
.no-results-message {
    display: none;
    text-align: center;
    margin-top: 80px;
}

.no-results-message p {
    font-size: 1.2em;
    font-weight: bold;
}

.no-results-message img {
    width: 100px;
    height: auto;
    margin-bottom: 20px;
}

/* =========================
   MOBILE STRUCTURE (hidden by default)
========================= */
.top-controls-mobile,
.top-bar-mobile,
.main-text-videos-mobile,
.second-main-text-mobile,
#searchBar-mobile,
.combo-box-mobile {
    display: none;
}

/* =========================
   FOOTER (desktop)
========================= */
.footer-custom {
    background-color: #1d1e27;
    color: #aad7ff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    gap: 30px;
    flex-wrap: wrap;
    font-family: sans-serif;
    margin-top: 80px;
}

.footer-left h2 {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.footer-left p {
    font-size: 14px;
    margin: 4px 0 0;
}

.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;
}

.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;
}

/* =========================
   LINKS (legacy)
========================= */
.link-mobile {
    display: none;
}

.link-desktop {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #dae2ff;
    padding: 6px 12px;
    transition: background-color 0.3s ease;
    text-decoration: none;
    color: black;
    font-weight: 500;
    min-width: 165px;
}

.link-desktop img {
    width: 20px;
    height: 20px;
}

/* =========================
   TABLET / SMALL DESKTOP
========================= */
@media (max-width: 1155px) {
    #searchBar {
        width: 300px;
    }

    .main-text-videos-desktop {
        margin-left: 8%;
    }

    .top-controls {
        flex-direction: column-reverse;
        align-items: flex-end;
        gap: 10px;
    }

    .explanation {
        margin-left: 10px;
    }

    .card-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 50px 70px;
        margin-left: 8%;
        margin-right: 8%;
    }

    .card {
        width: 100px;
        min-height: 136px;
    }

    .card img {
        width: 100px;
        height: 100px;
        object-fit: cover;
    }
}

@media (min-width: 751px) {
    .footer-custom {
        min-height: 150px;
    }
}

/* =========================
   MOBILE
========================= */
@media (max-width: 780px) {
    body {
        background-image: url("/others-images/testbibli8.png");
        background-position: 81%;
        min-height: 100vh;
        min-height: 100dvh;
    }

    /* Logo */
    .linguateka-logo {
        margin-top: 5px;
        margin-left: 10px;
        gap: 6px;
        flex-wrap: wrap;
    }

    .linguateka-logo h1 {
        font-size: 15px;
        margin-top: 10px;
    }

    .linguateka-logo-image {
        width: 30px;
    }

    /* Banner */
    .polish-banner-image {
        width: min(350px, 92vw);
        max-width: 100%;
        height: auto;
        display: block;
    }

    .banner-wrapper {
        /* ajuste si tu veux */
        margin-bottom: 0;
    }


    .filter-wrapper-mobile {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    /* Hide desktop header parts */
    .explanation {
        display: none;
    }

    .top-controls {
        display: none;
    }

    .top-bar-desktop {
        display: none;
    }

    .combo-box {
        display: none;
    }

    .top-language-section-mobile {
        display: block;
        margin-top: 15px;
    }

    .top-language-section-mobile h2 {
        font-family: "Rajdhani", sans-serif;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 2px;
        text-transform: uppercase;
    }

    .top-language-section {
        display: none;
    }

    /* Show mobile explanation */
    .explanation-mobile {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: 35px;
    }

    .explanation-mobile h1 {
        font-family: "Rajdhani", sans-serif;
        font-size: 18px;
        font-weight: 600;
        letter-spacing: 2px;
        text-transform: uppercase;
    }

    .explanation-mobile h2 {
        font-family: "Rajdhani", sans-serif;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 2px;
        text-transform: uppercase;
    }

    /* Top controls mobile */
    .top-controls-mobile {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .main-text-videos-mobile {
        display: block;
    }


    /* cache l'ancien bloc burger mobile */
    .combo-box-mobile,
    .wrapper-mobile-other-icons,
    .burger-wrapper-mobile,
    #burger-mobile-content {
        display: none !important;
    }

    /* place le switch langues en haut à droite */
    .mobile-lang-switcher {
        position: absolute;
        top: 13px;
        right: 15px;
        z-index: 9999;
    }

    /* version mobile du bloc langues (on neutralise le position absolute desktop) */
    .other-languages-block--mobile {
        position: static !important;
        right: auto !important;
        top: auto !important;
        gap: 8px;
    }

    /* IMPORTANT : on garde le dropdown caché par défaut */
    .other-languages-block--mobile .language-dropdown {
        display: none;
    }

    /* Quand ouvert : on force l'affichage */
    .other-languages-block--mobile.is-open .language-dropdown {
        display: block !important;
    }

    /* sécurité : le toggle doit capter le clic */
    .other-languages-block--mobile .other-lang-wrapper {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .other-languages-block--mobile .other-lang-title {
        font-size: 12px !important;
        /* texte plus petit */
        letter-spacing: 1px !important;
    }


    .other-languages-block--mobile .flag-color-wrapper {
        padding: 4px;
        /* halo plus petit */
        border-radius: 10px;
    }

    .other-languages-block--mobile .rotating-flag {
        width: 34px;
        /* drapeau plus petit */
        border-radius: 6px;
    }

    /* dropdown mobile un peu plus compact */
    .other-languages-block--mobile .language-item {
        font-size: 12px;
        padding: 6px 12px;
    }

    .other-languages-block--mobile .language-flag {
        width: 18px;
    }


    /* Title area (mobile) */
    .second-main-text-mobile {
        order: -1;
        margin-left: 10px;
        display: flex;
        align-items: center;
        margin-bottom: 10px;
        margin-top: 20px;
    }

    .second-main-text-mobile h2 {
        font-size: 15px;
        font-weight: 600;
        text-transform: uppercase;
        margin-top: 15px;
        font-family: "Rajdhani", sans-serif;
        letter-spacing: 2px;
    }

    .second-main-text-mobile img {
        display: none !important;
    }

    /* Search mobile */
    #searchBar {
        display: none;
    }

    #searchBar-mobile {
        display: block;
        width: 85%;
        padding: 10px;
        border: 2px solid #ccc;
        border-radius: 5px;
        font-size: 12px;
        min-width: unset;
        box-sizing: border-box;
        background-color: rgba(0, 0, 0, 0.3);
        border: 1px solid #4acfff;
        color: #ffffff;
    }

    /* Filters mobile */
    #filter-panel-mobile {
        position: static;
        background-color: transparent;
        border: none;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #filter-panel-mobile.hidden {
        display: none;
    }

    .difficulty-filter-mobile {
        margin-top: 10px;
        display: flex;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }

    .difficulty-btn-mobile {
        flex: 1;
        padding: 5px;
        border: 1px solid #ccc;
        border-radius: 5px;
        cursor: pointer;
        transition: background 0.2s;
    }

    .difficulty-btn-mobile[data-difficulty="easy"] {
        background-color: #b3ff9b; 
    }

    .difficulty-btn-mobile[data-difficulty="easy"].active {
        background-color: #00ff00;
        color: white;
    }

    .difficulty-btn-mobile[data-difficulty="medium"] {
        background-color: #ffff9b;
    }

    .difficulty-btn-mobile[data-difficulty="medium"].active {
        background-color: #ffff00;
        color: white;
    }

    .difficulty-btn-mobile[data-difficulty="hard"] {
        background-color: #ff9f9b;
    }

    .difficulty-btn-mobile[data-difficulty="hard"].active {
        background-color: #ff0000;
        color: white;
    }

    .meme-filter-mobile {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .tag-btn-mobile {
        flex: 1;
        min-width: 0;
        border: 1px solid #ccc;
        border-radius: 5px;
        font-size: 12px;
        cursor: pointer;

        width: auto;

        min-width: unset;
        padding: 5px;
        background-color: #c4e1ff;
        transition: background 0.2s;

    }

    .tag-btn-mobile.active {
        background-color: #007bff;
        color: white;
        border-color: #0056b3;
    }

    .mobile-secondary-row {
        width: 85%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin-top: 10px;
    }

    .subtitleFilter--mobile {
        flex: 1;
        min-width: 0;
        display: block;
        margin: 0;
    }

    .subtitleFilter--mobile span {
        display: block;
        width: 100%;
        padding: 5px;

        border: 1px solid #ccc;
        border-radius: 5px;

        font-size: 12px;
        text-align: center;
        cursor: pointer;
        background-color: #e5d4ff;

        color: #000;
        transition: background 0.2s;
        white-space: nowrap;
    }

    /* No results (mobile) */
    .no-results-message img {
        width: 70px;
        height: auto;
        margin-bottom: 20px;
    }

    /* ====== GRID MOBILE : 1 par ligne ====== */
    .top-bar-mobile {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    /* ====== CARDS : 1 par ligne ====== */
    .card-container {
        display: grid;
        grid-template-columns: 1fr;
        /* ✅ une seule colonne */
        gap: 22px;
        /* espace entre cards */
        padding: 0 16px;
        margin: 22px 0 0 0;
        justify-items: center;
    }

    .card {
        width: 100%;
        max-width: 320px;
        /* ajuste si tu veux plus large */
        min-height: unset;
        border-radius: 14px;
        overflow: hidden;
    }

    .image-card-wrapper {
        width: 100%;
        height: 320px;
        /* card “grande” */
        position: relative;
        overflow: hidden;
    }

    .card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        margin: 0;
        display: block;
    }

    .play-button-logo {
        width: 90px;
        /* play button plus grand */
        height: auto;
    }

    .video-title {
        margin: 10px 0 0 0;
        font-size: 14px;
        font-weight: 600;
        letter-spacing: 2px;
        text-align: center;
        padding: 0 10px 12px 10px;
    }

    .vote-count {
        font-size: 18px;
        line-height: 1;
        color: white;
        margin-top: 3px;
    }

    .card .votes-row--card .vote-icon {
        width: 30px !important;
        height: 30px !important;
    }

    /* footer mobile */
    .footer-custom {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 15px 10px;
        gap: 15px;
    }

    .footer-center {
        flex-direction: row;
        justify-content: center;
        width: 100%;
        order: 3;
    }

    .footer-left {
        order: 1;
    }

    .footer-right {
        order: 2;
    }

    .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;
    }

    .link-desktop {
        display: none;
    }

    .link-mobile {
        display: flex;
        align-items: center;
        gap: 8px;
        background-color: #dae2ff;
        border-radius: 6px;
        padding: 6px 9px;
        transition: background-color 0.3s ease;
        text-decoration: none;
        color: rgb(46, 46, 46);
        font-weight: 600;
        min-width: 100px;
    }

    .link-mobile:hover {
        background-color: #c9d5ff;
    }

    /* ===== CONTRIBUTE: switch + layout mobile (PROPRE) ===== */
    .contribute-and-title--desktop {
        display: none !important;
    }

    .contribute-and-title--mobile {
        display: flex !important;
        margin: 36px 0 6px 0;
        padding: 0 16px;
        justify-content: flex-start;
    }

    .contribute-and-title--mobile .contribute-left {
        width: 100%;
        max-width: none;
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        column-gap: 12px;
        align-items: center;
        text-align: left;
    }

    .contribute-and-title--mobile .contrib-main-text {
        grid-column: 1;
        grid-row: 1;
        margin: 0;
    }

    .contribute-and-title--mobile .contrib-sub-text {
        grid-column: 1;
        grid-row: 2;
        margin: 0;
    }

    .contribute-and-title--mobile .add-video-pill {
        grid-column: 2;
        grid-row: 1 / span 2;
        justify-self: end;
        width: auto !important;
        margin-top: 0 !important;
        white-space: nowrap;
    }
}
/* fix provisoire

@media (max-width: 400px) {


    .polish-banner-image {
        width: min(300px, 80vw);
    }

    .banner-wrapper {
        margin-bottom: -12%;
    }
    
}
*/


/* =========================
   VERY SMALL MOBILE
========================= */
@media (max-width: 370px) {
    .image-card-wrapper {
        height: 171px;
    }

    .card-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 50px 12px;
        margin-left: 6%;
        margin-right: 6%;
        margin-top: 40px;
    }

    .card {
        width: 150px;
    }

    .card img {
        height: 150px;
        object-fit: cover;
    }

    .footer-link {
        width: 60%;
    }
}

@media (max-width: 370px) {
    .card-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .card {
        max-width: 140px;
    }

    .image-card-wrapper {
        height: 140px;
    }
}