/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

/* Reset and base style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

:root {
    --main-bg: #f9f9f9;
    --text-color: #1a1a1a;
    --accent: #6FC3DF;
    --secondary: #F9A825;
    --card-bg: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--main-bg);
    color: var(--text-color);
    overflow-x: hidden;
}

header {
    position: relative;
    width: 100%;
    padding: 0.6rem 5%;
    /* réduit le padding pour un header plus petit */
    background-color: #1c1f2b;
    box-shadow: 0 2px 10px var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.3s ease;
    flex-wrap: nowrap;
}

.logo {
    font-size: 1.6rem;
    /* réduit la taille du logo */
    font-weight: 700;
    color: var(--accent);
}

nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

nav a {
    font-size: 1rem;
    /* réduit la taille des liens */
    color: whitesmoke;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 2px solid transparent;
}

nav a:hover,
nav a.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
}

/* Responsive Menu */
.menu-toggle {
    display: none;
    font-size: 1.6rem;
    /* réduit taille du hamburger */
    color: var(--accent);
    cursor: pointer;
}

@media (max-width: 768px) {
    header {
        padding: 0.5rem 4%;
        /* encore plus compact */
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: block;
        font-size: 1.6rem;
    }

    nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #1c1f2b;
        padding: 1rem 0;
    }

    nav.show {
        display: flex;
    }

    nav a {
        margin: 0.4rem 0;
        font-size: 0.9rem;
        /* un peu plus petit */
        padding: 0.4rem 0;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.3rem 3%;
        /* header très compact */
    }

    .logo {
        font-size: 1.3rem;
        /* logo plus petit */
    }

    .menu-toggle {
        font-size: 1.3rem;
        /* hamburger plus petit */
    }

    nav a {
        font-size: 0.8rem;
        /* liens plus petits */
        margin: 0.3rem 0;
    }
}

section {
    padding: 8rem 9% 5rem;
    min-height: 100vh;
}

.home {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    background-image: url('image11.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: fadeIn 1s ease-in-out;
    flex-wrap: wrap;
}

.home-content h1 {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
    /* tu peux garder la bordure et fond */
    border-left: 5px solid var(--accent);
    padding-left: 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.welcome-text {
    border-left: 5px solid var(--accent);
    padding-left: 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.home-content h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: var(--secondary);
    animation: typing 4s steps(40, end) infinite;
    white-space: nowrap;
    overflow: hidden;
    border-right: 2px solid var(--accent);
    width: 20ch;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 20ch;
    }
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--accent);
    color: white;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    transition: 0.4s ease;
    box-shadow: 0 4px 12px var(--shadow);
}

.btn:hover {
    transform: translateY(-4px);
    background-color: var(--secondary);
    color: #1a1a1a;
}

.home-img img {
    width: clamp(180px, 25vw, 300px);
    /* minimum 180px, max 300px, adaptatif */
    border-radius: 20px;
    box-shadow: 0 8px 20px var(--shadow);
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: brightness(95%) contrast(105%);
    margin: clamp(20px, 5vw, 80px);
    /* marge adaptative selon l'écran */
}

.home-img {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    text-align: center;
    margin-top: 2rem;
}

.home-img img:hover {
    transform: scale(1.05);
    filter: brightness(100%) contrast(110%);
}

.title {
    font-size: 2.5rem;
    color: var(--accent);
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.title::after {
    content: "";
    width: 60px;
    height: 4px;
    background-color: var(--secondary);
    display: block;
    margin: 10px auto 0;
    border-radius: 2px;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
}

.skill {
    background-color: var(--card-bg);
    padding: 30px;
    width: 240px;
    border-radius: 25px;
    box-shadow: 0 8px 20px var(--shadow);
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    transition: transform 0.3s ease;
    animation: fadeInUp 1s ease both;
}

.skill:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.skill img {
    width: 70px;
    height: 70px;
    margin-bottom: 1rem;
}

@keyframes fadeInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.card-contact .content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 15px var(--shadow);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-8px);
}

.icon {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

footer {
    background-color: #ffffff;
    padding: 2rem;
    text-align: center;
    color: #555;
    border-top: 1px solid #ddd;
    font-weight: 500;
    line-height: 1.6;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery img {
    width: 280px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery img:hover {
    transform: scale(1.05);
}

nav a.active {
    color: var(--secondary);
    border-bottom: 2px solid var(--secondary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.highlight {
    background-color: #F9A825;
    color: #1a1a1a;
    font-weight: 600;
    padding: 0 4px;
    border-radius: 4px;
}