/* ==========================================================================
   ⚡ JEREMOS - DESKTOP WIDGETS & ACCESSORIES (jeremos-oth.css)
   Fonds d'écran, icônes bureau, taskbar, start menu, flyouts, calc, HUD
   ========================================================================== */

/* ==========================================================================
   WALLPAPERS & THEMES
   ========================================================================== */
.win-wallpaper-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.win-wallpaper,
.win-wallpaper-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.win-wallpaper-layer {
    opacity: 0;
    pointer-events: none;
}

.win-wallpaper-layer.active {
    opacity: 1;
    z-index: 1;
}

.win-wallpaper-layer.next {
    opacity: 0;
    z-index: 2;
}


.theme-ambre {
    background:
        radial-gradient(ellipse 85% 65% at 15% 15%, rgba(245, 158, 11, 0.42) 0%, transparent 65%),
        radial-gradient(ellipse 75% 55% at 85% 80%, rgba(180, 83, 9, 0.48) 0%, transparent 65%),
        radial-gradient(ellipse 90% 70% at 50% 50%, rgba(99, 102, 241, 0.16) 0%, transparent 70%),
        radial-gradient(circle at 75% 20%, rgba(251, 191, 36, 0.28) 0%, transparent 45%),
        linear-gradient(135deg, #181008 0%, #120e24 45%, #070810 100%);
}

.theme-night {
    background:
        radial-gradient(ellipse 80% 60% at 20% 25%, rgba(59, 130, 246, 0.42) 0%, transparent 65%),
        radial-gradient(ellipse 75% 55% at 80% 75%, rgba(147, 51, 234, 0.42) 0%, transparent 65%),
        radial-gradient(circle at 50% 85%, rgba(6, 182, 212, 0.22) 0%, transparent 50%),
        radial-gradient(circle at 70% 15%, rgba(99, 102, 241, 0.28) 0%, transparent 40%),
        linear-gradient(140deg, #040810 0%, #090e22 50%, #010307 100%);
}

.theme-bistro {
    background:
        radial-gradient(ellipse 80% 60% at 75% 25%, rgba(194, 65, 12, 0.42) 0%, transparent 65%),
        radial-gradient(ellipse 75% 55% at 20% 75%, rgba(180, 83, 9, 0.38) 0%, transparent 65%),
        radial-gradient(circle at 50% 50%, rgba(217, 119, 6, 0.18) 0%, transparent 50%),
        linear-gradient(135deg, #170c06 0%, #221007 45%, #0b0502 100%);
}

.theme-graphite {
    background:
        radial-gradient(ellipse 85% 65% at 50% 20%, rgba(148, 163, 184, 0.16) 0%, transparent 65%),
        radial-gradient(ellipse 75% 55% at 85% 85%, rgba(71, 85, 105, 0.22) 0%, transparent 65%),
        radial-gradient(circle at 15% 75%, rgba(100, 116, 139, 0.16) 0%, transparent 55%),
        linear-gradient(135deg, #16171a 0%, #0e0f11 50%, #050607 100%);
}

.theme-neon {
    background:
        radial-gradient(ellipse 80% 60% at 50% 20%, rgba(168, 85, 247, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse 75% 55% at 20% 80%, rgba(59, 130, 246, 0.35) 0%, transparent 60%),
        linear-gradient(135deg, #1b0c36 0%, #0c0822 50%, #02030d 100%);
}

/* Background animated particle glow overlay */
.win-wallpaper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(59, 130, 246, 0.08) 0%, transparent 40%);
    pointer-events: none;
}

/* ==========================================================================
   DESKTOP WORKSPACE & ICONS
   ========================================================================== */
#win-desktop-workspace {
    position: relative;
    flex: 1;
    width: 100%;
    height: calc(100vh - var(--win-taskbar-height));
    z-index: 10;
    overflow: hidden;
}

/* ==========================================================================
   CENTERED DESKTOP BRANDING (JEREMOS WATERMARK)
   ========================================================================== */
.win-desktop-branding {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
    user-select: none;
    opacity: 0.95;
    transition: opacity 0.3s ease, transform 0.4s ease;
}

/* Minimalist Clean Branding: No borders, no background contours, pristine drop shadows */
.win-branding-clean {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.win-branding-main-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.win-branding-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.85)) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.95));
    transition: filter 0.3s ease;
}

.win-branding-title {
    font-size: 46px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
    margin: 0;
    line-height: 1;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.85), 
                 0 1px 3px rgba(0, 0, 0, 0.95), 
                 0 0 35px rgba(0, 0, 0, 0.6);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.win-branding-subtitle {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85), 
                 0 1px 2px rgba(0, 0, 0, 0.95);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}


@keyframes brandingFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-4px); }
}

@keyframes ledPulse {
    0%, 100% { opacity: 0.5; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.2); filter: drop-shadow(0 0 6px #38bdf8); }
}

@keyframes pulseSparkle {
    0%, 100% { opacity: 0.7; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.2); filter: drop-shadow(0 0 6px #a5b4fc); }
}

#win-desktop-icons {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

/* Grid Sizing Modifiers */
#win-desktop-icons.grid-compact .win-desktop-icon {
    width: 88px;
    height: 100px;
    padding: 6px 4px;
}
#win-desktop-icons.grid-compact .win-desktop-icon-symbol {
    width: 48px;
    height: 48px;
    font-size: 24px;
    margin-bottom: 4px;
}
#win-desktop-icons.grid-compact .win-desktop-icon-label {
    font-size: 11px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    max-height: 28px;
}

#win-desktop-icons.grid-normal .win-desktop-icon {
    width: 112px;
    height: 126px;
    padding: 8px 6px;
}
#win-desktop-icons.grid-normal .win-desktop-icon-symbol {
    width: 58px;
    height: 58px;
    font-size: 28px;
    margin-bottom: 6px;
}
#win-desktop-icons.grid-normal .win-desktop-icon-label {
    font-size: 12px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    max-height: 46px;
}

#win-desktop-icons.grid-comfortable .win-desktop-icon {
    width: 132px;
    height: 146px;
    padding: 10px 8px;
}
#win-desktop-icons.grid-comfortable .win-desktop-icon-symbol {
    width: 68px;
    height: 68px;
    font-size: 34px;
    margin-bottom: 7px;
}
#win-desktop-icons.grid-comfortable .win-desktop-icon-label {
    font-size: 12.5px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    max-height: 48px;
}

.win-desktop-icon {
    width: 112px;
    height: 126px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 6px;
    border-radius: 14px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, left 0.12s ease-out, top 0.12s ease-out;
    text-align: center;
    position: absolute;
    pointer-events: auto;
    box-sizing: border-box;
}

.win-desktop-icon:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    transform: translateY(-2px);
}

.win-desktop-icon.selected {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(96, 165, 250, 0.5);
    backdrop-filter: blur(10px);
}

.win-desktop-icon.admin-draggable {
    cursor: grab;
}

.win-desktop-icon.admin-draggable:active {
    cursor: grabbing;
}

.win-desktop-icon.is-dragging {
    opacity: 0.35;
    transform: scale(0.92);
    border: 2px dashed rgba(96, 165, 250, 0.8) !important;
    background: rgba(59, 130, 246, 0.15) !important;
}

/* Pastille "nombre d'icônes" sur l'image de glisser-déposer multiple */
.win-drag-count-badge {
    position: absolute;
    top: 2px;
    right: 6px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    box-sizing: border-box;
    border-radius: 11px;
    background: #3b82f6;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.win-desktop-icon.drag-over {
    background: rgba(59, 130, 246, 0.35) !important;
    border-color: #60a5fa !important;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}

.win-desktop-icon.folder-drop-target {
    background: rgba(245, 158, 11, 0.32) !important;
    border: 2px dashed #f59e0b !important;
    transform: translateY(-4px) scale(1.12) !important;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.55) !important;
    z-index: 60 !important;
}

.win-desktop-icon.folder-drop-target .win-desktop-icon-symbol {
    transform: scale(1.18);
    filter: drop-shadow(0 0 14px rgba(245, 158, 11, 0.8));
}

.win-desktop-icon.swap-drop-target {
    background: rgba(59, 130, 246, 0.32) !important;
    border: 2px dashed #60a5fa !important;
    transform: translateY(-3px) scale(1.08) !important;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.55) !important;
    z-index: 60 !important;
}

.win-desktop-icon-symbol {
    position: relative;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-bottom: 6px;
    transition: transform 0.2s ease, filter 0.2s ease;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55));
}

/* Badge circulaire en bas à droite des dossiers indiquant le nombre de blocs */
.win-folder-count-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    border-radius: 999px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff !important;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.65);
    pointer-events: none;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.2px;
    z-index: 5;
    transition: transform 0.2s ease;
}

.win-desktop-icon:hover .win-folder-count-badge {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.7);
}

.win-desktop-icon-symbol img,
.win-desktop-icon-symbol .win-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

.win-desktop-icon:hover .win-desktop-icon-symbol {
    transform: scale(1.12);
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.75));
}

.win-desktop-icon-label {
    width: 100%;
    font-size: 12px;
    font-weight: 500;
    color: #ffffff !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95), 0 0 8px rgba(0, 0, 0, 0.75) !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
    word-break: break-word;
    hyphens: auto;
    max-height: 46px;
    padding: 0 2px;
    box-sizing: border-box;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.win-desktop-icon-badge {
    position: static;
    display: inline-block;
    margin-top: 4px;
    background: rgba(245, 158, 11, 0.22);
    color: #fef08a;
    border: 1px solid rgba(245, 158, 11, 0.45);
    font-size: 9.5px;
    font-weight: 700;
    padding: 1.5px 7px;
    border-radius: 6px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
    max-width: 94%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
}

.win-desktop-icon-admin {
    border: 1px dashed rgba(234, 179, 8, 0.5);
}
.win-desktop-icon-admin .win-desktop-icon-symbol {
    background: transparent !important;
}

/* Marquee Selection Box */
#win-marquee-box {
    position: absolute;
    border: 1px solid rgba(96, 165, 250, 0.8);
    background: rgba(59, 130, 246, 0.18);
    pointer-events: none;
    z-index: 25;
    display: none;
    border-radius: 4px;
}

/* Drag Shield Overlay */
#win-drag-shield {
    position: absolute;
    inset: 0;
    z-index: 99999;
    display: none;
    cursor: grabbing;
}



/* ==========================================================================
   TASKBAR
   ========================================================================== */
#win-taskbar {
    height: var(--win-taskbar-height);
    width: 100%;
    background: rgba(12, 15, 20, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--win-glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    z-index: 10000;
    position: relative;
}

.win-taskbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    overflow: visible;
}

#win-start-btn {
    height: 32px;
    padding: 0 13px;
    border-radius: 9px;
    border: 1px solid rgba(251, 191, 36, 0.65);
    background: linear-gradient(125deg, 
        rgba(217, 119, 6, 0.5), 
        rgba(245, 158, 11, 0.4), 
        rgba(236, 72, 153, 0.35), 
        rgba(139, 92, 246, 0.35), 
        rgba(6, 182, 212, 0.4), 
        rgba(251, 191, 36, 0.5)
    );
    background-size: 320% 320%;
    color: white;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.35px;
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    position: relative;
    overflow: visible;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4), 
                0 0 20px rgba(234, 179, 8, 0.2), 
                inset 0 1px 2px rgba(255, 255, 255, 0.55);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Shimmer supprimé pour éviter la distraction visuelle continue */
#win-start-btn::after {
    display: none;
}

#win-start-btn:hover {
    border-color: rgba(253, 224, 71, 0.95);
    background: linear-gradient(125deg, 
        rgba(245, 158, 11, 0.7), 
        rgba(236, 72, 153, 0.55), 
        rgba(139, 92, 246, 0.55), 
        rgba(6, 182, 212, 0.65), 
        rgba(251, 191, 36, 0.7)
    );
    background-size: 200% 200%;
    box-shadow: 0 0 22px rgba(245, 158, 11, 0.85), 
                0 0 45px rgba(234, 179, 8, 0.55), 
                0 0 70px rgba(168, 85, 247, 0.45), 
                inset 0 1px 3px rgba(255, 255, 255, 0.7);
    transform: translateY(-1px) scale(1.02);
}

#win-start-btn:active,
#win-start-btn.active {
    background: linear-gradient(125deg, 
        rgba(217, 119, 6, 0.85), 
        rgba(190, 24, 93, 0.7), 
        rgba(109, 40, 217, 0.7)
    );
    border-color: #fbbf24;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.8), 
                0 0 35px rgba(234, 179, 8, 0.45), 
                inset 0 2px 5px rgba(0, 0, 0, 0.3);
    transform: translateY(0) scale(0.99);
}

#win-start-btn.active::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12%;
    right: 12%;
    height: 3px;
    background: linear-gradient(90deg, #f59e0b, #ec4899, #38bdf8, #f59e0b);
    background-size: 200% 100%;
    border-radius: 3px 3px 0 0;
    box-shadow: 0 0 12px #fbbf24, 0 0 20px #ec4899;
    animation: startBtnRainbowFlow 3s linear infinite;
}

.win-start-btn-logo {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.9)) drop-shadow(0 0 14px rgba(245, 158, 11, 0.5));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

#win-start-btn:hover .win-start-btn-logo {
    transform: scale(1.12) rotate(5deg);
    filter: drop-shadow(0 0 10px rgba(253, 224, 71, 1)) drop-shadow(0 0 18px rgba(245, 158, 11, 0.8));
}

#win-start-btn span {
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #ffffff 20%, #fef08a 65%, #fcd34d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.8));
    font-weight: 700;
}

/* Animations Rainbow & Aura Dorée du Bouton Démarrer */
@keyframes startBtnRainbowFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes startBtnGoldenRainbowAura {
    0%, 100% {
        box-shadow: 
            0 0 14px rgba(245, 158, 11, 0.5), 
            0 0 28px rgba(234, 179, 8, 0.28), 
            0 0 45px rgba(236, 72, 153, 0.2), 
            0 0 60px rgba(59, 130, 246, 0.15), 
            inset 0 1px 2px rgba(255, 255, 255, 0.45);
        border-color: rgba(251, 191, 36, 0.55);
    }
    50% {
        box-shadow: 
            0 0 24px rgba(245, 158, 11, 0.8), 
            0 0 44px rgba(234, 179, 8, 0.5), 
            0 0 68px rgba(168, 85, 247, 0.35), 
            0 0 88px rgba(6, 182, 212, 0.25), 
            inset 0 1px 3px rgba(255, 255, 255, 0.7);
        border-color: rgba(253, 224, 71, 0.95);
    }
}

@keyframes startBtnGoldenShimmer {
    0% { left: -140%; opacity: 0; }
    15% { opacity: 1; }
    35% { left: 150%; opacity: 0; }
    100% { left: 150%; opacity: 0; }
}

@keyframes logoGentleFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-1.5px); }
}

#win-taskbar-items {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

#win-taskbar-items::-webkit-scrollbar {
    display: none;
}

.win-taskbar-item {
    height: 38px;
    min-width: 140px;
    max-width: 200px;
    padding: 0 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--win-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.win-taskbar-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--win-text);
}

.win-taskbar-item.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--win-glass-border-active);
    color: white;
}

.win-taskbar-item.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 20%;
    right: 20%;
    height: 3px;
    background: var(--win-accent);
    border-radius: 2px;
}

.win-taskbar-item-icon {
    font-size: 15px;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.win-taskbar-item-icon img,
.win-taskbar-item-icon .win-icon-img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 3px;
    display: block;
}

.win-taskbar-item-title {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Taskbar Right Tray */
.win-taskbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.win-tray-battery {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    height: 32px;
    border-radius: 6px;
    cursor: default;
    font-size: 11px;
    color: var(--win-text-muted);
    transition: background 0.15s ease, color 0.15s ease;
}

.win-tray-battery:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.win-tray-battery i {
    font-size: 13px;
    color: #34d399;
}

.win-tray-battery.charging i {
    color: #60a5fa;
}

.win-tray-battery.low i {
    color: #f87171;
}

.win-tray-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--win-text-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.win-tray-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

#win-tray-clock {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

#win-tray-clock:hover {
    background: rgba(255, 255, 255, 0.12);
}

#win-tray-clock.active {
    background: rgba(59, 130, 246, 0.2);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.4);
}

#win-clock-time {
    font-size: 12px;
    font-weight: 600;
    color: white;
    line-height: 1.2;
}

#win-clock-date {
    font-size: 10px;
    color: var(--win-text-muted);
    line-height: 1.2;
}

#win-show-desktop-btn,
.win-admin-trigger-zone {
    width: 8px;
    height: 36px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 4px;
}

#win-show-desktop-btn:hover,
.win-admin-trigger-zone:hover {
    background: rgba(255, 255, 255, 0.25);
    width: 12px;
}

/* ==========================================================================
   CALENDAR FLYOUT (WINDOWS 11 STYLE)
   ========================================================================== */
.win-calendar-flyout {
    position: absolute;
    bottom: calc(var(--win-taskbar-height) + 12px);
    right: 12px;
    width: 320px;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--win-glass-border);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(59, 130, 246, 0.1);
    z-index: 10001;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform: translateY(15px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.win-calendar-flyout.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.win-calendar-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
}

.win-calendar-today-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#win-cal-weekday {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    text-transform: capitalize;
}

#win-cal-full-date {
    font-size: 13px;
    color: #94a3b8;
    text-transform: capitalize;
}

.win-calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px;
}

#win-cal-month-year {
    font-size: 13px;
    font-weight: 600;
    color: #f1f5f9;
    text-transform: capitalize;
}

.win-cal-nav-btns {
    display: flex;
    gap: 4px;
}

.win-cal-nav-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.win-cal-nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.win-calendar-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 2px;
}

.win-calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    text-align: center;
}

.win-cal-day {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 12px;
    color: #f1f5f9;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.win-cal-day:hover {
    background: rgba(255, 255, 255, 0.12);
}

.win-cal-day.other-month {
    color: #475569;
}

.win-cal-day.today {
    background: var(--win-accent);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 0 10px var(--win-accent-glow);
}

.win-cal-day.selected {
    border-color: rgba(96, 165, 250, 0.8);
    background: rgba(59, 130, 246, 0.2);
}

.win-calendar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 8px;
    display: flex;
    justify-content: flex-end;
}

#win-cal-today-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #94a3b8;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

#win-cal-today-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.win-toast {
    position: fixed;
    bottom: calc(var(--win-taskbar-height) + 20px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: #f8fafc;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.win-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================================================
   START MENU (ADAPTED & WIDENED)
   ========================================================================== */
#win-start-menu {
    position: absolute;
    bottom: calc(var(--win-taskbar-height) + 12px);
    left: 12px;
    width: min(620px, calc(100vw - 24px));
    max-height: 600px;
    background: rgba(18, 24, 34, 0.94);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--win-glass-border);
    border-radius: 18px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#win-start-menu.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.win-start-search {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.win-start-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.win-start-search-box i {
    position: absolute;
    left: 14px;
    color: var(--win-text-muted);
    font-size: 14px;
}

#win-start-search-input {
    width: 100%;
    height: 40px;
    padding: 0 16px 0 40px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
}

#win-start-search-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--win-accent);
    box-shadow: 0 0 12px var(--win-accent-glow);
}

.win-start-body {
    padding: 16px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.win-start-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--win-text-muted);
}

.win-start-apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
}

.win-start-app-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    overflow: hidden;
    box-sizing: border-box;
    min-width: 0;
}

.win-start-app-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(96, 165, 250, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.win-start-app-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.win-start-app-icon img,
.win-start-app-icon .win-icon-img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    pointer-events: none;
}

.win-start-app-info {
    flex: 1;
    min-width: 0;
}

.win-start-app-info h5 {
    font-size: 12px;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #f1f5f9;
}

.win-start-app-info span {
    font-size: 10px;
    color: var(--win-text-muted);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.win-start-footer {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.win-start-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.win-start-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--win-accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.win-start-user-name {
    font-size: 12px;
    font-weight: 600;
}

/* ==========================================================================
   CONTEXT MENU (RIGHT CLICK)
   ========================================================================== */
#win-context-menu {
    position: fixed;
    min-width: 220px;
    background: rgba(20, 26, 36, 0.92);
    backdrop-filter: blur(25px);
    border: 1px solid var(--win-glass-border);
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
    padding: 6px;
    z-index: 100000;
    display: none;
}

.win-context-item {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--win-text);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.win-context-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.win-context-item i {
    font-size: 13px;
    color: var(--win-accent);
    width: 16px;
}

.win-context-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}



/* ==========================================================================
   CUSTOM MODAL (WALLPAPER & THEME PICKER)
   ========================================================================== */
.win-custom-modal {
    position: absolute;
    bottom: calc(var(--win-taskbar-height) + 12px);
    right: 48px;
    width: 360px;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--win-glass-border);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(59, 130, 246, 0.15);
    z-index: 10001;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transform: translateY(15px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.win-custom-modal.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.win-custom-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
}

.win-custom-modal-header h4 {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.win-custom-modal-header h4 i {
    color: var(--win-accent);
}

.win-custom-modal-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--win-text-muted);
    display: block;
    margin-bottom: 8px;
}

.win-wallpaper-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.win-wallpaper-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.win-wallpaper-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(96, 165, 250, 0.5);
    transform: translateY(-2px);
}

.win-wallpaper-card.active {
    border-color: var(--win-accent);
    background: rgba(59, 130, 246, 0.15);
    box-shadow: 0 0 12px var(--win-accent-glow);
}

.win-wallpaper-card-preview {
    width: 100%;
    height: 52px;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.win-wallpaper-card-preview.theme-ambre {
    background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.6) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(180, 83, 9, 0.6) 0%, transparent 50%),
                linear-gradient(135deg, #181008 0%, #070810 100%);
}

.win-wallpaper-card-preview.theme-night {
    background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.6) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(147, 51, 234, 0.6) 0%, transparent 50%),
                linear-gradient(135deg, #040810 0%, #010307 100%);
}

.win-wallpaper-card-preview.theme-bistro {
    background: radial-gradient(circle at 75% 25%, rgba(194, 65, 12, 0.6) 0%, transparent 50%),
                radial-gradient(circle at 25% 75%, rgba(180, 83, 9, 0.5) 0%, transparent 50%),
                linear-gradient(135deg, #170c06 0%, #0b0502 100%);
}

.win-wallpaper-card-preview.theme-graphite {
    background: radial-gradient(circle at 50% 30%, rgba(148, 163, 184, 0.3) 0%, transparent 60%),
                linear-gradient(135deg, #27272a 0%, #050607 100%);
}

.win-wallpaper-card span {
    font-size: 11px;
    font-weight: 600;
    color: #e2e8f0;
}

.win-theme-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.win-theme-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: var(--win-text);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.win-theme-option-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(96, 165, 250, 0.4);
}

.win-theme-option-btn.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--win-accent);
    color: #ffffff;
    box-shadow: 0 0 10px var(--win-accent-glow);
}

.win-theme-option-btn i {
    font-size: 14px;
}

/* ==========================================================================
   WALLPAPER ROTATION CONTROLS (THEME MODAL)
   ========================================================================== */
.win-wallpaper-rotation-section {
    margin-top: 14px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.win-wallpaper-rotation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.win-wallpaper-rotation-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--win-text);
}

.win-wallpaper-rotation-label i {
    color: #60a5fa;
    font-size: 14px;
}

.win-wallpaper-rotation-label small {
    display: block;
    font-size: 10px;
    font-weight: normal;
    color: var(--win-text-muted);
}

.win-wallpaper-rotation-options {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 12px;
}

.win-wallpaper-rotation-text {
    color: var(--win-text-muted);
}

.win-wallpaper-rotation-input {
    width: 54px;
    height: 30px;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.25);
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    outline: none;
}

.win-wallpaper-rotation-input:focus {
    border-color: var(--win-accent);
    box-shadow: 0 0 8px var(--win-accent-glow);
}



/* ==========================================================================
   LIGHT THEME OVERRIDES (body.theme-light) - MAXIMUM READABILITY & CONTRAST
   ========================================================================== */
body.theme-light {
    --win-text: #0f172a;
    --win-text-muted: #475569;
    --win-surface: rgba(255, 255, 255, 0.96);
    --win-surface-solid: #f8fafc;
    --win-glass-bg: rgba(255, 255, 255, 0.92);
    --win-glass-border: rgba(0, 0, 0, 0.14);
    --win-glass-border-active: #3b82f6;
    --win-window-bg: #ffffff;
}

body.theme-light .win-window {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.16) !important;
}

body.theme-light .win-body {
    background: #f8fafc !important;
    color: #0f172a !important;
}




/* Taskbar in Light Theme */
body.theme-light #win-taskbar {
    background: rgba(255, 255, 255, 0.88);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

body.theme-light #win-start-btn {
    background: linear-gradient(125deg, 
        rgba(254, 243, 199, 0.96), 
        rgba(253, 230, 138, 0.9), 
        rgba(252, 231, 243, 0.9), 
        rgba(238, 242, 255, 0.95), 
        rgba(224, 242, 254, 0.92), 
        rgba(254, 243, 199, 0.96)
    );
    background-size: 320% 320%;
    border: 1px solid rgba(217, 119, 6, 0.45);
    color: #0f172a;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.25), 
                0 0 18px rgba(236, 72, 153, 0.12), 
                inset 0 1px 1px rgba(255, 255, 255, 0.95);
    transition: all 0.25s ease;
}

body.theme-light #win-start-btn span {
    background: linear-gradient(135deg, #0f172a 40%, #b45309 85%, #d97706 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.8));
    font-weight: 700;
}

body.theme-light #win-start-btn:hover {
    background: linear-gradient(125deg, #ffffff, rgba(254, 243, 199, 0.98), rgba(252, 231, 243, 0.95));
    border-color: rgba(245, 158, 11, 0.85);
    box-shadow: 0 0 22px rgba(245, 158, 11, 0.5), 
                0 0 40px rgba(236, 72, 153, 0.28), 
                inset 0 1px 2px rgba(255, 255, 255, 1);
    color: #0f172a;
}

body.theme-light #win-start-btn:active,
body.theme-light #win-start-btn.active {
    background: linear-gradient(125deg, rgba(254, 243, 199, 0.98), rgba(253, 230, 138, 0.98));
    border-color: #d97706;
    box-shadow: 0 0 18px rgba(217, 119, 6, 0.5), inset 0 2px 4px rgba(0, 0, 0, 0.08);
}

body.theme-light #win-start-btn.active::before {
    background: linear-gradient(90deg, #f59e0b, #ec4899, #38bdf8, #f59e0b);
    box-shadow: 0 0 10px #f59e0b, 0 0 18px #ec4899;
}

@keyframes startBtnGoldenRainbowAuraLight {
    0%, 100% {
        box-shadow: 0 0 12px rgba(245, 158, 11, 0.3), 
                    0 0 24px rgba(236, 72, 153, 0.16), 
                    inset 0 1px 1px rgba(255, 255, 255, 0.95);
        border-color: rgba(217, 119, 6, 0.45);
    }
    50% {
        box-shadow: 0 0 22px rgba(245, 158, 11, 0.55), 
                    0 0 38px rgba(234, 179, 8, 0.35), 
                    0 0 50px rgba(168, 85, 247, 0.2), 
                    inset 0 1px 2px rgba(255, 255, 255, 1);
        border-color: rgba(245, 158, 11, 0.85);
    }
}

body.theme-light .win-taskbar-item {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #0f172a;
}

body.theme-light .win-taskbar-item:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #0f172a;
}

body.theme-light .win-taskbar-item.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    color: #1d4ed8;
}

body.theme-light #win-clock-time {
    color: #0f172a;
    font-weight: 700;
}

body.theme-light #win-clock-date {
    color: #475569;
}

body.theme-light #win-tray-battery {
    color: #0f172a;
}

body.theme-light .win-tray-btn {
    color: #334155;
}

body.theme-light .win-tray-btn:hover {
    background: rgba(0, 0, 0, 0.07);
    color: #0f172a;
}

/* Start Menu in Light Theme */
body.theme-light #win-start-menu {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
}

body.theme-light #win-start-search-input {
    background: #f1f5f9;
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: #0f172a;
}

body.theme-light #win-start-search-input::placeholder {
    color: #94a3b8;
}

body.theme-light #win-start-search-input:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

body.theme-light .win-start-search-box i {
    color: #64748b;
}

body.theme-light .win-start-section-title {
    color: #475569;
    font-weight: 600;
}

body.theme-light .win-start-app-item {
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

body.theme-light .win-start-app-icon {
    background: rgba(0, 0, 0, 0.05);
}

body.theme-light .win-start-app-item:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

body.theme-light .win-start-app-info h5 {
    color: #0f172a;
    font-weight: 600;
}

body.theme-light .win-start-app-info span {
    color: #64748b;
}

body.theme-light .win-start-footer {
    background: #f8fafc;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

body.theme-light .win-start-user-name {
    color: #0f172a;
    font-weight: 600;
}

/* Modals & Calendar Flyout in Light Theme */
body.theme-light .win-calendar-flyout,
body.theme-light .win-custom-modal {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(0, 0, 0, 0.14);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
}

body.theme-light #win-cal-weekday,
body.theme-light #win-cal-month-year,
body.theme-light .win-custom-modal-header h4 {
    color: #0f172a;
}

body.theme-light .win-cal-day {
    color: #0f172a;
}

body.theme-light .win-cal-day:hover {
    background: rgba(59, 130, 246, 0.1);
}

body.theme-light .win-cal-day.today {
    background: #3b82f6;
    color: white;
}

body.theme-light .win-cal-day.other-month {
    color: #cbd5e1;
}

body.theme-light .win-custom-modal-label {
    color: #334155;
}

body.theme-light .win-wallpaper-card {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.theme-light .win-wallpaper-card.active {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
}

body.theme-light .win-wallpaper-card span {
    color: #0f172a;
}

body.theme-light .win-theme-option-btn {
    background: #f1f5f9;
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: #334155;
}

body.theme-light .win-theme-option-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

body.theme-light .win-theme-option-btn.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    color: #1d4ed8;
}

body.theme-light .win-wallpaper-rotation-section {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.theme-light .win-wallpaper-rotation-text {
    color: #334155;
}

body.theme-light .win-wallpaper-rotation-input {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.18);
    color: #0f172a;
}



/* ==========================================================================
   FOLDER SYSTEM & EXPLORER WINDOW STYLES
   ========================================================================== */
.win-desktop-folder .win-desktop-icon-symbol {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.15));
    border: 1px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

.win-desktop-folder:hover .win-desktop-icon-symbol {
    border-color: #f59e0b;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.win-folder-explorer {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
}

.win-folder-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 12px;
}

.win-folder-path {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--win-text-muted);
}

.win-folder-path i {
    color: #f59e0b;
}

.win-folder-path span.current {
    color: white;
    font-weight: 600;
}

.win-folder-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.win-folder-add-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.win-folder-add-btn:hover {
    background: var(--win-accent);
    color: white;
    box-shadow: 0 0 12px var(--win-accent-glow);
}

.win-folder-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    transition: background-color 0.2s ease, outline 0.2s ease;
}

.win-folder-body.drag-over-folder {
    background: rgba(59, 130, 246, 0.12) !important;
    outline: 2px dashed rgba(96, 165, 250, 0.85);
    outline-offset: -6px;
    border-radius: 10px;
}

.win-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 16px;
}

.win-folder-grid .win-desktop-icon {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 110px;
}

.win-folder-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--win-text-muted);
    gap: 12px;
    text-align: center;
    padding: 40px 20px;
}

.win-folder-empty i {
    font-size: 42px;
    color: rgba(255, 255, 255, 0.2);
}

.win-folder-empty p {
    font-size: 13px;
    margin: 0;
}

body.theme-light .win-folder-explorer {
    background: rgba(248, 250, 252, 0.9);
}

body.theme-light .win-folder-toolbar {
    background: rgba(0, 0, 0, 0.04);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .win-folder-path span.current {
    color: #0f172a;
}



/* ==========================================================================
   DESKTOP FREE GRID SNAP GUIDE & HIGHLIGHT
   ========================================================================== */
.win-desktop-grid-guide {
    position: absolute;
    width: 104px;
    height: 100px;
    border: 2px dashed rgba(96, 165, 250, 0.6);
    background: rgba(59, 130, 246, 0.12);
    border-radius: 12px;
    pointer-events: none;
    z-index: 15;
    transition: left 0.08s ease, top 0.08s ease, opacity 0.15s ease;
    opacity: 0;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.25);
}
.win-desktop-grid-guide.active {
    opacity: 1;
}








/* ========================================================
   HUD INFOS TECHNIQUES VISITEUR (WALLPAPER EN SURBRILLANCE)
   ======================================================== */
.win-tech-specs-overlay {
    position: absolute;
    bottom: 16px;
    right: 20px;
    width: 360px;
    max-width: calc(100vw - 32px);
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 24px rgba(59, 130, 246, 0.22);
    z-index: 25;
    pointer-events: auto;
    user-select: none;
    animation: fadeInTechSpecs 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.25s ease;
}

.win-tech-specs-overlay:hover {
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(59, 130, 246, 0.35);
}

@keyframes fadeInTechSpecs {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.win-tech-specs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.win-tech-specs-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #93c5fd;
    display: flex;
    align-items: center;
    gap: 7px;
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

.win-tech-specs-title i {
    font-size: 13px;
    color: #60a5fa;
}

.win-tech-specs-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 8px #34d399;
    animation: techSpecsPulse 2s infinite;
}

@keyframes techSpecsPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(52, 211, 153, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
    }
}

.win-tech-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
}

.win-tech-specs-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 6px 8px;
}

.win-tech-specs-item.full-width {
    grid-column: span 2;
}

.win-tech-specs-lbl {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 5px;
}

.win-tech-specs-lbl i {
    font-size: 10px;
    color: #60a5fa;
}

.win-tech-specs-val {
    font-size: 11px;
    font-weight: 600;
    color: #f1f5f9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.win-tech-specs-val.highlight {
    color: #38bdf8;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

/* Bouton Fermer du HUD */
.win-tech-specs-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    color: #94a3b8;
    font-size: 11px;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    flex-shrink: 0;
}

.win-tech-specs-close:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.3);
}

/* Mode Clair pour l'encart Infos Techniques */
body.theme-light .win-tech-specs-overlay {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(37, 99, 235, 0.3);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15), 0 0 20px rgba(37, 99, 235, 0.12);
}

body.theme-light .win-tech-specs-overlay:hover {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.2), 0 0 26px rgba(37, 99, 235, 0.2);
}

body.theme-light .win-tech-specs-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.theme-light .win-tech-specs-title {
    color: #1d4ed8;
    text-shadow: none;
}

body.theme-light .win-tech-specs-title i {
    color: #2563eb;
}

body.theme-light .win-tech-specs-item {
    background: rgba(241, 245, 249, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

body.theme-light .win-tech-specs-lbl {
    color: #64748b;
}

body.theme-light .win-tech-specs-lbl i {
    color: #2563eb;
}

body.theme-light .win-tech-specs-val {
    color: #0f172a;
}

body.theme-light .win-tech-specs-val.highlight {
    color: #0284c7;
    text-shadow: none;
}

body.theme-light .win-tech-specs-close {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: #64748b;
}

body.theme-light .win-tech-specs-close:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.2);
}

@media (max-width: 768px) {
    .win-tech-specs-overlay {
        display: none !important;
    }
}



/* ==========================================================================
   CALCULATRICE JEREMOS (SÉCURISÉE, FLUIDE, RESPONSIVE)
   ========================================================================== */
.win-calc-window {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 14px;
    gap: 12px;
    background: rgba(15, 23, 42, 0.65);
    user-select: none;
}

.win-calc-screen {
    background: rgba(10, 14, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    min-height: 86px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 15px rgba(245, 158, 11, 0.08);
    position: relative;
    cursor: pointer;
}

.win-calc-screen:hover::after {
    content: 'Cliquer pour copier';
    position: absolute;
    top: 6px;
    left: 10px;
    font-size: 10px;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
}

.win-calc-history {
    font-size: 12px;
    color: #94a3b8;
    font-family: 'JetBrains Mono', monospace;
    min-height: 18px;
    word-break: break-all;
}

.win-calc-primary {
    font-size: 32px;
    font-weight: 700;
    color: #f8fafc;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.2;
    word-break: break-all;
    max-width: 100%;
}

.win-calc-primary.small {
    font-size: 22px;
}

.win-calc-primary.xsmall {
    font-size: 17px;
}

.win-calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    flex: 1;
}

.win-calc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
    transition: all 0.15s ease;
    font-family: 'Outfit', sans-serif;
}

.win-calc-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.2);
}

.win-calc-btn:active {
    transform: translateY(1px);
}

/* Touches de fonction */
.win-calc-btn.fn {
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
}

.win-calc-btn.fn:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

/* Opérateurs arithmétiques */
.win-calc-btn.op {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
    font-size: 17px;
}

.win-calc-btn.op:hover {
    background: rgba(56, 189, 248, 0.26);
    color: #7dd3fc;
}

/* Touche Égale avec Gradient Rainbow / Doré */
.win-calc-btn.equal {
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    color: #ffffff;
    border: 1px solid rgba(251, 191, 36, 0.6);
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.45);
}

.win-calc-btn.equal:hover {
    background: linear-gradient(135deg, #fbbf24, #f43f5e);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.7);
    transform: translateY(-1.5px) scale(1.02);
}

/* Mode Clair pour la Calculatrice */
body.theme-light .win-calc-window {
    background: rgba(248, 250, 252, 0.95);
}

body.theme-light .win-calc-screen {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.05);
}

body.theme-light .win-calc-history {
    color: #64748b;
}

body.theme-light .win-calc-primary {
    color: #0f172a;
}

body.theme-light .win-calc-btn {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

body.theme-light .win-calc-btn:hover {
    background: #f1f5f9;
}

body.theme-light .win-calc-btn.fn {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

body.theme-light .win-calc-btn.op {
    background: rgba(2, 132, 199, 0.08);
    border-color: rgba(2, 132, 199, 0.2);
    color: #0284c7;
}

/* Panneaux flottants déplaçables (Diagnostic live, Personnalisation du bureau) */
.win-panel-drag-handle {
    cursor: grab;
    touch-action: none;
}

.win-panel-drag-handle button {
    cursor: pointer;
}

.is-panel-dragging {
    transition: none !important;
}

.is-panel-dragging .win-panel-drag-handle {
    cursor: grabbing;
}

/* ==========================================================================
   MODULE PROXY (navigation libre via le reverse proxy)
   ========================================================================== */
.win-toolbar-btn:disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.win-address-wrapper.prx-form {
    margin: 0;
}

.win-prx-welcome {
    position: absolute;
    inset: 0;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--win-surface-solid);
}

.win-prx-welcome-card {
    max-width: 520px;
    width: 100%;
    text-align: center;
    color: var(--win-text);
}

.win-prx-welcome-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.16);
    border: 1px solid rgba(96, 165, 250, 0.35);
    box-shadow: 0 0 24px rgba(59, 130, 246, 0.2);
}

.win-prx-welcome-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
}

.win-prx-welcome-card p {
    margin: 0 0 12px;
    font-size: 12px;
    line-height: 1.55;
    color: var(--win-text-muted);
}

.win-prx-welcome-card ul {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--win-text-muted);
}

.win-prx-welcome-card code {
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #93c5fd;
    font-size: 11px;
}

.win-prx-note {
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.win-prx-note i {
    margin-right: 4px;
    color: #60a5fa;
}

.win-prx-recent {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
}

.win-prx-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--win-text-muted);
    font-size: 11px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.win-prx-chip:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(96, 165, 250, 0.5);
    color: #ffffff;
}

body.theme-light .win-prx-welcome-card code {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.12);
    color: #1d4ed8;
}

body.theme-light .win-prx-chip {
    border-color: rgba(15, 23, 42, 0.12);
    background: rgba(15, 23, 42, 0.04);
}
