/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body général */
body {
    font-family: Arial, Helvetica, sans-serif;
    background: #efe3cf;
    color: #560000;
    line-height: 1.6;
}

/* Navbar */
nav {
    width: 100%;
    padding: 20px 50px;
    position: fixed;
    top: 0;
    display: flex;
    justify-content: space-between; /* logo à gauche, menu à droite */
    align-items: center;
    background: #560000;
    z-index: 100;
}

nav .logo img {
    height: 50px; /* ajuste selon ton logo */
}

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

nav ul li a {
    text-decoration: none;
    color: #efe3cf;
    font-weight: bold;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: white;
}

/* Hero section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.hero p {
    font-size: 1.2rem;
    color: black;
}

/* Sections */
.section-content {
    padding: 120px 50px; /* 120px pour laisser de la place à la navbar */
}

.section-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #560000;
    display: inline-block;
}

.section-content p {
    color: black;
    max-width: 800px;
}

/* Galerie projets en grille carrée (preview sur la page Réalisations) */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 10%;
    aspect-ratio: 1 / 1,1; /* carré */
    background: #560000; /* fond derrière les images */
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* images remplissent la carte */
    transition: transform 0.3s ease;
}


.project-card:hover img {
    transform: scale(1.1);
}

/* Overlay avec texte sur preview projets */
.project-card .overlay {
    position: absolute;
    bottom: 0;
    background: #efe3cf;
    color: white;
    width: 100%;
    padding: 10px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .overlay {
    opacity: 1;
}

/* ================= CV PAGE ================= */
.cv-section {
    padding: 120px 50px 60px;
}

.cv-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.cv-download {
    color: black;
}

.cv-download a {
    color: #560000;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #560000;
    transition: color 0.3s;
}

.cv-download a:hover {
    color: #8b0000;
}

.cv-image {
    max-width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ================= RESPONSIVE: tablettes / téléphones ================= */
@media (max-width: 768px) {
    nav {
        position: relative; /* laisse la place au contenu */
        padding: 14px 20px;
    }

    nav .logo img { height: 44px; }

    nav ul {
        gap: 16px;
        flex-wrap: wrap;
        margin-top: 8px;
    }

    .hero h1 { font-size: 2.4rem; }
    .hero p { font-size: 1rem; }

    .section-content { padding: 100px 20px; }

    .gallery { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

@media (max-width: 480px) {
    nav {
        padding: 12px 14px;
    }
    nav .logo img { height: 40px; }
    nav ul { 
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 10px;
        align-items: flex-start;
    }

    .hero { height: auto; padding: 40px 16px; }
    .hero h1 { font-size: 2rem; }

    .section-content { padding: 80px 16px; }

    .section-content h2 { font-size: 1.4rem; }

    .project-card { border-radius: 10px; }
    .project-card img { object-fit: cover; }

    /* Ajustements pour petites images et galeries */
    .project-gallery { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
    .project-gallery .image-wrapper { height: 150px; }
    .image-wrapper.large { height: 320px; }

    /* Formulaires et éléments plein écran */
    input, textarea, button { font-size: 16px; }
}

/* Burger menu styles */
.burger {
    display: none;
    width: 44px;
    height: 38px;
    background: transparent;
    border: 0;
    cursor: pointer;
    position: relative;
}
.burger span,
.burger span::before,
.burger span::after {
    display: block;
    background: #efe3cf;
    height: 3px;
    width: 26px;
    border-radius: 3px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.burger span { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.burger span::before { content: ''; position: absolute; top: -8px; left: 0; }
.burger span::after { content: ''; position: absolute; top: 8px; left: 0; }

@media (max-width: 480px) {
    .burger { display: block; }
    nav ul { display: none; }
    nav.nav-open ul {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        right: 14px;
        background: rgba(86,0,0,0.98);
        padding: 12px 16px;
        border-radius: 8px;
        gap: 8px;
        z-index: 200;
    }
    nav.nav-open .burger span { transform: rotate(45deg); }
    nav.nav-open .burger span::before { transform: rotate(90deg) translateX(0); top: 0; }
    nav.nav-open .burger span::after { opacity: 0; }
    nav ul li a { color: #efe3cf; }
}
