
/* SALSA GATINEAU — PATCH V2
   Ne remplace pas la page : corrige uniquement le rendu demandé. */

html, body { overflow-x: hidden; }

/* 1) HEADER : garder tout le menu sur une ligne sur desktop */
.sgp-header,
.sgp-header > .e-con-inner {
    flex-wrap: nowrap !important;
}
.sgp-header .elementor-widget-text-editor div[style*="display:flex"] {
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    gap: 14px !important;
}
.sgp-header .elementor-widget-text-editor div[style*="display:flex"] a {
    font-size: 10px !important;
}

/* 1b) HERO : montrer l'image au complet plutôt que la recadrer */
#accueil {
    background-size: contain !important;
    background-position: right center !important;
    background-repeat: no-repeat !important;
    background-color: #050505 !important;
}

/* 2) 5 AVANTAGES : 5 blocs en ligne sur desktop */
#cours,
#cours > .e-con-inner {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
}
#cours > .elementor-element,
#cours > .e-con-inner > .elementor-element {
    width: 20% !important;
    flex: 0 0 20% !important;
    max-width: 20% !important;
    min-width: 0 !important;
}

/* 3) HORAIRE : tout doit tenir sans curseur horizontal */
#horaire .elementor-widget-text-editor div[style*="overflow-x"] {
    overflow-x: visible !important;
}
#horaire table {
    width: 100% !important;
    table-layout: fixed !important;
    font-size: 10px !important;
}
#horaire th,
#horaire td {
    padding: 6px 5px !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    line-height: 1.15 !important;
}
#horaire th:nth-child(1), #horaire td:nth-child(1) { width: 14% !important; }
#horaire th:nth-child(2), #horaire td:nth-child(2) { width: 18% !important; }
#horaire th:nth-child(3), #horaire td:nth-child(3) { width: 31% !important; }
#horaire th:nth-child(4), #horaire td:nth-child(4) { width: 20% !important; }
#horaire th:nth-child(5), #horaire td:nth-child(5) { width: 17% !important; }

/* 4) ÉVÉNEMENTS : 3 cartes par ligne */
.sgp-events-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
    width: 100% !important;
}
.sgp-event-card {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
}
.sgp-event-card img {
    width: 100% !important;
    height: 210px !important;
    object-fit: cover !important;
}

/* 5) SUPPRIMER NOS PROFESSEURS */
#professeurs {
    display: none !important;
}

/* 6) FOOTER : 4 colonnes sur desktop */
#contact,
#contact > .e-con-inner {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
}
#contact > .elementor-element,
#contact > .e-con-inner > .elementor-element {
    width: 25% !important;
    flex: 0 0 25% !important;
    max-width: 25% !important;
    min-width: 0 !important;
}

/* Tablette */
@media (max-width: 1024px) {
    .sgp-header .elementor-widget-text-editor div[style*="display:flex"] {
        gap: 8px !important;
    }
    .sgp-header .elementor-widget-text-editor div[style*="display:flex"] a {
        font-size: 9px !important;
    }
    .sgp-events-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .sgp-header,
    .sgp-header > .e-con-inner {
        flex-wrap: wrap !important;
    }
    .sgp-header .elementor-widget-text-editor div[style*="display:flex"] {
        overflow-x: auto !important;
        justify-content: flex-start !important;
        gap: 14px !important;
    }

    #accueil {
        background-size: cover !important;
        background-position: 65% center !important;
    }

    #cours,
    #cours > .e-con-inner {
        flex-direction: column !important;
    }
    #cours > .elementor-element,
    #cours > .e-con-inner > .elementor-element {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .sgp-events-grid {
        grid-template-columns: 1fr !important;
    }

    #contact,
    #contact > .e-con-inner {
        flex-direction: column !important;
    }
    #contact > .elementor-element,
    #contact > .e-con-inner > .elementor-element {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}
