
/* =====================================
   HUB SERVICES IPS2 — ONGLETS
   ===================================== */

/* Bandeau vert */
.services-onglets [role="tablist"] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;

    width: 100%;
    margin: 0 0 35px;
    padding: 18px;

    background-color: #80b827;
    border-radius: 18px;
    box-sizing: border-box;
}

/* Onglets blancs */
.services-onglets [role="tab"] {
    min-width: 190px;
    padding: 12px 24px;

    background-color: #ffffff;
    color: #254150;

    border: none;
    border-radius: 25px;

    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
}

/* Onglet actif */
.services-onglets [role="tab"][aria-selected="true"] {
    background-color: #254150;
    color: #ffffff;
}

/* Survol */
.services-onglets [role="tab"]:not([aria-selected="true"]):hover {
    background-color: #f5f7fa;
    color: #159447;
}

/* Responsive */
@media (max-width: 800px) {
    .services-onglets [role="tablist"] {
        flex-direction: column;
        gap: 12px;
    }

    .services-onglets [role="tab"] {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
}


/* =====================================
   SERVICES — AJUSTEMENT DES ONGLETS
   ===================================== */

/* Centrer les boutons dans le bandeau vert */
.services-onglets [role="tablist"] {
    justify-content: center !important;
    align-items: center !important;
}

/* Supprimer le soulignement des onglets */
.services-onglets [role="tab"],
.services-onglets [role="tab"]:hover,
.services-onglets [role="tab"][aria-selected="true"] {
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

/* Supprimer les éventuels traits décoratifs */
.services-onglets [role="tab"]::before,
.services-onglets [role="tab"]::after {
    content: none !important;
    display: none !important;
}


/* =====================================
   SERVICES — GRILLE DES CARTES
   ===================================== */

.services-grille {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px !important;
    width: 100%;
    max-width: 1280px;
    margin: 30px auto 60px !important;
}

/* Cartes */
.services-grille .carte-service {
    display: flex;
    flex-direction: column;
    gap: 18px;

    min-width: 0;
    padding: 30px 34px;

    background-color: #f5f7fa;
    border-radius: 30px;
    box-sizing: border-box;
}

/* Titres */
.services-grille .carte-service h3 {
    margin: 0;
    color: #159447;
    font-size: 22px;
    font-weight: 500;
    line-height: 1.35;
}

/* Descriptions */
.services-grille .carte-service p {
    margin: 0;
    color: #254150;
    font-size: 16px;
    line-height: 1.6;
}

/* Boutons toujours en bas */
.services-grille .carte-service .wp-block-buttons {
    margin-top: auto;
    padding-top: 12px;
}

/* Boutons IPS2 */
.services-grille .carte-service .wp-block-button__link {
    background-color: #80b827;
    color: #ffffff;
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

.services-grille .carte-service .wp-block-button__link:hover {
    background-color: #254150;
    color: #ffffff;
}

/* Responsive */
@media (max-width: 800px) {
    .services-grille {
        grid-template-columns: 1fr;
        gap: 20px !important;
        padding: 0 15px;
        box-sizing: border-box;
    }

    .services-grille .carte-service {
        padding: 24px;
    }
}

/* =====================================
   SERVICES — LARGEUR DU CONTENU
   ===================================== */

/* Élargir le bloc Onglets */
.services-onglets {
    width: 100% !important;
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
}

/* Bandeau vert sur toute la largeur disponible */
.services-onglets [role="tablist"] {
    width: 100% !important;
    max-width: none !important;
}

/* Contenu des onglets */
.services-onglets [role="tabpanel"] {
    width: 100% !important;
    max-width: none !important;
}

/* Grille des cartes */
.services-onglets .services-grille {
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}


/* =====================================
   SERVICES — HAUTEUR DES CARTES
   ===================================== */

.services-grille {
    align-items: stretch !important;
}

.services-grille .carte-service {
    height: 100%;
    min-height: 280px;
    box-sizing: border-box;
}

/* Conserver les boutons en bas des cartes */
.services-grille .carte-service .wp-block-buttons {
    margin-top: auto !important;
}

/* Responsive */
@media (max-width: 800px) {
    .services-onglets {
        width: calc(100% - 30px) !important;
    }

    .services-onglets .services-grille {
        grid-template-columns: 1fr !important;
        padding: 0 !important;
    }

    .services-grille .carte-service {
        min-height: 0;
        height: auto;
    }
}

/* =====================================
   SERVICES — ALIGNEMENT DES CARTES
   ===================================== */

/* Supprimer les marges automatiques de Gutenberg */
.services-grille > .carte-service {
    margin: 0 !important;
    align-self: stretch;
}

/* Uniformiser les espacements */
.services-grille {
    row-gap: 30px !important;
    column-gap: 30px !important;
    align-items: stretch !important;
}
