/* ===== RESET & BASE ===== */
:root {
    --primary-color: #4a3529;
    --secondary-color: #8b6f47;
    --light-bg: #fdfbf8;
    --dark-text: #4a3529;
    --light-text: #f5f0e8;
    --hover-color: #6b4f3f;
    --section-bg: #f6f0e8;
    --card-bg: #e6d8ca;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

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

/* ===== HEADER & NAV ===== */
header {
    background-color: var(--light-bg);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: box-shadow var(--transition-speed);
    padding: 2rem 0;
}

header:hover {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

/* Modifier nav */
nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
}

/* Modifier header-branding */
.header-branding {
    position: absolute;
    left: 1rem;
    width: auto;
    justify-content: flex-start;
}

/* Logo plus gros */
.header-icon {
    height: 80px;
    width: auto;
}

.header-icon:hover {
    transform: scale(1.1);
}

.header-branding a {
    background-color: transparent !important;
    color: inherit !important;
}

.header-branding a::after {
    display: none;
}

.header-branding a:hover {
    background-color: transparent !important;
    transform: none !important;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0 auto;
    background-color: var(--light-bg);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

nav a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all var(--transition-speed) ease;
    position: relative;
}

nav a:hover {
    background-color: rgba(139, 111, 71, 0.1);
    color: var(--secondary-color);
    transform: translateY(-2px);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: all var(--transition-speed) ease;
    transform: translateX(-50%);
}

nav a:hover::after {
    width: 80%;
}

.cta-button,
.button {
    background-image: url('../images/bois2.jpg');
    background-size: 100px;
    background-color: var(--primary-color);
    color: var(--light-text) !important;
}

/* ===== HERO ===== */
/* Réinitialiser .hero */
.hero {
    padding: 0;
    background-color: var(--section-bg);
    margin-bottom: 0;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* Réinitialiser .video-placeholder */
.video-placeholder {
    position: relative;
    width: 100%;
    height: 600px;
    margin: 0 calc(-50vw + 50%);
    overflow: hidden;
}

/* Supprimer le padding-top sur main */
main {
    padding-top: 0;
}


.video-placeholder video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.video-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.video-button:hover {
    transform: translate(-50%, -50%) translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ===== SECTIONS ===== */
.section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 1s ease-out;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    position: relative;
}

/* Ajoutez cette règle après .section */
.hero.section {
    max-width: none;
    width: 100%;
    padding: 0;
    margin-bottom: 0;
}

.section::before {
    display: none;
}

.section h1,
.section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section h1::after,
.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
    transform: translateX(-50%);
    transition: width var(--transition-speed);
}

.section h1:hover::after,
.section h2:hover::after {
    width: 100px;
}

/* ===== À PROPOS ===== */
#about {
    position: relative;
    padding-top: 0;
    padding: 4rem 2rem;
    margin: 0 calc(-50vw + 50%);
    left: 50%;
    transform: translateX(-50%);
    animation: fadeIn 1s ease-out 0.2s forwards;
    overflow: hidden;
    margin-top: 0;
    border-top: 2px solid var(--secondary-color);
}

#about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/bois2.jpg') repeat;
    background-size: auto;
    z-index: -1;
    opacity: 0.8;
}

#about .content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    padding-top: 2rem;
    color: var(--dark-text);
}

#about .text {
    max-width: 800px;
    text-align: left;
    color: var(--dark-text);
}

#about h2 {
    color: var(--light-text);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

#about p {
    color: var(--light-text);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    border: 3px solid var(--secondary-color);
    z-index: 1;
}

/* ===== RÉALISATIONS ===== */
#realisations {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 1s ease-out;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

#realisations h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

#realisations h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
    transform: translateX(-50%);
    transition: width var(--transition-speed);
}

.featured-projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    overflow: hidden;
    padding: 0;
    background-color: var(--card-bg);
    border: 1px solid transparent;
    text-decoration: none;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/pattern.png');
    background-size: 800px;
    /* ← CORRIGÉ : taille cohérente */
    opacity: 0.15;
    /* ← CORRIGÉ : visible tout le temps */
    z-index: -1;
    border-radius: 8px;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    border-color: var(--primary-color);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px 4px 0 0;
    position: relative;
    z-index: 1;
}

.project-card-content {
    padding: 1.5rem;
    position: relative;
    z-index: 1;
    color: #333;
    background: transparent;
}

.project-card-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.project-card-content p {
    color: #333;
    font-size: 1rem;
}

/* ===== GALERIE (PAGE RÉALISATIONS) ===== */
.gallery-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
    position: relative;
    background-color: transparent;
}

.gallery-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/pattern.png');
    background-size: 1200px;
    opacity: 0.15;
    z-index: -1;
    border-radius: 8px;
    pointer-events: none;
}

.gallery-by-project {
    display: flex;
    flex-direction: column;
    /* ← Une colonne = disposition en lignes verticales */
    gap: 2rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.project {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    border: 1px solid transparent;
}

.project::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/pattern.png');
    background-size: 800px;
    opacity: 0.15;
    z-index: -1;
    border-radius: 8px;
}

.project:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    border-color: var(--primary-color);
}

.project h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.project p {
    text-align: center;
    color: var(--dark-text);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.project-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.project-images img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform var(--transition-speed);
}

.project-images img:hover {
    transform: scale(1.03);
}

/* ===== SERVICES ===== */
.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-item {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transition: all var(--transition-speed);
    border: 1px solid transparent;
    overflow: hidden;
    color: #333;
    background-color: var(--card-bg);
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/pattern.png');
    background-size: 800px;
    /* ← CORRIGÉ : taille cohérente */
    opacity: 0.15;
    /* ← CORRIGÉ : visible tout le temps */
    z-index: -1;
    border-radius: 8px;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    border-color: var(--primary-color);
}

.service-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.service-item h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--secondary-color);
    z-index: 1;
}

.service-item p {
    color: #333;
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== ATELIER ===== */
#atelier .atelier-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 800px;
    margin: 2rem auto 0;
}

#atelier .atelier-images img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    transition: transform var(--transition-speed);
}

#atelier .atelier-images img:hover {
    transform: scale(1.03);
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/pattern.png');
    background-size: 800px;
    opacity: 0.1;
    z-index: -1;
    border-radius: 8px;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 1s ease-out 0.3s forwards;
    position: relative;
    isolation: isolate;
    z-index: 1;
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/pattern.png');
    background-size: 800px;
    opacity: 0.15;
    z-index: -1;
    border-radius: 8px;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--primary-color);
    transition: transform var(--transition-speed);
}

.form-group input:focus+label,
.form-group textarea:focus+label,
.form-group select:focus+label {
    transform: translateY(-5px);
    color: var(--secondary-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    transition: all var(--transition-speed);
    background-color: var(--section-bg);
    color: var(--dark-text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 53, 41, 0.2);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5em;
    padding-right: 2.5rem;
}

/* ===== CONTACT TEASER ===== */
#contact-teaser {
    text-align: center;
    padding: 3rem 2rem;
    margin: 0 auto 2rem;
    border-radius: 8px;
    background-color: var(--section-bg);
}

#contact-teaser h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

#contact-teaser p {
    margin-bottom: 2rem;
    color: var(--dark-text);
}

/* ===== BOUTONS ===== */
.button {
    display: inline-block;
    background-image: url('../images/bois2.jpg');
    background-size: 100px;
    background-color: rgba(40, 25, 15, 0.9);
    color: var(--light-text);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all var(--transition-speed);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s;
}

.button:hover {
    background-color: rgba(40, 25, 15, 1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.button:hover::before {
    left: 100%;
}

.button:active {
    transform: translateY(0);
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--primary-color);
    color: var(--light-text);
    margin-top: 2rem;
    transition: background-color var(--transition-speed);
}

footer:hover {
    background-color: #3a2e23;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {

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

    #about .content {
        flex-direction: column;
        text-align: center;
    }

    #about .text {
        text-align: center;
    }

    .featured-projects,
    .project-images,
    .atelier-images,
    .services-list {
        grid-template-columns: 1fr;
    }

    .header-branding {
        position: static;
        width: 100%;
        justify-content: center;
        order: -1;
        margin-bottom: 0.5rem;
    }

    nav {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .form-group {
        margin-bottom: 1rem;
    }
}