/**
 * Styles Windows 11 Interface
 * CYBERLOGIC - Copyright 2024-2025
 */

@import url('https://fonts.googleapis.com/css2?family=Segoe+UI:wght@300;400;600;700&display=swap');

:root {
    --win-primary: #0067c0;
    --win-primary-hover: #005a9e;
    --win-bg: #f3f3f3;
    --win-surface: rgba(255, 255, 255, 0.7);
    --win-surface-hover: rgba(255, 255, 255, 0.85);
    --win-taskbar: rgba(243, 243, 243, 0.85);
    --win-border: rgba(0, 0, 0, 0.06);
    --win-shadow: 0 8px 16px rgba(0, 0, 0, 0.14);
    --win-text: #1e1e1e;
    --win-text-secondary: #605e5c;
    --win-radius: 8px;
    --win-radius-lg: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    background: var(--win-bg);
    color: var(--win-text);
}

/* Fond d'écran Windows 11 - Animation code */
.desktop-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at bottom, #0a0a0f 0%, #1a0a2e 50%, #0f0520 100%);
    background-size: cover;
    background-position: center;
    z-index: 0;
    overflow: hidden;
}

/* Logo CYBERLOGIC en néon - petit en haut à droite */
.neon-logo {
    position: absolute;
    top: 20px;
    right: 30px;
    transform: none;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 3px;
    color: #fff;
    text-shadow:
        0 0 5px #00ffff,
        0 0 10px #00ffff,
        0 0 15px #00ffff,
        0 0 20px #00d4ff,
        0 0 30px #00d4ff,
        0 0 40px #00d4ff;
    animation: neonFlicker 3s infinite alternate;
    pointer-events: none;
    z-index: 2;
    font-family: 'Arial Black', sans-serif;
    opacity: 0.85;
}

@keyframes neonFlicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow:
            0 0 5px #00ffff,
            0 0 10px #00ffff,
            0 0 15px #00ffff,
            0 0 20px #00d4ff,
            0 0 30px #00d4ff,
            0 0 40px #00d4ff;
        opacity: 0.85;
    }
    20%, 24%, 55% {
        text-shadow:
            0 0 3px #00ffff,
            0 0 6px #00ffff,
            0 0 10px #00ffff,
            0 0 15px #00d4ff,
            0 0 20px #00d4ff;
        opacity: 0.6;
    }
}

/* Responsive pour le logo néon */
@media (max-width: 1024px) {
    .neon-logo {
        font-size: 24px;
        letter-spacing: 2px;
        top: 15px;
        right: 25px;
    }
}

@media (max-width: 768px) {
    .neon-logo {
        font-size: 20px;
        letter-spacing: 2px;
        top: 12px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .neon-logo {
        font-size: 16px;
        letter-spacing: 1px;
        top: 10px;
        right: 15px;
        text-shadow:
            0 0 3px #00ffff,
            0 0 6px #00ffff,
            0 0 10px #00ffff,
            0 0 15px #00d4ff,
            0 0 20px #00d4ff;
    }
}

.code-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
    pointer-events: none;
}

.code-line {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #667eea;
    white-space: nowrap;
    animation: slideCode linear infinite;
}

@keyframes slideCode {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(100vw);
        opacity: 0;
    }
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    font-size: 60px;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(10deg);
    }
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #667eea;
    border-radius: 50%;
    animation: particle-float linear infinite;
}

@keyframes particle-float {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

.desktop-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(138, 35, 135, 0.3), transparent 50%);
}

/* Icônes du bureau */
.desktop-icons {
    position: fixed;
    top: 20px;
    left: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, 100px);
    gap: 20px;
    z-index: 1;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: var(--win-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.desktop-icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

.desktop-icon:active {
    transform: scale(0.95);
}

/* Styles pour le drag & drop des icônes */
.desktop-icon.dragging {
    opacity: 0.8;
    cursor: move !important;
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: none;
    z-index: 1000;
}

.desktop-icon i {
    font-size: 48px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.desktop-icon span {
    color: white;
    font-size: 13px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    word-wrap: break-word;
    max-width: 100px;
}

.desktop-icon .pin-toggle {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.desktop-icon .pin-toggle:hover {
    background: rgba(0, 0, 0, 0.8);
}

.desktop-icon:hover .pin-toggle {
    opacity: 1;
}

.desktop-icon .pin-toggle i {
    font-size: 12px;
    text-shadow: none;
}

/* Tooltips */
.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: rgba(32, 32, 32, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(32, 32, 32, 0.95);
}

/* Barre des tâches */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background: var(--win-taskbar);
    backdrop-filter: blur(30px) saturate(150%);
    border-top: 1px solid var(--win-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    z-index: 1000;
}

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

.start-button {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--win-text);
    font-size: 20px;
    cursor: pointer;
    border-radius: var(--win-radius);
    transition: all 0.2s ease;
}

.start-button:hover {
    background: var(--win-surface-hover);
}

.start-button.active {
    background: var(--win-surface);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    height: 32px;
    background: var(--win-surface);
    border-radius: 16px;
    border: 1px solid var(--win-border);
    transition: all 0.2s ease;
    position: relative;
}

.search-box:hover {
    background: var(--win-surface-hover);
}

.search-box i {
    color: var(--win-text-secondary);
    font-size: 14px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 200px;
    font-size: 13px;
    color: var(--win-text);
}

.search-box input::placeholder {
    color: var(--win-text-secondary);
}

.taskbar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
}

.taskbar-apps {
    display: flex;
    gap: 4px;
}

.taskbar-app {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--win-radius);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.taskbar-app:hover {
    background: var(--win-surface-hover);
}

.taskbar-app.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--win-primary);
    border-radius: 2px;
}

.taskbar-app i {
    font-size: 18px;
    color: var(--win-text);
}

.taskbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.taskbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.taskbar-user:hover {
    background: var(--win-surface-hover);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.taskbar-user span {
    font-size: 14px;
    font-weight: 600;
    color: #1e1e1e;
}

/* Menu utilisateur */
.user-menu {
    position: fixed;
    bottom: 60px;
    right: 20px;
    width: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(40px) saturate(150%);
    border-radius: var(--win-radius-lg);
    box-shadow: var(--win-shadow);
    border: 1px solid var(--win-border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
}

.user-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--win-radius-lg) var(--win-radius-lg) 0 0;
    color: white;
}

.user-menu-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.user-menu-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-menu-info p {
    font-size: 12px;
    opacity: 0.9;
    margin: 0 0 8px 0;
}

.user-role-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.user-menu-content {
    padding: 10px;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 15px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    color: var(--win-text);
    font-size: 14px;
    text-align: left;
}

.user-menu-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

.user-menu-item.logout {
    color: #dc3545;
}

.user-menu-item.logout:hover {
    background: rgba(220, 53, 69, 0.1);
}

.user-menu-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.user-menu-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 8px 0;
}

.login-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--win-primary);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-button:hover {
    background: var(--win-primary-hover);
    transform: translateY(-1px);
}

.system-tray {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 12px;
}

.system-tray i {
    color: var(--win-text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.system-tray i:hover {
    color: #667eea;
    transform: scale(1.1);
}

.help-icon {
    color: #667eea !important;
    font-size: 16px !important;
}

.clock {
    font-size: 13px;
    font-weight: 400;
    min-width: 80px;
    text-align: right;
}

/* Menu WiFi/Réseau */
.network-menu {
    position: fixed;
    bottom: 60px;
    right: 20px;
    width: 380px;
    background: rgba(32, 32, 32, 0.95);
    backdrop-filter: blur(40px) saturate(150%);
    border-radius: var(--win-radius-lg);
    box-shadow: var(--win-shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
    color: white;
}

.network-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.network-menu-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.network-menu-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.network-menu-content {
    padding: 15px;
}

.network-info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: background 0.2s ease;
}

.network-info-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.network-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.network-value {
    font-size: 13px;
    color: white;
    font-weight: 600;
    word-break: break-word;
}

.network-value.user-agent {
    font-size: 11px;
    font-family: 'Courier New', monospace;
    color: rgba(255, 255, 255, 0.9);
    max-height: 60px;
    overflow-y: auto;
    padding: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* Menu Audio */
.audio-menu {
    position: fixed;
    bottom: 60px;
    right: 20px;
    width: 350px;
    background: rgba(32, 32, 32, 0.95);
    backdrop-filter: blur(40px) saturate(150%);
    border-radius: var(--win-radius-lg);
    box-shadow: var(--win-shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
    color: white;
}

.audio-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.audio-menu-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.audio-menu-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.audio-menu-content {
    padding: 20px;
}

.audio-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.audio-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.audio-info i {
    font-size: 18px;
    color: var(--win-primary);
}

.audio-info span {
    font-size: 14px;
    font-weight: 500;
}

.audio-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--win-primary);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.audio-play-btn:hover {
    background: var(--win-primary-hover);
    transform: scale(1.05);
}

.audio-play-btn i {
    font-size: 16px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.volume-control i {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.volume-slider {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    background: var(--win-primary);
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.volume-slider::-moz-range-thumb:hover {
    background: var(--win-primary);
    transform: scale(1.2);
}

#volumeValue {
    font-size: 12px;
    font-weight: 600;
    min-width: 35px;
    text-align: right;
}

.audio-track-info {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.track-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 10px;
}

.track-progress-bar {
    height: 100%;
    background: var(--win-primary);
    width: 0%;
    transition: width 0.1s linear;
}

.track-time {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

#volumeButton {
    cursor: pointer;
    transition: all 0.2s ease;
}

#volumeButton:hover {
    color: var(--win-primary);
    transform: scale(1.1);
}

/* Menu Démarrer */
.start-menu {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    width: 600px;
    max-height: 700px;
    background: var(--win-surface);
    backdrop-filter: blur(50px) saturate(150%);
    border-radius: var(--win-radius-lg);
    box-shadow: var(--win-shadow);
    border: 1px solid var(--win-border);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
}

.start-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.start-menu-header {
    padding: 24px 32px 16px;
    border-bottom: 1px solid var(--win-border);
}

.start-menu-header h3 {
    font-size: 24px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.start-menu-pinned {
    padding: 24px 32px;
}

.start-menu-pinned h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #4a4a4a;
    margin-bottom: 16px;
}

.pinned-apps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 16px;
}

.pinned-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border-radius: var(--win-radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pinned-app:hover {
    background: rgba(0, 0, 0, 0.04);
}

.pinned-app:active {
    transform: scale(0.95);
}

.pinned-app i {
    font-size: 32px;
    color: var(--win-primary);
}

.pinned-app span {
    font-size: 12px;
    text-align: center;
    font-weight: 400;
}

.start-menu-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    border-top: 1px solid var(--win-border);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.user-profile span {
    font-size: 14px;
    font-weight: 500;
}

.power-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--win-radius);
    color: var(--win-text);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.power-button:hover {
    background: rgba(0, 0, 0, 0.04);
}

.login-button-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--win-primary);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    justify-content: center;
}

.login-button-menu:hover {
    background: var(--win-primary-hover);
}

/* Popup de connexion */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2000;
}

.login-modal.active {
    opacity: 1;
    visibility: visible;
}

.login-container {
    position: relative;
    width: 420px;
    background: white;
    border-radius: var(--win-radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-modal.active .login-container {
    transform: scale(1);
}

.close-button {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 24px;
    color: var(--win-text-secondary);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-button:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--win-text);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header i {
    font-size: 48px;
    color: var(--win-primary);
    margin-bottom: 16px;
}

.login-header h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header p {
    font-size: 14px;
    color: var(--win-text-secondary);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--win-bg);
    border-radius: var(--win-radius);
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.form-group:focus-within {
    border-color: var(--win-primary);
    background: white;
}

.form-group i {
    color: var(--win-text-secondary);
    font-size: 16px;
}

.form-group input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 15px;
    color: var(--win-text);
}

.form-group input::placeholder {
    color: var(--win-text-secondary);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.form-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--win-text);
}

.forgot-password {
    color: var(--win-primary);
    text-decoration: none;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

.submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: var(--win-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.submit-button:active {
    transform: translateY(0);
}

.error-message {
    padding: 12px;
    background: #fee;
    color: #c33;
    border-radius: var(--win-radius);
    font-size: 13px;
    text-align: center;
    display: none;
}

.error-message.active {
    display: block;
}

/* Fenêtres d'applications */
.window {
    position: fixed;
    background: white;
    border-radius: var(--win-radius-lg);
    box-shadow: var(--win-shadow);
    overflow: hidden;
    z-index: 100;
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100% - 48px) !important;
    border-radius: 0;
}

.window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--win-surface);
    border-bottom: 1px solid var(--win-border);
    cursor: move;
}

.window-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.window-controls {
    display: flex;
    gap: 12px;
}

.window-control {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: var(--win-radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.window-control:hover {
    background: rgba(0, 0, 0, 0.04);
}

.window-control.close:hover {
    background: #e81123;
    color: white;
}

.window-content {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(100% - 60px);
}

/* Poignées de redimensionnement */
.resize-handle {
    position: absolute;
    z-index: 10;
}

.resize-handle.resize-top {
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    cursor: ns-resize;
}

.resize-handle.resize-bottom {
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    cursor: ns-resize;
}

.resize-handle.resize-left {
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    cursor: ew-resize;
}

.resize-handle.resize-right {
    right: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    cursor: ew-resize;
}

.resize-handle.resize-top-left {
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    cursor: nwse-resize;
}

.resize-handle.resize-top-right {
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    cursor: nesw-resize;
}

.resize-handle.resize-bottom-left {
    bottom: 0;
    left: 0;
    width: 10px;
    height: 10px;
    cursor: nesw-resize;
}

.resize-handle.resize-bottom-right {
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    cursor: nwse-resize;
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Media Queries - Responsive Design */

/* Tablettes et petits écrans */
@media (max-width: 1024px) {
    .desktop-icons {
        grid-template-columns: repeat(auto-fill, 80px);
        gap: 16px;
        top: 16px;
        left: 16px;
    }

    .desktop-icon i {
        font-size: 40px;
    }

    .desktop-icon span {
        font-size: 12px;
    }

    .start-menu {
        width: 90vw;
        max-width: 500px;
        max-height: 80vh;
    }

    .search-box input {
        width: 150px;
    }
}

/* Tablettes portrait et smartphones paysage */
@media (max-width: 768px) {
    .taskbar {
        height: 56px;
        padding: 0 8px;
    }

    .taskbar-app,
    .start-button,
    .power-button,
    .window-control {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }

    .desktop-icons {
        grid-template-columns: repeat(auto-fill, 70px);
        gap: 12px;
        top: 12px;
        left: 12px;
    }

    .desktop-icon {
        padding: 8px;
    }

    .desktop-icon i {
        font-size: 36px;
    }

    .desktop-icon span {
        font-size: 11px;
        max-width: 70px;
    }

    .start-menu {
        width: 95vw;
        max-height: 70vh;
        bottom: 68px;
    }

    .start-menu-header,
    .start-menu-pinned,
    .start-menu-footer {
        padding: 16px 20px;
    }

    .start-menu-header h3 {
        font-size: 20px;
    }

    .pinned-apps {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 12px;
    }

    .pinned-app {
        padding: 12px;
    }

    .pinned-app i {
        font-size: 28px;
    }

    .search-box {
        display: none;
    }

    .taskbar-user span {
        display: none;
    }

    .clock {
        font-size: 12px;
        min-width: 60px;
    }

    .system-tray {
        gap: 12px;
        padding: 0 8px;
    }

    .login-container {
        width: 90vw;
        max-width: 380px;
        padding: 32px 24px;
    }

    .login-header h2 {
        font-size: 24px;
    }

    .login-header i {
        font-size: 40px;
    }

    .window-content {
        padding: 16px;
    }
}

/* Smartphones portrait */
@media (max-width: 480px) {
    .taskbar {
        height: 60px;
    }

    .desktop-icons {
        grid-template-columns: repeat(auto-fill, 60px);
        gap: 10px;
        top: 10px;
        left: 10px;
    }

    .desktop-icon i {
        font-size: 32px;
    }

    .desktop-icon span {
        font-size: 10px;
        max-width: 60px;
    }

    .start-menu {
        width: 100vw;
        max-height: 75vh;
        bottom: 72px;
        border-radius: var(--win-radius) var(--win-radius) 0 0;
        left: 0;
        transform: translateX(0) scale(0.95);
    }

    .start-menu.active {
        transform: translateX(0) scale(1);
    }

    .start-menu-header,
    .start-menu-pinned,
    .start-menu-footer {
        padding: 12px 16px;
    }

    .pinned-apps {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .taskbar-left {
        gap: 4px;
    }

    .taskbar-center {
        display: none;
    }

    .system-tray i:not(.fa-wifi):not(.fa-battery-full) {
        display: none;
    }

    .login-container {
        width: 95vw;
        padding: 28px 20px;
    }

    .login-header h2 {
        font-size: 22px;
    }

    .form-group {
        padding: 12px 14px;
    }

    .submit-button {
        padding: 14px;
        font-size: 15px;
    }

    .window-content {
        padding: 12px;
    }
}

/* Très petits écrans */
@media (max-width: 360px) {
    .desktop-icons {
        grid-template-columns: repeat(auto-fill, 55px);
        gap: 8px;
    }

    .desktop-icon i {
        font-size: 28px;
    }

    .desktop-icon span {
        font-size: 9px;
    }

    .pinned-apps {
        grid-template-columns: repeat(2, 1fr);
    }

    .clock {
        font-size: 11px;
        min-width: 50px;
    }
}

/* RESPONSIVE - Fenêtres en plein écran sur mobile */
@media (max-width: 768px) {
    .window {
        width: 100vw !important;
        height: calc(100vh - 56px) !important;
        top: 0 !important;
        left: 0 !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0 !important;
    }

    .window-titlebar {
        border-radius: 0 !important;
    }

    .window-maximize {
        display: none; /* Déjà en plein écran */
    }

    .notification-panel {
        width: 100vw;
        right: 0;
        bottom: 56px;
        max-height: calc(100vh - 120px);
    }

    .user-menu {
        right: 0;
        width: 100vw;
        max-width: 100vw;
    }

    .start-menu {
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

@media (max-width: 480px) {
    .window {
        height: calc(100vh - 60px) !important;
    }

    .window-titlebar {
        padding: 12px 16px;
    }

    .window-titlebar h2 {
        font-size: 16px;
    }

    .window-control {
        width: 40px;
        height: 40px;
    }

    .notification-panel {
        bottom: 60px;
    }
}

/* Bouton de notifications */
.notification-button {
    position: relative;
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    border-radius: var(--win-radius);
    cursor: pointer;
    transition: background 0.15s ease;
    color: var(--win-text);
    font-size: 18px;
}

.notification-button:hover {
    background: rgba(0, 0, 0, 0.05);
}

.notification-button.active {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 18px;
    height: 18px;
    background: #e81123;
    color: white;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* Panneau de notifications */
.notification-panel {
    position: fixed;
    right: 8px;
    bottom: 64px;
    width: 380px;
    max-height: 600px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(40px);
    border-radius: var(--win-radius-lg);
    box-shadow: var(--win-shadow);
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 9999;
}

.notification-panel.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.notification-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.notification-panel-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--win-text);
}

.btn-text {
    background: transparent;
    border: none;
    color: #667eea;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.btn-text:hover {
    background: rgba(102, 126, 234, 0.1);
}

.notification-list {
    max-height: 500px;
    overflow-y: auto;
}

.loading-notifications {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.loading-notifications i {
    font-size: 32px;
    margin-bottom: 12px;
}

.notification-item {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
}

.notification-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.notification-item.unread {
    background: rgba(102, 126, 234, 0.05);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #667eea;
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.notification-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--win-text);
}

.notification-item-time {
    font-size: 12px;
    color: var(--win-text-secondary);
}

.notification-item-message {
    font-size: 13px;
    color: var(--win-text-secondary);
    line-height: 1.4;
}

.notification-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.notification-empty i {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 12px;
}

.notification-empty p {
    font-size: 14px;
}

/* Résultats de recherche */
.search-results {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    width: 450px;
    max-height: 500px;
    overflow-y: auto;
    background: rgba(44, 44, 44, 0.95);
    backdrop-filter: blur(40px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideUp 0.2s ease;
}

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

.search-results-header {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.active {
    background: rgba(102, 126, 234, 0.2);
}

.search-result-item i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
    font-size: 16px;
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-size: 14px;
    font-weight: 500;
    color: white;
    margin-bottom: 2px;
}

.search-result-name strong {
    color: #667eea;
    font-weight: 700;
}

.search-result-subtitle {
    font-size: 12px;
    color: #999;
}

.search-no-results {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* Responsive pour la recherche */
@media (max-width: 768px) {
    .search-results {
        width: calc(100vw - 40px);
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 480px) {
    .search-results {
        position: fixed;
        top: 60px;
        left: 10px;
        right: 10px;
        width: auto;
        transform: none;
    }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #667eea;
    pointer-events: all;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.toast-close {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

/* Toast types */
.toast-success {
    border-left-color: #4caf50;
}

.toast-success .toast-icon {
    color: #4caf50;
}

.toast-error {
    border-left-color: #f44336;
}

.toast-error .toast-icon {
    color: #f44336;
}

.toast-warning {
    border-left-color: #ff9800;
}

.toast-warning .toast-icon {
    color: #ff9800;
}

.toast-info {
    border-left-color: #2196f3;
}

.toast-info .toast-icon {
    color: #2196f3;
}

/* Toast responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .toast {
        padding: 12px;
    }

    .toast-icon {
        font-size: 20px;
    }

    .toast-title {
        font-size: 14px;
    }

    .toast-message {
        font-size: 12px;
    }
}

/* ===== OPTIMISATIONS TACTILES MOBILE ===== */
@media (max-width: 768px) {
    /* Augmenter la zone de tap sur mobile */
    .desktop-icon {
        min-width: 70px;
        min-height: 90px;
    }

    .taskbar-app,
    .start-button,
    .notification-button,
    .taskbar-user {
        min-width: 48px;
        min-height: 48px;
    }

    /* Désactiver le hover sur tactile */
    .desktop-icon:hover,
    .taskbar-app:hover,
    .pinned-app:hover {
        background: transparent;
    }

    /* Active state pour feedback tactile */
    .desktop-icon:active {
        background: rgba(255, 255, 255, 0.2);
    }

    .taskbar-app:active,
    .pinned-app:active {
        background: rgba(255, 255, 255, 0.1);
    }

    /* Améliorer la lisibilité */
    body {
        -webkit-text-size-adjust: 100%;
        -webkit-tap-highlight-color: transparent;
    }

    /* Scroll smooth */
    * {
        -webkit-overflow-scrolling: touch;
    }
}

/* ===== VIEWPORT META OPTIMISATIONS ===== */
@media (max-width: 480px) {
    /* Empêcher le zoom sur les inputs */
    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Scroll bars plus épaisses sur mobile pour faciliter l'utilisation */
    ::-webkit-scrollbar {
        width: 12px;
        height: 12px;
    }
}

/* ===== ORIENTATION PAYSAGE MOBILE ===== */
@media (max-width: 896px) and (orientation: landscape) {
    .desktop-icons {
        grid-template-columns: repeat(auto-fill, 60px);
        gap: 8px;
        top: 8px;
        left: 8px;
    }

    .desktop-icon i {
        font-size: 30px;
    }

    .desktop-icon span {
        font-size: 10px;
    }

    .window {
        height: calc(100vh - 48px) !important;
    }

    .taskbar {
        height: 48px;
    }

    .start-menu {
        max-height: calc(100vh - 60px);
    }
}
