/* Réinitialisation et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
}

/* Global */
:root {
    --primary-color: #1e3e62;
    /* #1e56a0;*/
    --primary-color-dark: #0b192c;
    --secondary-color: #ff6500;
    /*#ff8c00;*/
    --dark-color: #000000;
    --light-color: #efefef;

    --border-radius: 2rem;
}

body {
    background-color: var(--primary-color-dark);
    color: var(--light-color);
    /* overflow-x: hidden; */
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-color-dark);
    backdrop-filter: blur(10px);
    /*FIXME pixel!*/
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    /*FIXME pixel!*/
}

.logo a {
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.logo a span {
    color: var(--light-color);
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--light-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 1rem;
}

nav a:hover {
    color: var(--secondary-color);
}

/* Hero */
.hero {
    background: linear-gradient(45deg, var(--primary-color-dark), var(--primary-color));
    text-align: center;
    padding-top: 5rem;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: var(--secondary-color);
}

.hero p {
    font-size: 1.5rem;
    margin: 0 auto 2.5rem;
    color: var(--light-color);
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Buttons */
.btn {
    background-color: var(--secondary-color);
    color: var(--light-color);
    padding: 0.7rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    /* box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3); */
}

.btn:hover {
    transform: translateY(-0.2rem);
    /* box-shadow: 0 8px 20px rgba(255, 140, 0, 0.4); */
}

.btn-secondary {
    background-color: transparent;
    border: 0.15rem solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: color-mix(in srgb, var(--secondary-color), transparent 90%)
}

/* Tech badges */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-badge {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 0.3rem 0.8rem;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    /* font-weight: 500; */
}

/* Sections */
.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.section h2 {
    text-align: center;
}

.light-section {
    background-color: var(--primary-color);
}

.dark-section {
    background-color: var(--primary-color-dark);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    padding-bottom: 2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 30%;
    bottom: 0;
    width: 40%;
    height: 0.3rem;
    background: var(--secondary-color);
    border-radius: var(--border-radius);
}

/* Container */
.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 66.6%;
    margin: 0 auto;
}

/* About */
.about-container {
    max-width: 66%;
    margin: 0 auto;
    border-radius: var(--border-radius);
    overflow: hidden;
    /*FIXME*/
    box-shadow: 0 25px 50px -12px var(--dark-color);
    position: relative;
    display: flex;
    flex-direction: row;
    background-color: var(--light-color);
    margin-top: 2rem;
}

.about-image {
    width: 50%;
    display: block;
    margin: auto;
}

.about-content {
    width: 60%;
    padding: 3rem;
    text-align: left;
    background: var(--light-color);
}

.about-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.about-content p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--primary-color-dark);
}

.about-content ul {
    color: var(--primary-color-dark);
    margin-bottom: 1rem;
    margin-left: 2rem;
}

/* Cards */
.card {
    background: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: 0 0.7rem 2.1rem var(--dark-color);
    padding: 2rem;
}

.card h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.card p {
    line-height: 1.5;
    color: var(--primary-color-dark);
    margin-bottom: 1rem;
}

/* Services */
#services-card {
    flex-wrap: wrap;
    min-width: 20rem;
    width: calc(33.3% - 2rem);
    border-left: 0.3rem solid var(--secondary-color);
    transform: translateX(-10rem);
    transition: all 0.8s ease-out;
    opacity: 0;
}

#services-card.visible {
    transform: translateX(0);
    opacity: 1;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Portfolio*/
#portfolio-card {
    min-width: 20rem;
    width: calc(50% - 2rem);
    transform: translateX(10rem);
    transition: all 0.8s ease-out;
    opacity: 0;
}

#portfolio-card.visible {
    transform: translateX(0);
    opacity: 1;
}

.portfolio-image {
    width: 32rem;
    height: 18rem;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.portfolio-image img {
    height: 100%;
    /* width: 100%; */
    object-fit: contain;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.portfolio-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: linear-gradient(to bottom, transparent 50%, rgba(10, 26, 47, 0.9)); */
    z-index: 1;
}

.portfolio-content {
    padding: 1.5rem;
    position: relative;
    background: var(--light-color);
}

.portfolio-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}


/* Contact */
#contact-card {
    width: 33.3%;
}

.contact-form {
    flex: 2;
    background: var(--light-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color-dark);
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border-radius: 0.5rem;
    border: 2px solid var(--primary-color);
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-color-dark);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Pied de page */
footer {
    background-color: var(--primary-color-dark);
    padding: 3rem 2rem;
    text-align: center;
}

footer p {
    color: var(--primary-color);
}

/* Animation de scroll */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 140, 0, 0.5);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    padding-top: 10px;
}

.scroll-indicator::before {
    content: '';
    width: 6px;
    height: 10px;
    background-color: #ff8c00;
    border-radius: 3px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    70% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(15px);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .about-container {
        flex-direction: column;
    }

    .about-image {
        width: 100%;
        height: 300px;
    }

    .about-content {
        width: 100%;
    }

    .portfolio-card {
        width: 100%;
    }

    .contact-container {
        flex-direction: column;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }
}