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

body {
    font-family: "Cambria";
    letter-spacing: 0.028em;
    line-height: 1.6;
    color: black;
    background-color: #ebe6e2;
}

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

/* Header */
header {
    /* Make header fill the viewport height */
    min-height: 100vh;
    /* Center content vertically */
    display: grid;
    place-items: center;
    padding: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

h2 {
    font-size: 1.618em;
    text-align: center;
    margin-top: 2.2em;
    margin-bottom: 2.2em;
    /* Keep titles visible below sticky nav when anchored */
    scroll-margin-top: 84px;
}

.service-subtitle {
    margin-bottom: 60px;
}

/* Sections */
p,
ul > li,
a {
    font-size: 1.1em;
    color: black;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.subtitle {
    font-size: 14px;
    text-align: justify;
}

.logo {
    position: relative;
    max-width: 800px;
    width: 100%;
    margin: 0 auto; /* centre la boîte réduite */
}

.logo > img {
    display: block;
    margin: auto;
    width: 90%;
}

.subtitle {
    font:
        100 2.025rem/1 Cambria,
        serif;
    margin: 0;
}

/* Astuce : justifier une ligne unique en ajoutant un pseudo-élément plein de largeur */
.subtitle--justify {
    text-align: justify;
}
.subtitle--justify::after {
    content: "";
    display: inline-block;
    width: 100%;
}

/* Navigation */
nav {
    padding: 25px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav .container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-toggler {
    display: none;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.25);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    background-color: #ebe6e2;
}

.navbar-toggler:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.25);
    outline-offset: 2px;
}

.navbar-toggler .bar {
    display: block;
    width: 22px;
    height: 1px;
    background: currentColor;
    margin: 0;
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

nav a {
    color: black;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

nav a:hover {
    color: black;
}

/* About Section */

.about-content {
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.about-content > p:not(:last-child),
.contact-content > p:not(:last-child) {
    margin-bottom: 1em;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.service-card {
    padding: 0 40px;
    border-radius: 15px;
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.service-subtitle {
    text-align: center;
}

.service-list {
    text-align: justify;
}

.service-list li {
    padding: 8px 0;
    padding-left: 5px;
    position: relative;
}

/* Contact Section */
.contact {
    text-align: center;
}

.contact-text {
    padding-bottom: 2em;
}

.contact-link {
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

/* Scroll-down arrow */
.scroll-down {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    text-decoration: none;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.scroll-down:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.scroll-down svg {
    width: 22px;
    height: 22px;
}

.scroll-down__icon {
    animation: float 2s ease-in-out infinite;
}

/* Footer */
footer {
    text-align: center;
    padding-top: 4em;
    padding-bottom: 1em;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    .logo > img {
        width: 80%;
    }

    /* Slightly smaller offset under mobile navbar */
    .section-title {
        scroll-margin-top: 72px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .navbar-toggler {
        display: inline-flex;
    }

    nav ul {
        display: none;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    nav.open ul {
        display: flex;
    }

    /* Make title responsive on mobile - keep on one line but scale down */
    .title {
        font-size: 1.5rem; /* Reduced from 3rem */
        white-space: nowrap;
    }

    .subtitle {
        font-size: 1.0125rem; /* Proportionally reduced from 2.025rem */
    }

    /* Move scroll-down arrow higher on mobile to avoid iPhone toolbar */
    .scroll-down {
        bottom: 90px;
    }

    /*new*/
    .service-list {
        text-align: justify;
    }
    .about-content,
    .service-subtitle {
        padding-left: 2em;
        padding-right: 2em;
        text-align: justify;
    }
}
