/* ==========================================================================
   FRYNZY IOS PLAYLIST & IMMERSIVE PLAYER STYLES (CYPHER ENGINE)
   Pure iPhone Frosted Glass (Gelée Cristalline, Blur, Luminous Borders)
   ========================================================================== */

/* --- 1. Tiroir Menu 3-Barres Style iPhone --- */
.frynzy-ios-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10009100 !important;
    opacity: 0;
    pointer-events: none !important;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.frynzy-ios-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto !important;
    visibility: visible !important;
}

.frynzy-ios-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 86%;
    max-width: 360px;
    height: 100%;
    background: rgba(255, 255, 255, 0.88);
    background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(243, 244, 246, 0.82) 100%);
    backdrop-filter: blur(50px) saturate(200%);
    -webkit-backdrop-filter: blur(50px) saturate(200%);
    border-right: 1.5px solid rgba(255, 255, 255, 0.95);
    box-shadow: 15px 0 45px rgba(0, 0, 0, 0.12), inset -1px 0 3px rgba(255, 255, 255, 0.9);
    z-index: 10009101 !important;
    transform: translateX(-100%);
    transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    padding: calc(max(var(--sat, 24px), env(safe-area-inset-top, 24px)) + 12px) 12px calc(max(var(--sab, 20px), env(safe-area-inset-bottom, 20px)) + 60px) 12px;
    box-sizing: border-box;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    overscroll-behavior-y: contain !important;
    color: #111827;
}
.frynzy-ios-drawer.open {
    transform: translateX(0);
}

.frynzy-ios-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 0 4px;
    flex-shrink: 0 !important;
}
.frynzy-ios-drawer-title {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: #111827;
}
.frynzy-ios-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s ease, transform 0.15s ease;
}
.frynzy-ios-close-btn:active {
    transform: scale(0.92);
    background: rgba(0, 0, 0, 0.12);
}

/* Sections du tiroir */
.frynzy-ios-section-header {
    font-size: 0.74rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 0.6px;
    margin: 20px 8px 8px 8px;
    flex-shrink: 0 !important;
}

.frynzy-ios-card {
    background: rgba(255, 255, 255, 0.76);
    border: 1.5px solid rgba(255, 255, 255, 0.98);
    border-radius: 18px;
    overflow: hidden;
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04), inset 0 1px 2px rgba(255, 255, 255, 1);
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0 !important;
    height: auto !important;
    min-height: -webkit-min-content !important;
    min-height: min-content !important;
}

.frynzy-ios-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.15s ease;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    gap: 8px;
    flex-shrink: 0 !important;
}
.frynzy-ios-row:last-child {
    border-bottom: none;
}
.frynzy-ios-row:active {
    background: rgba(0, 0, 0, 0.03);
}

.frynzy-ios-row-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}
.frynzy-ios-row-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #64748b !important;
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(14px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.85), 0 3px 8px rgba(0, 0, 0, 0.07) !important;
    transition: transform 0.15s ease, background 0.2s ease;
    flex-shrink: 0;
}
.frynzy-ios-row-icon i,
.frynzy-ios-row-icon svg {
    color: #64748b !important;
    fill: #64748b !important;
}
.frynzy-ios-row-icon.playlist-icon,
.frynzy-ios-row-icon.settings-icon,
.frynzy-ios-row-icon.pause-icon,
.frynzy-ios-row-icon.sleep-icon,
.frynzy-ios-row-icon.activation-icon {
    background: rgba(255, 255, 255, 0.65) !important;
    color: #64748b !important;
}
body.dark-theme .frynzy-ios-row-icon,
[data-theme="dark"] .frynzy-ios-row-icon {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3), 0 3px 8px rgba(0, 0, 0, 0.25) !important;
    color: #94a3b8 !important;
}
body.dark-theme .frynzy-ios-row-icon i,
[data-theme="dark"] .frynzy-ios-row-icon i {
    color: #94a3b8 !important;
}

.frynzy-ios-row-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    letter-spacing: -0.2px;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.frynzy-ios-plus-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}
.frynzy-ios-plus-btn:active {
    background: rgba(0, 0, 0, 0.12);
    color: #111827;
    transform: scale(0.92);
}

.frynzy-ios-row-cog {
    color: #9ca3af;
    font-size: 1.15rem;
}

/* Switches iOS en verre flouté */
.frynzy-ios-switch {
    position: relative;
    width: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    flex-shrink: 0 !important;
    background: rgba(120, 120, 128, 0.2);
    border-radius: 20px !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: background 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box !important;
    display: inline-block;
    vertical-align: middle;
}
.frynzy-ios-switch::after {
    content: '';
    position: absolute;
    top: 2px !important;
    left: 2px !important;
    width: 22px !important;
    height: 22px !important;
    background: #ffffff;
    border-radius: 50% !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box !important;
}
.frynzy-ios-switch.active {
    background: #34c759 !important;
    border-color: #34c759 !important;
    box-shadow: 0 2px 10px rgba(52, 199, 89, 0.4);
}
.frynzy-ios-switch.active::after {
    transform: translateX(22px) !important;
}

/* --- 2. Vues Écrans Plein Écran (Playlists & Sous-pages) --- */
.frynzy-ios-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f8fafc;
    background-image: radial-gradient(at 10% 10%, rgba(255, 255, 255, 0.96) 0px, transparent 65%),
                      radial-gradient(at 90% 90%, rgba(241, 245, 249, 0.92) 0px, transparent 65%),
                      url('../img/iphone-crystal-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 10000050 !important;
    display: none;
    flex-direction: column;
    box-sizing: border-box;
    color: #000000;
    animation: frynzySlideInRight 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.frynzy-ios-page.active {
    display: flex;
}
@keyframes frynzySlideInRight {
    from { transform: translateX(100%); opacity: 0.9; }
    to   { transform: translateX(0); opacity: 1; }
}
@keyframes frynzySlideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to   { transform: translateX(100%); opacity: 0.9; }
}

.frynzy-ios-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: calc(52px + max(var(--sat, 48px), env(safe-area-inset-top, 48px)));
    height: calc(52px + max(var(--sat, 48px), env(safe-area-inset-top, 48px)));
    padding: max(var(--sat, 48px), env(safe-area-inset-top, 48px)) 16px 0 16px;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    position: sticky;
    top: 0;
    z-index: 10;
}
.frynzy-ios-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.frynzy-ios-back-btn {
    background: none;
    border: none;
    font-size: 1.15rem;
    color: #007aff;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.frynzy-ios-back-btn:active {
    opacity: 0.6;
}
.frynzy-ios-page-title {
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #000000;
}
.frynzy-ios-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.frynzy-ios-header-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #007aff;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.frynzy-ios-header-btn:active {
    opacity: 0.6;
}

/* Barre de recherche style iPhone */
.frynzy-ios-searchbar-wrap {
    padding: 8px 16px;
    background: #f2f2f7;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: none;
}
.frynzy-ios-searchbar-wrap.open {
    display: block;
    animation: frynzyFadeIn 0.2s ease;
}
.frynzy-ios-search-input-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(142, 142, 147, 0.16);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 10px;
    padding: 7px 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}
.frynzy-ios-search-input-box i {
    color: #8e8e93;
    font-size: 0.95rem;
}
.frynzy-ios-search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.98rem;
    color: #000000;
    width: 100%;
    font-family: inherit;
}
.frynzy-ios-search-input::placeholder {
    color: #8e8e93;
}

.frynzy-ios-page-content {
    flex: 1;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 16px;
    box-sizing: border-box;
    background: #f8fafc;
    will-change: scroll-position;
    overscroll-behavior-y: contain !important;
}

/* Section blocs blancs */
.frynzy-ios-white-section {
    background: rgba(242, 242, 247, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 22px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04), inset 0 1px 2px rgba(255, 255, 255, 0.8);
}
.frynzy-ios-white-row {
    background: rgba(255, 255, 255, 0.82);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: background 0.15s;
}
.frynzy-ios-white-row:last-child {
    border-bottom: none;
}
.frynzy-ios-white-row:active {
    background: #ebebed;
}
.frynzy-ios-white-row-label {
    font-size: 1rem;
    font-weight: 500;
    color: #000000;
}
.frynzy-ios-chevron {
    color: #c7c7cc;
    font-size: 0.9rem;
}

/* Liste des playlists créées */
.frynzy-playlist-card {
    background: #ffffff;
    border: 1px solid #e5e5ea;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.frynzy-playlist-card:active {
    transform: scale(0.98);
}
.frynzy-playlist-collage-4 {
    width: 58px;
    height: 58px;
    border-radius: 10px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    background: #e5e5ea;
    flex-shrink: 0;
}
.frynzy-playlist-collage-4 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.frynzy-playlist-collage-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #007aff, #5856d6);
    color: #ffffff;
    font-size: 0.75rem;
}
.frynzy-playlist-info {
    flex: 1;
    overflow: hidden;
}
.frynzy-playlist-name {
    font-size: 1.02rem;
    font-weight: 600;
    color: #000000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.frynzy-playlist-count {
    font-size: 0.82rem;
    color: #8e8e93;
    margin-top: 3px;
}

/* --- 3. Écran Nouveau Playlist --- */
.frynzy-ios-input-group {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e5ea;
    overflow: hidden;
    margin-bottom: 20px;
}
.frynzy-ios-input-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #636366;
    padding: 10px 16px 4px 16px;
}
.frynzy-ios-input {
    width: 100%;
    border: none;
    outline: none;
    padding: 10px 16px 14px 16px;
    font-size: 1.05rem;
    font-family: inherit;
    color: #000000;
    box-sizing: border-box;
}
.frynzy-ios-input::placeholder {
    color: #c7c7cc;
}

/* Pilule limite */
.frynzy-ios-pill-value {
    background: rgba(142, 142, 147, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #007aff;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 16px;
}

/* --- 4. Modales & Bottom Sheets en Verre Cristal --- */
.frynzy-crystal-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10005000 !important;
    display: none;
    align-items: flex-end;
    justify-content: center;
}
.frynzy-crystal-modal-backdrop.active {
    display: flex;
    animation: frynzyFadeIn 0.2s ease;
}

.frynzy-crystal-bottom-sheet {
    width: 100%;
    max-width: 480px;
    background: rgba(242, 242, 247, 0.92);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 22px 22px 0 0;
    padding: 16px 20px calc(env(safe-area-inset-bottom, 16px) + 20px) 20px;
    box-sizing: border-box;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
    animation: frynzySheetUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}
@keyframes frynzySheetUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.frynzy-sheet-handle {
    width: 36px;
    height: 5px;
    background: #c7c7cc;
    border-radius: 3px;
    margin: 0 auto 14px auto;
}
.frynzy-sheet-title {
    font-size: 1.15rem;
    font-weight: 700;
    text-align: center;
    color: #000000;
    margin-bottom: 16px;
}
.frynzy-sheet-options {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e5e5ea;
}
.frynzy-sheet-opt-row {
    padding: 15px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f2f2f7;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #000000;
    transition: background 0.15s;
}
.frynzy-sheet-opt-row:last-child {
    border-bottom: none;
}
.frynzy-sheet-opt-row:active {
    background: #f2f2f7;
}
.frynzy-sheet-opt-row.disabled {
    color: #8e8e93;
    opacity: 0.55;
    cursor: not-allowed;
}

/* Modale Compteur Personnalisé en Verre Cristal */
.frynzy-counter-modal-dialog {
    width: 90%;
    max-width: 330px;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 24px;
    padding: 24px 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.16) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #111827 !important;
    margin: auto;
}
.frynzy-counter-title {
    font-size: 1.18rem;
    font-weight: 700;
    margin-bottom: 18px;
    text-align: center;
    color: #111827 !important;
}
.frynzy-counter-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
}
.frynzy-counter-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #111827 !important;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: background 0.15s, transform 0.1s;
}
.frynzy-counter-btn:active {
    background: rgba(0, 0, 0, 0.12) !important;
    transform: scale(0.92);
}
.frynzy-counter-display {
    min-width: 60px;
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #111827 !important;
}
.frynzy-counter-apply-btn {
    width: 100%;
    padding: 13px;
    background: #007aff !important;
    border: none;
    border-radius: 14px;
    color: #ffffff !important;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.frynzy-counter-apply-btn:active {
    background: #0062cc !important;
}

/* --- 5. Écran Importation de Musique (4/4 Chunking & Filtres) --- */
.frynzy-import-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f2f2f7;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.frynzy-filter-chips {
    display: flex;
    gap: 8px;
}
.frynzy-filter-chip {
    padding: 6px 14px;
    border-radius: 16px;
    background: rgba(142, 142, 147, 0.14);
    border: none;
    font-size: 0.88rem;
    font-weight: 600;
    color: #000000;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.frynzy-filter-chip.active {
    background: #007aff;
    color: #ffffff;
}
.frynzy-sd-toggle-btn {
    background: rgba(142, 142, 147, 0.14);
    border: none;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #007aff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.frynzy-audio-list-container {
    padding: 10px 16px;
}
.frynzy-audio-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: background 0.15s, transform 0.1s;
    user-select: none;
    -webkit-user-select: none;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    contain: layout style !important;
    will-change: transform !important;
    min-height: 68px !important;
    box-sizing: border-box !important;
}
.frynzy-audio-row.selected {
    background: rgba(240, 247, 255, 0.92);
    border-color: #007aff;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.18), inset 0 1px 2px rgba(255, 255, 255, 0.95);
}
.frynzy-audio-row-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    overflow: hidden;
}
.frynzy-audio-thumb {
    width: 44px;
    height: 44px;
    border-radius: 9px;
    background: #e5e5ea;
    object-fit: cover;
    flex-shrink: 0;
}
.frynzy-audio-meta {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.frynzy-audio-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #000000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.frynzy-audio-sub {
    font-size: 0.78rem;
    color: #8e8e93;
    margin-top: 2px;
}

.frynzy-audio-select-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #c7c7cc;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.frynzy-audio-select-btn.checked {
    background: #34c759;
    border-color: #34c759;
    color: #ffffff;
    transform: scale(1.05);
}

/* --- 6. Tutoriel Interactif avec Main Animée --- */
.frynzy-tutorial-card {
    background: linear-gradient(135deg, #007aff, #5856d6);
    color: #ffffff;
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 16px;
    box-shadow: 0 4px 18px rgba(0, 122, 255, 0.35);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.frynzy-tutorial-text {
    font-size: 0.94rem;
    line-height: 1.4;
    font-weight: 500;
}
.frynzy-tutorial-btn {
    align-self: flex-start;
    padding: 8px 18px;
    background: #ffffff;
    color: #007aff;
    border: none;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.frynzy-tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    z-index: 100015;
    display: none;
    pointer-events: none !important;
}
.frynzy-tutorial-overlay.active {
    display: block;
}

/* Flouter les pistes non ciblées pendant le tutoriel pour que SEULE la musique ciblée soit nette et cliquable */
.frynzy-tutorial-active #frynzySetupTracksContainer .frynzy-audio-row:not(.frynzy-spotlight-audio) {
    pointer-events: auto !important;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.frynzy-tutorial-active .frynzy-ios-page-header,
.frynzy-tutorial-active .frynzy-tutorial-card {
    pointer-events: auto !important;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

/* La piste sélectionnée reste 100% nette, cristalline, sans aucun flou et sélectionnable immédiatement */
.frynzy-spotlight-audio {
    position: relative !important;
    z-index: 100025 !important;
    filter: none !important;
    -webkit-filter: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    background: #ffffff !important;
    border-radius: 14px !important;
    border: 2.5px solid #007aff !important;
    box-shadow: 0 0 0 6px rgba(0, 122, 255, 0.28), 0 14px 35px rgba(0, 0, 0, 0.18) !important;
    transform: scale(1.02);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.frynzy-animated-hand {
    position: fixed !important;
    width: 56px;
    height: 56px;
    z-index: 100030;
    pointer-events: none !important;
    fill: #007aff !important;
    color: #007aff !important;
    filter: drop-shadow(0 4px 14px rgba(0, 122, 255, 0.6));
    transform: translate(-50%, -50%);
    animation: frynzyHandPress 1.6s infinite ease-in-out;
}
@keyframes frynzyHandPress {
    0%   { transform: translate(-50%, -50%) scale(1.18); opacity: 0; }
    25%  { transform: translate(-50%, -50%) scale(1.06); opacity: 1; }
    50%  { transform: translate(-50%, -50%) scale(0.86); filter: drop-shadow(0 0 16px rgba(0, 122, 255, 0.9)); }
    75%  { transform: translate(-50%, -50%) scale(1.0); }
    100% { transform: translate(-50%, -50%) scale(1.0); opacity: 1; }
}

/* --- 7. Widget Flottant Circulaire (Bordure Lumineuse Rotative) --- */
.frynzy-floating-widget {
    position: fixed;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    bottom: 95px;
    right: 20px;
    z-index: 99990;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.frynzy-floating-widget.active {
    display: flex;
}

/* Anneau lumineux rotatif qui change progressivement de couleur */
.frynzy-widget-glow-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #ff007f, #7928ca, #0070f3, #00dfd8, #7928ca, #ff007f);
    animation: frynzySpinGlow 3.5s linear infinite;
    z-index: 1;
    filter: drop-shadow(0 0 8px rgba(255, 0, 127, 0.6));
}
@keyframes frynzySpinGlow {
    0%   { transform: rotate(0deg); filter: drop-shadow(0 0 8px #ff007f) hue-rotate(0deg); }
    50%  { filter: drop-shadow(0 0 12px #00dfd8) hue-rotate(180deg); }
    100% { transform: rotate(360deg); filter: drop-shadow(0 0 8px #ff007f) hue-rotate(360deg); }
}

.frynzy-widget-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: #1c1c1e;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}
.frynzy-widget-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- 8. Lecteur Immersif Dédié en Verre Cristal iPhone --- */
.frynzy-ios-player-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 10001000 !important;
    display: none;
    flex-direction: column;
    overflow: hidden;
    color: #ffffff;
    box-sizing: border-box;
    animation: frynzyPlayerSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.frynzy-ios-player-modal.active {
    display: flex !important;
}
@keyframes frynzyPlayerSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* Arrière-plan flouté de la musique en cours */
.frynzy-player-backdrop-img {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background-size: cover;
    background-position: center;
    filter: blur(50px) brightness(0.45);
    -webkit-filter: blur(50px) brightness(0.45);
    z-index: 1;
    transform: scale(1.1);
}
.frynzy-player-crystal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 25, 0.45);
    backdrop-filter: blur(35px) saturate(160%);
    -webkit-backdrop-filter: blur(35px) saturate(160%);
    z-index: 2;
}

.frynzy-player-content-wrap {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-top: 0 !important;
    padding-bottom: max(var(--sab, 16px), env(safe-area-inset-bottom, 16px));
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.frynzy-player-topbar {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box !important;
    /* Poussé strictement sous la barre d'état système avec min-height = 52px + status bar */
    padding-top: max(var(--sat, 48px), env(safe-area-inset-top, 48px)) !important;
    min-height: calc(52px + max(var(--sat, 48px), env(safe-area-inset-top, 48px))) !important;
    height: calc(52px + max(var(--sat, 48px), env(safe-area-inset-top, 48px))) !important;
    padding-bottom: 6px;
    margin-top: 0 !important;
    margin-bottom: 8px;
    flex-shrink: 0;
    z-index: 10;
}
.frynzy-player-top-left {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
    height: 40px;
}
.frynzy-player-playlist-thumb {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}
.frynzy-player-playlist-thumb.is-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}
.frynzy-player-playlist-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.frynzy-playlist-thumb-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #ff2d55, #af52de);
}
.frynzy-player-topbar-center {
    position: absolute;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: calc(100% - 150px);
    max-width: 220px;
    height: 40px;
    pointer-events: none;
    z-index: 1;
}
.frynzy-player-top-sub {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.1;
    margin-bottom: 2px;
}
.frynzy-player-top-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
}
.frynzy-player-top-right {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
}
.frynzy-timer-countdown-badge {
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 4px 10px;
    font-size: 0.85rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #ffffff;
    display: none;
}
.frynzy-timer-countdown-badge.active {
    display: block;
}

/* Scène centrale pour centrer verticalement la pochette et le titre */
.frynzy-player-center-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 0;
    margin: 6px 0;
    width: 100%;
}

/* Pochette centrale ultra-claire - responsive fluide pour tous ecrans & tablettes */
.frynzy-player-main-card {
    width: min(72vw, 42vh);
    max-width: 480px;
    max-height: 44vh;
    aspect-ratio: 1/1;
    margin: 0 auto 14px auto;
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.55);
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.frynzy-player-main-card:active {
    transform: scale(0.98);
}
.frynzy-player-main-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Titre avec animation défilante de gauche vers droite (Marquee) */
.frynzy-player-title-wrap {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    margin-bottom: 10px;
    text-align: center;
}
.frynzy-player-marquee-title {
    display: inline-block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
    animation: frynzyMarquee 12s linear infinite;
    padding-left: 100%;
}
@keyframes frynzyMarquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Visualiseur Fréquence Symétrique Temps Réel (0ms) */
.frynzy-visualizer-container {
    width: 100%;
    height: 52px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
#frynzySymmetricVisualizerCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* File d'attente : 2 chansons suivantes en verre flouté */
.frynzy-queue-section {
    background: rgba(44, 44, 46, 0.55);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 10px 12px;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}
.frynzy-queue-header {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(235, 235, 245, 0.6);
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.frynzy-queue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.frynzy-queue-item:last-child {
    border-bottom: none;
}
.frynzy-queue-thumb {
    width: 36px;
    height: 36px;
    border-radius: 7px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
}
.frynzy-queue-info {
    flex: 1;
    overflow: hidden;
}
.frynzy-queue-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.frynzy-queue-artist {
    font-size: 0.75rem;
    color: rgba(235, 235, 245, 0.5);
    margin-top: 1px;
}

/* Menu 3-points du lecteur - Dark Crystal Glass */
.frynzy-player-menu-dropdown {
    position: absolute;
    top: calc(var(--sat, 28px) + 54px);
    right: 16px;
    width: 260px;
    background: #1a1a24 !important;
    background: rgba(26, 26, 36, 0.96) !important;
    backdrop-filter: blur(35px) saturate(180%);
    -webkit-backdrop-filter: blur(35px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 18px !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.6) !important;
    z-index: 100065;
    padding: 8px;
    display: none;
    flex-direction: column;
    color: #ffffff !important;
}
.frynzy-player-menu-dropdown.open {
    display: flex !important;
    animation: frynzyFadeIn 0.2s ease;
}
.frynzy-menu-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border-radius: 10px;
    transition: background 0.15s;
}
.frynzy-menu-action-row:last-child {
    border-bottom: none !important;
}
.frynzy-menu-action-row:active {
    background: rgba(255, 255, 255, 0.1) !important;
}
.frynzy-menu-action-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: #ffffff !important;
}

/* --- Styles Multi-Sélection (Sélectionner plus) --- */
.frynzy-audio-row.multi-selected {
    background: rgba(230, 243, 255, 0.95) !important;
    border: 1.5px solid #007aff !important;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.22) !important;
}
.frynzy-batch-check-indicator {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #007aff;
    background: #007aff;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    margin-right: 8px;
    flex-shrink: 0;
}
.frynzy-batch-uncheck-indicator {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #c7c7cc;
    background: rgba(255, 255, 255, 0.8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    flex-shrink: 0;
}
.frynzy-setup-batch-dropdown,
#frynzyImportBatchMenu {
    position: absolute;
    top: calc(var(--sat, 28px) + 50px);
    right: 16px;
    width: 220px;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    z-index: 100085 !important;
    padding: 6px;
    display: none;
    flex-direction: column;
}
.frynzy-setup-batch-dropdown.open,
#frynzyImportBatchMenu.open {
    display: flex !important;
    animation: frynzyFadeIn 0.2s ease;
}
.frynzy-batch-opt-row {
    padding: 12px 14px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.15s ease;
}
.frynzy-batch-opt-row i {
    color: #007aff;
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
}
.frynzy-batch-opt-row:last-child {
    border-bottom: none;
}
.frynzy-batch-opt-row.danger {
    color: #ef4444 !important;
}
.frynzy-batch-opt-row.danger i {
    color: #ef4444 !important;
}
.frynzy-batch-opt-row:active {
    background: #f3f4f6 !important;
}

/* Animations génériques */
@keyframes frynzyFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ============================================================
 * HORIZON VISUALIZER — hauteur et ambiance style Yalantis Horizon
 * ============================================================ */
.frynzy-visualizer-container {
    width: 100%;
    height: 84px !important;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(26, 40, 44, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================================
 * FRYNZY EQUALIZER PAGE — Style WaveformEqualizer dark
 * ============================================================ */
.frynzy-eq-page {
    position: fixed;
    inset: 0;
    z-index: 10001150 !important;
    background: #ffffff !important;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    font-family: -apple-system, 'Outfit', system-ui, sans-serif;
    color: #0f172a !important;
    -webkit-user-select: none;
    user-select: none;
}
.frynzy-eq-page.open {
    transform: translateX(0);
}
/* Topbar */
.frynzy-eq-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: max(var(--sat, 48px), env(safe-area-inset-top, 48px));
    padding-bottom: 10px;
    padding-left: 12px;
    padding-right: 16px;
    min-height: calc(52px + max(var(--sat, 48px), env(safe-area-inset-top, 48px)));
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    flex-shrink: 0;
    box-sizing: border-box;
}
.frynzy-eq-page-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.2px;
    color: #0f172a !important;
    margin-left: 8px;
    flex: 1;
}
.frynzy-eq-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.frynzy-eq-nav-btn {
    background: none;
    border: none;
    color: #0f172a !important;
    font-size: 1.15rem;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}
.frynzy-eq-nav-btn:active { background: rgba(0,0,0,0.06); }
/* Toggle ON/OFF */
.frynzy-eq-toggle-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 5px 13px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}
.frynzy-eq-toggle-btn.active {
    background: #ef4444;
    border-color: #dc2626;
    color: #ffffff;
}
/* Canvas zone */
.frynzy-eq-canvas-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: stretch;
    padding: 14px 14px 6px 14px;
    box-sizing: border-box;
    background: #ffffff !important;
}
.frynzy-eq-canvas {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 16px;
    touch-action: none;
    background: #ffffff !important;
}
/* Label Présets */
.frynzy-eq-presets-label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #0f172a !important;
    padding: 8px 20px 4px 20px;
    flex-shrink: 0;
    background: #ffffff !important;
}
/* Rangée présets */
.frynzy-eq-presets-row {
    display: flex;
    gap: 8px;
    padding: 6px 16px 14px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
    background: #ffffff !important;
    scrollbar-width: none;
}
.frynzy-eq-presets-row::-webkit-scrollbar { display: none; }
.frynzy-eq-preset-btn {
    flex-shrink: 0;
    background: #475569 !important;
    border: 1.5px solid #64748b !important;
    color: #ffffff !important;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}
.frynzy-eq-preset-btn.active {
    background: #ef4444 !important;
    border: 1.5px solid #dc2626 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}
.frynzy-eq-preset-btn:active { transform: scale(0.95); }
/* Note info */
.frynzy-eq-info-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.76rem;
    color: #64748b !important;
    line-height: 1.45;
    padding: 8px 20px calc(max(var(--sab, 16px), env(safe-area-inset-bottom, 16px)) + 14px) 20px;
    background: #ffffff !important;
    flex-shrink: 0;
    border-top: 1px solid #f1f5f9;
}
.frynzy-eq-info-note i {
    margin-top: 2px;
    flex-shrink: 0;
    color: #64748b;
    font-size: 0.85rem;
}
/* Row EQ dans le drawer */
.frynzy-eq-drawer-row { cursor: pointer; }
.frynzy-eq-drawer-row:active { background: rgba(229,57,53,0.06); }

/* ============================================================
 * HIGH-PERFORMANCE LIST ISOLATION & Z-INDEX STACK OVERHAUL
 * ============================================================ */
#frynzySetupTracksContainer,
#frynzyImportAudioList,
.frynzy-audio-list-container,
#frynzyPlaylistsContainer,
#frynzyImportScrollContainer {
    contain: paint;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-overflow-scrolling: touch;
}

.frynzy-playlist-card {
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Modals & Sub-pages Z-Index Hierarchy:
 * Dedicated Player Modal: 100050
 * Player Dropdown Menu:   100065
 * Playlist Setup Page:    100070 (Displays ABOVE player modal)
 * Setup Batch Dropdown:   100075 (Dropdown inside setup page)
 * Import Music Page:      100080 (Displays ABOVE setup page)
 * Import Batch Menu:      100085 (Dropdown inside import page)
 * Modals & Sheets:        100090 (Top level popups & dialogs)
 * Tutorial & Spotlight:   100095
 */
#frynzyPlaylistSetupPage {
    z-index: 10009200 !important;
}
.frynzy-setup-batch-dropdown {
    z-index: 10009850 !important;
}
#frynzyImportMusicPage {
    z-index: 10009650 !important;
}
#frynzyImportBatchMenu {
    z-index: 10009850 !important;
}
.frynzy-crystal-modal-backdrop,
#frynzyLimitSheet,
#frynzyCustomCounterModal,
#frynzyHeureLectureModal,
#frynzyMinuterieModal,
#frynzyPlayerOptionsMenu,
.frynzy-player-menu-sheet {
    z-index: 10002100 !important;
}
#frynzyTutorialOverlay,
.frynzy-animated-hand {
    z-index: 10002200 !important;
}

/* Small mobile & floating popup window responsiveness for iPhone Drawer and Cards */
@media (max-width: 480px), (max-height: 720px) {
    .frynzy-ios-drawer {
        width: min(88%, 340px) !important;
        padding-top: calc(max(var(--sat, 12px), env(safe-area-inset-top, 12px)) + 8px) !important;
        padding-bottom: calc(max(var(--sab, 16px), env(safe-area-inset-bottom, 16px)) + 60px) !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    .frynzy-ios-drawer-header {
        margin-bottom: 16px !important;
    }
    .frynzy-ios-section-header {
        margin: 14px 6px 6px 6px !important;
        font-size: 0.74rem !important;
        letter-spacing: 0.5px !important;
    }
    .frynzy-ios-card {
        border-radius: 14px !important;
        margin-bottom: 6px !important;
    }
    .frynzy-ios-row {
        padding: 10px 12px !important;
        min-height: 48px !important;
        gap: 8px !important;
        align-items: center !important;
    }
    .frynzy-ios-row-left {
        gap: 10px !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    .frynzy-ios-row-icon {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        font-size: 0.95rem !important;
        border-radius: 10px !important;
        flex-shrink: 0 !important;
    }
    .frynzy-ios-row-label {
        font-size: 0.96rem !important;
        font-weight: 600 !important;
    }
    .frynzy-ios-plus-btn {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
        font-size: 0.95rem !important;
        flex-shrink: 0 !important;
    }
    .frynzy-ios-switch {
        width: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
        height: 28px !important;
        min-height: 28px !important;
        max-height: 28px !important;
        flex-shrink: 0 !important;
        border-radius: 20px !important;
    }
    .frynzy-ios-switch::after {
        width: 22px !important;
        height: 22px !important;
        top: 2px !important;
        left: 2px !important;
        border-radius: 50% !important;
    }
    .frynzy-ios-switch.active::after {
        transform: translateX(22px) !important;
    }
}


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE TABLETTES & GRANDS ECRANS — Lecteur Playlist
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 600px) {
    .frynzy-player-main-card {
        width: min(65vw, 44vh);
        max-width: 480px;
        max-height: 46vh;
        border-radius: 28px;
        box-shadow: 0 20px 55px rgba(0, 0, 0, 0.6);
    }
    .frynzy-player-marquee-title {
        font-size: 1.5rem;
    }
    .frynzy-player-title-wrap {
        max-width: 580px;
        margin-left: auto;
        margin-right: auto;
    }
    .frynzy-visualizer-container {
        max-width: 680px;
        height: 60px;
        margin-left: auto;
        margin-right: auto;
    }
    .frynzy-queue-section {
        max-width: 680px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding: 14px 18px;
    }
    .frynzy-player-menu-dropdown {
        width: 290px;
    }
}

@media (min-width: 768px) and (orientation: portrait) {
    .frynzy-player-main-card {
        width: min(60vw, 46vh);
        max-width: 520px;
        max-height: 48vh;
        border-radius: 32px;
        box-shadow: 0 24px 65px rgba(0, 0, 0, 0.65);
    }
    .frynzy-player-marquee-title {
        font-size: 1.7rem;
    }
    .frynzy-player-title-wrap {
        max-width: 680px;
    }
    .frynzy-visualizer-container {
        max-width: 760px;
        height: 68px;
    }
    .frynzy-queue-section {
        max-width: 760px;
    }
}

@media (min-width: 1024px) and (orientation: portrait) {
    .frynzy-player-main-card {
        width: min(54vw, 48vh);
        max-width: 580px;
        max-height: 50vh;
        border-radius: 36px;
    }
    .frynzy-player-marquee-title {
        font-size: 1.9rem;
    }
    .frynzy-visualizer-container {
        max-width: 820px;
        height: 74px;
    }
    .frynzy-queue-section {
        max-width: 820px;
    }
}

@media (min-width: 768px) and (orientation: landscape) {
    .frynzy-player-main-card {
        width: min(44vw, 50vh);
        max-width: 440px;
        max-height: 52vh;
        border-radius: 28px;
    }
    .frynzy-visualizer-container {
        max-width: 640px;
        height: 52px;
        margin-left: auto;
        margin-right: auto;
    }
    .frynzy-queue-section {
        max-width: 640px;
        margin-left: auto;
        margin-right: auto;
    }
}


/* ═══════════════════════════════════════════════════════════════
   STYLES PRO PLAYLIST & SÉLECTION TACTILE SANS FAILLE
   ═══════════════════════════════════════════════════════════════ */

/* Barre de recherche instantanée PRO dans le réglage de playlist */
.frynzy-playlist-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(142, 142, 147, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 0 12px;
    height: 38px;
    margin-bottom: 12px;
    transition: border-color 0.2s, background 0.2s;
}
.frynzy-playlist-search-wrap:focus-within {
    border-color: #007aff;
    background: rgba(255, 255, 255, 0.9);
}
body.dark-theme .frynzy-playlist-search-wrap {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}
body.dark-theme .frynzy-playlist-search-wrap:focus-within {
    border-color: #007aff;
    background: rgba(255, 255, 255, 0.14);
}
.frynzy-playlist-search-icon {
    color: #8e8e93;
    font-size: 0.9rem;
    margin-right: 8px;
    flex-shrink: 0;
}
.frynzy-playlist-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.92rem;
    color: inherit;
    outline: none;
    font-family: inherit;
}
.frynzy-playlist-search-clear {
    background: transparent;
    border: none;
    color: #8e8e93;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.frynzy-playlist-search-clear:active {
    opacity: 0.7;
}

/* Sélection d'un audio sans faille dans la liste */
.frynzy-audio-row {
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.frynzy-audio-row.selected {
    background: rgba(235, 245, 255, 0.96) !important;
    border: 1.5px solid #007aff !important;
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.25), inset 0 0 0 1px #007aff !important;
    transform: scale(1.01) !important;
}
body.dark-theme .frynzy-audio-row.selected {
    background: rgba(0, 122, 255, 0.22) !important;
    border: 1.5px solid #007aff !important;
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4) !important;
}

/* Dark theme: audio rows should be dark, NOT white */
body.dark-theme .frynzy-audio-row,
.dark-theme .frynzy-audio-row {
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}
body.dark-theme .frynzy-audio-row:active,
.dark-theme .frynzy-audio-row:active {
    background: rgba(255, 255, 255, 0.14) !important;
}
body.dark-theme .frynzy-audio-title,
.dark-theme .frynzy-audio-title {
    color: #ffffff !important;
}
body.dark-theme .frynzy-audio-sub,
.dark-theme .frynzy-audio-sub {
    color: #94a3b8 !important;
}
body.dark-theme .frynzy-audio-thumb,
.dark-theme .frynzy-audio-thumb {
    background: rgba(255, 255, 255, 0.1) !important;
}
body.dark-theme .frynzy-playlist-search-input,
.dark-theme .frynzy-playlist-search-input {
    color: #ffffff !important;
}
body.dark-theme .frynzy-playlist-search-icon,
.dark-theme .frynzy-playlist-search-icon {
    color: #94a3b8 !important;
}
body.dark-theme #frynzySetupTracksContainer,
.dark-theme #frynzySetupTracksContainer {
    color: #ffffff !important;
}
/* Dark theme: Import music filter bar */
body.dark-theme .frynzy-import-filter-bar,
.dark-theme .frynzy-import-filter-bar {
    background: #0f172a !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}
body.dark-theme .frynzy-filter-chip,
.dark-theme .frynzy-filter-chip {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
}
body.dark-theme .frynzy-filter-chip.active,
.dark-theme .frynzy-filter-chip.active {
    background: #007aff !important;
    color: #ffffff !important;
}
/* Dark theme: Setup/Import batch dropdown */
body.dark-theme .frynzy-setup-batch-dropdown,
body.dark-theme #frynzyImportBatchMenu,
.dark-theme .frynzy-setup-batch-dropdown,
.dark-theme #frynzyImportBatchMenu {
    background: #1e293b !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
}
body.dark-theme .frynzy-batch-opt-row,
.dark-theme .frynzy-batch-opt-row {
    color: #e2e8f0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}
body.dark-theme .frynzy-batch-opt-row:active,
.dark-theme .frynzy-batch-opt-row:active {
    background: rgba(255,255,255,0.08) !important;
}
body.dark-theme .frynzy-batch-opt-row.danger,
.dark-theme .frynzy-batch-opt-row.danger {
    color: #ff6b6b !important;
}

/* Bottom Sheet & Options en mode sombre & clair */
body.dark-theme .frynzy-crystal-bottom-sheet {
    background: rgba(28, 28, 36, 0.96) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}
body.dark-theme .frynzy-sheet-title {
    color: #ffffff !important;
}
body.dark-theme .frynzy-sheet-options {
    background: rgba(40, 40, 50, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
body.dark-theme .frynzy-sheet-opt-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}
body.dark-theme .frynzy-sheet-opt-row:active {
    background: rgba(255, 255, 255, 0.08) !important;
}
body.dark-theme .frynzy-counter-modal-dialog {
    background: #1c1c24 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}
body.dark-theme .frynzy-counter-title {
    color: #ffffff !important;
}

/* Badge de statistiques PRO */
.frynzy-pro-stat-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 8px;
}
body.dark-theme .frynzy-pro-stat-badge {
    background: rgba(255, 255, 255, 0.06);
}

/* Garantir que les enfants du widget ne bloquent aucun clic ni tap */
.frynzy-floating-widget {
    cursor: pointer !important;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.frynzy-floating-widget:active {
    transform: scale(0.9) !important;
}
.frynzy-widget-glow-ring,
.frynzy-widget-inner,
.frynzy-widget-inner img {
    pointer-events: none !important;
}



/* ===========================================================================
   FRYNEX BULLETPROOF ROCK-SOLID LAYER HIERARCHY (NO WINDOW BEHIND PAGE)
   =========================================================================== */
/* 1. Explorateur de Stockage Base */
.gfiles-explorer-modal,
#frynzyStorageExplorerModal {
    z-index: 10001000 !important;
}

/* 1.1 Modales, fiches et menus internes a l'Explorateur de stockage (TOUJOURS AU-DESSUS DE L'EXPLORATEUR) */
#gfilesSelectionMenuBackdrop,
.gfiles-sheet-backdrop,
#gfilesVolumeSheetBackdrop,
#gfilesSortSheetBackdrop {
    z-index: 10009250 !important;
}

.gfiles-bottom-sheet,
#gfilesVolumeSheet,
#gfilesSortSheet,
#gfilesSelectionMenu,
#gfilesNormalOptionsMenu,
#frynzyPlayerMenuDropdown,
#frynzyPlayerOptionsMenu,
.frynzy-ios-glass-menu,
.frynzy-player-menu-dropdown {
    z-index: 10009300 !important;
}

.gfiles-dialog-backdrop,
#gfilesNewFolderBackdrop,
#gfilesNewFileBackdrop,
.frynzy-ios-crystal-backdrop,
#frynzyIosCompressModal,
#frynzyIosDeleteModal,
#frynzyZipConfirmDialog {
    z-index: 10008620 !important;
}

/* 2. Lecteur Dedie Playlist (Base) */
#frynzyIosPlayerModal {
    z-index: 10005000 !important;
}

/* 2.1 TOUS LES LECTEURS, VISIONNEUSES DE DOCUMENTS, EDITEURS ET JEUX ARCADE */
.frynzy-player-modal,
#frynzyPlayerModal,
.adult-player-modal,
#adultPlayerModal,
.frynzy-office-viewer-modal,
.frynzy-office-modal,
#frynzyOfficeViewerModal,
.frynzy-pdf-viewer-modal,
.frynzy-pdf-modal,
#frynzyPdfViewerModal,
.frynzy-code-editor-modal,
#frynzyCodeEditorModal,
.frynzy-sky-fighter-container,
#frynzySkyFighterOverlay,
.frynzy-games-hub-overlay,
#frynzyGamesHubModal,
.frynzy-memory-container,
.frynzy-memory-game-container,
#frynzyMemoryGameOverlay {
    z-index: 10007000 !important;
}

/* 3. Pages secondaires Playlist (TOUTES AU-DESSUS DE TOUS LES LECTEURS & EXPLORATEUR) */
#frynzyPlaylistsPage,
#frynzyNewPlaylistPage,
#frynzyPlaylistSetupPage,
#frynzyImportMusicPage,
#frynzyEqualizerPage,
.frynzy-eq-page {
    z-index: 10008500 !important;
    background: #f8fafc !important;
    opacity: 1 !important;
}

body.dark-theme #frynzyPlaylistsPage,
body.dark-theme #frynzyNewPlaylistPage,
body.dark-theme #frynzyPlaylistSetupPage,
body.dark-theme #frynzyImportMusicPage,
body.dark-theme #frynzyEqualizerPage,
body.dark-theme .frynzy-eq-page {
    background: #0b1120 !important;
    opacity: 1 !important;
}

/* 4. Dialogues, Fiches, Timers et Menus de la Playlist (AU-DESSUS DES PAGES & LECTEURS) */
.frynzy-crystal-modal-backdrop,
.frynzy-crystal-modal-backdrop.active,
#frynzyLimitSheet,
#frynzyCustomCounterModal,
#frynzyFolderSelectSheet,
#frynzyFolderExcessLimitModal,
#frynzyReorderActionSheet,
#frynzyPlaylistProToolsSheet,
#frynzyPlaylistStatsDialog,
#frynzyCustomRankDialog,
#frynzyPlaylistSelectSheet,
#frynzyHeureLectureModal,
#frynzyHeurePauseModal,
#frynzyAlarmConfigModal,
.frynzy-setup-batch-dropdown,
#frynzyImportBatchMenu,
#frynzyPlayerMenuDropdown,
#frynzyPlayerOptionsMenu,
.fap-viz-knowfy-btn,
.fap-viz-aify-btn,
#knowfyFullscreenModal,
.knowfy-fullscreen-modal,
#aifyModalBackdrop,
.aify-modal-backdrop {
    z-index: 10008300 !important;
}

#frynzyTutorialOverlay,
.frynzy-animated-hand,
#frynzyAudioTourOverlay {
    z-index: 10008400 !important;
}

/* 5. Paroles synchronisees (Lyrics) */
.frynzy-lyrics-modal,
#frynzyLyricsModal,
.frynzy-lyrics-sheet-backdrop,
#frynzyLyricsSheet {
    z-index: 10008700 !important;
}

/* 6. Dialogues d'information systeme, info fichier et telechargement (SOMMET ABSOLU) */
#frynzyFileInfoDialogBackdrop,
#frynzyFileInfoDialogBackdrop.active,
body.player-modal-open #frynzyFileInfoDialogBackdrop {
    z-index: 10009500 !important;
}

#frynzyFileInfoDialogBackdrop .gfiles-dialog-card,
body.player-modal-open #frynzyFileInfoDialogBackdrop .gfiles-dialog-card {
    z-index: 10009501 !important;
}

#quickDownloadChoiceModal {
    position: fixed !important;
    inset: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: none !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-end !important;
    z-index: 10009600 !important;
    pointer-events: none !important;
}

#quickDownloadChoiceModal.active,
#quickDownloadChoiceModal[style*="display: flex"],
#quickDownloadChoiceModal[style*="display:flex"] {
    display: flex !important;
    pointer-events: auto !important;
}

#quickDownloadChoiceModal .frynzy-bottom-sheet {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: 0 !important;
    margin: 0 auto !important;
    max-width: 500px !important;
    width: 92% !important;
    align-self: center !important;
}

/* ============================================================
   BOUTONS KNOW-FY & AI-FY ANCRÉS SUR LES DEUX POINTS DU VISUALISEUR
   ============================================================ */
.frynzy-visualizer-container {
    position: relative !important;
}

.fap-viz-knowfy-btn,
.fap-viz-aify-btn {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.16) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.55) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 15 !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.18s ease, box-shadow 0.18s ease !important;
}

.fap-viz-knowfy-btn {
    left: 12px !important;
}

.fap-viz-aify-btn {
    right: 12px !important;
}

.fap-viz-knowfy-btn:active,
.fap-viz-aify-btn:active {
    transform: translateY(-50%) scale(0.90) !important;
    background: rgba(255, 255, 255, 0.28) !important;
}

.fap-viz-knowfy-btn .knowfy-btn-icon-wrap {
    width: 17px !important;
    height: 17px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
}

.fap-viz-knowfy-btn .knowfy-btn-icon-wrap svg {
    width: 100% !important;
    height: 100% !important;
    stroke: #ffffff !important;
}

.fap-viz-aify-btn .aify-btn-logo-wrap {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.fap-viz-aify-btn .aify-btn-gemini-bg {
    position: absolute !important;
    width: 20px !important;
    height: 20px !important;
    opacity: 0.75 !important;
    fill: #cbd5e1 !important;
}

.fap-viz-aify-btn .aify-btn-f-char {
    position: relative !important;
    z-index: 2 !important;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif !important;
    font-weight: 900 !important;
    font-size: 13px !important;
    color: #ffffff !important;
    line-height: 1 !important;
}

/* ═══════════════════════════════════════════════════════════════
   ONBOARDING BULBE DISCOVERY — STYLE BIG TECH (APPLE / SPOTIFY)
   ═══════════════════════════════════════════════════════════════ */
.frynzy-audio-tour-overlay {
    position: absolute !important;
    inset: 0 !important;
    z-index: 10005900 !important;
    background: rgba(0, 0, 0, 0.45) !important;
    backdrop-filter: blur(3px) !important;
    -webkit-backdrop-filter: blur(3px) !important;
    pointer-events: auto !important;
    animation: tourOverlayFadeIn 0.25s ease-out forwards;
}

@keyframes tourOverlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.frynzy-audio-tour-bubble {
    position: absolute !important;
    width: 260px !important;
    background: rgba(28, 28, 30, 0.94) !important;
    backdrop-filter: blur(28px) !important;
    -webkit-backdrop-filter: blur(28px) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 20px !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 24px rgba(147, 51, 234, 0.25) !important;
    padding: 16px 18px !important;
    color: #ffffff !important;
    z-index: 10005950 !important;
    pointer-events: auto !important;
    transform-origin: top left;
    animation: tourBubblePop 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tourBubblePop {
    0% {
        opacity: 0;
        transform: scale(0.82) translateY(-8px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.tour-bubble-arrow {
    position: absolute !important;
    width: 14px !important;
    height: 14px !important;
    background: rgba(28, 28, 30, 0.94) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.18) !important;
    transform: rotate(45deg) !important;
    top: -8px !important;
    left: 20px;
    z-index: 1;
}

.tour-bubble-arrow.arrow-right {
    left: auto !important;
    right: 20px !important;
}

.tour-bubble-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 8px !important;
}

.tour-bubble-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 3px 9px !important;
    border-radius: 12px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    text-transform: uppercase !important;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(59, 130, 246, 0.3)) !important;
    border: 1px solid rgba(168, 85, 247, 0.55) !important;
    color: #d8b4fe !important;
}

.tour-bubble-title {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin-bottom: 5px !important;
    letter-spacing: -0.2px !important;
}

.tour-bubble-desc {
    font-size: 12.5px !important;
    line-height: 1.45 !important;
    color: rgba(255, 255, 255, 0.82) !important;
    margin-bottom: 14px !important;
}

.tour-bubble-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-top: 4px !important;
}

.tour-bubble-step-indicator {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.5) !important;
}

.tour-bubble-try-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 7px 15px !important;
    border-radius: 14px !important;
    border: none !important;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
    color: #ffffff !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
    outline: none !important;
}

.tour-bubble-try-btn:active {
    transform: scale(0.94) !important;
}

/* Pulsation lumineuse d'accentuation sur le bouton ciblé pendant le tour */
.fap-tour-highlight {
    animation: tourTargetPulse 1.6s ease-in-out infinite !important;
    z-index: 10005960 !important;
}

@keyframes tourTargetPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.8), 0 2px 10px rgba(0, 0, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(168, 85, 247, 0), 0 2px 16px rgba(168, 85, 247, 0.6);
    }
}


/* ==========================================================================
   FRYNEX MULTI-TIER DETERMINISTIC LAYER STACKING RULES (STRICT Z-INDEX TIERS)
   ========================================================================== */
/* TIER 1: Fullscreen Pages (10008200) */
.frynzy-ios-page,
#frynzyPlaylistsPage,
#frynzyNewPlaylistPage,
#frynzyPlaylistSetupPage,
#frynzyImportMusicPage,
#frynzyEqualizerPage,
.frynzy-eq-page,
.frynzy-acc-page,
#frynzyAccountsPage,
#frynzyInstagramPage,
#frynzyYoutubePage,
#frynzyWatchLaterPage,
.frynzy-biz-page,
#frynzyBusinessScreen,
#frynzyPromoteScreen {
    z-index: 10008200 !important;
    background: #f8fafc !important;
    opacity: 1 !important;
}

body.dark-theme .frynzy-ios-page,
body.dark-theme #frynzyPlaylistsPage,
body.dark-theme #frynzyNewPlaylistPage,
body.dark-theme #frynzyPlaylistSetupPage,
body.dark-theme #frynzyImportMusicPage,
body.dark-theme #frynzyEqualizerPage,
body.dark-theme .frynzy-eq-page,
body.dark-theme .frynzy-acc-page,
body.dark-theme #frynzyAccountsPage,
body.dark-theme #frynzyInstagramPage,
body.dark-theme #frynzyYoutubePage,
body.dark-theme #frynzyWatchLaterPage,
body.dark-theme .frynzy-biz-page,
body.dark-theme #frynzyBusinessScreen,
body.dark-theme #frynzyPromoteScreen {
    background: #0b1120 !important;
    opacity: 1 !important;
}

/* TIER 2: Fullscreen Players (10008500) */
#frynzyIosPlayerModal,
#frynzyPlayerModal,
.frynzy-player-modal {
    z-index: 10008500 !important;
}

/* TIER 3: Drawer & Sidebar (10009100 / 10009150) */
#frynzyIosDrawerOverlay,
.frynzy-ios-drawer-overlay,
#sidebarOverlay {
    z-index: 10009100 !important;
}

#frynzyIosDrawer,
.frynzy-ios-drawer,
#mainSidebar {
    z-index: 10009150 !important;
    background: #ffffff !important;
    background-image: none !important;
}

body.dark-theme #frynzyIosDrawer,
body.dark-theme .frynzy-ios-drawer,
body.dark-theme #mainSidebar {
    background: #111827 !important;
    color: #f9fafb !important;
}

/* TIER 4: Modals & Dialogs (10009300 / 10009350) */
#frynzyFileInfoDialogBackdrop,
.frynzy-crystal-modal-backdrop,
.gfiles-dialog-backdrop,
.fyshare-fullscreen-modal,
.knowfy-fullscreen-modal,
#customConfirmModal,
#frynzyCamSettingsModal,
#frynzyStorageExplorerModal {
    z-index: 10009300 !important;
}

#frynzyFileInfoDialog,
.gfiles-dialog-content,
.frynzy-crystal-modal-card {
    z-index: 10009350 !important;
}

/* TIER 5: Sheets & Quick Downloads (10009600 / 10009650) */
.gfiles-sheet-backdrop,
#gfilesVolumeSheetBackdrop,
#gfilesSortSheetBackdrop {
    z-index: 10009600 !important;
}

#quickDownloadChoiceModal,
#frynzyFolderSelectSheet,
#frynzyPlaylistSelectSheet,
#gfilesCatSortSheet,
#frynzyReorderActionSheet {
    z-index: 10009650 !important;
}

/* TIER 6: 3-Dots Menus & Dropdowns (10009800 / 10009850) */
#gfilesSelectionMenuBackdrop {
    z-index: 10009800 !important;
}

#gfilesNormalOptionsMenu,
#gfilesSelectionMenu,
#frynzyPlayerMenuDropdown,
#frynzyPlayerOptionsMenu,
.frynzy-ios-glass-menu,
.frynzy-player-menu-dropdown,
.frynzy-setup-batch-dropdown,
#sidebarDropdownPortal {
    z-index: 10009850 !important;
}

/* ==========================================================================
   FRYNEX APK INSTALLER & SECURITY MODAL
   ========================================================================== */
.frynzy-apk-installer-modal {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10009500 !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

.frynzy-apk-installer-modal.active {
    display: flex !important;
}

.frynzy-apk-installer-backdrop {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    z-index: 1 !important;
}

.frynzy-apk-installer-card {
    position: relative !important;
    z-index: 2 !important;
    width: 100% !important;
    max-width: 380px !important;
    background: #ffffff !important;
    border-radius: 28px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
    padding: 28px 24px 22px 24px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    animation: frynzyApkCardPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

body.dark-theme .frynzy-apk-installer-card {
    background: #1e293b !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
}

@keyframes frynzyApkCardPop {
    0% { transform: scale(0.92); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.frynzy-apk-installer-close {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.06) !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #64748b !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

body.dark-theme .frynzy-apk-installer-close {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #cbd5e1 !important;
}

.frynzy-apk-icon-wrapper {
    width: 82px !important;
    height: 82px !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12) !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f1f5f9 !important;
    margin-bottom: 14px !important;
}

body.dark-theme .frynzy-apk-icon-wrapper {
    background: #334155 !important;
}

.frynzy-apk-app-icon {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.frynzy-apk-default-icon {
    font-size: 42px !important;
    color: #10b981 !important;
}

.frynzy-apk-app-name {
    font-size: 1.3rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.25 !important;
    word-break: break-word !important;
}

body.dark-theme .frynzy-apk-app-name {
    color: #f8fafc !important;
}

.frynzy-apk-meta {
    font-size: 0.8rem !important;
    color: #64748b !important;
    margin-bottom: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-weight: 500 !important;
}

body.dark-theme .frynzy-apk-meta {
    color: #94a3b8 !important;
}

.frynzy-apk-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 4px 12px !important;
    border-radius: 999px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    margin-bottom: 14px !important;
}

.frynzy-apk-badge.badge-new {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #059669 !important;
}

.frynzy-apk-badge.badge-update {
    background: rgba(37, 99, 235, 0.12) !important;
    color: #2563eb !important;
}

.frynzy-apk-badge.badge-danger {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #dc2626 !important;
}

.frynzy-apk-version-row {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    background: rgba(0, 0, 0, 0.03) !important;
    border-radius: 14px !important;
    padding: 8px 16px !important;
    margin-bottom: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

body.dark-theme .frynzy-apk-version-row {
    background: rgba(255, 255, 255, 0.04) !important;
}

.frynzy-apk-version-box {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.frynzy-apk-version-box .version-label {
    font-size: 0.68rem !important;
    color: #94a3b8 !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
}

.frynzy-apk-version-box .version-val {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
}

body.dark-theme .frynzy-apk-version-box .version-val {
    color: #f1f5f9 !important;
}

.version-arrow {
    color: #64748b !important;
    font-size: 0.8rem !important;
}

.frynzy-apk-security-box {
    background: rgba(239, 68, 68, 0.08) !important;
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
    border-radius: 14px !important;
    padding: 10px 12px !important;
    margin-bottom: 12px !important;
    text-align: left !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.frynzy-apk-security-header {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: #dc2626 !important;
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    margin-bottom: 4px !important;
}

.frynzy-apk-security-text {
    font-size: 0.74rem !important;
    color: #b91c1c !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

body.dark-theme .frynzy-apk-security-text {
    color: #fca5a5 !important;
}

.frynzy-apk-explain {
    font-size: 0.85rem !important;
    color: #475569 !important;
    margin-bottom: 16px !important;
    line-height: 1.4 !important;
}

body.dark-theme .frynzy-apk-explain {
    color: #cbd5e1 !important;
}

.frynzy-apk-perm-notice {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: rgba(245, 158, 11, 0.1) !important;
    border-radius: 12px !important;
    padding: 8px 12px !important;
    color: #d97706 !important;
    font-size: 0.76rem !important;
    margin-bottom: 14px !important;
    text-align: left !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.frynzy-apk-perm-btn {
    margin-left: auto !important;
    background: #f59e0b !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 4px 10px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
}

.frynzy-apk-actions {
    display: flex !important;
    gap: 12px !important;
    width: 100% !important;
}

.frynzy-apk-btn {
    flex: 1 !important;
    padding: 12px 16px !important;
    border-radius: 14px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    border: none !important;
    outline: none !important;
}

.frynzy-apk-btn.btn-cancel {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #64748b !important;
}

body.dark-theme .frynzy-apk-btn.btn-cancel {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #94a3b8 !important;
}

.frynzy-apk-btn.btn-install {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4) !important;
}

.frynzy-apk-btn.btn-install.is-update {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4) !important;
}

.frynzy-apk-btn.btn-install.is-blocked {
    background: #94a3b8 !important;
    color: #e2e8f0 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

.frynzy-apk-progress-section {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    margin-top: 8px !important;
}

.frynzy-apk-spinner {
    width: 28px !important;
    height: 28px !important;
    border: 3px solid rgba(16, 185, 129, 0.2) !important;
    border-top-color: #10b981 !important;
    border-radius: 50% !important;
    animation: frynzyApkSpin 0.7s linear infinite !important;
}

@keyframes frynzyApkSpin {
    to { transform: rotate(360deg); }
}

.frynzy-apk-progress-status {
    font-size: 0.8rem !important;
    color: #64748b !important;
    font-weight: 600 !important;
}

body.dark-theme .frynzy-apk-progress-status {
    color: #94a3b8 !important;
}

.frynzy-apk-progress-bar-track {
    width: 100% !important;
    height: 5px !important;
    background: rgba(0, 0, 0, 0.06) !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    position: relative !important;
}

body.dark-theme .frynzy-apk-progress-bar-track {
    background: rgba(255, 255, 255, 0.08) !important;
}

.frynzy-apk-progress-bar-fill {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 45% !important;
    background: linear-gradient(90deg, #10b981, #3b82f6) !important;
    border-radius: 999px !important;
    animation: frynzyApkFillIndeterminate 1.2s infinite ease-in-out !important;
}

@keyframes frynzyApkFillIndeterminate {
    0% { left: -45%; width: 45%; }
    50% { left: 30%; width: 55%; }
    100% { left: 100%; width: 45%; }
}

/* =========================================================================
   FRYNEX GOOGLE GEMINI-STYLE FIRST LAUNCH WELCOME & POLICY CARD
   ========================================================================= */
.frynex-gemini-policy-card {
    position: fixed;
    bottom: calc(64px + var(--sab, 0px) + 14px);
    left: 14px;
    right: 14px;
    max-width: 480px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 18px 20px;
    box-sizing: border-box;
    z-index: 10008400;
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body.dark-theme .frynex-gemini-policy-card {
    background: #1a1a26;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 44px rgba(0, 0, 0, 0.55), 0 2px 10px rgba(0, 0, 0, 0.3);
}

.frynex-gemini-policy-card.frynex-gemini-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.frynex-gemini-policy-card.frynex-gemini-closing {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
}

.frynex-gemini-policy-hdr {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.frynex-gemini-policy-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
}

body.dark-theme .frynex-gemini-policy-title {
    color: #f1f5f9;
}

.frynex-gemini-brand {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.frynex-gemini-close-btn {
    background: #f1f5f9;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 0.85rem;
    transition: background 0.15s, color 0.15s;
}

body.dark-theme .frynex-gemini-close-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

.frynex-gemini-close-btn:active {
    background: #e2e8f0;
    color: #0f172a;
}

.frynex-gemini-policy-desc {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.48;
    margin: 0 0 14px 0;
}

body.dark-theme .frynex-gemini-policy-desc {
    color: #cbd5e1;
}

.frynex-gemini-inline-link {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 600;
}

body.dark-theme .frynex-gemini-inline-link {
    color: #60a5fa;
}

/* Accordion */
.frynex-gemini-accordion-wrap {
    background: #f8fafc;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 14px;
    overflow: hidden;
}

body.dark-theme .frynex-gemini-accordion-wrap {
    background: #14141d;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.frynex-gemini-accordion-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: transparent;
    border: none;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    text-align: left;
}

body.dark-theme .frynex-gemini-accordion-toggle {
    color: #e2e8f0;
}

.frynex-accordion-arrow {
    font-size: 0.8rem;
    color: #64748b;
    transition: transform 0.22s ease;
}

.frynex-gemini-accordion-content {
    padding: 4px 14px 12px 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

body.dark-theme .frynex-gemini-accordion-content {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.frynex-accordion-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
}

.frynex-accordion-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.frynex-accordion-row-text strong {
    display: block;
    font-size: 0.82rem;
    color: #1e293b;
    margin-bottom: 2px;
}

body.dark-theme .frynex-accordion-row-text strong {
    color: #e2e8f0;
}

.frynex-accordion-row-text p {
    font-size: 0.77rem;
    color: #64748b;
    margin: 0;
    line-height: 1.35;
}

body.dark-theme .frynex-accordion-row-text p {
    color: #94a3b8;
}

/* Legal text */
.frynex-gemini-policy-legal {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.45;
}

body.dark-theme .frynex-gemini-policy-legal {
    color: #94a3b8;
}

.frynex-policy-legal-link {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 500;
}

body.dark-theme .frynex-policy-legal-link {
    color: #60a5fa;
}

/* Legal Info Modal */
.frynex-legal-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10009400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.frynex-legal-info-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
}

.frynex-legal-info-card {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    max-width: 440px;
    width: 100%;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
    z-index: 1;
    overflow: hidden;
}

body.dark-theme .frynex-legal-info-card {
    background: #181822;
    color: #f1f5f9;
}

.frynex-legal-info-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.dark-theme .frynex-legal-info-hdr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.frynex-legal-info-hdr h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.frynex-legal-info-close {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
}

.frynex-legal-info-body {
    padding: 16px 18px;
    overflow-y: auto;
    font-size: 0.88rem;
    line-height: 1.55;
    color: #334155;
}

body.dark-theme .frynex-legal-info-body {
    color: #cbd5e1;
}

.frynex-legal-info-body p {
    margin: 0 0 10px 0;
}

.frynex-legal-info-footer {
    padding: 12px 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: flex-end;
}

body.dark-theme .frynex-legal-info-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.frynex-legal-info-ok-btn {
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 10px 22px;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
}

/* =========================================================================
   FRYNEX ULTIMATE DARK THEME & UI STYLING SPECIFICATION (USER DIRECTIVE MATCH)
   ========================================================================= */

/* 1. CIRCULAR VEIL THEME TRANSITION OVERLAY */
#frynexThemeTransitionVeil {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #000000 !important;
    z-index: 10010999 !important;
    pointer-events: none !important;
}

/* 2. ABSOLUTELY ALL PAGES IN PURE OLED BLACK */
body.dark-theme,
body.dark-theme html,
body.dark-theme #app,
body.dark-theme #frynzyApp,
body.dark-theme .main-container,
body.dark-theme .frynzy-tabs-swipe-viewport,
body.dark-theme .frynzy-tabs-swipe-track,
body.dark-theme .tab-screen,
body.dark-theme #tabContentSearch,
body.dark-theme #tabContentLecture,
body.dark-theme #tabContentProfile,
body.dark-theme #tabContentDownloads,
body.dark-theme .lecture-screen-container,
body.dark-theme .gfiles-lecture-container,
body.dark-theme .gfiles-cat-screen,
body.dark-theme #frynzyAppsScreen,
body.dark-theme #frynzyCategoryDetailScreen,
body.dark-theme .trash-dedicated-screen,
body.dark-theme #trashDedicatedScreen,
body.dark-theme .dl-dedicated-screen,
body.dark-theme #dlDedicatedScreen,
body.dark-theme .frynzy-vault-fullscreen,
body.dark-theme #frynzySecureFolderScreen,
body.dark-theme .gfiles-settings-page,
body.dark-theme #frynzyStorageExplorerModal,
body.dark-theme .gfiles-explorer-modal,
body.dark-theme #frynzyEqualizerPage,
body.dark-theme .frynzy-eq-page,
body.dark-theme #frynzyBusinessScreen,
body.dark-theme .frynzy-business-screen,
body.dark-theme #frynzyInstagramPage,
body.dark-theme #frynzyYoutubePage,
body.dark-theme #frynzyStorageChooserScreen,
body.dark-theme #frynzySettingsAudioScreen,
body.dark-theme #frynzySettingsEditorScreen,
body.dark-theme #frynzySettingsFyShareScreen,
body.dark-theme #frynzySettingsNotificationsScreen,
body.dark-theme #frynzySettingsVideoScreen,
body.dark-theme #frynzyGamingHub,
body.dark-theme #gfilesSearchScreen {
    background: #000000 !important;
    color: #f1f5f9;
}

/* 3. TOP HEADER (MENU HAMBURGER, SEARCH BAR & FY SHARE QUICK BUTTON) */
body.dark-theme #mobileTopBar,
body.dark-theme .mobile-top-bar {
    background: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Menu hamburger icon in exact inactive tab bar gray */
body.dark-theme .mobile-hamburger-btn span,
body.dark-theme #mobileHamburgerBtn span {
    background: rgba(255, 255, 255, 0.65) !important;
}
body.dark-theme .mobile-hamburger-btn i,
body.dark-theme #mobileHamburgerBtn i {
    color: rgba(255, 255, 255, 0.65) !important;
}

/* Search bar pill with identical glassmorphism to bottom tab dock */
body.dark-theme .gfiles-top-searchbar,
body.dark-theme #gfilesTopSearchBar {
    background: rgba(26, 26, 32, 0.76) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    border-radius: 28px !important;
}

/* Search bar text in light gray / near-white */
body.dark-theme .gfiles-top-search-text,
body.dark-theme #gfilesTopSearchBar .gfiles-top-search-text {
    color: #f1f5f9 !important;
    font-weight: 500 !important;
}

/* Search bar magnifying glass icon in inactive tab gray */
body.dark-theme .gfiles-top-search-icon,
body.dark-theme #gfilesTopSearchBar .gfiles-top-search-icon,
body.dark-theme #gfilesTopSearchBar i {
    color: rgba(255, 255, 255, 0.65) !important;
}

/* Fy Share top button with identical glassmorphism to tab dock & gray icon */
body.dark-theme .mobile-top-fyshare-btn {
    background: rgba(26, 26, 32, 0.76) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    border-radius: 50% !important;
}
body.dark-theme .mobile-top-fyshare-btn i {
    color: rgba(255, 255, 255, 0.65) !important;
}

/* 4. CATEGORIES, COLLECTIONS & TOTAL STORAGE CARDS (MATCH DRAWER MENU IN IMAGE 1) */
body.dark-theme .gfiles-tile-card,
body.dark-theme .gfiles-collection-card,
body.dark-theme .gfiles-storage-card,
body.dark-theme #catCardJeux,
body.dark-theme #storageCardSd {
    background: rgba(255, 255, 255, 0.76) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.98) !important;
    border-radius: 18px !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04), inset 0 1px 2px rgba(255, 255, 255, 1) !important;
}

body.dark-theme .gfiles-tile-card:active,
body.dark-theme .gfiles-collection-card:active,
body.dark-theme .gfiles-storage-card:active {
    background: rgba(240, 242, 247, 0.92) !important;
    transform: scale(0.98) !important;
}

/* Tile Icon Box: Crystal Glass container, NO square drop shadow artifacts! */
.gfiles-tile-icon,
.gfiles-tile-card .gfiles-tile-icon,
.gfiles-tile-card:nth-child(n) .gfiles-tile-icon,
body.dark-theme .gfiles-tile-icon,
body.dark-theme .gfiles-tile-card .gfiles-tile-icon,
body.dark-theme .gfiles-tile-card:nth-child(n) .gfiles-tile-icon,
body.dark-theme .gfiles-collection-card .gfiles-collection-icon,
body.dark-theme .gfiles-storage-card .gfiles-storage-icon,
body.dark-theme #catCardJeux .gfiles-tile-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(14px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.85), 0 3px 8px rgba(0, 0, 0, 0.07) !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    filter: none !important;
    -webkit-filter: none !important;
}

.gfiles-tile-icon i,
.gfiles-tile-icon svg,
.gfiles-tile-card .gfiles-tile-icon i,
.gfiles-tile-card .gfiles-tile-icon svg,
.gfiles-tile-card:nth-child(n) .gfiles-tile-icon i,
.gfiles-tile-card:nth-child(n) .gfiles-tile-icon svg,
body.dark-theme .gfiles-tile-icon i,
body.dark-theme .gfiles-tile-icon svg,
body.dark-theme .gfiles-tile-card .gfiles-tile-icon i,
body.dark-theme .gfiles-tile-card .gfiles-tile-icon svg,
body.dark-theme .gfiles-tile-card:nth-child(n) .gfiles-tile-icon i,
body.dark-theme .gfiles-tile-card:nth-child(n) .gfiles-tile-icon svg,
body.dark-theme .gfiles-collection-card i,
body.dark-theme .gfiles-storage-card i,
body.dark-theme #catCardJeux .gfiles-tile-icon i {
    color: #64748b !important;
    fill: #64748b !important;
    font-size: 1.05rem !important;
}

/* Card titles and subtitles */
body.dark-theme .gfiles-tile-name,
body.dark-theme .gfiles-collection-title,
body.dark-theme .gfiles-storage-title {
    color: #111827 !important;
    font-weight: 700 !important;
}

body.dark-theme .gfiles-tile-sub,
body.dark-theme .gfiles-storage-sub {
    color: #64748b !important;
    font-size: 0.8rem !important;
}

/* 5. TITLES IN WHITE & BLUE ACCENTS PRESERVED */
body.dark-theme .gfiles-section-title,
body.dark-theme .gfiles-section-header,
body.dark-theme .gfiles-recent-title,
body.dark-theme .trash-header-title,
body.dark-theme .trash-top-title,
body.dark-theme .dl-dedicated-title,
body.dark-theme #gfilesCatHeaderTitle,
body.dark-theme .gfiles-cat-title,
body.dark-theme .frynzy-eq-page-title,
body.dark-theme .gfiles-setting-title,
body.dark-theme .media-date-header,
body.dark-theme .gfiles-group-title,
body.dark-theme .gfiles-date-title,
body.dark-theme .gfiles-exp-title,
body.dark-theme .frynzy-biz-header-title,
body.dark-theme .frynzy-header-title,
body.dark-theme .frynzy-page-title,
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme .settings-title,
body.dark-theme .fcp-header-title,
body.dark-theme .fyshare-title {
    color: #ffffff !important;
}

/* Blue text preservation */
body.dark-theme .gfiles-section-link,
body.dark-theme a.blue-link,
body.dark-theme .text-blue,
body.dark-theme .gfiles-section-link:active,
body.dark-theme .frynex-policy-legal-link,
body.dark-theme .frynzy-link-blue,
body.dark-theme .gfiles-breadcrumb-segment.active {
    color: #2563eb !important;
}

/* Secondary header icons/buttons in light gray */
body.dark-theme .gfiles-add-collection-btn,
body.dark-theme .gfiles-section-dots-btn,
body.dark-theme .gfiles-cat-btn,
body.dark-theme .frynzy-eq-nav-btn,
body.dark-theme .gfiles-chevron,
body.dark-theme .gfiles-back-btn,
body.dark-theme .gfiles-top-back-btn,
body.dark-theme .gfiles-view-mode-btn,
body.dark-theme .frynzy-nav-back,
body.dark-theme .header-back-btn i,
body.dark-theme .fcp-back-btn i {
    color: #cbd5e1 !important;
}

/* 6. CATEGORY DETAILS SCREEN (IMAGE 3) */
body.dark-theme #gfilesCatNormalTopbar,
body.dark-theme .gfiles-cat-topbar {
    background: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .gfiles-cat-chips-scroll {
    background: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .gfiles-cat-chip,
body.dark-theme .gfiles-chip {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

body.dark-theme .gfiles-cat-chip.active,
body.dark-theme .gfiles-chip.active {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

body.dark-theme .gfiles-cat-media-list,
body.dark-theme #gfilesCatMediaContainer {
    background: #000000 !important;
}

body.dark-theme .gfiles-media-card {
    background: #111116 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .gfiles-media-card .gfiles-media-title {
    color: #ffffff !important;
}

body.dark-theme .gfiles-media-card .gfiles-media-sub {
    color: #94a3b8 !important;
}

body.dark-theme .gfiles-media-card .gfiles-media-duration {
    background: rgba(0, 0, 0, 0.75) !important;
    color: #ffffff !important;
}

/* 7. EQUALIZER FULLSCREEN PAGE */
body.dark-theme #frynzyEqualizerPage,
body.dark-theme .frynzy-eq-page {
    background: #000000 !important;
}

body.dark-theme .frynzy-eq-topbar {
    background: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .frynzy-eq-page-title {
    color: #ffffff !important;
}

body.dark-theme .frynzy-eq-nav-btn {
    color: #ffffff !important;
}

body.dark-theme .frynzy-eq-canvas-wrap {
    background: #000000 !important;
}

body.dark-theme .frynzy-eq-canvas {
    background: #09090f !important;
}

body.dark-theme .frynzy-eq-presets-label {
    background: #000000 !important;
    color: #94a3b8 !important;
}

body.dark-theme .frynzy-eq-presets-row {
    background: #000000 !important;
}

body.dark-theme .frynzy-eq-preset-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

body.dark-theme .frynzy-eq-preset-btn.active {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

body.dark-theme .frynzy-eq-info-note {
    background: #000000 !important;
    color: #94a3b8 !important;
}

/* 8. SETTINGS & PROFILE PAGE IN DARK THEME */
body.dark-theme .gfiles-settings-page {
    background: #000000 !important;
}

body.dark-theme .gfiles-setting-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .gfiles-setting-title {
    color: #ffffff !important;
}

body.dark-theme .gfiles-setting-sub {
    color: #94a3b8 !important;
}

/* 9. RECENT CAROUSEL IN DARK THEME */
body.dark-theme .gfiles-recent-frame {
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
body.dark-theme .gfiles-recent-frame-title {
    color: #ffffff !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FRYNEX ULTIMATE PLAYLIST MODALS & REFINED DARK THEME STYLING
   ═══════════════════════════════════════════════════════════════════════════ */

/* 1. PLAYLIST SETUP & RINGTONE MODAL Z-INDEX (ALWAYS IN FRONT OF PLAYLIST PAGE) */
#frynzyPlaylistSetupPage,
#frynzyPlaylistSetupPage.active {
    z-index: 10009200 !important;
}

#frynzyImportMusicPage,
#frynzyImportMusicPage.active {
    z-index: 10009650 !important;
}

#frynzyRingtoneActionModal,
.frynzy-ringtone-modal {
    z-index: 10009900 !important;
}

#frynzyAlarmConfigModal,
#frynzyHeurePauseModal,
#frynzyHeureLectureModal,
#frynzyMinuterieModal,
#frynzyCustomCounterModal {
    z-index: 10009900 !important;
}

/* 2. RECENT MEDIA CAROUSEL IN DARK THEME (PURE BLACK & SLEEK BORDER) */
body.dark-theme .gfiles-recent-carousel,
body.dark-theme #gfilesRecentCarousel {
    background: transparent !important;
}

body.dark-theme .gfiles-recent-frame,
body.dark-theme .gfiles-recent-card,
body.dark-theme .gfiles-hero-card,
body.dark-theme .gfiles-recent-carousel-item {
    background: #000000 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 16px !important;
    box-shadow: none !important;
}

body.dark-theme .gfiles-recent-frame-title,
body.dark-theme .gfiles-recent-card-title,
body.dark-theme .gfiles-hero-title,
body.dark-theme .gfiles-recent-title-txt {
    color: #ffffff !important;
}

body.dark-theme .gfiles-recent-frame-sub,
body.dark-theme .gfiles-recent-card-sub,
body.dark-theme .gfiles-hero-sub {
    color: #94a3b8 !important;
}

body.dark-theme .gfiles-recent-frame-play {
    background: rgba(0, 0, 0, 0.7) !important;
    color: #ffffff !important;
}

/* 3. CATEGORY FOLDERS BAR: IPHONE DOCK GLASSMORPHISM STYLE & ACTIVE WHITE CHIP */
body.dark-theme #gfilesCatChipsScroll,
body.dark-theme .gfiles-chips-scroll,
body.dark-theme .gfiles-cat-chips-scroll {
    background: rgba(26, 26, 32, 0.76) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    border-radius: 34px !important;
    padding: 4px 6px !important;
    margin: 10px 14px 12px 14px !important;
    gap: 4px !important;
    display: flex !important;
    align-items: center !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    width: auto !important;
    box-sizing: border-box !important;
}

body.dark-theme #gfilesCatChipsScroll::-webkit-scrollbar,
body.dark-theme .gfiles-chips-scroll::-webkit-scrollbar {
    display: none !important;
}

/* Inactive folder chips in dock gray */
body.dark-theme .gfiles-cat-chip,
body.dark-theme .gfiles-chip,
body.dark-theme .gfiles-cat-chip:not(.active),
body.dark-theme .gfiles-chip:not(.active) {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.65) !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    padding: 7px 15px !important;
    border-radius: 22px !important;
    box-shadow: none !important;
    white-space: nowrap !important;
    transition: color 0.18s ease, background 0.18s ease !important;
}

/* Active folder chip ("Tous" or selected current folder) in WHITE active pill */
body.dark-theme .gfiles-cat-chip.active,
body.dark-theme .gfiles-chip.active {
    background: rgba(255, 255, 255, 0.22) !important;
    border: 0.5px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
    padding: 7px 16px !important;
    border-radius: 22px !important;
}

/* 4. DATE HEADERS MATCHING DRAWER MENU CARDS (.frynzy-ios-card) */
body.dark-theme .gfiles-virtual-header,
body.dark-theme .gfiles-date-header,
body.dark-theme .gfiles-date-group {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 12px 14px 6px 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

body.dark-theme .gfiles-date-group-title,
body.dark-theme .gfiles-date-label,
body.dark-theme .gfiles-date-title,
body.dark-theme .media-date-header {
    display: inline-flex !important;
    align-items: center !important;
    background: rgba(255, 255, 255, 0.76) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.98) !important;
    border-radius: 14px !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04), inset 0 1px 2px rgba(255, 255, 255, 1) !important;
    color: #111827 !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
    padding: 6px 14px !important;
    margin: 4px 0 !important;
}

body.dark-theme .gfiles-group-checkbox,
body.dark-theme .gfiles-date-circle {
    border-color: rgba(255, 255, 255, 0.4) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .gfiles-group-checkbox.checked,
body.dark-theme .gfiles-date-circle.checked {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FRYNEX ULTIMATE SETTINGS & ALL SUB-PAGES DARK THEME SPECIFICATION
   - Tout l'arrière-plan de Paramètres et sous-pages en noir pur OLED (#000000)
   - Les sections/cartes adoptent le style du contenu menu (.frynzy-ios-card)
   - Les titres de sections sur fond noir sont en BLANC PUR (#ffffff)
   - Les conteneurs d'icônes adoptent le verre cristal du menu (.frynzy-ios-row-icon)
   ═══════════════════════════════════════════════════════════════════════════ */

/* 1. PAGES & SOUS-PAGES PARAMÈTRES EN NOIR PUR (#000000) */
body.dark-theme .gfiles-settings-page,
body.dark-theme #tabContentProfile,
body.dark-theme .gfiles-sub-screen,
body.dark-theme .gfiles-sub-topbar,
body.dark-theme .gfiles-sub-body,
body.dark-theme .frynzy-acc-page,
body.dark-theme .frynzy-acc-nav,
body.dark-theme .frynzy-acc-body,
body.dark-theme .fcp-screen,
body.dark-theme .fcp-process-screen,
body.dark-theme .frynzy-biz-page,
body.dark-theme .frynzy-sub-page,
body.dark-theme #frynzyAccountsPage,
body.dark-theme #frynzyLangSelectScreen,
body.dark-theme #frynzySettingsAudioScreen,
body.dark-theme #frynzySettingsVideoScreen,
body.dark-theme #frynzySettingsEditorScreen,
body.dark-theme #frynzySettingsFyShareScreen,
body.dark-theme #frynzySettingsNotificationsScreen,
body.dark-theme #frynzyCamSettingsModal,
body.dark-theme #frynzySecureSettingsScreen,
body.dark-theme #frynzyCleanerContainer,
body.dark-theme #audioSettingsBody,
body.dark-theme #videoSettingsBody,
body.dark-theme #editorSettingsBody,
body.dark-theme #fyshareSettingsBody,
body.dark-theme #notificationSettingsBody,
body.dark-theme #frynzyLangBody,
body.dark-theme [id*="SettingsScreen"] {
    background: #000000 !important;
    color: #f1f5f9 !important;
}

/* 2. EN-TÊTES & TOPBARS DES SOUS-PAGES (FOND NOIR & TITRES EN BLANC PUR) */
body.dark-theme .gfiles-sub-topbar,
body.dark-theme .frynzy-acc-nav,
body.dark-theme .fcp-topbar,
body.dark-theme .frynzy-biz-nav {
    background: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .gfiles-sub-topbar-title,
body.dark-theme .frynzy-acc-nav-title,
body.dark-theme .fcp-topbar-title,
body.dark-theme .frynzy-biz-nav-title,
body.dark-theme .frynzy-vault-settings-title {
    color: #ffffff !important;
    font-weight: 700 !important;
}

body.dark-theme .gfiles-sub-back-btn,
body.dark-theme .gfiles-sub-action-btn,
body.dark-theme .frynzy-acc-nav-btn,
body.dark-theme .fcp-back-btn {
    color: #cbd5e1 !important;
}

/* 3. TITRES DE SECTIONS SUR FOND NOIR : TOUS EN BLANC PUR (#ffffff) */
body.dark-theme .gfiles-section-header,
body.dark-theme .frynzy-ios-group-title,
body.dark-theme .gfiles-lang-section-label,
body.dark-theme .gfiles-group-title,
body.dark-theme .settings-group-header,
body.dark-theme .fcp-group-header {
    color: #ffffff !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    background: transparent !important;
    padding: 18px 18px 8px 18px !important;
}

/* 4. CARTES/SECTIONS STYLE MENU (.frynzy-ios-card) */
body.dark-theme .gfiles-setting-item,
body.dark-theme .frynzy-ios-group,
body.dark-theme .gfiles-lang-card-group,
body.dark-theme .gfiles-lang-card {
    background: rgba(255, 255, 255, 0.76) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.98) !important;
    border-radius: 18px !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04), inset 0 1px 2px rgba(255, 255, 255, 1) !important;
    margin: 6px 14px !important;
    padding: 12px 14px !important;
    box-sizing: border-box !important;
}

body.dark-theme .gfiles-setting-item:active,
body.dark-theme .gfiles-lang-card:active {
    background: rgba(240, 242, 247, 0.92) !important;
    transform: scale(0.98) !important;
}

/* Conteneurs d'icônes : Verre cristal arrondi identique au menu (.frynzy-ios-row-icon) */
body.dark-theme .gfiles-icon-box {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(14px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.85), 0 3px 8px rgba(0, 0, 0, 0.07) !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem !important;
    flex-shrink: 0 !important;
}

body.dark-theme .gfiles-icon-box i,
body.dark-theme .gfiles-icon-box svg {
    color: #64748b !important;
    fill: #64748b !important;
}

/* Titres & Sous-titres des options dans les cartes */
body.dark-theme .gfiles-setting-title,
body.dark-theme .frynzy-ios-row-label,
body.dark-theme .gfiles-lang-name,
body.dark-theme #frynzyAccountsSettingTitle {
    color: #111827 !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
}

body.dark-theme .gfiles-setting-sub,
body.dark-theme .gfiles-lang-native,
body.dark-theme #frynzyAccountsSettingSub {
    color: #64748b !important;
    font-size: 0.8rem !important;
}

body.dark-theme .gfiles-chevron {
    color: #94a3b8 !important;
}

/* Cibles de sélection internes (Qualité Vidéo, Piste Audio) */
body.dark-theme .gfiles-audio-track-target-btn,
body.dark-theme .gfiles-video-quality-target-btn {
    background: rgba(0, 0, 0, 0.07) !important;
    color: #111827 !important;
    border-radius: 12px !important;
    padding: 6px 10px !important;
    font-weight: 600 !important;
}

/* Séparateurs transparents */
body.dark-theme .gfiles-divider {
    height: 6px !important;
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
}

/* Barre de recherche dans les sous-pages */
body.dark-theme .gfiles-sub-search-bar {
    background: rgba(26, 26, 32, 0.76) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 24px !important;
    margin: 8px 14px !important;
}
body.dark-theme .gfiles-sub-search-input {
    background: transparent !important;
    color: #f1f5f9 !important;
}
body.dark-theme .gfiles-sub-search-icon {
    color: rgba(255, 255, 255, 0.65) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FRYNEX ULTIMATE DARK THEME FIXES:
   1. Téléchargements: Bouton "Tout continuer" & cartes en blanc/noir
   2. Télécharger: Encadrement des plateformes comme dans Catégories & noms en blanc
   3. Récents fichiers: Arrière-plan où s'affichent les fichiers récents en noir pur
   ═══════════════════════════════════════════════════════════════════════════ */

/* 1. TÉLÉCHARGEMENTS ("Tout continuer" & Liste) */
body.dark-theme .dl-continue-all-btn,
body.dark-theme .dl-continue-all-btn span {
    color: #ffffff !important;
}

body.dark-theme .dl-continue-all-btn i {
    color: #ffffff !important;
}

body.dark-theme .dl-dedicated-title {
    color: #ffffff !important;
}

body.dark-theme .dl-dedicated-trash-btn i {
    color: #cbd5e1 !important;
}

body.dark-theme .dl-task-card {
    background: #14141e !important;
    border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 18px !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35) !important;
    color: #ffffff !important;
}

body.dark-theme .dl-task-title {
    color: #ffffff !important;
}

body.dark-theme .dl-task-meta {
    color: #94a3b8 !important;
}

/* 2. TÉLÉCHARGER (Plateformes & Titres) */
body.dark-theme #tabContentSearch .card,
body.dark-theme .card {
    background: #14141e !important;
    border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 18px !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.12) !important;
}

/* Noms des plateformes en BLANC PUR */
body.dark-theme #tabContentSearch .card-header h3,
body.dark-theme #tabContentSearch .icon-title h3,
body.dark-theme #tabContentSearch .card h3,
body.dark-theme .card-header h3,
body.dark-theme .icon-title h3,
body.dark-theme .card h3 {
    color: #ffffff !important;
    font-weight: 700 !important;
}

body.dark-theme #tabContentSearch .card-desc,
body.dark-theme .card-desc {
    color: #94a3b8 !important;
}

body.dark-theme #tabContentSearch .badge,
body.dark-theme .card .badge {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* 3. RÉCENTS FICHIERS (Arrière-plan en noir pur, suppression bande blanche) */
body.dark-theme #tabContentLecture,
body.dark-theme .lecture-screen-container,
body.dark-theme .gfiles-lecture-container,
body.dark-theme #gfilesRecentSection,
body.dark-theme .gfiles-recent-section,
body.dark-theme .gfiles-recent-carousel,
body.dark-theme #gfilesRecentCarousel,
body.dark-theme .gfiles-section,
body.dark-theme .gfiles-section:first-child {
    background: #000000 !important;
}

body.dark-theme .gfiles-recent-carousel {
    background: #000000 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FRYNEX ULTRA-FAST ZERO-LAG SETTINGS & SUB-PAGES DARK THEME ENGINE
   - Titres de sections (ex: Préférences) en capsule style menu (.frynzy-ios-card)
   - Lignes de paramètres (Éditeur, Audio, etc.) ULTRA-LÉGÈRES, plates et fluides (120 FPS)
   - Suppression totale de backdrop-filter et box-shadow répétés (0 surcoût GPU)
   - Zéro recalcul DOM, défilement fluide sans saccades ni clignotement
   ═══════════════════════════════════════════════════════════════════════════ */

/* 1. PAGES & CONTENEURS : ACCÉLÉRATION MATÉRIELLE & DÉFILEMENT PUR GPU */
.gfiles-settings-page,
#tabContentProfile,
.gfiles-sub-screen,
.gfiles-sub-body,
#audioSettingsBody,
#videoSettingsBody,
#editorSettingsBody,
#fyshareSettingsBody,
#notificationSettingsBody,
#frynzyLangBody,
.frynzy-acc-body {
    contain: layout style !important;
    will-change: scroll-position !important;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Dark mode: black background */
body.dark-theme .gfiles-settings-page,
body.dark-theme #tabContentProfile,
body.dark-theme .gfiles-sub-screen,
body.dark-theme .gfiles-sub-body,
body.dark-theme #audioSettingsBody,
body.dark-theme #videoSettingsBody,
body.dark-theme #editorSettingsBody,
body.dark-theme #fyshareSettingsBody,
body.dark-theme #notificationSettingsBody,
body.dark-theme #frynzyLangBody,
body.dark-theme .frynzy-acc-body {
    background: #000000 !important;
    color: #f1f5f9 !important;
}

/* Light mode: white background */
body:not(.dark-theme) .gfiles-settings-page,
body:not(.dark-theme) #tabContentProfile,
body:not(.dark-theme) .gfiles-sub-screen,
body:not(.dark-theme) .gfiles-sub-body,
body:not(.dark-theme) #audioSettingsBody,
body:not(.dark-theme) #videoSettingsBody,
body:not(.dark-theme) #editorSettingsBody,
body:not(.dark-theme) #fyshareSettingsBody,
body:not(.dark-theme) #notificationSettingsBody,
body:not(.dark-theme) #frynzyLangBody,
body:not(.dark-theme) .frynzy-acc-body {
    background: #ffffff !important;
    color: #202124 !important;
}

/* 2. TITRES DE SECTIONS : SEULS LES TITRES ONT LE STYLE CAPSULE DU MENU */
body.dark-theme .gfiles-settings-page .gfiles-section-header,
body.dark-theme .gfiles-sub-screen .gfiles-section-header,
body.dark-theme .frynzy-ios-group-title,
body.dark-theme .gfiles-lang-section-label,
body.dark-theme .settings-group-header,
body.dark-theme .fcp-group-header {
    display: inline-flex !important;
    align-items: center !important;
    background: rgba(255, 255, 255, 0.76) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.98) !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    color: #111827 !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    padding: 6px 14px !important;
    margin: 18px 14px 6px 14px !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: translateZ(0) !important;
}

/* 3. LIGNES DE PARAMÈTRES (ÉDITEUR, AUDIO, ETC.) : ULTRA-FLUIDES ET LÉGÈRES */
body.dark-theme .gfiles-setting-item,
body.dark-theme .frynzy-ios-group,
body.dark-theme .gfiles-lang-card-group,
body.dark-theme .gfiles-lang-card {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    margin: 0 !important;
    padding: 13px 18px !important;
    contain: layout style paint !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    transition: background-color 0.12s ease !important;
}

body.dark-theme .gfiles-setting-item:active,
body.dark-theme .gfiles-lang-card:active {
    background: rgba(255, 255, 255, 0.06) !important;
    transform: none !important;
}

/* Conteneurs d'icônes discrets, crystal net sans filtre lourd */
body.dark-theme .gfiles-icon-box {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: #cbd5e1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem !important;
    flex-shrink: 0 !important;
    transform: translateZ(0) !important;
}

body.dark-theme .gfiles-icon-box i,
body.dark-theme .gfiles-icon-box svg {
    color: #cbd5e1 !important;
    fill: #cbd5e1 !important;
}

/* Titres & Sous-titres des options : Blanc éclatant et gris lisible */
body.dark-theme .gfiles-setting-title,
body.dark-theme .frynzy-ios-row-label,
body.dark-theme .gfiles-lang-name,
body.dark-theme #frynzyAccountsSettingTitle {
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
}

body.dark-theme .gfiles-setting-sub,
body.dark-theme .gfiles-lang-native,
body.dark-theme #frynzyAccountsSettingSub {
    color: #94a3b8 !important;
    font-size: 0.8rem !important;
}

body.dark-theme .gfiles-chevron {
    color: #64748b !important;
}

/* Cibles interactives (Audio, Vidéo) */
body.dark-theme .gfiles-audio-track-target-btn,
body.dark-theme .gfiles-video-quality-target-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px !important;
    padding: 5px 10px !important;
    font-weight: 600 !important;
}

/* Espacements propres entre sections */
body.dark-theme .gfiles-divider {
    height: 12px !important;
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
}


/* LIGHT MODE — SECTION HEADERS MUST LOOK NORMAL (not capsule) */
body:not(.dark-theme) .gfiles-section-header,
body:not(.dark-theme) .gfiles-settings-page .gfiles-section-header,
body:not(.dark-theme) .settings-group-header,
body:not(.dark-theme) .fcp-group-header {
    display: block !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #5f6368 !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    letter-spacing: 0.6px !important;
    text-transform: uppercase !important;
    padding: 16px 18px 6px !important;
    margin: 0 !important;
}

/* LIGHT MODE — SETTING ITEMS */
body:not(.dark-theme) .gfiles-setting-item {
    background: #ffffff !important;
    color: #202124 !important;
    border-bottom: 1px solid #f1f5f9 !important;
}
body:not(.dark-theme) .gfiles-setting-title {
    color: #202124 !important;
}
body:not(.dark-theme) .gfiles-setting-sub {
    color: #5f6368 !important;
}
body:not(.dark-theme) .gfiles-icon-box {
    background: #f1f3f4 !important;
    color: #5f6368 !important;
    border: none !important;
}
body:not(.dark-theme) .gfiles-divider {
    background: #f1f3f4 !important;
    height: 8px !important;
    border: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FRYNEX ULTIMATE REVISION V1.0.6 : SPECIFIC USER FIXES
   1. Outils Business : Titres dans l'explication des performances en BLANC PUR
   2. Télécharger : Champ de saisie (.input-area) élégant sans bloc blanc brut
   3. Menu latéral : Titre "Menu" en BLANC PUR et en-têtes en gris clair
   4. Playlist : Boutons de navigation et d'actions style iOS Pro ultra-tactiles
   ═══════════════════════════════════════════════════════════════════════════ */

/* 1. OUTILS BUSINESS — EXPLICATION DES PERFORMANCES EN BLANC PUR (#ffffff) */
body.dark-theme .frynzy-biz-info-title,
.frynzy-biz-info-title {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.96rem !important;
}

body.dark-theme .frynzy-biz-info-text,
.frynzy-biz-info-text {
    color: #94a3b8 !important;
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
}

body.dark-theme .frynzy-biz-info-icon-box {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
}

body.dark-theme #frynzyBizInfoModal .frynzy-crystal-bottom-sheet {
    background: #14141e !important;
    border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 24px 24px 0 0 !important;
    color: #ffffff !important;
}

body.dark-theme #frynzyBizInfoModal .frynzy-sheet-title {
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* 2. TÉLÉCHARGER — CHAMPS DE SAISIE ÉLÉGANTS & INTÉGRÉS (PLUS DE BLOC BLANC BRUT) */
body.dark-theme #tabContentSearch .input-area,
body.dark-theme .input-area {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 14px !important;
    padding: 4px 6px 4px 14px !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    width: 100% !important;
    transition: border-color 0.15s ease, background-color 0.15s ease !important;
}

body.dark-theme #tabContentSearch .input-area:focus-within,
body.dark-theme .input-area:focus-within {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

body.dark-theme #tabContentSearch .service-input,
body.dark-theme .service-input {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #ffffff !important;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    flex: 1 !important;
    padding: 8px 6px 8px 0 !important;
    box-shadow: none !important;
}

body.dark-theme #tabContentSearch .service-input::placeholder,
body.dark-theme .service-input::placeholder {
    color: #94a3b8 !important;
}

body.dark-theme #tabContentSearch .btn-action,
body.dark-theme .btn-action {
    background: #2563eb !important;
    border: none !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4) !important;
    transition: transform 0.12s ease !important;
}

body.dark-theme #tabContentSearch .btn-action:active,
body.dark-theme .btn-action:active {
    transform: scale(0.92) !important;
}

/* 3. MENU LATÉRAL — TITRE "Menu" EN BLANC PUR (#ffffff) & EN-TÊTES GRIS CLAIR */
.frynzy-ios-drawer-title,
body.dark-theme .frynzy-ios-drawer-title {
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 1.4rem !important;
    letter-spacing: -0.4px !important;
}

.frynzy-ios-close-btn,
body.dark-theme .frynzy-ios-close-btn {
    color: #cbd5e1 !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

.frynzy-ios-section-header,
body.dark-theme .frynzy-ios-section-header {
    color: #cbd5e1 !important;
    font-weight: 700 !important;
    font-size: 0.74rem !important;
    letter-spacing: 0.6px !important;
    text-transform: uppercase !important;
}

/* 4. PLAYLIST & ÉCRANS LIÉS — BOUTONS PRO STYLE iOS (DARK & LIGHT MODE) */
#frynzyPlaylistSetupPage {
    z-index: 10009200 !important;
}

#frynzyImportMusicPage {
    z-index: 10009650 !important;
}

#frynzyNewPlaylistPage {
    z-index: 10009200 !important;
}

#frynzyPlaylistsPage {
    z-index: 10009100 !important;
}

/* Bouton Retour style iOS Pro (Circulaire avec retour tactile doux) */
.frynzy-ios-back-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(142, 142, 147, 0.16) !important;
    border: 1px solid rgba(142, 142, 147, 0.22) !important;
    color: #007aff !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    transition: transform 0.12s ease, background 0.12s ease !important;
    box-sizing: border-box !important;
    padding: 0 !important;
}

.frynzy-ios-back-btn:active {
    transform: scale(0.92) !important;
    background: rgba(142, 142, 147, 0.3) !important;
}

body.dark-theme .frynzy-ios-back-btn {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
}

/* Boutons d'action droite style iOS Pro */
.frynzy-ios-header-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(142, 142, 147, 0.16) !important;
    border: 1px solid rgba(142, 142, 147, 0.22) !important;
    color: #007aff !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    transition: transform 0.12s ease, background 0.12s ease !important;
    box-sizing: border-box !important;
    padding: 0 !important;
}

.frynzy-ios-header-btn:active {
    transform: scale(0.92) !important;
}

body.dark-theme .frynzy-ios-header-btn {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #cbd5e1 !important;
}

/* Bouton + (Ajouter) : Cercle bleu iOS Pro vibrant */
#frynzySetupAddBtn {
    background: #007aff !important;
    border: 1px solid #007aff !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.4) !important;
}

#frynzySetupAddBtn i {
    color: #ffffff !important;
    font-size: 0.95rem !important;
}

/* Bouton Check (Sauvegarder) : Cercle vert iOS Pro vibrant */
#frynzySetupSaveBtn {
    background: #34c759 !important;
    border: 1px solid #34c759 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(52, 199, 89, 0.4) !important;
}

#frynzySetupSaveBtn i {
    color: #ffffff !important;
    font-size: 0.95rem !important;
}



/* ==========================================================================
   TURN 14: SEARCH BOTTOMSHEETS, CALENDAR, FY SHARE, PLAYLIST BUTTONS
   ========================================================================== */

/* 1. SEARCH FILTER BOTTOMSHEETS (DARK THEME) */
body.dark-theme .gfiles-bottomsheet,
.dark-theme .gfiles-bottomsheet,
body.dark-theme #gfilesSearchStorageSheet .gfiles-bottomsheet,
body.dark-theme #gfilesSearchSortSheet .gfiles-bottomsheet,
body.dark-theme #gfilesSearchCatSheet .gfiles-bottomsheet {
    background: #111625 !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 24px 24px 0 0 !important;
    color: #ffffff !important;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6) !important;
}

body.dark-theme .gfiles-bottomsheet-handle,
.dark-theme .gfiles-bottomsheet-handle {
    background: rgba(255, 255, 255, 0.28) !important;
}

body.dark-theme .gfiles-bottomsheet-title,
.dark-theme .gfiles-bottomsheet-title {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1.08rem !important;
}

body.dark-theme .gfiles-sheet-row,
.dark-theme .gfiles-sheet-row {
    color: #ffffff !important;
    border-radius: 12px !important;
    transition: background 0.12s ease !important;
}

body.dark-theme .gfiles-sheet-row:active,
body.dark-theme .gfiles-sheet-row:hover,
.dark-theme .gfiles-sheet-row:active,
.dark-theme .gfiles-sheet-row:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .gfiles-sheet-row-left,
.dark-theme .gfiles-sheet-row-left {
    color: #ffffff !important;
}

body.dark-theme .gfiles-sheet-row-left span,
body.dark-theme .gfiles-sheet-row span,
.dark-theme .gfiles-sheet-row-left span,
.dark-theme .gfiles-sheet-row span {
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 0.98rem !important;
}

body.dark-theme .gfiles-sheet-row-left i,
body.dark-theme .gfiles-sheet-row i,
.dark-theme .gfiles-sheet-row-left i,
.dark-theme .gfiles-sheet-row i {
    color: #94a3b8 !important;
}

/* Custom Radio & Checkbox in Dark Theme */
body.dark-theme .gfiles-radio,
.dark-theme .gfiles-radio {
    border: 2px solid rgba(255, 255, 255, 0.35) !important;
    background: transparent !important;
}

body.dark-theme .gfiles-radio.selected,
.dark-theme .gfiles-radio.selected {
    border-color: #3b82f6 !important;
}

body.dark-theme .gfiles-radio.selected::after,
.dark-theme .gfiles-radio.selected::after {
    background: #3b82f6 !important;
}

body.dark-theme .gfiles-checkbox,
.dark-theme .gfiles-checkbox {
    border: 2px solid rgba(255, 255, 255, 0.35) !important;
    background: transparent !important;
    color: transparent !important;
}

body.dark-theme .gfiles-checkbox.checked,
.dark-theme .gfiles-checkbox.checked {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

body.dark-theme .gfiles-checkbox.checked i,
.dark-theme .gfiles-checkbox.checked i {
    color: #ffffff !important;
}

/* 2. DATE CALENDAR MODAL (BLEU ET ROSE) */
.gfiles-cal-day.range-start span {
    background: #2563eb !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.55) !important;
}

.gfiles-cal-day.range-end span {
    background: #ec4899 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 10px rgba(236, 72, 153, 0.55) !important;
}

body.dark-theme .gfiles-cal-day span,
.dark-theme .gfiles-cal-day span {
    color: #ffffff !important;
}

body.dark-theme .gfiles-cal-day.empty span,
.dark-theme .gfiles-cal-day.empty span {
    color: transparent !important;
}

body.dark-theme .gfiles-cal-day.future-disabled span,
.dark-theme .gfiles-cal-day.future-disabled span {
    color: #64748b !important;
    opacity: 0.3 !important;
}

/* 3. FY SHARE SETTINGS & DEVICE NAME PILL */
.fyshare-device-pill,
#fyshareSettingsDeviceNameVal {
    display: inline-flex !important;
    align-items: center !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    margin-right: 8px !important;
}

body:not(.dark-theme) .fyshare-device-pill,
body:not(.dark-theme) #fyshareSettingsDeviceNameVal {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

body.dark-theme .fyshare-device-pill,
body.dark-theme #fyshareSettingsDeviceNameVal {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
}

.fyshare-edit-pen {
    color: #3b82f6 !important;
    font-size: 0.85rem !important;
    cursor: pointer !important;
    padding: 4px !important;
}

/* FY SHARE ICON BOXES */
#fyshareSettingsBody .gfiles-icon-box,
#rowFyShareSettings .gfiles-icon-box {
    width: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.05rem !important;
    flex-shrink: 0 !important;
}

body:not(.dark-theme) #fyshareSettingsBody .gfiles-icon-box,
body:not(.dark-theme) #rowFyShareSettings .gfiles-icon-box {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
}

body.dark-theme #fyshareSettingsBody .gfiles-icon-box,
body.dark-theme #rowFyShareSettings .gfiles-icon-box {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #cbd5e1 !important;
}

body.dark-theme #fyshareSettingsBody .gfiles-icon-box i,
body.dark-theme #rowFyShareSettings .gfiles-icon-box i {
    color: #cbd5e1 !important;
}

/* FY SHARE SUB-SCREEN BODY & ITEMS */
body.dark-theme #fyshareSettingsBody {
    background: #000000 !important;
    color: #ffffff !important;
}

body.dark-theme #fyshareSettingsBody .gfiles-setting-item {
    background: #000000 !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme #fyshareSettingsBody .gfiles-setting-title {
    color: #ffffff !important;
    font-weight: 600 !important;
}

body.dark-theme #fyshareSettingsBody .gfiles-setting-sub {
    color: #94a3b8 !important;
}

body.dark-theme #fyshareSettingsBody .gfiles-section-header {
    color: #cbd5e1 !important;
    font-weight: 700 !important;
}

/* Device badge in settings main page */
#settingsFyShareDeviceBadge {
    border-radius: 12px !important;
    padding: 3px 10px !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
}

body:not(.dark-theme) #settingsFyShareDeviceBadge {
    background: #e2e8f0 !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

body.dark-theme #settingsFyShareDeviceBadge {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

/* 4. PLAYLIST SETUP & IMPORT PAGE BUTTONS (iOS STYLE) */
.frynzy-ios-back-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: transform 0.12s ease, opacity 0.12s ease !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

body:not(.dark-theme) .frynzy-ios-back-btn {
    background: rgba(0, 0, 0, 0.06) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #007aff !important;
}

body.dark-theme .frynzy-ios-back-btn {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #38bdf8 !important;
}

.frynzy-ios-back-btn:active {
    transform: scale(0.92) !important;
    opacity: 0.8 !important;
}

.frynzy-ios-header-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: transform 0.12s ease, opacity 0.12s ease !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

body:not(.dark-theme) .frynzy-ios-header-btn {
    background: rgba(0, 0, 0, 0.06) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #007aff !important;
}

body.dark-theme .frynzy-ios-header-btn {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #cbd5e1 !important;
}

.frynzy-ios-header-btn:active {
    transform: scale(0.92) !important;
    opacity: 0.8 !important;
}

/* Header Action Buttons - Simple, Minimalist & White like iPhone */
body:not(.dark-theme) #frynzySetupAddBtn,
body:not(.dark-theme) #frynzySetupSaveBtn,
body:not(.dark-theme) #frynzySetupProToolsBtn,
body:not(.dark-theme) #frynzySetupBatchMenuBtn {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #007aff !important;
}
body:not(.dark-theme) #frynzySetupAddBtn i,
body:not(.dark-theme) #frynzySetupSaveBtn i,
body:not(.dark-theme) #frynzySetupProToolsBtn i,
body:not(.dark-theme) #frynzySetupBatchMenuBtn i {
    color: #007aff !important;
}

body.dark-theme #frynzySetupAddBtn,
body.dark-theme #frynzySetupSaveBtn,
body.dark-theme #frynzySetupProToolsBtn,
body.dark-theme #frynzySetupBatchMenuBtn,
.dark-theme #frynzySetupAddBtn,
.dark-theme #frynzySetupSaveBtn,
.dark-theme #frynzySetupProToolsBtn,
.dark-theme #frynzySetupBatchMenuBtn,
[data-theme="dark"] #frynzySetupAddBtn,
[data-theme="dark"] #frynzySetupSaveBtn,
[data-theme="dark"] #frynzySetupProToolsBtn,
[data-theme="dark"] #frynzySetupBatchMenuBtn,
#frynzyPlaylistSetupPage .frynzy-ios-header-btn,
#frynzyPlaylistSetupPage .frynzy-ios-back-btn,
#frynzyImportMusicPage .frynzy-ios-header-btn,
#frynzyImportMusicPage .frynzy-ios-back-btn,
body.dark-theme .frynzy-ios-header-btn,
.dark-theme .frynzy-ios-header-btn {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: none !important;
}
body.dark-theme #frynzySetupAddBtn i,
body.dark-theme #frynzySetupSaveBtn i,
body.dark-theme #frynzySetupProToolsBtn i,
body.dark-theme #frynzySetupBatchMenuBtn i,
.dark-theme #frynzySetupAddBtn i,
.dark-theme #frynzySetupSaveBtn i,
.dark-theme #frynzySetupProToolsBtn i,
.dark-theme #frynzySetupBatchMenuBtn i,
[data-theme="dark"] #frynzySetupAddBtn i,
[data-theme="dark"] #frynzySetupSaveBtn i,
[data-theme="dark"] #frynzySetupProToolsBtn i,
[data-theme="dark"] #frynzySetupBatchMenuBtn i,
#frynzyPlaylistSetupPage .frynzy-ios-header-btn i,
#frynzyPlaylistSetupPage .frynzy-ios-back-btn i,
#frynzyImportMusicPage .frynzy-ios-header-btn i,
#frynzyImportMusicPage .frynzy-ios-back-btn i,
body.dark-theme .frynzy-ios-header-btn i,
.dark-theme .frynzy-ios-header-btn i {
    color: #ffffff !important;
    font-size: 1.15rem !important;
}

/* Ensure Import page is strictly in front of Playlist Setup page */
#frynzyPlaylistSetupPage {
    z-index: 10009200 !important;
}
#frynzyImportMusicPage {
    z-index: 10009650 !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   DARK THEME OVERRIDES FOR PLAYLIST SETUP & TRACK ROWS (HIGHEST SPECIFICITY)
   ═══════════════════════════════════════════════════════════════════════════ */
body.dark-theme #frynzyPlaylistSetupPage,
.dark-theme #frynzyPlaylistSetupPage,
body.dark-theme #frynzyImportMusicPage,
.dark-theme #frynzyImportMusicPage,
body.dark-theme #frynzyNewPlaylistPage,
.dark-theme #frynzyNewPlaylistPage,
body.dark-theme #frynzyPlaylistsPage,
.dark-theme #frynzyPlaylistsPage,
body.dark-theme .frynzy-ios-page,
.dark-theme .frynzy-ios-page {
    background: #0b1120 !important;
    background-color: #0b1120 !important;
    background-image: none !important;
    color: #ffffff !important;
}

body.dark-theme .frynzy-ios-page-content,
.dark-theme .frynzy-ios-page-content,
body.dark-theme #frynzyPlaylistSetupPage .frynzy-ios-page-content,
.dark-theme #frynzyPlaylistSetupPage .frynzy-ios-page-content,
body.dark-theme #frynzyImportMusicPage .frynzy-ios-page-content,
.dark-theme #frynzyImportMusicPage .frynzy-ios-page-content {
    background: #0b1120 !important;
    background-color: #0b1120 !important;
    color: #ffffff !important;
}

body.dark-theme #frynzySetupTracksContainer,
.dark-theme #frynzySetupTracksContainer {
    background: transparent !important;
    background-color: transparent !important;
}

body.dark-theme #frynzySetupTracksContainer .frynzy-audio-row,
body.dark-theme .frynzy-audio-row,
.dark-theme #frynzySetupTracksContainer .frynzy-audio-row,
.dark-theme .frynzy-audio-row,
[data-theme="dark"] #frynzySetupTracksContainer .frynzy-audio-row,
[data-theme="dark"] .frynzy-audio-row,
.dark #frynzySetupTracksContainer .frynzy-audio-row,
.dark .frynzy-audio-row,
#frynzyPlaylistSetupPage .frynzy-audio-row {
    background: rgba(255, 255, 255, 0.08) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}
body.dark-theme #frynzySetupTracksContainer .frynzy-audio-row.selected,
body.dark-theme .frynzy-audio-row.selected {
    background: rgba(0, 122, 255, 0.22) !important;
    border: 1.5px solid #007aff !important;
}
body.dark-theme .frynzy-audio-title,
.dark-theme .frynzy-audio-title,
[data-theme="dark"] .frynzy-audio-title,
.dark .frynzy-audio-title,
#frynzyPlaylistSetupPage .frynzy-audio-title {
    color: #ffffff !important;
    font-weight: 600 !important;
}
body.dark-theme .frynzy-audio-sub,
.dark-theme .frynzy-audio-sub,
[data-theme="dark"] .frynzy-audio-sub,
.dark .frynzy-audio-sub,
#frynzyPlaylistSetupPage .frynzy-audio-sub {
    color: #94a3b8 !important;
}
body.dark-theme .frynzy-audio-thumb,
.dark-theme .frynzy-audio-thumb {
    background: rgba(255, 255, 255, 0.10) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
body.dark-theme .frynzy-playlist-search-wrap,
.dark-theme .frynzy-playlist-search-wrap {
    background: rgba(255, 255, 255, 0.08) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}
body.dark-theme .frynzy-playlist-search-input,
.dark-theme .frynzy-playlist-search-input {
    color: #ffffff !important;
    background: transparent !important;
}
body.dark-theme .frynzy-playlist-search-input::placeholder,
.dark-theme .frynzy-playlist-search-input::placeholder {
    color: #94a3b8 !important;
}
body.dark-theme .frynzy-playlist-search-icon,
.dark-theme .frynzy-playlist-search-icon {
    color: #94a3b8 !important;
}
body.dark-theme .frynzy-playlist-search-clear,
.dark-theme .frynzy-playlist-search-clear {
    color: #94a3b8 !important;
}

#frynzyPlaylistSetupPage.active,
#frynzyPlaylistSetupPage[style*="display: flex"],
#frynzyPlaylistSetupPage[style*="display: block"],
#frynzyImportMusicPage.active,
#frynzyImportMusicPage[style*="display: flex"],
#frynzyImportMusicPage[style*="display: block"] {
    display: flex !important;
    flex-direction: column !important;
}


/* ==========================================================================
   FRYNEX TÉLÉCHARGER TAB & APPLICATIONS DARK MODE OVERHAUL
   ========================================================================== */

/* 1. TÉLÉCHARGER TAB: RESTAURATION STRUCTURELLE DES ENCADREMENTS ET LOGOS */
#tabContentSearch .card,
.grid-container .card,
.card {
    border-radius: 20px !important;
    background: #ffffff !important;
    border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
    padding: 18px !important;
    margin-bottom: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    position: relative !important;
}

body.dark-theme #tabContentSearch .card,
body.dark-theme .grid-container .card,
body.dark-theme .card {
    background: #14141e !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
}

/* En-tête de carte : Flex horizontal avec alignement de l'URL à droite */
#tabContentSearch .card-header,
.card .card-header {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 12px !important;
}

/* Groupe Logo + Titre : Flex horizontal avec espacement */
#tabContentSearch .icon-title,
.card .icon-title {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 0 !important;
    flex: 1 !important;
}

#tabContentSearch .icon-title i,
.card .icon-title i {
    font-size: 1.6rem !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

#tabContentSearch .icon-title h3,
.card .icon-title h3 {
    margin: 0 !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: #1e293b !important;
    display: inline-block !important;
}

body.dark-theme #tabContentSearch .icon-title h3,
body.dark-theme .card .icon-title h3 {
    color: #ffffff !important;
}

/* Badge URL : Positionné obligatoirement à droite avec style élégant */
#tabContentSearch .badge,
.card .badge {
    margin-left: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    background: rgba(127, 0, 255, 0.1) !important;
    color: #7f00ff !important;
    border: 1px solid rgba(127, 0, 255, 0.25) !important;
    flex-shrink: 0 !important;
}

body.dark-theme #tabContentSearch .badge,
body.dark-theme .card .badge {
    background: rgba(127, 0, 255, 0.25) !important;
    color: #c084fc !important;
    border: 1px solid rgba(192, 132, 252, 0.35) !important;
}

/* Couleurs officielles vives des logos des plateformes (Adieu logos noirs !) */
.card-youtube .icon-title i,
#tabContentSearch .card-youtube .icon-title i,
.card[data-service="youtube"] .icon-title i,
.card-youtube i.fab.fa-youtube {
    color: #ff0000 !important;
}

.card-tiktok .icon-title i,
#tabContentSearch .card-tiktok .icon-title i,
.card[data-service="tiktok"] .icon-title i,
.card-tiktok i.fab.fa-tiktok {
    color: #ff0050 !important;
}

.card-instagram .icon-title i,
#tabContentSearch .card-instagram .icon-title i,
.card[data-service="instagram"] .icon-title i,
.card-instagram i.fab.fa-instagram {
    color: #e1306c !important;
}

.card-twitter .icon-title i,
#tabContentSearch .card-twitter .icon-title i,
.card[data-service="twitter"] .icon-title i,
.card-twitter i.fab.fa-twitter,
.card-twitter i.fab.fa-x-twitter {
    color: #1da1f2 !important;
}

.card-facebook .icon-title i,
#tabContentSearch .card-facebook .icon-title i,
.card[data-service="facebook"] .icon-title i,
.card-facebook i.fab.fa-facebook,
.card-facebook i.fab.fa-facebook-f {
    color: #1877f2 !important;
}

.card-pinterest .icon-title i,
#tabContentSearch .card-pinterest .icon-title i,
.card[data-service="pinterest"] .icon-title i,
.card-pinterest i.fab.fa-pinterest,
.card-pinterest i.fab.fa-pinterest-p {
    color: #e60023 !important;
}

.card-mediafire .icon-title i,
#tabContentSearch .card-mediafire .icon-title i,
.card[data-service="mediafire"] .icon-title i {
    color: #0070f0 !important;
}

.card-appvn .icon-title i,
#tabContentSearch .card-appvn .icon-title i,
.card[data-service="appvn"] .icon-title i {
    color: #388e3c !important;
}

.card-apk .icon-title i,
#tabContentSearch .card-apk .icon-title i,
.card[data-service="apk"] .icon-title i {
    color: #00897b !important;
}

.card-ringtones .icon-title i,
#tabContentSearch .card-ringtones .icon-title i,
.card[data-service="ringtones"] .icon-title i {
    color: #f57c00 !important;
}

.card-xnxx .icon-title i,
#tabContentSearch .card-xnxx .icon-title i,
.card[data-service="xnxx"] .icon-title i,
.card-xvideos .icon-title i,
#tabContentSearch .card-xvideos .icon-title i,
.card[data-service="xvideos"] .icon-title i {
    color: #e67e00 !important;
}

.card-lyrics .icon-title i,
#tabContentSearch .card-lyrics .icon-title i,
.card[data-service="lyrics"] .icon-title i {
    color: #8b5cf6 !important;
}

/* 2. SECTION APPLICATIONS : MODE SOMBRE COMPLET & MENUS 3 POINTS */

/* Écran et conteneur principal : Fond noir pur / sombre */
body.dark-theme #frynzyAppsScreen,
.dark-theme #frynzyAppsScreen,
body.dark-theme #frynzyAppsScreen.gfiles-cat-screen,
.dark-theme #frynzyAppsScreen.gfiles-cat-screen,
body.dark-theme #gfilesAppsListContainer,
.dark-theme #gfilesAppsListContainer,
body.dark-theme .gfiles-apps-list,
.dark-theme .gfiles-apps-list {
    background: #000000 !important;
    background-color: #000000 !important;
    color: #ffffff !important;
}

/* Topbar Applications */
body.dark-theme #frynzyAppsScreen .gfiles-cat-topbar,
.dark-theme #frynzyAppsScreen .gfiles-cat-topbar {
    background: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme #frynzyAppsScreen .gfiles-cat-title,
.dark-theme #frynzyAppsScreen .gfiles-cat-title {
    color: #ffffff !important;
}

body.dark-theme #frynzyAppsScreen .gfiles-cat-icon-btn,
.dark-theme #frynzyAppsScreen .gfiles-cat-icon-btn,
body.dark-theme #frynzyAppsScreen .gfiles-cat-icon-btn i,
.dark-theme #frynzyAppsScreen .gfiles-cat-icon-btn i {
    color: #ffffff !important;
}

/* Onglets d'applications (Installées, Système, APK) */
body.dark-theme .gfiles-apps-tabs,
.dark-theme .gfiles-apps-tabs {
    background: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .gfiles-apps-tab-btn,
.dark-theme .gfiles-apps-tab-btn {
    color: #94a3b8 !important;
    background: transparent !important;
}

body.dark-theme .gfiles-apps-tab-btn.active,
.dark-theme .gfiles-apps-tab-btn.active {
    color: #38bdf8 !important;
    border-bottom-color: #38bdf8 !important;
}

/* Boutons filtres (Chips : Volumineuses, Inutilisées, Jeux) */
body.dark-theme .gfiles-apps-chips,
.dark-theme .gfiles-apps-chips {
    background: #000000 !important;
}

body.dark-theme .gfiles-app-filter-chip,
.dark-theme .gfiles-app-filter-chip {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
}

body.dark-theme .gfiles-app-filter-chip i,
.dark-theme .gfiles-app-filter-chip i,
body.dark-theme .gfiles-app-filter-chip span,
.dark-theme .gfiles-app-filter-chip span {
    color: #ffffff !important;
}

body.dark-theme .gfiles-app-filter-chip.active,
.dark-theme .gfiles-app-filter-chip.active {
    background: rgba(56, 189, 248, 0.22) !important;
    border-color: #38bdf8 !important;
    color: #38bdf8 !important;
}

body.dark-theme .gfiles-app-filter-chip.active i,
.dark-theme .gfiles-app-filter-chip.active i,
body.dark-theme .gfiles-app-filter-chip.active span,
.dark-theme .gfiles-app-filter-chip.active span {
    color: #38bdf8 !important;
}

/* Lignes d'application & Textes en BLANC */
body.dark-theme .gfiles-app-row,
.dark-theme .gfiles-app-row {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .gfiles-app-row:active,
.dark-theme .gfiles-app-row:active {
    background: rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .gfiles-app-name,
.dark-theme .gfiles-app-name {
    color: #ffffff !important;
    font-weight: 600 !important;
}

body.dark-theme .gfiles-app-sub,
.dark-theme .gfiles-app-sub,
body.dark-theme .gfiles-app-sub span,
.dark-theme .gfiles-app-sub span,
body.dark-theme .gfiles-app-meta,
.dark-theme .gfiles-app-meta {
    color: #94a3b8 !important;
}

body.dark-theme .gfiles-app-more-btn,
.dark-theme .gfiles-app-more-btn,
body.dark-theme .gfiles-app-more-btn i,
.dark-theme .gfiles-app-more-btn i {
    color: #ffffff !important;
    background: transparent !important;
}

/* Skeleton de chargement en mode sombre */
body.dark-theme .gfiles-app-skeleton,
.dark-theme .gfiles-app-skeleton {
    background: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .gfiles-app-skeleton div,
.dark-theme .gfiles-app-skeleton div {
    background: rgba(255, 255, 255, 0.08) !important;
}

/* 3. MENUS 3 POINTS (Popups d'actions d'application et tri) : TEXTES STRICTEMENT EN BLANC */
body.dark-theme #gfilesAppsMenuPopup,
.dark-theme #gfilesAppsMenuPopup,
body.dark-theme #gfilesAppItemMenuPopup,
.dark-theme #gfilesAppItemMenuPopup,
body.dark-theme .gfiles-dropdown-popup,
.dark-theme .gfiles-dropdown-popup {
    background: #181824 !important;
    background-color: #181824 !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75) !important;
    border-radius: 16px !important;
}

body.dark-theme #gfilesAppsMenuPopup .gfiles-dropdown-item,
.dark-theme #gfilesAppsMenuPopup .gfiles-dropdown-item,
body.dark-theme #gfilesAppItemMenuPopup .gfiles-dropdown-item,
.dark-theme #gfilesAppItemMenuPopup .gfiles-dropdown-item,
body.dark-theme .gfiles-dropdown-popup .gfiles-dropdown-item,
.dark-theme .gfiles-dropdown-popup .gfiles-dropdown-item,
body.dark-theme .gfiles-dropdown-item,
.dark-theme .gfiles-dropdown-item {
    color: #ffffff !important;
}

body.dark-theme #gfilesAppsMenuPopup .gfiles-dropdown-item span,
.dark-theme #gfilesAppsMenuPopup .gfiles-dropdown-item span,
body.dark-theme #gfilesAppItemMenuPopup .gfiles-dropdown-item span,
.dark-theme #gfilesAppItemMenuPopup .gfiles-dropdown-item span,
body.dark-theme .gfiles-dropdown-popup .gfiles-dropdown-item span,
.dark-theme .gfiles-dropdown-popup .gfiles-dropdown-item span,
body.dark-theme .gfiles-dropdown-item span,
.dark-theme .gfiles-dropdown-item span {
    color: #ffffff !important;
}

body.dark-theme .gfiles-dropdown-item:active,
.dark-theme .gfiles-dropdown-item:active {
    background: rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .gfiles-dropdown-item[style*="color:#ef4444"],
body.dark-theme .gfiles-dropdown-item[style*="color: #ef4444"],
.dark-theme .gfiles-dropdown-item[style*="color:#ef4444"],
.dark-theme .gfiles-dropdown-item[style*="color: #ef4444"] {
    color: #ef4444 !important;
}

body.dark-theme .gfiles-dropdown-item[style*="color:#ef4444"] span,
body.dark-theme .gfiles-dropdown-item[style*="color: #ef4444"] span,
.dark-theme .gfiles-dropdown-item[style*="color:#ef4444"] span,
.dark-theme .gfiles-dropdown-item[style*="color: #ef4444"] span {
    color: #ef4444 !important;
}

/* ==========================================================================
   4. MENU LATÉRAL : TITRES STRICTEMENT EN NOIR ET RETRAIT OMBRE CARRÉE DES ICÔNES
   ========================================================================== */
#frynzyIosDrawer .frynzy-ios-row-label,
.frynzy-ios-drawer .frynzy-ios-row-label,
#mainSidebar .frynzy-ios-row-label,
.main-sidebar .frynzy-ios-row-label,
body.dark-theme #frynzyIosDrawer .frynzy-ios-row-label,
body.dark-theme .frynzy-ios-drawer .frynzy-ios-row-label,
body.dark-theme #mainSidebar .frynzy-ios-row-label,
body.dark-theme .main-sidebar .frynzy-ios-row-label,
[data-theme="dark"] #frynzyIosDrawer .frynzy-ios-row-label,
[data-theme="dark"] .frynzy-ios-drawer .frynzy-ios-row-label {
    color: #000000 !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
}

#frynzyIosDrawer .frynzy-ios-row-icon,
.frynzy-ios-drawer .frynzy-ios-row-icon,
#mainSidebar .frynzy-ios-row-icon,
.main-sidebar .frynzy-ios-row-icon,
body.dark-theme #frynzyIosDrawer .frynzy-ios-row-icon,
body.dark-theme .frynzy-ios-drawer .frynzy-ios-row-icon,
body.dark-theme #mainSidebar .frynzy-ios-row-icon,
body.dark-theme .main-sidebar .frynzy-ios-row-icon,
[data-theme="dark"] #frynzyIosDrawer .frynzy-ios-row-icon,
[data-theme="dark"] .frynzy-ios-drawer .frynzy-ios-row-icon {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

#frynzyIosDrawer .frynzy-ios-row-icon i,
.frynzy-ios-drawer .frynzy-ios-row-icon i,
#frynzyIosDrawer .frynzy-ios-row-icon svg,
.frynzy-ios-drawer .frynzy-ios-row-icon svg,
#mainSidebar .frynzy-ios-row-icon i,
.main-sidebar .frynzy-ios-row-icon i,
body.dark-theme #frynzyIosDrawer .frynzy-ios-row-icon i,
body.dark-theme .frynzy-ios-drawer .frynzy-ios-row-icon i,
body.dark-theme #mainSidebar .frynzy-ios-row-icon i,
body.dark-theme .main-sidebar .frynzy-ios-row-icon i,
[data-theme="dark"] #frynzyIosDrawer .frynzy-ios-row-icon i,
[data-theme="dark"] .frynzy-ios-drawer .frynzy-ios-row-icon i {
    color: #000000 !important;
    fill: #000000 !important;
}

/* ==========================================================================
   5. INFORMATIONS SUR LE FICHIER : DIALOGUE EN MODE SOMBRE (TEXTES NETS ET LISIBLES)
   ========================================================================== */
body.dark-theme #frynzyFileInfoDialogBackdrop .gfiles-dialog-card,
.dark-theme #frynzyFileInfoDialogBackdrop .gfiles-dialog-card,
body.dark-theme .gfiles-dialog-card,
.dark-theme .gfiles-dialog-card {
    background: #181824 !important;
    background-color: #181824 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8) !important;
    color: #ffffff !important;
}

body.dark-theme #frynzyFileInfoDialogBackdrop .gfiles-dialog-title,
.dark-theme #frynzyFileInfoDialogBackdrop .gfiles-dialog-title {
    color: #ffffff !important;
    font-weight: 700 !important;
}

body.dark-theme #gfilesFileInfoContent,
.dark-theme #gfilesFileInfoContent,
body.dark-theme #gfilesFileInfoContent *,
.dark-theme #gfilesFileInfoContent * {
    color: #f1f5f9 !important;
}

body.dark-theme #gfilesFileInfoContent strong,
.dark-theme #gfilesFileInfoContent strong,
body.dark-theme #gfilesFileInfoContent .gfiles-info-lbl,
.dark-theme #gfilesFileInfoContent .gfiles-info-lbl {
    color: #ffffff !important;
    font-weight: 700 !important;
}

body.dark-theme #gfilesFileInfoContent .gfiles-info-path,
.dark-theme #gfilesFileInfoContent .gfiles-info-path {
    color: #94a3b8 !important;
}
