:root {
    --primary-color: #5A998A;
    --secondary-color: #A2D5C6;
    --dark-color: #3E4A3D;
    --light-color: #F9F7F3;
    --white-color: #fff;
    --font-family-headings: 'Montserrat', sans-serif;
    --font-family-body: 'Roboto', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-body);
    line-height: 1.6;
    background: var(--white-color);
    color: var(--dark-color);
}

h1, h2, h3 {
    font-family: var(--font-family-headings);
    font-weight: 700;
    line-height: 1.2;

}

a {
    text-decoration: none;
    color: var(--primary-color);
}

img {
    max-width: 100%;
}

/* Header */
header {
    background: var(--light-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

nav .logo {
    display: flex;
    align-items: center;
}

nav .logo img {
    height: 40px;
    margin-right: 10px;
}

nav .logo span {
    font-size: 1.5rem;
    font-family: var(--font-family-headings);
    font-weight: 700;
    color: var(--dark-color);
}

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

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    color: var(--dark-color);
    font-weight: 700;
    transition: color 0.3s ease;
}

nav ul li a:hover, .active-link {
    color: var(--primary-color);
}

#way, #about, #services, #contact {
    scroll-margin-top: 90px;
}

/* Hero Section */
#hero {
    background: url('hero-background.png') no-repeat center center/cover;
    color: var(--white-color);
    height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}
#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    padding: 0 2rem;
}

.hero-content h1  {
    font-size: 3rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.hero-content h5  {
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-button {
    background: var(--primary-color);
    color: var(--white-color);
    padding: 1rem 2rem;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 700;
    transition: background-color 0.3s ease;
}

.cta-button.secondary {
    background: transparent;
    border: 2px solid var(--white-color);
}

.cta-button:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Sections */
main section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

main section h2 {
    font-size: 2.5rem;
    padding-bottom: 8px;
    border-bottom: solid 6px var(--primary-color);
    margin-top: 1rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}


/* Scroll Animation */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
}

#about, #way {
    text-align: left;
}

#about h3, #way h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-top: 1rem;
    margin-bottom: 1rem;
}

#about ul, #way ul, .service-card ul {
    list-style: disc;
    padding-left: 2rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

#about ul li, #way ul li,.service-card ul li {
    margin-bottom: 0.5rem;
    
}

.about-container {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
}

.about-text {
    flex: 2;
}

.about-photo {
    flex: 1;
    max-width: 350px;
    margin-top: 1rem;
    position: sticky;
    top: 80px; /* hauteur du header + petit espace */
    align-self: flex-start;
}

.about-photo img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

#about p, #way p {
    max-width: 800px;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Services */
#services {
    background: var(--light-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    text-align: left;
}

.service-card {
    background: var(--white-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 25px rgba(0,0,0,0.1);
}

.service-card img {
    height: 50px;
    width: 50px;
    object-fit: contain;
    margin: 0 auto 1rem auto;
}

.service-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.service-card h4 {
   color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.service-card p {
    margin-bottom: 0.5rem;
    flex-grow: 1;
}

/* Contact */
#contact {
    background-color: var(--light-color);
}
.contact-actions {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.contact-button {
    background: var(--primary-color);
    color: var(--white-color);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    min-width: 250px;
    justify-content: center;
}

.contact-button:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

.contact-button img {
    height: 24px;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 2rem;
}

/* Responsive */
@media(max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    nav {
        flex-direction: column;
        padding: 1rem;
    }
    nav .logo {
        margin-bottom: 0.5rem;
    }
    nav ul {
        display: flex;
        padding-top: 0.5rem;
        border-top: 1px solid #eee;
        width: 100%;
        justify-content: space-around;
    }
    nav ul li {
        margin-left: 0;
    }
    #way{
        scroll-margin-top: 110px;
    }
    .about-container {
        flex-direction: column;
        align-items: center;
    }
    .about-photo {
        order: -1;
        margin-bottom: 2rem;
        position: static;
        top: auto;
        max-width: 100%;
    }
    #about {
        text-align: center;
    }
    .about-text {
        text-align: left;
    }
    main section {
        padding: 3rem 1rem;
    }
    main section h2 {
        font-size: 2rem;
    }

    /* FAQ responsive padding */
    .faq-content-wrapper {
        padding: 3rem 1rem;
    }

    .service-card img {
        height: 70px;
        width: 70px;
        margin-bottom: 1.5rem;
    }
}

/* Mobile Landscape Optimization */
@media (max-height: 500px) and (orientation: landscape) {
    /* Container width optimization */
    nav,
    main section,
    .faq-content-wrapper {
        max-width: 80vw;
        margin: 0 auto;
    }
    
    /* Compact header for landscape */
    nav {
        padding: 0.5rem 1rem;
        flex-direction: row;
    }
    
    nav .logo {
        margin-bottom: 0;
    }
    
    nav .logo span {
        font-size: 1.2rem;
    }
    
    nav .logo img {
        height: 30px;
    }
    
    nav ul {
        border-top: none;
        padding-top: 0;
        width: auto;
        justify-content: flex-end;
        gap: 1rem;
    }
    
    nav ul li {
        margin-left: 1rem;
    }
    
    nav ul li a {
        font-size: 0.9rem;
    }
    
    /* Hero section optimization */
    #hero {
        height: 70vh;
        min-height: 300px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .hero-buttons {
        gap: 0.5rem;
    }
    
    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Compact sections */
    main section {
        padding: 2rem 1rem;
    }
    
    main section h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    /* About section */
    .about-container {
        gap: 1.5rem;
    }
    
    #about h3 {
        font-size: 1.2rem;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
    }
    
    #about p {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }
    
    /* Services grid - single column layout */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-card h3 {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }
    
    .service-card img {
        height: 60px;
        width: 60px;
        margin-bottom: 0.8rem;
    }
    
    /* FAQ section */
    .faq-content-wrapper {
        padding: 2rem 1rem;
    }
    
    .faq-question {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .faq-icon {
        font-size: 1.5rem;
    }
    
    .faq-answer p {
        padding: 0 1rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Contact section */
    .contact-actions {
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .contact-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        min-width: 220px;
    }
    
    /* Footer */
    footer {
        padding: 1rem;
    }
}

/* Additional optimization for very small landscape screens */
@media (max-height: 400px) and (orientation: landscape) {
    /* Container width optimization */
    nav,
    main section,
    .faq-content-wrapper {
        max-width: 80vw;
        margin: 0 auto;
    }
    
    #hero {
        height: 60vh;
        min-height: 250px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    main section {
        padding: 1.5rem 1rem;
    }
    
    main section h2 {
        font-size: 1.6rem;
    }
}