:root {
    --color-dark-brown: #391709;
    --color-main-brown: #771f05;
    --color-beige: #e6c5a2;
    --color-orange: #e08639;
    --color-leaf: #b69030;
    --color-bg-light: #FDFBF7;
    --color-text: #2c2523;
}

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

body {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.15em;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg-light);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

header {
    background: white;
    padding: 10px 0;
    border-bottom: 5px solid var(--color-main-brown);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    gap: 20px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.site-logo { height: 72px; width: auto; }

.logo-text { display: flex; flex-direction: column; }
.main-title { font-family: 'Oswald', sans-serif; font-size: 1.7em; font-weight: 700; color: var(--color-main-brown); line-height: 1; }
.subtitle { font-size: 0.9em; font-weight: 600; color: var(--color-text); letter-spacing: 2px; }
.artisan { font-size: 0.8em; color: var(--color-leaf); font-weight: 700; }

.header-actions {
    display: flex;
    align-items: center;
    flex: 1;
    margin-left: 20px;
    min-width: 0;
}

/* Pousse le menu vers la droite, laisse l'espace après Devis pour le CESU */
.header-actions::before {
    content: '';
    flex: 1 1 auto;
}

/* Burger button */
.nav-toggle {
    display: none;
    background: var(--color-main-brown);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    z-index: 110;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@keyframes pulse-soft {
  0%   { transform: scale(1);    filter: drop-shadow(0 0 0 rgba(224, 134, 57, 0)); }
  50%  { transform: scale(1.08); filter: drop-shadow(0 0 10px rgba(224, 134, 57, 0.55)); }
  100% { transform: scale(1);    filter: drop-shadow(0 0 0 rgba(224, 134, 57, 0)); }
}

.cesu-link {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Occupe l'espace entre Devis et le bord droit, logo centré dedans */
    flex: 1 1 auto;
    margin-left: 0;
    margin-right: 0;
    cursor: pointer;
    min-width: 0;
    text-decoration: none;
}

.cesu-logo {
    display: block;
    width: 115px;
    height: 75px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 10px rgba(57, 23, 9, 0.12);
    animation: pulse-soft 4.5s infinite ease-in-out;
    transition: box-shadow 0.3s ease;
}

.cesu-link:hover .cesu-logo {
    animation-play-state: paused;
    box-shadow: 0 4px 16px rgba(224, 134, 57, 0.35);
}

nav ul { list-style: none; display: flex; gap: 28px; align-items: center; }
nav a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 700;
    text-transform: uppercase;
    transition: color 0.3s;
    font-size: 1.08em;
    letter-spacing: 0.3px;
}
nav a:hover, nav a:focus-visible { color: var(--color-orange); outline: none; }

.hero-section {
    color: white;
    text-align: center;
    padding: 140px 20px;
    display: flex;
    align-items: center;
    min-height: 500px;
}
.hero-content { max-width: 800px; margin: 0 auto; }
.hero-section h1 {
    font-size: 3.5em;
    color: var(--color-beige);
    margin-bottom: 20px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}
.slogan { font-size: 1.3em; margin-bottom: 30px; color: rgba(230, 197, 162, 0.95); }

.cta-button-large {
    display: inline-block;
    padding: 16px 35px;
    background-color: var(--color-orange);
    color: white;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1em;
}
.cta-button-large:hover,
.cta-button-large:focus-visible {
    background-color: var(--color-main-brown);
    transform: translateY(-3px);
    outline: none;
}

.cta-button-small {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--color-orange);
    color: white !important;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 6px;
    font-size: 0.9em;
    transition: background 0.3s;
}
.cta-button-small:hover,
.cta-button-small:focus-visible {
    background-color: var(--color-main-brown);
    outline: none;
}

/* Bouton Devis dans le header — un peu plus grand */
nav .nav-button.cta-button-small {
    padding: 12px 22px;
    font-size: 1.05em;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.services-section { padding: 100px 0; background-color: #f9f6f1; text-align: center; }
.services-section h2 {
    font-size: 2.5em;
    color: var(--color-main-brown);
    margin-bottom: 10px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}
.section-intro { color: #666; margin-bottom: 50px; font-size: 1.2em; }
.service-grid { display: flex; gap: 40px; justify-content: center; }
.service-card {
    flex: 1;
    background: white;
    padding: 50px 40px;
    border-radius: 8px;
    text-align: center;
    border-top: 6px solid var(--color-leaf);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}
.service-card:hover { transform: translateY(-5px); }
.card-icon { font-size: 3em; margin-bottom: 20px; }
.service-card h3 {
    color: var(--color-main-brown);
    font-size: 1.8em;
    margin-bottom: 10px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}
.service-card h4 { color: var(--color-leaf); font-size: 1.2em; margin-bottom: 15px; }
.service-card p { color: #555; margin-bottom: 25px; line-height: 1.7; }

.portfolio-section { padding: 100px 0; text-align: center; }
.portfolio-section h2 {
    font-size: 2.5em;
    color: var(--color-main-brown);
    margin-bottom: 10px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; margin: 40px 0; }
.gallery-item { overflow: hidden; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.gallery-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}
.gallery-img:hover { transform: scale(1.05); }

.contact-section {
    background: var(--color-main-brown);
    color: var(--color-beige);
    padding: 100px 0;
    text-align: center;
    scroll-margin-top: 100px;
}
.contact-section h2 {
    font-size: 2.5em;
    color: var(--color-beige);
    margin-bottom: 10px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}
.contact-form { max-width: 650px; margin: 40px auto 30px auto; text-align: left; }
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--color-beige);
    font-size: 0.95em;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 6px;
    border: 2px solid transparent;
    font-family: inherit;
    font-size: 1em;
    background: #fff;
    color: var(--color-text);
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-orange);
}
.contact-form .form-submit { width: 100%; margin-top: 8px; }
.contact-details { margin-top: 30px; font-size: 1.1em; text-align: center; }
.contact-details p { margin: 10px 0; }
.contact-details a { color: var(--color-beige); text-decoration: none; font-weight: 700; }

/* Honeypot anti-spam — hidden from users */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

footer {
    background: var(--color-dark-brown);
    color: white;
    padding: 40px 0;
    text-align: center;
}
footer p { margin-bottom: 10px; }
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-bottom: 12px;
}
.footer-links a,
.legal-link {
    color: var(--color-beige);
    text-decoration: none;
    font-size: 0.95em;
}
.footer-links a:hover,
.legal-link:hover { text-decoration: underline; }

/* Focus visible for a11y */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--color-orange);
    outline-offset: 2px;
}

@media (max-width: 992px) {
    .service-grid { flex-direction: column; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .nav-toggle { display: flex; }

    .header-actions {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        box-shadow: 0 8px 20px rgba(0,0,0,0.12);
        transition: max-height 0.3s ease, padding 0.3s ease;
        border-bottom: 3px solid var(--color-main-brown);
    }

    .header-actions.is-open {
        max-height: 420px;
        padding: 16px 20px 20px;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    nav li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    nav a {
        display: block;
        padding: 14px 8px;
    }

    .nav-button {
        display: block !important;
        text-align: center;
        margin: 8px 0;
    }

    .header-actions::before {
        display: none;
    }

    .cesu-link {
        flex: none;
        margin: 12px auto 0;
        width: fit-content;
    }

    .hero-section h1 { font-size: 2.4em; }
    .hero-section { padding: 100px 20px; min-height: 400px; }
    .site-logo { height: 56px; }
    .main-title { font-size: 1.4em; }
}

@media (max-width: 600px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .logo-text .subtitle,
    .logo-text .artisan { display: none; }
}
