/* ==========================================================================
   1. BASES & RÉINITIALISATION
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f9f9f6;
    color: #333333;
}

.container {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Images responsives */
img {
    width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   2. BANDEAU DE L'ENTÊTE (HEADER EN BANDEAU IMAGÉ)
   ========================================================================== */
.header-qigong {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.4)), url('index.png') no-repeat center center;
    background-size: cover;
    padding: 30px 4%;
    color: #ffffff;
}

/* Structure de la zone titre + logo */
.brand-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 20px auto;
    width: 100%;
}

.title-area {
    text-align: left;
}

.title-area h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.title-area .subtitle {
    font-size: 1.4rem;
    opacity: 0.9;
}

.logo-area {
    width: 100px;
    height: 100px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

/* ==========================================================================
   3. BARRE DE NAVIGATION (Harmonisée)
   ========================================================================== */
.menu {
    display: flex;
    justify-content: center;
    gap: 30px;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
}

.menu-item a {
    text-decoration: none;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

.menu-item a:hover, .menu-item.active a {
    border-bottom-color: #7fa15a;
}

/* Bouton hamburger : n'existe que sur mobile, voir media query plus bas */
.menu-toggle {
    display: none;
}

/* ==========================================================================
   4. ZONE CONTENU PRINCIPAL
   ========================================================================== */
.main-content {
    display: flex;
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 4%;
    gap: 5%;
    align-items: center;
}

.image-side {
    flex: 1;
    max-width: 450px;
}

.image-side img {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.text-side {
    flex: 1.3;
    text-align: left;
}

.text-side h2 {
    font-size: 2.5rem;
    color: #2c3e2b;
    margin-bottom: 20px;
    font-weight: 700;
    position: relative;
}

.text-side h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #7fa15a;
    margin-top: 10px;
}

.text-side p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #555555;
    margin-bottom: 15px;
    text-align: justify;
}

/* ==========================================================================
   5. PIED DE PAGE (FOOTER)
   ========================================================================== */
.footer {
    background-color: #f4f4ee;
    color: #777777;
    font-size: 0.85rem;
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid #eaeae4;
    margin-top: auto;
}

/* ==========================================================================
   6. ADAPTATION SMARTPHONES & TABLETTES
   ========================================================================== */
@media screen and (max-width: 850px) {

    .header-qigong {
        padding: 14px 4% 0 4%;
    }

    .brand-container {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        margin-bottom: 10px;
    }

    .title-area {
        text-align: center;
    }

    .title-area h1 {
        font-size: 1.8rem;
    }

    .logo-area {
        order: -1;
        width: 80px;
        height: 80px;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 42px;
        height: 42px;
        background: rgba(18, 28, 20, 0.85);
        border: none;
        border-radius: 8px;
        position: fixed;
        top: 14px;
        left: 4%;
        z-index: 120;
        cursor: pointer;
        padding: 0;
    }

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

    .menu-toggle.open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

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

    .menu-toggle.open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .menu {
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 26px;
        position: fixed;
        inset: 0;
        margin: 0;
        padding: 0;
        background: rgba(15,25,18,.97);
        border-top: none;
        z-index: 110;
    }

    .menu.open {
        display: flex;
    }

    .menu-item {
        width: auto;
        text-align: center;
    }

    .menu-item a {
        font-size: 1.25rem;
        text-shadow: none;
    }

    .main-content {
        flex-direction: column;
        margin: 0 auto 30px;
        gap: 20px;
    }

    .image-side {
        width: 100vw;
        max-width: 100vw;
        margin: 0 calc(-50vw + 50%);
        height: 55vh;
        overflow: hidden;
    }

    .image-side img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }

    .text-side {
        text-align: justify;
    }

    .text-side h2 {
        font-size: 1.9rem;
        text-align: center;
    }

    .text-side h2::after {
        margin: 10px auto 0;
    }

    .text-side p {
        font-size: 0.95rem;
    }
}

/* ==========================================================
   IPHONE UNIQUEMENT
   Coupe le haut et le bas de l'image et conserve
   le personnage central.
   ========================================================== */

@media screen and (max-width: 430px) {

    .main-content {
        margin-top: 0;
    }

    .image-side {
        height: 38vh;              /* image moins haute */
        margin-top: 0;
    }

    .image-side picture,
    .image-side img {
        display: block;
        object-fit: cover;
        object-position: center center;
        border-radius: 0;
    }

}