/* Bouton moderne de toggle dark mode - Thème informatique */
.theme-toggle {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    padding: 0;
    margin: 0 8px;
    box-shadow: 0 4px 15px rgba(0, 153, 255, 0.3);
}

.theme-toggle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    top: -50%;
    left: -50%;
    transition: all 0.3s;
}

.theme-toggle:hover::before {
    top: 100%;
    left: 100%;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 153, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
}

.theme-toggle:active {
    transform: scale(0.95) rotate(0deg);
}

.theme-toggle i {
    position: absolute;
    font-size: 1.1rem;
    color: #fff;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Mode clair - Icône laptop-code visible */
.theme-toggle .light-icon {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
}

.theme-toggle .dark-icon {
    opacity: 0;
    transform: translateY(-20px) rotate(-90deg) scale(0);
}

/* Mode sombre - Icône terminal visible */
[data-theme="dark"] .theme-toggle {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-color: rgba(0, 255, 100, 0.3);
    box-shadow: 0 4px 15px rgba(0, 255, 100, 0.3);
}

[data-theme="dark"] .theme-toggle:hover {
    box-shadow: 0 6px 20px rgba(0, 255, 100, 0.5);
    border-color: rgba(0, 255, 100, 0.5);
}

[data-theme="dark"] .theme-toggle .light-icon {
    opacity: 0;
    transform: translateY(20px) rotate(90deg) scale(0);
}

[data-theme="dark"] .theme-toggle .dark-icon {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
    color: #00ff66;
}

/* Animation de typing au survol en mode sombre */
@keyframes typing-pulse {
    0%, 100% {
        text-shadow: 0 0 5px rgba(0, 255, 100, 0.5);
    }
    50% {
        text-shadow: 0 0 10px rgba(0, 255, 100, 0.8), 0 0 20px rgba(0, 255, 100, 0.4);
    }
}

[data-theme="dark"] .theme-toggle:hover .dark-icon {
    animation: typing-pulse 1.5s infinite;
}

/* Animation de code au survol en mode clair */
@keyframes code-pulse {
    0%, 100% {
        text-shadow: 0 0 5px rgba(0, 153, 255, 0.5);
    }
    50% {
        text-shadow: 0 0 10px rgba(0, 153, 255, 0.8), 0 0 20px rgba(0, 153, 255, 0.4);
    }
}

.theme-toggle:hover .light-icon {
    animation: code-pulse 1.5s infinite;
}

/* Effet de scan line */
@keyframes scan-line {
    0% {
        top: 0%;
    }
    100% {
        top: 100%;
    }
}

.theme-toggle::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    top: 0;
    left: 0;
    animation: scan-line 2s linear infinite;
    opacity: 0;
}

.theme-toggle:hover::after {
    opacity: 1;
}
