:root {
    --bg-dark: #0a0a0a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --primary: #3b82f6;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --border-light: rgba(255, 255, 255, 0.08);

    /* Effets */
    --glass-blur: blur(16px);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Animé */
.background-glow {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.06), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.06), transparent 25%);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-main);
}

.gradient-text {
    background: linear-gradient(to right, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

/* --- NAVIGATION FLOTTANTE --- */
.navbar {
    position: fixed;
    top: 20px; left: 0; right: 0;
    display: flex; justify-content: center;
    z-index: 1000; padding: 0 20px;
}

.nav-content {
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    display: flex; align-items: center; gap: 3rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700; font-size: 1.3rem;
    color: var(--text-main); text-decoration: none;
}

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
    color: var(--text-muted); text-decoration: none;
    font-weight: 500; transition: 0.3s;
}
.nav-links a:hover { color: var(--text-main); }

.controls button {
    background: transparent; border: none;
    color: var(--text-main); cursor: pointer;
    font-size: 1.1rem; padding: 5px; transition: 0.2s;
}
.controls button:hover { color: var(--primary); transform: scale(1.1); }

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex; align-items: center;
    padding-top: 80px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1; margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem; color: var(--text-muted);
    max-width: 700px; margin-bottom: 2rem;
}

.cta-buttons { display: flex; gap: 1rem; }
.cta-button {
    padding: 0.8rem 1.8rem; border-radius: 12px;
    text-decoration: none; font-weight: 600;
    transition: all 0.3s ease; display: inline-flex;
    align-items: center; gap: 0.5rem; border: none; cursor: pointer;
    font-size: 1rem; font-family: 'Inter', sans-serif;
}

.cta-button.primary {
    background: var(--text-main); color: var(--bg-dark);
}
.cta-button.primary:hover {
    background: var(--primary); color: white;
    transform: translateY(-2px);
}
.cta-button.secondary {
    background: rgba(255,255,255,0.05); color: var(--text-main);
    border: 1px solid var(--border-light);
}
.cta-button.secondary:hover {
    background: rgba(255,255,255,0.1); border-color: var(--text-main);
}

/* --- UTILITY GLASS CARD --- */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    transition: 0.3s ease;
}
.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
}

/* --------------------------- SKILLS (Effets Rétablis) --------------------------- */
section { padding: 5rem 0; }

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-category {
    padding: 2rem;
}

.skill-category h3 {
    color: var(--primary);
    margin-bottom: 2rem;
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1rem;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* --- LE STYLE DES CARTES INDIVIDUELLES --- */
.skill-group, .tool-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.2rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

/* L'effet au survol (HOVER) */
.skill-group:hover, .tool-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 10px 20px -10px rgba(59, 130, 246, 0.3);
}

.skill-group h4, .tool-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-group h4 i, .tool-item h4 i {
    color: var(--accent);
    transition: transform 0.3s;
}

/* Petite animation de l'icône au survol */
.skill-group:hover h4 i, .tool-item:hover h4 i {
    transform: scale(1.2) rotate(10deg);
}

.description, .tool-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* --- PROJECTS --- */
.projects-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem; margin-top: 3rem;
}

.project-card {
    display: flex; flex-direction: column;
    text-decoration: none; color: inherit;
    overflow: hidden; height: 100%;
}

.project-image {
    width: 100%; height: 180px;
    position: relative; overflow: hidden;
}
.project-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}
.project-card:hover .project-image img { transform: scale(1.05); }

.project-image .overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex; justify-content: center; align-items: center;
    opacity: 0; transition: 0.3s;
}
.project-card:hover .overlay { opacity: 1; }
.project-image .overlay i { font-size: 2rem; color: white; }

.project-content {
    padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1;
}

.project-content h3 { font-size: 1.2rem; margin-bottom: 0.8rem; line-height: 1.3; }
.project-description { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; flex-grow: 1; }
.project-role { font-size: 0.8rem; font-weight: 600; color: var(--text-main); margin-bottom: 0.5rem; }

.tech-stack { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.technos {
    font-size: 0.75rem; color: var(--accent);
    background: rgba(6, 182, 212, 0.1);
    padding: 4px 10px; border-radius: 6px; border: 1px solid rgba(6, 182, 212, 0.2);
}

/* --- CONTACT --- */
.contact-wrapper {
    display: grid; grid-template-columns: 1fr 1.5fr;
    overflow: hidden; margin-top: 2rem;
}

.contact-info {
    padding: 2.5rem; background: rgba(255,255,255,0.02);
    border-right: 1px solid var(--border-light);
}
.contact-info h2 { font-size: 2rem; margin-bottom: 2rem; }

.contact-methods { display: flex; flex-direction: column; gap: 1.2rem; }
.method-item {
    display: flex; align-items: center; gap: 1rem;
    color: var(--text-muted); text-decoration: none;
    transition: 0.3s;
}
.method-item i { width: 20px; text-align: center; color: var(--primary); }
.method-item:hover { color: var(--text-main); transform: translateX(5px); }

.contact-form { padding: 2.5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.form-group { position: relative; }

.form-group input, .form-group textarea {
    width: 100%; background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-light);
    border-radius: 8px; padding: 1rem;
    color: var(--text-main); font-family: inherit;
    outline: none; transition: 0.3s;
}
.form-group textarea { min-height: 140px; resize: vertical; }

/* Floating Label Logic */
.form-group label {
    position: absolute; left: 1rem; top: 1rem;
    color: var(--text-muted); pointer-events: none;
    transition: 0.3s; background: transparent;
}
.form-group input:focus, .form-group textarea:focus,
.form-group input:not(:placeholder-shown),
.form-group textarea:not(:placeholder-shown) {
    border-color: var(--primary); background: rgba(0,0,0,0.4);
}
.form-group input:focus ~ label, .form-group textarea:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    top: -0.6rem; left: 0.8rem; font-size: 0.8rem;
    color: var(--primary); background: var(--bg-dark); padding: 0 5px;
}

/* Force le texte du placeholder à être invisible pour éviter le doublon */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: transparent;
}

/* Responsive */
@media (max-width: 900px) {
    .contact-wrapper { grid-template-columns: 1fr; }
    .contact-info { border-right: none; border-bottom: 1px solid var(--border-light); }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2.5rem; }
    .projects-grid { grid-template-columns: 1fr; }
}

/* Light Mode (Si tu l'utilises) */
body.light {
    --bg-dark: #f3f4f6;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --text-main: #111827;
    --text-muted: #4b5563;
    --border-light: rgba(0, 0, 0, 0.1);
}
body.light .nav-content { background: rgba(255,255,255,0.8); }
body.light .background-glow { opacity: 0.5; }