/* Variables and reset */
:root {
    --primary-color: #6c63ff;
    --secondary-color: #4a41da;
    --text-color: #f8f8f8;
    --dark-bg: #121212;
    --card-bg: rgba(30, 30, 40, 0.7);
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: var(--text-color);
    background-color: var(--dark-bg);
    overflow-x: hidden;
}

/* Construction banner */
.construction-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(30, 30, 40, 0.9);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    z-index: 1000;
    border-left: 4px solid var(--primary-color);
    max-width: 280px;
}

.tool-animation {
    margin-right: 15px;
    position: relative;
    width: 45px;
    height: 45px;
}

.hammer {
    position: absolute;
    top: 10px;  /* Modifié de 5px à 10px pour descendre le marteau */
    right: 2px;
    width: 30px;
    height: 6px;
    transform-origin: left center;
    animation: hammerSwing 1.2s infinite ease-in-out;
}

.hammer-head {
    position: absolute;
    right: 0;
    top: -3px;
    width: 12px;
    height: 12px;
    background-color: #888;
    border-radius: 2px;
    box-shadow: inset 0 0 2px rgba(255,255,255,0.3);
}

.hammer-handle {
    position: absolute;
    top: 2px;
    right: 12px;
    width: 18px;
    height: 4px;
    background-color: #a0522d;
    border-radius: 2px;
}

.anvil {
    position: absolute;
    bottom: 0;
    left: 5px;
    width: 30px;
    height: 12px;
    background-color: #555;
    border-radius: 3px 3px 0 0;
}

/* Base élargie de l'enclume */
.anvil::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 7px;
    width: 16px;
    height: 5px;
    background-color: #333;
}

/* Corne de l'enclume (pointe à gauche) */
.anvil::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 0;
    width: 8px;
    height: 6px;
    background-color: #555;
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

/* Table de l'enclume (partie surélevée à droite) */
.anvil-table {
    position: absolute;
    top: -3px;
    right: 3px;
    width: 12px;
    height: 3px;
    background-color: #666;
    border-radius: 1px;
}

.spark {
    position: absolute;
    bottom: 12px;
    left: 22px;
    width: 3px;
    height: 3px;
    background-color: #ff9900;
    border-radius: 50%;
    opacity: 0;
    animation: sparkle 1.2s infinite ease-in-out;
    animation-delay: 0.5s;  /* Ajusté pour synchroniser avec la position du marteau */
}

.spark:nth-child(2) {
    left: 26px;
    animation-delay: 0.2s;
}

.spark:nth-child(3) {
    left: 18px;
    animation-delay: 0.4s;
}

@keyframes hammerSwing {
    0%, 100% { transform: rotate(30deg); }
    50% { transform: rotate(-5deg); }
}

@keyframes sparkle {
    0%, 100% { 
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    20% { 
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    60% {
        opacity: 0;
        transform: translate(calc(var(--random-x, 0) * 10px), calc(var(--random-y, -1) * 10px)) scale(0);
    }
}

.construction-text {
    font-size: 14px;
    line-height: 1.4;
}

.construction-text span {
    font-weight: bold;
    color: var(--primary-color);
}

/* Starry sky */
#stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    background: linear-gradient(to bottom, #0f0c29, #302b63, #24243e);
}

.star {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    animation: twinkle 4s infinite ease-in-out;
}

@keyframes twinkle {
    0% { opacity: 0.2; }
    50% { opacity: 1; }
    100% { opacity: 0.2; }
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(5px);
    transition: transform 0.4s ease;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

header.hidden {
    transform: translateY(-100%);
}

.logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary-color);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
    position: relative;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* Submenu for Projects */
.dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    background-color: rgba(20, 20, 30, 0.9);
    backdrop-filter: blur(5px);
    border-radius: 8px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: block;
    padding: 10px 20px;
    color: var(--text-color);
    transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
    background-color: rgba(108, 99, 255, 0.2);
}

/* Main content */
main {
    padding-top: calc(var(--header-height) + 50px);
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 50px;
}

section {
    margin-bottom: 80px;
}

h1, h2, h3 {
    margin-bottom: 20px;
}

h1 {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(to right, #6c63ff, #4a41da);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 30px;
}

h2 {
    font-size: 36px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    display: inline-block;
}

p {
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 18px;
}

/* Welcome card and sections */
.card {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 10px;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.project-img {
    width: 100%;
    height: 180px;
    background-color: #2a2a35;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-color);
}

.project-info {
    padding: 20px;
}

.project-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    margin-top: 15px;
    gap: 8px;
}

.tag {
    background-color: rgba(108, 99, 255, 0.2);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Blog */
.blog-preview {
    margin-top: 30px;
}

.blog-card {
    display: flex;
    margin-bottom: 25px;
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-card:hover {
    transform: translateX(10px);
}

.blog-img {
    min-width: 200px;
    background-color: #2a2a35;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-color);
}

.blog-content {
    padding: 20px;
}

.blog-date {
    font-size: 14px;
    color: #a8a8b3;
    margin-bottom: 8px;
}

.blog-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* Contact form */
.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.contact-form .full-width {
    grid-column: 1 / -1;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.15);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(5px);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--text-color);
    text-decoration: none;
    font-size: 18px;
}

.social-link:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 36px;
    }
    
    h2 {
        font-size: 28px;
    }
    
    nav ul li {
        margin-left: 15px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-card {
        flex-direction: column;
    }
    
    .blog-img {
        height: 150px;
        min-width: 100%;
    }
    
    .contact-form {
        grid-template-columns: 1fr;
    }
}

/* Mobile menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: rgba(10, 10, 15, 0.9);
        padding: 20px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease;
    }
    
    nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin: 10px 0;
    }
    
    .dropdown-content {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: transparent;
        display: none;
        padding: 10px 0 10px 20px;
    }
    
    .dropdown.active .dropdown-content {
        display: block;
    }
}

