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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* En-tête et navigation */
.header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: #764ba2;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: #667eea;
}

/* Menu hamburger - checkbox trick */
.menu-toggle {
    display: none;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: #333;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* État du menu hamburger */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 50;
    cursor: pointer;
}

.menu-toggle:checked ~ .menu-overlay {
    display: block;
}

.menu-toggle:checked ~ .nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 1rem 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid #e0e0e0;
    z-index: 51;
}

/* Sur mobile, afficher les labels des liens pour fermer le menu */
@media (max-width: 768px) {
    .nav-item label[for="menu-toggle"] {
        display: block;
    }
}

.menu-toggle:checked ~ .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle:checked ~ .hamburger span:nth-child(2) {
    opacity: 0;
}

.menu-toggle:checked ~ .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Chaque section a sa propre grille pour aligner le contenu */
.content-section,
.full-bleed {
    display: grid;
    grid-template-columns: 1fr 736px 1fr;
    padding: 3rem 0;
}

/* Marges de défilement pour les ancres (pour laisser de l'espace pour l'en-tête sticky) */
#hero,
#accueil,
#apropos,
#sections,
#contact {
    scroll-margin-top: 70px;
}

/* Section Hero */
.hero {
    position: relative;
    min-height: 500px;
    padding: 6rem 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    text-wrap: balance;
}

.hero-content p {
    font-size: 1.25rem;
    color: #f0f0f0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    text-wrap: balance;
}

/* Le contenu utilise la colonne centrale dans toutes les sections */
.content-section > *,
.full-bleed > *:not(.full-bleed-overlay) {
    grid-column: 2;
}

/* Les sections full-bleed s'étendent sur toute la largeur du viewport */
.full-bleed {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Superposition pour les images en full-bleed */
.full-bleed-overlay {
    grid-column: 1 / -1;
    background: rgba(0, 0, 0, 0.4);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.full-bleed-image {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Texte blanc sur les sections spécifiques */
.full-bleed.text-white > h2,
.full-bleed.text-white > p {
    color: #fff;
}

/* Le texte sur les images doit être au-dessus de l'overlay */
.full-bleed-image > h2,
.full-bleed-image > p {
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Headings */
h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    font-weight: 600;
}

h2:first-child {
    margin-top: 0;
}

/* Paragraphes */
p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Listes */
ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Pied de page */
.footer {
    background: #2d3436;
    color: #fff;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 3rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-column h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.footer-column ul {
    list-style: none;
    margin-left: 0;
}

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: #667eea;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid #444;
    color: #999;
}

/* Améliorer le contraste du texte sur les images */
.full-bleed-image .full-bleed-content {
    position: relative;
    z-index: 1;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.full-bleed-image .full-bleed-content h2 {
    color: #fff;
}

/* Responsive design */
@media (max-width: 768px) {
    .content-section,
    .full-bleed {
        grid-template-columns: 1rem 1fr 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* Menu hamburger visible sur mobile */
    .hamburger {
        display: flex;
    }

    .nav {
        display: none;
    }

    .header-content {
        position: relative;
    }

    /* Pied de page responsive */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    /* Hero responsive */
    .hero {
        min-height: 350px;
        padding: 3rem 0;
    }

    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

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

@media (max-width: 480px) {
    .content-section,
    .full-bleed {
        grid-template-columns: 0.5rem 1fr 0.5rem;
        padding: 2rem 0;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.25rem;
    }
}
