:root {
    /* Couleurs */
    --color-white: #ffffff;
    --color-white-opaque: rgba(255, 255, 255, 0.79);
    --color-gold: #FFD700;
    --color-gold-dark: #EFB810;
    --color-overlay-dark: rgba(0, 0, 0, 0.8);
    --color-shadow-text: rgba(0, 0, 0, 0.4);

    /* Espacements */
    --margin-auto: auto;
    --margin-top-lg: 3rem;
    --margin-bottom-lg: 3rem;
    --margin-top-xl: 2rem;
    --margin-bottom-xl: 3rem;
    --padding-base: 20px;

    /* Tailles */
    --max-height-scroll: 600px;
    --font-size-title: 2rem;
    --font-size-subtitle: 18px;
    --font-size-earn-title: 24px;
    --font-size-close: 20px;
    --max-width-section: 80%;

    /* Responsive breakpoints */
    --bp-md: 992px;
    --bp-sm: 768px;

    /* Autres */
    --transition-opacity: opacity 0.3s ease-in-out;
}

/* ==================
   MODALE SCROLLABLE
   ================== */
.scroll-modal {
    max-height: var(--max-height-scroll);
    overflow-y: auto;
}

/* ======================
   TITRE EARN MONEY
   ====================== */
.title-earnMoney {
    font-size: var(--font-size-title);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(90deg, var(--color-gold), var(--color-gold-dark));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0px 4px 6px var(--color-shadow-text);
    margin: var(--margin-auto);
    margin-top: var(--margin-top-xl);
    margin-bottom: var(--margin-bottom-xl);
    position: relative;
}

/* ======================
   LIGNE EARN MONEY
   ====================== */
.earnMoney-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    padding: var(--padding-base);
    overflow: hidden;
}

/* =====================
   ÉLÉMENT EARN MONEY
   ===================== */
.earnMoney-element {
    flex: 1 1 30%;
    max-width: 30%;
    position: relative;
}

/* ============================
   IMAGE AVEC OVERLAY AU HOVER
   ============================ */
.earnMoney-image-hover {
    position: relative;
    width: 100%;
    height: auto;
    border: 1px solid var(--color-white-opaque);
}

.earnMoney-image-hover img {
    display: block;
    width: 100%;
    height: auto;
}

.earnMoney-hover-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-overlay-dark);
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    transition: var(--transition-opacity);
}

.earnMoney-image-hover:hover .earnMoney-hover-text,
.earnMoney-image-hover.active .earnMoney-hover-text {
    opacity: 1;
    pointer-events: auto;
}

/* ===================
   BOUTON FERMER OVERLAY
   =================== */
.close-overlay {
    border: none;
    background: none;
    color: var(--color-gold);
    font-weight: bold;
    font-size: var(--font-size-close);
}

/* ======================
   TITRE & SOUS-TITRE
   ====================== */
.earnMoney-title {
    font-size: var(--font-size-earn-title);
    font-weight: bold;
    margin: 10px 0;
    color: var(--color-gold);
}

.earnMoney-subtitle {
    font-family: 'Arial', sans-serif;
    font-size: var(--font-size-subtitle);
    margin: 5px 0;
    color: var(--color-white);
}

/* ========================
   TEXTE BAS & SECTION BAS
   ======================== */
.text-earnMoney-bas {
    text-align: center;
    color: var(--color-white);
}

.section-bas-earnMoney {
    margin-top: var(--margin-top-lg);
    margin-bottom: var(--margin-bottom-lg);
    text-align: center;
    color: var(--color-white);
    max-width: var(--max-width-section);
    margin-left: var(--margin-auto);
    margin-right: var(--margin-auto);
    font-size: clamp(1rem, 2vw, 1.3rem);
}

.titre-section3-earnMoney {
    text-align: center;
}

/* =====================
   SURCHARGE BOUTON “EN SAVOIR PLUS”
   ===================== */
.earnMoney-hover-text .button-05 {
    display: inline-block;
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 1rem;
}

/* ============================================
            MODAL 
   ============================================ */

.zi-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.zi-modal.open {
    visibility: visible;
    opacity: 1;
}

.zi-modal-window {
    background: var(--color-overlay-dark);
    color: var(--color-white);
    width: 90%;
    max-width: 800px;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.zi-modal-header {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.zi-modal-header .zi-modal-title {
    margin: 0;
    font-size: 1.5rem;
}

/* Croix fermer */
.zi-modal-header .zi-modal-close {
    width: 24px;
    height: 24px;
    position: relative;
    cursor: pointer;
}

.zi-modal-header .zi-modal-close::before,
.zi-modal-header .zi-modal-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 100%;
    background: var(--color-white);
}

.zi-modal-header .zi-modal-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.zi-modal-header .zi-modal-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.zi-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    white-space: pre-line;
}

.zi-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: right;
}

.zi-modal-footer .zi-modal-close-btn {
    cursor: pointer;
    background: var(--color-gold);
    color: var(--color-overlay-dark);
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 4px;
}


/* =====================
   MEDIA QUERIES
   ===================== */

@media (min-width: 768px) and (max-width: 991px) {
    .earnMoney-row {
        flex-wrap: wrap;
        gap: var(--padding-base);
    }

    .earnMoney-element {
        flex: 1 1 45%;
        max-width: 45%;
        margin-bottom: var(--padding-base);
    }

    .title-earnMoney {
        font-size: 1.75rem;
        margin: 1.5rem 0;
    }

    .earnMoney-subtitle {
        font-size: 16px;
    }

    .scroll-modal {
        max-height: 400px;
    }

    .section-bas-earnMoney {
        font-size: clamp(0.9rem, 2vw, 1.2rem);
        max-width: 90%;
    }

    .earnMoney-hover-text .button-05 {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 767px) {
    .earnMoney-row {
        flex-wrap: wrap;
        gap: var(--padding-base);
    }

    .earnMoney-element {
        flex: 1 1 100%;
        max-width: 100%;
        margin-bottom: var(--padding-base);
    }

    .title-earnMoney {
        font-size: 1.5rem;
        margin: 1.25rem 0;
    }

    .earnMoney-subtitle {
        font-size: 14px;
        padding: 0 10px;
    }

    .scroll-modal {
        max-height: 300px;
    }

    .section-bas-earnMoney {
        font-size: clamp(0.8rem, 3vw, 1rem);
        padding: 0 var(--padding-base);
    }

    .earnMoney-hover-text .button-05 {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}