:root{
    --second-color: #ec1650; /*use colors easily readable on white background*/
    --second-color-shadow: #ec165008;
    --first-color: #171c22;
  }

/* ===== UX/UI IMPROVEMENTS ===== */

/* --- 1. Navigation : labels toujours visibles --- */
/* Supprimer le ::after hover puisqu'on injecte des labels permanents */
.navbar a[data-labeled="true"]::after {
    content: none !important;
    display: none !important;
}
.navbar a[data-labeled="true"] {
    border-radius: 5px !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.25rem !important;
    padding: 0.2rem 0.5rem !important;
    min-width: auto !important;
    width: auto !important;
    height: auto !important;
    min-height: 2rem !important;
}
.navbar a[data-labeled="true"] .nav-label {
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: none;
}

/* --- 2. Masquer TV Guide partout --- */
/* Top bar : bouton TV Guide (icône fa-tv) */
.navbar a:has(> i.fa-tv),
.navbar a:has(> svg.fa-tv) {
    display: none !important;
}
/* Fallback JS : marqué par data-tvguide-hidden */
[data-tvguide-hidden="true"] {
    display: none !important;
}

/* --- 3. Bandeau VOD (limitations navigateur) --- */
#vod-browser-notice {
    position: fixed;
    top: 3rem;
    left: 0;
    right: 0;
    z-index: 999;
    background-color: rgba(23, 28, 34, 0.95);
    border-bottom: 2px solid var(--second-color);
    color: #fff;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: "Proxima Nova", sans-serif;
    animation: vodNoticeSlideIn 0.3s ease-out;
}
@keyframes vodNoticeSlideIn {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}
#vod-browser-notice .vod-notice-icon {
    color: var(--second-color);
    font-size: 1rem;
    flex-shrink: 0;
}
#vod-browser-notice .vod-notice-text {
    flex: 1;
    text-align: center;
}
#vod-notice-dismiss {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 0 0.3rem;
    line-height: 1;
    flex-shrink: 0;
}
#vod-notice-dismiss:hover {
    opacity: 1;
}

/* --- 4. Masquer tous les boutons/liens Download --- */
/* Liens contenant l'icône fa-download (listes VOD, détails, etc.) */
a:has(> i.fa-download),
a:has(> svg.fa-download),
a:has(> i.fas.fa-download),
button:has(> i.fa-download),
button:has(> svg.fa-download) {
    display: none !important;
}
/* Bouton Download stylisé (page détail film/série) */
.btn:has(> i.fa-download),
.btn:has(> svg.fa-download) {
    display: none !important;
}
/* Fallback JS : marqué par data-download-hidden */
[data-download-hidden="true"] {
    display: none !important;
}

/* --- 5.1 Runtime feature toggles (movie/series) --- */
[data-feature-hidden="movie"],
[data-feature-hidden="series"] {
    display: none !important;
}

/* --- 5. Continue to Watch : boutons de suppression --- */

/* Bouton X sur chaque carte */
.ctw-remove-btn {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    width: 1.6rem;
    height: 1.6rem;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1rem;
    line-height: 1.6rem;
    text-align: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s, background-color 0.2s, transform 0.15s;
    pointer-events: auto;
    font-family: sans-serif;
    user-select: none;
}
/* Visible au hover de la carte */
[data-ctw-remove="true"]:hover .ctw-remove-btn {
    opacity: 1;
}
/* Hover sur le bouton X lui-même */
.ctw-remove-btn:hover {
    background: var(--second-color);
    opacity: 1 !important;
    transform: scale(1.15);
}
/* Mobile / tactile : toujours visible */
@media (hover: none), (max-width: 768px) {
    .ctw-remove-btn {
        opacity: 0.75;
    }
}

/* Bouton "Tout effacer" à côté du heading */
.ctw-clear-all {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.7rem;
    padding: 0.15rem 0.6rem;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 0.8rem;
    vertical-align: middle;
    transition: color 0.2s, border-color 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: "Proxima Nova", sans-serif;
}
.ctw-clear-all:hover {
    color: #fff;
    border-color: var(--second-color);
}

/* --- 6. Login Security (Rate Limit & Captcha UI) --- */
#service-admin-notice {
    position: fixed;
    top: 4rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
    max-width: min(90vw, 760px);
    width: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    color: #fff;
    background: rgba(23, 28, 34, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    animation: serviceNoticeIn 0.25s ease-out;
}
#service-admin-notice[data-level="warning"] {
    border-color: rgba(195, 135, 29, 0.45);
}
#service-admin-notice[data-level="success"] {
    border-color: rgba(31, 143, 95, 0.45);
}
#service-admin-notice[data-level="info"] {
    border-color: rgba(34, 92, 147, 0.45);
}
.service-notice-pill {
    flex-shrink: 0;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: var(--second-color);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.service-notice-text {
    line-height: 1.5;
    font-size: 0.9rem;
}
.service-notice-dismiss {
    border: 0;
    background: transparent;
    color: rgba(255,255,255,0.7);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.15rem;
}
.service-notice-dismiss:hover {
    color: #fff;
}
@keyframes serviceNoticeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

#sec-alert-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background: #ec1650;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 9999;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    pointer-events: none;
}
#sec-alert-toast.sec-alert-show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

#sec-captcha-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(23, 28, 34, 0.95);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 16px 24px;
    border-radius: 8px;
    z-index: 9999;
    font-weight: bold;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    font-size: 15px;
}

@media (max-width: 768px) {
    #service-admin-notice {
        top: auto;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        transform: none;
        max-width: none;
    }
    @keyframes serviceNoticeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}
