/* Variables CSS pour les thèmes */
:root {
    --primary-color: #007AFF;
    --secondary-color: #5AC8FA;
    --success-color: #34C759;
    --warning-color: #FF9500;
    --error-color: #FF3B30;
}

/* Thème clair */
.light-theme {
    --bg-primary: linear-gradient(135deg, #a8e6cf 0%, #dcedc8 50%, #f4d03f 100%);
    --bg-secondary: rgba(255, 255, 255, 0.3);
    --bg-tertiary: rgba(255, 255, 255, 0.2);
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-accent: #ffffff;
    --border-color: rgba(255, 255, 255, 0.3);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.25);
}

/* Thème sombre */
.dark-theme {
    --bg-primary: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
    --bg-secondary: rgba(0, 0, 0, 0.4);
    --bg-tertiary: rgba(0, 0, 0, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-accent: #ffffff;
    --border-color: rgba(255, 255, 255, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --glass-bg: rgba(0, 0, 0, 0.25);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: url('https://images.unsplash.com/photo-1545569341-9eb8b30979d9?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80') center/cover no-repeat fixed;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    transition: all 0.5s ease, background-image 0.5s ease;
}

.dark-theme {
    filter: brightness(0.8);
}

/* Container principal */
.container {
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.theme-toggle {
    position: relative;
}

.theme-btn {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    width: 60px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.theme-btn:hover {
    transform: scale(1.05);
}

.theme-icon {
    position: absolute;
    font-size: 14px;
    transition: all 0.3s ease;
}

.light-theme .theme-icon.moon {
    opacity: 1;
    transform: translateX(0);
}

.light-theme .theme-icon.sun {
    opacity: 0;
    transform: translateX(20px);
}

.dark-theme .theme-icon.moon {
    opacity: 0;
    transform: translateX(-20px);
}

.dark-theme .theme-icon.sun {
    opacity: 1;
    transform: translateX(0);
}

/* Main content */
.main-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    flex: 1;
}

/* Sidebar */
        .sidebar {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

/* Widget Date/Heure et Météo combiné */
        .datetime-weather-widget {
            background: linear-gradient(135deg, #4A90E2 0%, #5BA3F5 100%);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 20px;
            padding: 20px;
            backdrop-filter: blur(10px);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
            color: white;
            position: relative;
            overflow: hidden;
        }

/* Section Date/Heure */
        .datetime-section {
            text-align: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        }

        .current-day {
            font-size: 16px;
            font-weight: 500;
            opacity: 0.9;
            margin-bottom: 5px;
        }

        .current-time {
            font-size: 28px;
            font-weight: 200;
            line-height: 1;
        }

/* Section Météo */
        .weather-section {
            position: relative;
        }

        .weather-location {
            font-size: 14px;
            font-weight: 400;
            opacity: 0.9;
            margin-bottom: 5px;
        }

        .weather-temp {
            font-size: 42px;
            font-weight: 200;
            line-height: 1;
            margin-bottom: 5px;
        }

        .weather-condition {
            font-size: 16px;
            font-weight: 400;
            opacity: 0.9;
            margin-bottom: 15px;
        }

        .weather-details {
            display: flex;
            justify-content: space-between;
            font-size: 12px;
            opacity: 0.8;
            margin-bottom: 15px;
        }

        .weather-forecast {
            display: flex;
            justify-content: space-between;
            gap: 8px;
        }

        .forecast-day {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            flex: 1;
        }

        .forecast-day-name {
            font-size: 11px;
            font-weight: 500;
            opacity: 0.8;
        }

        .forecast-icon {
            font-size: 14px;
        }

        .forecast-temp {
            font-size: 11px;
            font-weight: 500;
        }

        .weather-icon {
            position: absolute;
            top: 15px;
            right: 15px;
            font-size: 32px;
            opacity: 0.3;
        }

        .loading {
            text-align: center;
            opacity: 0.7;
        }

        .error {
            color: #ffcccb;
            font-size: 14px;
            text-align: center;
        }

        .add-widget {
            background: var(--glass-bg);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            padding: 40px 20px;
            backdrop-filter: blur(10px);
            box-shadow: 0 8px 32px var(--shadow-color);
        }

        .add-btn {
            background: none;
            border: none;
            color: var(--text-primary);
            cursor: pointer;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
            width: 100%;
            transition: all 0.3s ease, color 0.15s ease;
        }

        .add-btn:hover {
            transform: translateY(-2px);
        }

        .plus-icon {
            font-size: 32px;
            font-weight: 300;
        }

        .add-text {
            font-size: 16px;
            font-weight: 500;
        }


.add-widget {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px var(--shadow-color);
}

.add-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    transition: all 0.3s ease, color 0.15s ease;
}

.add-btn:hover {
    transform: translateY(-2px);
}

.plus-icon {
    font-size: 32px;
    font-weight: 300;
}

.add-text {
    font-size: 16px;
    font-weight: 500;
}

/* Main panels */
.main-panels {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px var(--shadow-color);
}

.panel-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--text-primary);
    transition: color 0.15s ease;
}

/* Links panel */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.link-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 15px;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease, color 0.15s ease;
    backdrop-filter: blur(5px);
    position: relative;
}

.link-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--shadow-color);
}

.link-item:hover .delete-btn {
    opacity: 1;
    transform: scale(1);
}

.link-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.amazon .link-icon {
    background: #ff000000;
}

.netflix .link-icon {
    background: #ff000000;
}

.youtube .link-icon {
    background: #ff000000;
}

.twitter .link-icon {
    background: #ff000000;
}

.link-text {
    font-weight: 500;
    transition: color 0.15s ease;
}

.delete-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FF3B30;
    color: white;
    border: none;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.3);
}

.delete-btn:hover {
    background: #FF1744;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.4);
}

.delete-btn:active {
    transform: scale(0.95);
}

.add-link-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 15px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease, color 0.15s ease;
    backdrop-filter: blur(5px);
    cursor: pointer;
    border-style: dashed;
    opacity: 0.7;
}

.add-link-btn:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--shadow-color);
}

.add-link-btn .plus-icon {
    font-size: 24px;
    font-weight: 300;
}

.add-app-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease, color 0.15s ease;
    background: none;
    border: none;
    color: var(--text-primary);
    opacity: 0.7;
}

.add-app-btn:hover {
    opacity: 1;
    transform: translateY(-5px);
}

.add-app-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--text-primary);
    font-weight: 300;
    margin-bottom: 5px;
    border: 2px dashed var(--border-color);
    background: var(--bg-secondary);
    backdrop-filter: blur(5px);
    transition: color 0.15s ease;
}

/* Apps panel */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
}

.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.app-item:hover {
    transform: translateY(-5px);
}

.app-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    font-weight: bold;
    margin-bottom: 5px;
}

.calendar .app-icon {
    background: white;
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--border-color);
    width: 60px;
    height: 60px;
    border-radius: 15px;
}

.calendar-header {
    font-size: 10px;
    color: #FF3B30;
    font-weight: bold;
    text-align: center;
    line-height: 1;
}

.calendar-date {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    color: #333;
    line-height: 1;
}

.mail-icon {
    background: #007AFF;
}

.photos-icon {
    background: linear-gradient(45deg, #FF6B6B, #4ECDC4, #45B7D1, #96CEB4);
}

.music-icon {
    background: #FF3B30;
}

.settings-icon {
    background: #8E8E93;
}

.app-text {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: color 0.15s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2;
    }
    
    .main-panels {
        order: 1;
    }
    
    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .apps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .panel {
        padding: 20px;
    }
    
    .panel-title {
        font-size: 24px;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.panel, .date-widget, .add-widget {
    animation: fadeIn 0.6s ease-out;
}

/* Smooth transitions rapides pour le texte */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Transition rapide uniquement pour les couleurs de texte */
.day, .time, .panel-title, .link-text, .app-text, .add-btn, .add-app-btn, .add-app-icon {
    transition: color 0.15s ease !important;
}
/* Widget Radio */
.radio-widget {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px var(--shadow-color);
}

.radio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.radio-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.15s ease;
}

.quality-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 5px 10px;
    color: var(--text-primary);
    font-size: 12px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.quality-select:hover {
    transform: translateY(-1px);
}

.radio-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

/* Contrôle de volume */
.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.volume-icon {
    font-size: 14px;
    opacity: 0.7;
}

.volume-slider {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--bg-secondary);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 12px rgba(0, 122, 255, 0.4);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

/* Animation de pulsation pour le bouton play/pause */
@keyframes pulse-glow {
    0% {
        box-shadow: 
            0 4px 15px rgba(0, 122, 255, 0.4),
            0 0 0 0px rgba(0, 122, 255, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 
            0 8px 35px rgba(0, 122, 255, 0.8),
            0 0 0 8px rgba(0, 122, 255, 0.1);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 
            0 4px 15px rgba(0, 122, 255, 0.4),
            0 0 0 0px rgba(0, 122, 255, 0.3);
        transform: scale(1);
    }
}

.play-pause-btn.playing {
    animation: pulse-glow 1.5s infinite;
}

.play-pause-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, #007AFF, #0056CC);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    outline: none;
}

.play-pause-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

.play-pause-btn:active {
    transform: scale(0.95);
}

.play-icon, .pause-icon {
    font-size: 16px;
    position: absolute;
    transition: all 0.3s ease;
}

.play-pause-btn.playing .play-icon {
    opacity: 0;
    transform: scale(0);
}

.play-pause-btn.playing .pause-icon {
    opacity: 1;
    transform: scale(1);
}

.play-pause-btn:not(.playing) .play-icon {
    opacity: 1;
    transform: scale(1);
}

.play-pause-btn:not(.playing) .pause-icon {
    opacity: 0;
    transform: scale(0);
}



.radio-status {
    font-size: 12px;
    color: var(--text-primary);
    text-align: center;
    opacity: 0.8;
    transition: color 0.15s ease;
}