/*
Theme Name: Tristan Pineau v2
Theme URI: https://tristanpineau.fr
Author: Tristan Pineau
Description: Thème one-page ultra-simple et fonctionnel
Version: 2.0
License: GPL v2+
*/

:root {
    --bg: #0a0a0a;
    --bg-alt: #050505;
    --accent: #f5e6d3;
    --text: #ffffff;
    --text-secondary: #a0a0a0;
    --card-bg: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] {
    --bg: #fafafa;
    --bg-alt: #ffffff;
    --accent: #c4a574;
    --text: #0a0a0a;
    --text-secondary: #666666;
    --card-bg: rgba(0, 0, 0, 0.02);
    --border: rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

html {
    scroll-behavior: smooth;
}

section {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

img {
    max-width: 100%;
    height: auto;
}

/* Typing Effect */
.typing-effect {
    position: relative;
}

.typing-effect::after {
    content: '|';
    color: var(--accent);
    animation: blink 0.8s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* 1️⃣ Cursor personnalisé */
* {
    cursor: none !important;
}

.custom-cursor {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease;
    mix-blend-mode: difference;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease;
    opacity: 0.5;
}

/* 3️⃣ Particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.3;
    animation: float linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

/* 5️⃣ Barre de progression scroll */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent);
    z-index: 10000;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px var(--accent);
}

/* 6️⃣ Text gradient animé sur le nom */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

#hero h1 {
    background: linear-gradient(90deg, var(--text), var(--accent), var(--text), var(--accent));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
}

/* 7️⃣ Glass morphism cards */
.service-card, .blog-card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.service-card:hover, .blog-card:hover {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .service-card:hover,
[data-theme="light"] .blog-card:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Service card overlay effect */
.service-card:hover .service-overlay {
    opacity: 1;
}

.service-overlay {
    backdrop-filter: blur(10px);
}

/* Circular progress animation */
.circular-progress {
    filter: drop-shadow(0 0 20px rgba(245, 230, 211, 0.3));
}

.skill-item:hover .circular-progress {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.skill-item:hover .skill-percentage {
    color: var(--text);
    text-shadow: 0 0 20px var(--accent);
}

[data-theme="light"] .service-overlay {
    background: linear-gradient(135deg, rgba(250, 250, 250, 0.95) 0%, rgba(255, 255, 255, 0.95) 100%) !important;
    border-color: var(--accent) !important;
}

[data-theme="light"] .service-overlay h3 {
    color: var(--accent) !important;
}

/* Menu Hamburger */
.hamburger {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.hamburger:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.1);
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 400px;
    height: 100vh;
    background: var(--bg);
    backdrop-filter: blur(20px);
    z-index: 1500;
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
    border-left: 1px solid var(--border);
}

.menu-overlay.active {
    right: 0;
}

.menu-nav {
    display: flex;
    flex-direction: column;
    padding: 100px 40px;
    gap: 10px;
}

.menu-link {
    color: var(--text);
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 700;
    padding: 20px 0;
    position: relative;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(50px);
}

.menu-overlay.active .menu-link {
    animation: slideIn 0.4s ease forwards;
}

.menu-overlay.active .menu-link:nth-child(1) { animation-delay: 0.1s; }
.menu-overlay.active .menu-link:nth-child(2) { animation-delay: 0.15s; }
.menu-overlay.active .menu-link:nth-child(3) { animation-delay: 0.2s; }
.menu-overlay.active .menu-link:nth-child(4) { animation-delay: 0.25s; }
.menu-overlay.active .menu-link:nth-child(5) { animation-delay: 0.3s; }
.menu-overlay.active .menu-link:nth-child(6) { animation-delay: 0.35s; }

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 15px;
    width: 0;
    height: 3px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.menu-link:hover {
    color: var(--accent);
    transform: translateX(10px);
}

.menu-link:hover::before {
    width: 50px;
}

/* Responsive */
@media (max-width: 768px) {
    section {
        padding: 60px 20px !important;
    }
    
    .menu-overlay {
        width: 100%;
        right: -100%;
    }
}
