/* ==========================================================================
   WANO FLIX — design+ (boutons, paramètres, logos, calendrier, TV en direct,
   fluidité). Chargé après style.css et halloween-plus.css.
   ========================================================================== */
:root {
    --wp-accent: #ff5a1f;
    --wp-accent-2: #b042ff;
    --wp-surface: rgba(22, 12, 32, 0.78);
    --wp-surface-hi: rgba(40, 22, 58, 0.9);
    --wp-line: rgba(255, 255, 255, 0.09);
    --wp-line-hi: rgba(255, 140, 60, 0.45);
    --wp-text-dim: #b9adc7;
    --wp-radius: 12px;
    --wp-ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Boutons ---------- */
.btn {
    border-radius: 999px;
    padding: 11px 22px;
    letter-spacing: 0.2px;
    transition: transform 0.18s var(--wp-ease), box-shadow 0.18s var(--wp-ease), background-color 0.18s, border-color 0.18s;
    will-change: transform;
}
.btn-sm { padding: 7px 14px; }
.btn:active { transform: scale(0.97) !important; }
.btn:focus-visible, .filter-btn:focus-visible, .settings-nav-btn:focus-visible, .iptv-channel:focus-visible, .cal-item:focus-visible {
    outline: 2px solid #ffb37a; outline-offset: 2px;
}
.btn-primary {
    background: linear-gradient(135deg, #ff5a1f 0%, #e5133a 100%);
    box-shadow: 0 6px 20px rgba(229, 19, 58, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover { background: linear-gradient(135deg, #ff6d33 0%, #f01d45 100%); transform: translateY(-1px); box-shadow: 0 10px 26px rgba(229, 19, 58, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn-secondary {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: none;
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.13); border-color: rgba(255, 255, 255, 0.28); transform: translateY(-1px); }
.filter-btn, .subcat-pill, .auth-tab-btn {
    border-radius: 999px !important;
    transition: background-color 0.18s, border-color 0.18s, color 0.18s, transform 0.18s var(--wp-ease) !important;
}
.filter-btn:hover, .subcat-pill:hover { transform: translateY(-1px); }
.filter-btn.active { background: linear-gradient(135deg, #ff5a1f, #e5133a) !important; border-color: transparent !important; color: #fff !important; box-shadow: 0 6px 18px rgba(229, 19, 58, 0.35); }
.btn-icon, .btn-nav-icon { border-radius: 50% !important; transition: background-color 0.18s, transform 0.18s var(--wp-ease); }
.btn-icon:hover, .btn-nav-icon:hover { transform: scale(1.08); }
.modal-close { transition: transform 0.2s var(--wp-ease), background-color 0.2s; }
.modal-close:hover { transform: rotate(90deg); }

/* ---------- Paramètres ---------- */
.settings-card { border-radius: 18px; border: 1px solid var(--wp-line); background: linear-gradient(180deg, #150a1f 0%, #0d0614 100%); }
.settings-header { gap: 14px; }
.settings-search-box { border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--wp-line); transition: border-color 0.2s; }
.settings-search-box:focus-within { border-color: var(--wp-line-hi); }
.settings-sidebar { padding: 12px 10px; gap: 4px; }
.settings-nav-btn {
    border-radius: 10px !important; padding: 11px 12px !important; gap: 10px;
    border: 1px solid transparent !important; background: transparent !important;
    transition: background-color 0.18s, border-color 0.18s, color 0.18s !important;
}
.settings-nav-btn:hover { background: rgba(255, 255, 255, 0.05) !important; }
.settings-nav-btn.active { background: rgba(255, 90, 31, 0.12) !important; border-color: rgba(255, 90, 31, 0.45) !important; color: #fff !important; box-shadow: inset 3px 0 0 var(--wp-accent); }
.settings-grid-150, .featured-binge-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important; gap: 12px !important; }
.setting-card-item {
    display: flex !important; flex-wrap: wrap; align-items: center !important; justify-content: space-between !important; gap: 12px 16px !important;
    padding: 14px 16px !important; border-radius: var(--wp-radius) !important; min-height: 0 !important;
    background: rgba(255, 255, 255, 0.035) !important; border: 1px solid var(--wp-line) !important;
    transition: border-color 0.2s, background-color 0.2s !important;
}
.setting-card-item:hover { border-color: rgba(255, 255, 255, 0.18) !important; background: rgba(255, 255, 255, 0.055) !important; }
.setting-card-item.setting-active-card { border-color: rgba(255, 90, 31, 0.4) !important; background: rgba(255, 90, 31, 0.06) !important; }
.setting-card-info { flex: 1 1 200px; min-width: 0; }
.setting-card-title { display: flex !important; align-items: center; gap: 8px; font-size: 14px !important; line-height: 1.35 !important; font-weight: 700; }
.setting-card-desc { margin-top: 4px; font-size: 12.5px !important; line-height: 1.45 !important; color: var(--wp-text-dim) !important; }
.setting-num-tag { flex-shrink: 0; font-size: 10.5px !important; opacity: 0.75; }
.setting-card-control { flex-shrink: 0; margin-left: auto; }
.setting-card-control select, .settings-content select {
    max-width: 190px; padding: 8px 30px 8px 12px; border-radius: 10px; border: 1px solid var(--wp-line);
    background: #1b0f27 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffb37a' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
    color: #fff; appearance: none; -webkit-appearance: none; font-size: 13px; cursor: pointer;
}
.wano-switch .wano-slider { transition: background-color 0.2s; }
.settings-cat-header { padding-bottom: 10px; border-bottom: 1px solid var(--wp-line); margin-bottom: 14px; }
@media (max-width: 768px) {
    .settings-grid-150 { grid-template-columns: 1fr !important; }
}

/* ---------- Logos des services ---------- */
.brand-logo-card { transition: transform 0.22s var(--wp-ease), box-shadow 0.22s, border-color 0.22s; }
.brand-logo-card:hover { transform: translateY(-4px); }
.brand-mark { display: inline-flex; align-items: center; gap: 9px; height: 34px; color: var(--brand-color, #fff); }
.brand-icon {
    width: 26px; height: 26px; flex-shrink: 0; background: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
.brand-word { font-family: 'Inter', system-ui, sans-serif; font-weight: 800; font-size: 19px; letter-spacing: 0.3px; white-space: nowrap; }
.brand-mark-netflix { color: #e50914; }
.brand-mark-netflix .brand-word { font-weight: 900; letter-spacing: 2px; font-size: 21px; }
.brand-mark-crunchyroll { color: #f47521; }
.brand-mark-crunchyroll .brand-word { text-transform: lowercase; }
.brand-mark-disney { color: #fff; }
.brand-mark-disney .brand-word { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 24px; background: linear-gradient(90deg, #a6c8ff, #fff 45%, #6be3ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-mark-prime { color: #1a98ff; }
.brand-mark-prime .brand-word { color: #fff; font-weight: 700; text-transform: lowercase; }
.brand-mark-paramount { color: #3b82ff; }
.brand-mark-max { color: #b066ff; }
.brand-mark-max .brand-word { font-size: 23px; font-weight: 900; text-transform: lowercase; }
.brand-mark-apple { color: #f2f2f2; }

/* ---------- Calendrier (frise par jour) ---------- */
.calendar-grid.calendar-timeline { display: flex; flex-direction: column; gap: 22px; padding: 20px 4% 60px; position: relative; z-index: 10; }
.cal-empty { color: var(--wp-text-dim); text-align: center; padding: 50px 10px; }
.cal-day-head { position: sticky; top: 64px; z-index: 5; display: flex; align-items: baseline; gap: 12px; padding: 10px 4px; margin-bottom: 10px; background: linear-gradient(180deg, rgba(10, 5, 16, 0.96) 70%, rgba(10, 5, 16, 0)); }
.cal-day-main { font-size: 20px; font-weight: 800; color: #fff; }
.cal-day-sub { font-size: 13px; color: var(--wp-text-dim); }
.cal-day-count { margin-left: auto; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: 12px; font-weight: 700; color: var(--wp-text-dim); }
.cal-day-today .cal-day-main { color: #ff7a3d; }
.cal-day-today .cal-day-main::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: #ff3b3b; box-shadow: 0 0 10px #ff3b3b; vertical-align: middle; animation: wp-pulse 1.6s infinite; }
.cal-day-past { opacity: 0.6; }
.cal-day-items { display: grid; position: relative; z-index: 1; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.cal-item {
    display: flex; gap: 12px; align-items: stretch; padding: 10px; text-align: left; cursor: pointer;
    border-radius: var(--wp-radius); border: 1px solid var(--wp-line); background: var(--wp-surface); color: #fff;
    transition: transform 0.18s var(--wp-ease), border-color 0.18s, background-color 0.18s;
}
.cal-item:hover { transform: translateY(-2px); border-color: var(--wp-line-hi); background: var(--wp-surface-hi); }
.cal-poster { width: 64px; height: 96px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: #1a0f24; }
.cal-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-kind { font-size: 11px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; color: #ffb37a; }
.cal-kind-series .cal-kind { color: #7cc4ff; }
.cal-kind-anime .cal-kind { color: #ff8fd0; }
.cal-title { font-size: 15px; font-weight: 800; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cal-label { font-size: 12.5px; color: var(--wp-text-dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cal-rating { margin-top: auto; font-size: 12px; font-weight: 800; color: #ffc24a; }
@keyframes wp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (max-width: 640px) {
    .cal-day-items { grid-template-columns: 1fr; }
    .cal-day-head { top: 56px; }
}

/* ---------- TV en direct ---------- */
.nav-link-live { display: inline-flex !important; align-items: center; gap: 7px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff2a2a; box-shadow: 0 0 8px #ff2a2a; animation: wp-pulse 1.6s infinite; }
.iptv-view { padding: 90px 4% 60px; position: relative; z-index: 10; }
/* Pendant la TV, la sorcière et la pénombre de nuit laissent l'écran tranquille */
body.wp-iptv .hp-witch-wrap, body.wp-iptv .hp-darkness, body.wp-iptv .hp-whisper { display: none !important; }
.iptv-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.iptv-player-wrap { position: sticky; top: 80px; border-radius: 14px; overflow: hidden; border: 1px solid var(--wp-line); background: #000; }
.iptv-video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.iptv-now { display: flex; align-items: center; gap: 9px; padding: 12px 14px; font-weight: 700; background: var(--wp-surface); }
.iptv-now-group { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--wp-text-dim); }
.iptv-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.iptv-search { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--wp-line); background: rgba(255, 255, 255, 0.05); color: var(--wp-text-dim); }
.iptv-search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; color: #fff; font-size: 14px; }
.iptv-groups { display: flex; flex-wrap: wrap; gap: 6px; }
.iptv-group { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--wp-line); background: rgba(255, 255, 255, 0.04); color: var(--wp-text-dim); font-size: 12px; font-weight: 700; cursor: pointer; transition: background-color 0.18s, color 0.18s; }
.iptv-group:hover { color: #fff; }
.iptv-group.active { background: #ff5a1f; border-color: transparent; color: #fff; }
.iptv-list { display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - 290px); overflow-y: auto; padding-right: 4px; overscroll-behavior: contain; }
.iptv-channel { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; background: var(--wp-surface); color: #fff; text-align: left; cursor: pointer; transition: background-color 0.15s, border-color 0.15s; }
.iptv-channel:hover { background: var(--wp-surface-hi); }
.iptv-channel.active { border-color: #ff5a1f; background: rgba(255, 90, 31, 0.12); }
.iptv-logo { position: relative; display: flex; align-items: center; justify-content: center; width: 54px; height: 34px; flex-shrink: 0; border-radius: 6px; background: rgba(255, 255, 255, 0.92); color: #555; overflow: hidden; }
.iptv-logo img { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); object-fit: contain; background: rgba(255, 255, 255, 0.92); }
.iptv-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) {
    .iptv-view { padding: 76px 12px 100px; }
    .iptv-layout { grid-template-columns: 1fr; }
    .iptv-player-wrap { position: relative; top: 0; }
    .iptv-list { max-height: none; }
}

/* ---------- Bannière du 31 octobre : en bas pour ne plus cacher les titres ---------- */
.hp-banner { top: auto !important; bottom: 18px; }
@media (max-width: 768px) { .hp-banner { bottom: 132px; } }

/* ---------- Fluidité ---------- */
.carousel-track { contain: layout paint; }
/* Onglet en arrière-plan : toutes les animations du décor sont suspendues */
.wp-hidden .halloween-ambient-layer *, .wp-hidden .hp-witch-wrap * { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
    .btn, .filter-btn, .cal-item, .brand-logo-card { transition: none !important; }
}

.iptv-country { width: 100%; padding: 10px 34px 10px 14px; border-radius: 12px; border: 1px solid var(--wp-line); color: #fff; font-size: 14px; cursor: pointer; appearance: none; -webkit-appearance: none;
    background: #1b0f27 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffb37a' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
.iptv-groups { flex-direction: column; flex-wrap: nowrap; }
.iptv-official { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.iptv-official-title { width: 100%; font-size: 12px; color: var(--wp-text-dim); }
.iptv-official-link { padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05); color: #fff; font-size: 12px; font-weight: 700; text-decoration: none; transition: background-color 0.15s; }
.iptv-official-link:hover { background: rgba(255, 255, 255, 0.14); }
.iptv-official-link i { font-size: 10px; opacity: 0.7; }
.iptv-country-tag { margin-left: auto; font-size: 11px; color: var(--wp-text-dim); white-space: nowrap; }
.iptv-more { margin: 6px auto; }
.iptv-list { contain: content; }

/* Avertissement dans le lecteur vidéo */
.wp-player-warning { position: relative; z-index: 6; display: flex; align-items: flex-start; gap: 10px; padding: 9px 14px;
    background: #3a2a00; border-bottom: 1px solid #b38600; color: #ffe9a8; font-size: 13px; line-height: 1.4; }
.wp-player-warning i { color: #ffc400; margin-top: 2px; }
.wp-player-warning span { flex: 1; }
.wp-player-warning button { background: none; border: none; color: #ffe9a8; font-size: 15px; cursor: pointer; padding: 0 4px; }
