/* ============================ */
/* RESET GLOBAL */
/* ============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Poppins", sans-serif;
    background-color: #f9f9f9;
    color: #222;
    line-height: 1.6;
}

/* ============================ */
/* CONTAINER */
/* ============================ */
.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    padding: 0 15px;
}

/* ============================ */
/* HEADER */
/* ============================ */
header {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo a {
    text-decoration: none;
    font-weight: 700;
    font-size: 1.4rem;
    color: #0077ff;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    transition: 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    color: #0077ff;
}

/* ============================ */
/* MENU BURGER */
/* ============================ */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 24px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: transform 0.28s ease, opacity 0.18s ease;
    transform-origin: center;
    will-change: transform, opacity;
}

.menu-toggle span + span {
    margin-top: 5px;
}

/* Animation : burger -> croix */
.menu-toggle.open span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.menu-toggle.open span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* ============================ */
/* HERO SECTION */
/* ============================ */
#hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
    background: linear-gradient(135deg, #0077ff20, #00c3ff20);
    text-align: center;
}

.hero-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 50px;
}

.hero-content .text {
    flex: 1;
    min-width: 280px;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.1rem;
    color: #444;
}

/* ============================ */
/* BOUTONS */
/* ============================ */
.btn {
    display: inline-block;
    background: #0077ff;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.3s;
    cursor: pointer;
}

.btn:hover {
    background: #005fcc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ============================ */
/* PROJECTS SECTION */
/* ============================ */
#projects {
    padding: 60px 0;
}

#projects h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.project-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: 0.3s;
    text-align: center;
    padding-bottom: 20px;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.project-card h3 {
    margin: 15px;
    color: #0077ff;
}

.project-card p {
    margin: 0 15px 15px;
    color: #555;
}

.project-card .btn {
    display: inline-block;
    margin-top: 10px;
}

/* ============================ */
/* CONTACT SECTION */
/* ============================ */
#contact {
    padding: 80px 0;
    background: linear-gradient(135deg, #0077ff10, #00c3ff10);
    text-align: center;
}

#contact h1 {
    font-size: 2rem;
    color: #0077ff;
    margin-bottom: 15px;
}

#contact p {
    max-width: 600px;
    margin: 0 auto 40px auto;
    color: #555;
    font-size: 1.1rem;
    line-height: 1.6;
}

.contact-form {
    background: #fff;
    max-width: 600px;
    margin: auto;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: 0.3s ease;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    font-family: "Poppins", sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    resize: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #0077ff;
    box-shadow: 0 0 8px rgba(0,119,255,0.2);
    outline: none;
}

.contact-form .btn {
    background: #0077ff;
    color: #fff;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.contact-form .btn:hover {
    background: #005fcc;
    transform: translateY(-2px);
}

/* ============================ */
/* FOOTER */
/* ============================ */
footer {
    background: #111;
    color: #fff;
    text-align: center;
    padding: 30px 0;
}

footer .socials a img {
    width: 24px;
    margin: 0 8px;
    filter: invert(1);
    transition: 0.3s;
}

footer .socials a:hover img {
    transform: scale(1.2);
}

/* ============================ */
/* MEDIA QUERIES */
/* ============================ */

/* Tablette */
@media (max-width: 1024px) {
    nav ul {
        gap: 15px;
    }

    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.6rem; }

    #hero {
        padding: 60px 0;
    }
}

/* Mobile */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .menu-toggle {
        display: flex;
    }

    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
        background: white;
        border-radius: 8px;
        padding: 15px;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        margin: 10px 0;
    }

    #hero {
        padding: 50px 0;
    }

    .hero-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .contact-form {
        padding: 25px 20px;
    }
}

/* Petit mobile */
@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }

    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .project-card img {
        height: 150px;
    }

    #contact p {
        font-size: 1rem;
    }
}
