/* ============================================================
   HISTOIRE SECTION - Sections de contenu Mon Histoire
   Layout 2 colonnes alternant image/texte
   ============================================================ */

/* ============================================================
   SECTION PRINCIPALE
   ============================================================ */

.histoire-section {
    position: relative;
    width: 100%;
    padding: 6rem 0;
    background-color: var(--site-white, #FFFFFF);
    overflow: hidden;
}

/* Fond gris clair pour certaines sections */
#histoire-mission,
#histoire-point_non_retour,
#histoire-accompagnement {
    background-color: #FAFAFA;
}

/* Alternance des couleurs de fond - plus marquee */
.histoire-section:nth-of-type(even) {
    background-color: #F5F0ED;
}

/* Override pour les sections spécifiques avec fond FAFAFA */
#histoire-mission,
#histoire-point_non_retour,
#histoire-accompagnement {
    background-color: #FAFAFA !important;
}

/* ============================================================
   CONTAINER - Layout 2 colonnes
   ============================================================ */

.histoire-section-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Version avec image a droite */
.histoire-section--image-right .histoire-section-container {
    direction: rtl;
}

.histoire-section--image-right .histoire-section-container > * {
    direction: ltr;
}

/* ============================================================
   PARTIE IMAGE
   ============================================================ */

.histoire-section-image-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.histoire-section-image {
    width: 100%;
    height: auto;
    max-height: 700px;
    object-fit: contain;
    object-position: center;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* ============================================================
   PARTIE CONTENU
   ============================================================ */

.histoire-section-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ============================================================
   EN-TETE AVEC TITRE DECORATIF
   ============================================================ */

.histoire-section-header {
    margin-bottom: 1rem;
}

.histoire-section-title-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.histoire-section-title-decorative {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Birthstone Bounce', cursive;
    font-size: 128px;
    color: var(--color-primary);
    opacity: 0.3;
    white-space: nowrap;
    z-index: 1;
    pointer-events: none;
}

.histoire-section-title {
    position: relative;
    z-index: 2;
    font-family: var(--font-heading, 'Lexend Deca', sans-serif);
    font-size: 42px;
    font-weight: 400;
    color: var(--color-text);
    margin: 0;
    text-transform: none;
    background: linear-gradient(to bottom, #FFFFFF 0%, #F5F0ED 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow:
        0 0 8px rgba(255, 255, 255, 0.9),
        0 0 15px rgba(255, 255, 255, 0.8),
        0 0 25px rgba(255, 255, 255, 0.6),
        0 0 40px rgba(255, 255, 255, 0.4);
}

/* Fond alternatif - ajuster l'ombre */
.histoire-section:nth-of-type(even) .histoire-section-title {
    text-shadow:
        0 0 8px rgba(245, 240, 237, 0.9),
        0 0 15px rgba(245, 240, 237, 0.8),
        0 0 25px rgba(245, 240, 237, 0.6),
        0 0 40px rgba(245, 240, 237, 0.4);
}

/* ============================================================
   TEXTE CONTENU
   ============================================================ */

.histoire-section-text {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.histoire-section-text p {
    font-family: var(--font-primary, 'Inter', sans-serif);
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--color-text);
    margin: 0;
}

.histoire-section-text p strong {
    font-weight: 600;
    color: #333333;
}

/* ============================================================
   RESPONSIVE - TABLETTE
   ============================================================ */

@media (max-width: 1024px) {
    .histoire-section {
        padding: 4rem 0;
    }

    .histoire-section-container {
        padding: 0 1.5rem;
        gap: 3rem;
    }

    .histoire-section-image {
        max-height: 550px;
    }

    .histoire-section-title-decorative {
        font-size: 96px;
    }

    .histoire-section-title {
        font-size: 32px;
    }

    .histoire-section-text p {
        font-size: 1rem;
    }
}

/* ============================================================
   RESPONSIVE - MOBILE
   ============================================================ */

@media (max-width: 768px) {
    .histoire-section {
        padding: 3rem 0;
    }

    .histoire-section-container {
        padding: 0 1rem;
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Reset direction sur mobile */
    .histoire-section--image-right .histoire-section-container {
        direction: ltr;
    }

    .histoire-section-image-wrapper {
        order: -1; /* Image toujours en haut sur mobile */
    }

    .histoire-section-image {
        max-height: 450px;
    }

    /* Sur desktop la grille est en 2 colonnes (image + texte) : le titre
       reste a gauche dans sa colonne, logique. Sur mobile la grille passe
       en 1 colonne empilee (regle ci-dessus) mais le titre restait aligne
       a gauche au lieu d'etre centre comme le reste des sections empilees
       du site. */
    .histoire-section-header {
        text-align: center;
    }

    .histoire-section-title-decorative {
        font-size: 64px;
    }

    .histoire-section-title {
        font-size: 26px;
    }

    .histoire-section-text {
        gap: 1rem;
    }

    .histoire-section-text p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
}

/* ============================================================
   RESPONSIVE - PETIT MOBILE
   ============================================================ */

@media (max-width: 480px) {
    .histoire-section {
        padding: 2rem 0;
    }

    .histoire-section-image {
        max-height: 400px;
    }

    .histoire-section-title-decorative {
        font-size: 48px;
    }

    .histoire-section-title {
        font-size: 22px;
    }

    .histoire-section-text p {
        font-size: 0.875rem;
    }
}
