
:root {
    --bg-main: #f5f6f8;
    --text-main: #111;
    --text-muted: #666;
    --text-light: #999;
    --primary: #444cf7;
    --primary-hover: #3339c4;
    --card-bg: rgba(255, 255, 255, 0.6);
    --card-blur: rgba(255, 255, 255, 0.5);
    --card-solid: #fff;
    --border-color: #ddd;
    --border-light: #eee;
    --shadow-sm: rgba(0, 0, 0, 0.05);
    --shadow-md: rgba(0, 0, 0, 0.15);
    --shadow-lg: rgba(0, 0, 0, 0.1);
    --bg-gradient: radial-gradient(ellipse at 80% 80%, rgba(130, 44, 247, 0.35) 0%, rgba(68, 76, 247, 0.18) 40%, transparent 70%);
}

[data-theme="dark"] {
    --bg-main: #121212;
    --text-main: #e0e0e0;
    --text-muted: #aaa;
    --text-light: #777;
    --primary: #626afc;
    --primary-hover: #7b82fb;
    --card-bg: rgba(30, 30, 30, 0.8);
    --card-blur: rgba(20, 20, 20, 0.7);
    --card-solid: #1e1e1e;
    --border-color: #444;
    --border-light: #333;
    --shadow-sm: rgba(0, 0, 0, 0.3);
    --shadow-md: rgba(0, 0, 0, 0.5);
    --shadow-lg: rgba(0, 0, 0, 0.6);
    --bg-gradient: radial-gradient(ellipse at 80% 80%, rgba(130, 44, 247, 0.15) 0%, rgba(68, 76, 247, 0.08) 40%, transparent 70%);
}

@font-face {
    font-family: 'healTheWebA';
    src: url("../font/HealTheWebA-Regular.otf");
    font-display: swap;
}

@font-face {
    font-family: 'healTheWebB';
    src: url("../font/HealTheWebB-Regular.otf");
    font-display: swap;
}

body {
    margin: 0;
    font-family: 'healTheWebA', sans-serif;
}

h3 {
    font-size: 24px;
    padding-right: 15px;
}

body::before {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -20%;
    width: 130vw;
    height: 130vh;
    background: var(--bg-gradient);
    filter: blur(80px);
    z-index: -2;
    pointer-events: none;
}


p {
    font-size: 20;
    font-family: 'healTheWebA', sans-serif;
}

.divHeader {
    margin-left: 10%;
    margin-right: 10%;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
}




.container_titrePlanning,
.container_infoFilm {
    margin-left: 10%;
    margin-right: 10%;
}

.line {
    width: 100%;
    height: 2px;
    background-image: linear-gradient(90deg, rgba(68, 76, 247, 1) 0%, rgba(9, 9, 121, 1) 35%, rgba(2, 0, 36, 1) 100%);
    margin-top: 10px;
    margin-bottom: 20px;
}

.container_titrePlanning {
    margin-top: 50px;
}

.seances-wrapper {
    margin-left: 10%;
    margin-right: 10%;
    content-visibility: auto;
    contain-intrinsic-size: 0 200px;
}

.mini-calendar {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.mini-cal-btn {
    padding: 6px 12px;
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    font-family: 'healTheWebA', sans-serif;
    font-size: 13px;
    text-transform: capitalize;
    transition: all 0.2s;
}

.mini-cal-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.mini-cal-btn.active {
    background-color: var(--primary);
    color: var(--card-solid);
    border-color: var(--primary);
}

.day-seances {
    display: none;
}

.day-seances.show {
    display: block;
}

.day-seances .seance_container,
.seances-wrapper>.seance_container {
    margin-left: 0;
    margin-right: 0;
}

.affiche {
    width: 200px;
    height: 288px;
    border-radius: 5px;
    padding-right: 30px;
}

.container_infoFilm {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    content-visibility: auto;
    contain-intrinsic-size: 0 300px;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 8px 32px var(--shadow-lg);
    margin-bottom: 10px;
}

.blur-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card-blur);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: -1;
    border-radius: 20px;
    box-shadow: 0 8px 32px var(--shadow-lg);
}

.info-content {
    position: relative;
    z-index: 1;
}

.realisateur,
.duree,
.rating,
.genre {
    margin-bottom: -20px;
}

.info-content p:last-child {
    margin-bottom: 0;
}

.date {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 10px;
    width: 80px;
    height: 100px;
    justify-content: center;
}

.date-selectionne {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--primary);
    color: var(--card-solid);
    border-radius: 10px;
    width: 80px;
    height: 100px;
    justify-content: center;
    box-shadow: 0 6px 20px var(--shadow-md);
}

.date-tous {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    width: 80px;
    height: 100px;
    transition: all 0.2s ease-in-out;
}

.date-tous:hover {
    background-color: var(--primary);
    color: var(--card-solid);
    box-shadow: 0 6px 20px var(--shadow-md);
}

.date-tous-active {
    background-color: var(--primary);
    color: var(--card-solid);
    box-shadow: 0 6px 20px var(--shadow-md);
}

.tous-label {
    font-family: 'Montserrat-ExtraBold', sans-serif;
    font-size: 22px;
    margin: 0;
}

.mois {
    margin-bottom: 20px;
}

.calendrier {
    width: 720px;
    position: relative;
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.chiffre {
    font-family: 'Montserrat-ExtraBold';
    font-size: 42px;
    margin-top: -20px;
    margin-bottom: -20px;
}

.duree {
    margin-bottom: -20px;
}

.cinema-link {
    color: var(--card-solid);
}

.cinema {
    background-color: var(--primary);
    border-radius: 5px;
    height: 40px;
    width: 200px;
    color: var(--card-solid);
    padding-left: 10px;
    box-sizing: border-box;
    align-items: center;
    display: flex;
    align-items: center;
    box-shadow: 0 6px 20px var(--shadow-md);
    flex-shrink: 0;
    flex-grow: 0;
}

.horaire_container {
    background-color: var(--card-solid);
}

.seance_container {
    margin-right: 10%;
    margin-left: 10%;
    display: flex;
    flex-direction: row;
}

.horaires_container {
    display: flex;
    flex-direction: row;
    max-width: 80% - 200px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.horaires_container::-webkit-scrollbar {
    display: none;
}


.horaire {
    background-color: var(--card-solid);
    border-radius: 5px;
    height: 40px;
    min-width: 100px;
    color: var(--primary);
    box-sizing: border-box;
    align-items: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    box-shadow: 0 6px 20px var(--shadow-md);
    flex-shrink: 0;
    flex-grow: 0;
    gap: 8px;
    padding: 0 12px;
}

.lang-badge {
    font-size: 13px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    color: grey;
}

.format-badge {
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 3px;
    background-color: #666efe;
    color: var(--card-solid);
    text-transform: uppercase;
}

.horaire-link {
    text-decoration: none;
    color: inherit;
}


.horaire-link .horaire {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}


.horaire-link:hover .horaire {
    box-shadow: 0 4px 12px rgba(68, 76, 247, 0.3);
    border: 2px solid var(--primary);
}

.search-container {
    margin: 20px 10%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.search-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'healTheWebA', sans-serif;
    font-size: 14px;
    transition: border-color 0.3s;
    background-color: var(--card-solid);
    /* Browser normalization for select arrows */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.search-input:not(select) {
    background-image: none;
    padding-right: 15px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-main {
    flex: 1;
    min-width: 200px;
}

.search-filters {
    margin-top: 10px;
}

.search-filters .search-input {
    flex: 1;
    min-width: 150px;
}

.reset-btn {
    padding: 12px 20px;
    background-color: var(--primary);
    color: var(--card-solid);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'healTheWebA', sans-serif;
    font-size: 14px;
    transition: background-color 0.3s;
}

.reset-btn:hover {
    background-color: var(--primary-hover);
}

.actions-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
}

footer {
    background-color: transparent;
    border-top: 1px solid var(--shadow-sm);
    margin-top: 10px;
}

.container_footer {
    margin-right: 10%;
    margin-left: 10%;
    padding: 10px 0 15px 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-info p {
    margin: 4px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--card-solid);
    color: var(--primary);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

.social-link:hover {
    background: var(--primary);
    color: var(--card-solid);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(68, 76, 247, 0.2);
}

.social-link svg {
    display: block;
}

@media (max-width: 576px) {
    .container_footer {
        flex-direction: column;
        text-align: center;
        margin-left: 5%;
        margin-right: 5%;
        padding: 15px 0 70px 0; /* Garde une marge pour le bouton popcorn mais moins imposante */
        gap: 12px;
    }
    
    .footer-info {
        order: 2;
    }

    .footer-info p {
        font-size: 11px;
        margin: 2px 0;
    }
    
    .footer-social {
        order: 1;
        justify-content: center;
        margin-bottom: 5px;
    }

    .social-link {
        width: 32px;
        height: 32px;
    }

    .social-link svg {
        width: 16px;
        height: 16px;
    }
}

.contenu_edt {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.txt_edt {
    position: relative;
    top: 50px;
}

.synopsis_container {
    max-width: 800px;
    margin-right: 10%;
    position: relative;
}

.synopsis {
    opacity: 0.8;
    max-height: 78px;
    overflow: hidden;
    transition: max-height 0.3s ease;
    position: relative;
}

.synopsis p {
    margin: 0;
}

.synopsis::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.9));
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.synopsis.expanded {
    max-height: 1000px;
}

.synopsis.expanded::after,
.synopsis.no-fade::after {
    opacity: 0;
}

.synopsis-toggle {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-family: 'healTheWebA', sans-serif;
    font-size: 14px;
    padding: 5px 0;
    margin-top: -10px;
}

.synopsis-toggle:hover {
    text-decoration: underline;
}

.trailer-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    padding: 0;
    margin-top: 6px;
    background: none;
    color: var(--primary);
    border: none;
    font-family: 'healTheWebA', sans-serif;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
    opacity: 0.8;
}

.trailer-btn:hover {
    opacity: 1;
    text-decoration: underline;
    color: var(--primary);
}

.trailer-btn svg {
    width: 12px;
    height: 12px;
}

.date:hover {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--primary);
    color: var(--card-solid);
    border-radius: 10px;
    width: 80px;
    height: 100px;
    justify-content: center;
    box-shadow: 0 6px 20px var(--shadow-md);
    transition: all 0.2s ease-in-out;
}

a {
    text-decoration: none;
    color: black;
}

#loader {
    min-width: 100vw;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#loader div.box {
    width: 3rem;
    height: 3rem;
    position: relative;
    margin: 0 1rem 0 1rem;
}

#loader div.box::after {
    content: "";
    position: absolute;
    background: var(--primary);
    height: 3rem;
    ;
    width: 3rem;
    border-radius: 50%;
    animation: move 1s ease alternate infinite;
    opacity: 0;
}

#loader div.box:nth-child(2)::after {
    animation-delay: 0.25s;
}

#loader div.box:nth-child(3)::after {
    animation-delay: 0.5s;
}

@keyframes move {
    0% {
        bottom: -1.5rem;
        opacity: 0;
    }

    100% {
        bottom: 1.5rem;
        opacity: 1;
    }
}

.goTop {
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    border: var(--card-solid) solid 5px;
    border-radius: 50%;
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px var(--shadow-md);
}

html {
    scroll-behavior: smooth;
}


.responsive-div {
    height: 60px;
}

.responsive-div-compact {
    height: 30px;
}

.responsive-petite-div {
    height: 10px;
}

@media (max-width: 576px) {
    .contenu_edt {
        display: flex;
        flex-direction: column;
    }



    body {
        margin: 0;
        padding: 0;
        overflow-y: auto;
    }

    .divHeader {
        flex-direction: column;
        max-width: 80vw;
    }

    h1 {
        margin-block-start: 15px;
        margin-block-end: 0;
    }

    p {
        font-size: 12px;
        margin-block-start: -5px;
    }

    .date {
        width: 40px;
        height: 50px;
    }

    .date-selectionne {
        width: 40px;
        height: 50px;
    }

    .date-tous {
        width: 40px;
        height: 50px;
    }

    .tous-label {
        font-size: 12px;
    }

    .mois {
        margin-bottom: 20px;
        font-size: 10px;
    }

    .calendrier {
        max-width: 90vw;
        width: auto;
        gap: 5px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .chiffre {
        font-size: 20px;
        margin-top: 15px;
        margin-bottom: 0;
    }

    .jour {
        display: none;
    }

    .txt_edt {
        display: none;
    }

    .line {
        max-width: 90vw;
        width: 100%;
    }

    .mini-calendar {
        gap: 5px;
        margin-left: 5%;
    }

    .mini-cal-btn {
        padding: 4px 8px;
        font-size: 11px;
    }

    .seances-wrapper {
        margin-left: 5%;
        margin-right: 5%;
    }

    .synopsis-toggle {
        display: none;
    }

    .synopsis {
        max-height: none;
    }

    .synopsis::after {
        display: none;
    }

    .trailer-btn {
        font-size: 10px;
        opacity: 0.7;
        margin-top: 2px;
    }

    .trailer-btn svg {
        width: 10px;
        height: 10px;
    }

    .search-container {
        margin: 10px 5%;
        padding: 10px;
    }

    .search-row {
        gap: 5px;
    }

    .search-input {
        padding: 8px 10px;
        font-size: 11px;
        min-width: 100%;
    }

    .search-main {
        min-width: 100%;
    }

    .search-filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 5px;
    }

    .search-filters .search-input {
        min-width: 0;
        width: 100%;
        padding: 6px 8px;
    }

    .search-filters .actions-row {
        grid-column: 1 / -1;
    }

    .reset-btn {
        width: auto;
        padding: 8px 15px;
        font-size: 12px;
    }

    .actions-row {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .affiche {
        width: 100px;
        height: 144px;
        padding-right: 10px;
    }

    .titreFilm {
        font-size: 14px;
        margin-block-start: 5px;
        margin-block-end: 5px;
    }

    .realisateur,
    .duree,
    .rating,
    .genre {
        margin-block-start: 0;
        margin-block-end: 0;
        font-size: 10px;
        margin-right: 5px;
    }

    .synopsis p {
        display: none;
    }

    .synopsis {
        max-height: none;
        overflow: visible;
    }

    .synopsis::after {
        display: none;
    }

    .seance_container {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .cinema {
        height: 30px;
        width: 100px;
        color: var(--card-solid);
        padding-right: 5px;
        flex-shrink: 0;
    }

    .horaires_container {
        max-width: none;
        flex-wrap: nowrap;
    }

    .horaire-wrapper {
        flex-shrink: 0;
    }

    .horaire {
        height: 30px;
        min-width: 60px;
        width: auto;
        border-radius: 5px;
        margin-left: 5px;
        padding: 0 8px;
        flex-wrap: nowrap;
    }

    .lang-badge {
        font-size: 9px;
    }

    .format-badge {
        font-size: 7px;
        padding: 1px 3px;
        var(--card-solid)-space: nowrap;
    }

    .calendar-btn {
        display: none;
    }

    .cinema p,
    .horaire p {
        font-size: 10px;
        margin-block-start: 1em;
    }

    .container_titrePlanning,
    .container_infoFilm {
        max-width: 80vw;
    }

    .responsive-div {
        height: 10px;
    }

    .responsive-petite-div {
        height: 5px;
    }

    .goTop {
        z-index: 2;
        bottom: 10px;
        right: 10px;
        width: 50px;
        height: 50px;
        background-color: var(--primary);
        border: var(--card-solid) solid 4px;
    }

    .goTop p {
        font-size: 20px;
        margin-block-start: 1em;
        margin-block-end: 1em;
    }

    body::before {
        bottom: -20%;
        right: -20%;
        top: auto;
        left: auto;
    }


    .blur-background {
        background: rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(20px);
        z-index: -1;
        border-radius: 5px;
        box-shadow: 0 -4px 16px var(--shadow-lg);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    }



    *:not(.affiche) {
        box-sizing: border-box;
    }

    .date:hover {
        width: 40px;
        height: 50px;
    }
}



.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    vertical-align: middle;
    margin-left: 5px;
}

.favorite-btn:hover {
    transform: scale(1.15);
}

.favorite-icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--text-light);
    stroke-width: 2;
    transition: all 0.2s ease;
}

.favorite-btn:hover .favorite-icon {
    stroke: #ff6b6b;
}

.favorite-btn.active .favorite-icon {
    fill: #ff6b6b;
    stroke: #ff6b6b;
    animation: heartPulse 0.3s ease;
}

@keyframes heartPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.favorites-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 8px;
    background: transparent;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.favorites-toggle:hover {
    border-color: #ff6b6b;
}

.favorites-toggle:hover .favorites-heart {
    stroke: #ff6b6b;
}

.favorites-toggle input[type="checkbox"] {
    display: none;
}

.favorites-heart {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--text-light);
    stroke-width: 2;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.favorites-toggle:has(input:checked) .favorites-heart,
.favorites-toggle.active .favorites-heart,
.favorites-toggle input[type="checkbox"]:checked ~ .favorites-heart {
    fill: #ff4d4d !important;
    stroke: #ff4d4d !important;
}

.favorites-toggle input[type="checkbox"]:checked ~ .favorites-label,
.favorites-toggle.active .favorites-label {
    color: #ff4d4d;
    font-weight: bold;
}

.favorites-toggle:has(input:checked),
.favorites-toggle.active {
    border-color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
}

.favorites-label {
    font-family: 'healTheWebA', sans-serif;
    font-size: 14px;
    color: var(--text-muted);
    user-select: none;
}

@media (max-width: 576px) {
    .favorite-icon {
        width: 14px;
        height: 14px;
    }

    .favorites-toggle {
        width: auto;
        justify-content: center;
        padding: 6px 12px;
    }

    .favorites-label {
        font-size: 11px;
    }

    .favorites-heart {
        width: 14px;
        height: 14px;
    }
}

/* Favorites Tabs */
.favorites-tabs-container {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    margin-top: 10px;
}

.favorites-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.fav-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: 8px;
    background: transparent;
    border: 2px solid var(--border-color);
    transition: all 0.2s ease;
    font-family: 'healTheWebA', sans-serif;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    var(--card-solid)-space: nowrap;
    min-width: 120px;
}

.fav-tab:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.fav-tab.active {
    border-color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
    color: #ff4d4d;
    box-shadow: none;
}

@media (max-width: 576px) {
    .favorites-tabs-container {
        grid-column: 1 / -1;
        width: 100%;
        margin-top: 10px;
    }

    .favorites-tabs {
        gap: 6px;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        justify-content: flex-start;
        width: 100%;
    }

    .fav-tab {
        padding: 8px 10px;
        font-size: 11px;
        min-width: 120px;
        flex: 1;
    }
}

/* Sync Button */
.sync-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 8px;
    background: transparent;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    font-family: 'healTheWebA', sans-serif;
    font-size: 14px;
    color: var(--text-muted);
}

.sync-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.sync-btn:hover svg {
    stroke: var(--primary);
}

.sync-btn svg {
    stroke: var(--text-light);
    transition: stroke 0.2s ease;
}

.sync-label {
    user-select: none;
}

@media (max-width: 576px) {
    .sync-btn {
        padding: 6px 12px;
    }

    .sync-label {
        font-size: 11px;
        display: inline;
    }

    .sync-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* Sync Modal */
.sync-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.sync-modal-overlay.show {
    display: flex;
}

.sync-modal {
    background: var(--card-solid);
    border-radius: 16px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sync-modal-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    justify-content: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
}

.sync-modal-tab {
    background: transparent;
    border: none;
    font-family: 'healTheWebA', sans-serif;
    font-size: 16px;
    color: var(--text-light);
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.sync-modal-tab:hover {
    color: var(--primary);
    background: #f0f0ff;
}

.sync-modal-tab.active {
    color: var(--primary);
    background: #f0f0ff;
    font-weight: bold;
}

.sync-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.sync-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.sync-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    font-size: 20px;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10;
    transition: all 0.2s;
}

.sync-modal-close:hover {
    color: var(--text-main);
}

.sync-modal-section {
    margin-bottom: 16px;
}

.sync-modal-label {
    font-family: 'healTheWebA', sans-serif;
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 8px;
}

.sync-code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #f0f0ff;
    border-radius: 12px;
    padding: 16px;
}

.sync-code-display span {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 28px;
    font-weight: bold;
    color: var(--primary);
    letter-spacing: 6px;
}

.sync-copy-btn {
    background: var(--card-solid);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.sync-copy-btn:hover {
    border-color: var(--primary);
    background: #f0f0ff;
}

.sync-copy-btn svg {
    stroke: var(--text-muted);
}

.sync-copy-btn:hover svg {
    stroke: var(--primary);
}

.sync-modal-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
}

.sync-modal-divider::before,
.sync-modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.sync-modal-divider span {
    font-family: 'healTheWebA', sans-serif;
    font-size: 13px;
    color: var(--text-light);
}

.sync-input-row {
    display: flex;
    gap: 8px;
}

.sync-code-input {
    flex: 1;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 18px;
    letter-spacing: 4px;
    text-align: center;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s;
    text-transform: uppercase;
}

.sync-code-input:focus {
    border-color: var(--primary);
}

.sync-link-btn {
    padding: 12px 20px;
    background: var(--primary);
    color: var(--card-solid);
    border: none;
    border-radius: 10px;
    font-family: 'healTheWebA', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    var(--card-solid)-space: nowrap;
}

.sync-link-btn:hover {
    background: var(--primary-hover);
}

.sync-modal-hint {
    font-family: 'healTheWebA', sans-serif;
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
    margin: 16px 0 0;
    line-height: 1.5;
}

@media (max-width: 576px) {
    .sync-modal {
        padding: 24px 20px;
        width: 92%;
        max-width: none;
    }

    .sync-modal-tabs {
        margin-bottom: 16px;
        padding-bottom: 8px;
    }
    .sync-modal-tab {
        font-size: 14px;
        flex: 1;
    }

    .sync-code-display span {
        font-size: 22px;
        letter-spacing: 4px;
    }

    .sync-input-row {
        flex-direction: column;
    }

    .sync-code-input {
        font-size: 16px;
    }

    .sync-link-btn {
        width: 100%;
        text-align: center;
    }
}

.sync-unlink-btn {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    background: transparent;
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    border-radius: 10px;
    font-family: 'healTheWebA', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sync-unlink-btn:hover {
    background: #fff0f0;
    transform: translateY(-1px);
}

.synced-devices-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.me-device {
    background: rgba(68, 76, 247, 0.05);
    border: 1px solid rgba(68, 76, 247, 0.1);
}

.me-device .friend-avatar {
    background: var(--primary);
    color: var(--card-solid);
}

/* ── Friends Feature ── */
.friends-add-row {
    flex-wrap: wrap;
    gap: 6px;
}

.friend-name-input {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background: #f8f8ff;
}

.friend-name-input:focus {
    border-color: #6c63ff;
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f8f8ff;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: background 0.2s;
}

.friend-item:last-child {
    margin-bottom: 0;
}

.friend-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c63ff, #c244f7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--card-solid);
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.friend-info {
    flex: 1;
    min-width: 0;
}

.friend-name {
    font-weight: 600;
    font-size: 14px;
    color: #222;
    display: flex;
    align-items: center;
    gap: 6px;
}

.friend-item.is-hidden {
    opacity: 0.5;
}

.friend-item.is-hidden .friend-avatar {
    filter: grayscale(1);
}

.friend-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.friend-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #ccc;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.friend-action-btn:hover {
    background: #f0f0f0;
    color: var(--text-muted);
}

.friend-action-btn.hide-btn:hover {
    color: var(--primary);
}

.friend-action-btn.remove-btn:hover {
    color: #e53935;
    background: #fff0f0;
}

.friend-action-btn svg {
    width: 16px;
    height: 16px;
}

.friend-meta {
    font-size: 11px;
    color: #888;
    margin-top: 1px;
}

.friends-empty {
    color: #aaa;
    font-size: 13px;
    text-align: center;
    padding: 16px 0;
}

/* Badge ami sur les film-cards */
.friend-badge {
    display: none;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #7c3aed;
    background: #f3eeff;
    border: 1px solid #ddd6fe;
    border-radius: 20px;
    padding: 2px 8px;
    margin-left: 6px;
    vertical-align: middle;
    font-weight: 600;
    var(--card-solid)-space: nowrap;
    cursor: default;
}

body.show-friend-badges .friend-badge {
    display: inline-flex;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.toast {
    padding: 12px 24px;
    border-radius: 12px;
    font-family: 'healTheWebA', sans-serif;
    font-size: 14px;
    color: var(--card-solid);
    background: var(--primary);
    box-shadow: 0 8px 32px rgba(68, 76, 247, 0.3);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    pointer-events: auto;
    var(--card-solid)-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-warning {
    background: #ff6b6b;
    box-shadow: 0 8px 32px rgba(255, 107, 107, 0.3);
}

/* Calendar Button Styles */
.horaire-wrapper {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
    gap: 4px;
    margin-left: 10px;
}

.horaire-wrapper .horaire {
    margin-left: 0;
}

.calendar-btn {
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.85;
    height: 28px;
}

.calendar-btn:hover {
    transform: scale(1.1);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(68, 76, 247, 0.4);
}

.calendar-btn svg {
    width: 16px;
    height: 16px;
    stroke: var(--card-solid);
}

.calendar-btn.added {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.calendar-btn.added svg {
    stroke: var(--card-solid);
}

@media (max-width: 576px) {
    .horaire-wrapper {
        margin-left: 5px;
    }

    .calendar-btn {
        padding: 4px 5px;
        height: 24px;
    }

    .calendar-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* Calendar Dropdown Menu */
.calendar-menu {
    position: absolute;
    background: var(--card-solid);
    border-radius: 8px;
    box-shadow: 0 4px 20px var(--shadow-md);
    padding: 6px;
    z-index: 1000;
    display: none;
    min-width: 160px;
}

.calendar-menu.show {
    display: block;
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calendar-menu-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: 'healTheWebA', sans-serif;
    font-size: 13px;
    color: var(--text-main);
    border-radius: 6px;
    transition: background 0.15s ease;
}

.calendar-menu-option:hover {
    background: #f0f0ff;
}

.calendar-menu-option svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Trailer Overlay Modal */
.trailer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.trailer-overlay.active {
    display: flex;
    opacity: 1;
}

.trailer-modal {
    position: relative;
    width: 90%;
    max-width: 900px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.trailer-overlay.active .trailer-modal {
    transform: scale(1);
}

.trailer-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.trailer-close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--card-solid);
    font-size: 30px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.trailer-close-btn:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .trailer-modal {
        width: 95%;
    }

    .trailer-close-btn {
        top: -35px;
        right: 10px;
    }
}