/*

Theme Name: CEMG

Template: kadence

Version: 1.0

*/

/* ==========================================================
   Fiche membre individuelle — /membres/nom-entreprise/
   Charte : navy #072845 / vert #8AB611 / turquoise #0096BF
   Titres : Libre Franklin (600/700) — Corps : Cabin (400/500)
   Signature : bandeau dégradé "aile" en écho au colibri du logo,
   logo flottant en carte superposée.
   ========================================================== */

.cemg-membre-fiche {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 90px;
    font-family: 'Cabin', sans-serif;
    color: #072845;
}

/* ---------- Hero : bandeau dégradé + logo flottant ---------- */
/* Wrapper invisible : sort du conteneur 900px de la fiche pour permettre
   au bandeau (niveau ci-dessous) d'atteindre une largeur plus grande */
.cemg-membre-header-bleed {
    position: relative;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    margin-top: 24px;
    background-color: var(--global-palette8) !important;
}

.cemg-membre-header {
    position: relative;
    max-width: 1200px;
    margin: 0 auto 8px;
    text-align: center;
    background: linear-gradient(120deg, #0096BF 0%, #072845 62%, #8AB611 130%);
    clip-path: polygon(0 0, 100% 0, 100% 76%, 52% 100%, 0 86%);
    padding: 72px 24px 96px;
    animation: cemgFadeUp .6s ease both;
}

.cemg-membre-logo {
    position: relative;
    z-index: 2;
    width: 132px;
    height: 132px;
    margin: 0 auto 22px;
    background: #FFFFFF;
    border-radius: 22px;
    box-shadow: 0 16px 34px rgba(7, 40, 69, 0.22);
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cemg-membre-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.cemg-membre-nom {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 700;
    font-size: 34px;
    line-height: 1.15;
    color: #FFFFFF;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    margin: 0 0 18px;
}

.cemg-membre-secteurs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.cemg-membre-secteur {
    display: inline-block;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #FFFFFF;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    font-family: 'Libre Franklin', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 7px 16px;
    border-radius: 999px;
}

/* ---------- Corps : deux colonnes sur desktop ---------- */
.cemg-membre-contenu {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 44px;
    align-items: start;
    margin-top: 32px;
    animation: cemgFadeUp .6s ease .1s both;
}

.cemg-membre-description::before {
    content: "À propos";
    display: block;
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8AB611;
    margin-bottom: 14px;
}

.cemg-membre-description {
    font-size: 16.5px;
    line-height: 1.75;
    color: #072845;
}

.cemg-membre-description p {
    margin: 0 0 14px;
}

/* ---------- Carte contact ---------- */
.cemg-membre-contact {
    background: #FFFFFF;
    border: 1px solid rgba(7, 40, 69, 0.06);
    border-radius: 20px;
    padding: 30px 30px 10px;
    box-shadow: 0 10px 34px rgba(7, 40, 69, 0.09);
    position: sticky;
    top: 100px;
}

.cemg-membre-contact::before {
    content: "Coordonnées";
    display: block;
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #0096BF;
    margin-bottom: 16px;
}

.cemg-membre-champ {
    margin: 0;
    padding: 14px 0;
    border-bottom: 1px solid rgba(7, 40, 69, 0.08);
}

.cemg-membre-champ:last-of-type {
    border-bottom: none;
}

.cemg-membre-label {
    display: block;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(7, 40, 69, 0.5);
    margin-bottom: 4px;
}

.cemg-membre-champ,
.cemg-membre-champ a {
    font-size: 15px;
    font-weight: 500;
    color: #072845;
}

.cemg-membre-contact a {
    color: #0096BF;
    text-decoration: none;
    background-image: linear-gradient(#0096BF, #0096BF);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 1px;
    transition: background-size .25s ease, color .25s ease;
}

.cemg-membre-contact a:hover {
    color: #072845;
    background-size: 100% 1px;
}

/* ---------- Retour à l'annuaire ---------- */
.cemg-membre-retour {
    text-align: center;
    margin-top: 56px;
}

.cemg-membre-retour a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #FFFFFF;
    background: #0096BF;
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 999px;
    transition: background .25s ease, transform .25s ease;
}

.cemg-membre-retour a:hover {
    background: #007A9A;
    transform: translateX(-3px);
}

/* ---------- Animation d'entrée (discrète) ---------- */
@keyframes cemgFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .cemg-membre-header,
    .cemg-page-hero,
    .cemg-membre-contenu {
        animation: none;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
    .cemg-membre-contenu {
        grid-template-columns: 1fr;
    }

    .cemg-membre-contact {
        position: static;
    }
}

@media (max-width: 600px) {
    .cemg-membre-header {
        clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
        padding: 44px 20px 80px;
    }

    .cemg-membre-nom {
        font-size: 26px;
    }

    .cemg-membre-logo {
        width: 108px;
        height: 108px;
    }
}

/* ---------- Description tronquée dans la carte annuaire ---------- */
.cemg-carte-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    line-height: 1.6;
    color: #072845;
}

/* ==========================================================
   Annuaire des membres — page /membres/ (grille Query Loop)
   Cible les classes natives générées par le bloc Query Loop /
   Post Template, universelles quel que soit le modèle choisi.
   ========================================================== */

/* Grille responsive : colonnes qui s'adaptent, pas de nombre fixe */
.wp-block-post-template {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 280px)) !important;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Carte membre */
.wp-block-post-template .wp-block-post {
    position: relative;
    background: #FFFFFF;
    border: 1px solid rgba(7, 40, 69, 0.06);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(7, 40, 69, 0.06);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    margin: 0;
    padding: 0;
}

.wp-block-post-template .wp-block-post::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0096BF, #8AB611);
    z-index: 2;
}

.wp-block-post-template .wp-block-post:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 34px rgba(7, 40, 69, 0.16);
    border-color: rgba(0, 150, 191, 0.25);
}

/* Zone logo : carrée, fond léger, un seul niveau d'encadrement */
.cemg-grille-membres .wp-block-post-featured-image {
    aspect-ratio: 2 / 1;
    background: #F4F9FB;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
}

.cemg-grille-membres .wp-block-post-featured-image img {
    max-width: 100%;
    max-height: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(7, 40, 69, 0.08));
}

/* Contenu texte de la carte */
.wp-block-post-template .wp-block-post-title {
    margin: 0 0 4px !important;
    padding-left: 0 !important;
    text-indent: 0;
}

.wp-block-post-template .wp-block-post-title a {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.3;
    color: #072845;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.wp-block-post-template .wp-block-post-title a::after {
    content: "→";
    font-size: 13px;
    color: #8AB611;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .2s ease, transform .2s ease;
}

.wp-block-post-template .wp-block-post-title a:hover {
    color: #0096BF;
}

.wp-block-post-template .wp-block-post-title a:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* Badge secteur (classe personnalisée ajoutée manuellement sur le bloc) */
.cemg-carte-secteurs {
    margin: 0 0 16px !important;
    padding-left: 0 !important;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cemg-carte-secteurs li,
.cemg-carte-secteurs p {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cemg-carte-secteurs a {
    display: inline-block;
    background: rgba(0, 150, 191, 0.1);
    border: 1px solid rgba(0, 150, 191, 0.25);
    color: #007A9A;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 999px;
    margin: 2px 4px 2px 0;
    pointer-events: none;
    cursor: default;
}

.wp-block-post-template .cemg-carte-description {
    margin: 0 22px 24px;
    color: rgba(7, 40, 69, 0.7);
}

/* Responsive : une seule colonne sur mobile */
@media (max-width: 480px) {
    .wp-block-post-template {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   En-tête de page réutilisable (motif "cemg-page-hero")
   Même signature visuelle que la fiche membre, en version
   compacte pour un bandeau de titre de page.
   ========================================================== */

.cemg-page-hero {
    position: relative;
    max-width: 1200px !important;
    margin: 0 auto 8px !important;
    text-align: center;
    background: linear-gradient(120deg, #0096BF 0%, #072845 62%, #8AB611 130%);
    clip-path: polygon(0 0, 100% 0, 100% 82%, 52% 100%, 0 90%);
    padding: 48px 24px 76px !important;
    animation: cemgFadeUp .6s ease both;
}

.cemg-page-hero h1,
.cemg-page-hero h2 {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 700;
    font-size: 32px;
    color: #FFFFFF;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    margin: 0;
}

.cemg-page-hero p {
    font-family: 'Cabin', sans-serif;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 520px;
    margin: 12px auto 0;
}

@media (max-width: 600px) {
    .cemg-page-hero {
        clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
        padding: 36px 20px 56px !important;
    }

    .cemg-page-hero h1,
    .cemg-page-hero h2 {
        font-size: 24px;
    }
}

/* ==========================================================
   Cartes événements — page /evenements/ (grille Query Loop)
   Même signature que l'annuaire : liseré dégradé + logo/visuel
   ========================================================== */

.cemg-grille-evenements .wp-block-post-featured-image {
    aspect-ratio: 16 / 9;
    background: #F4F9FB;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.cemg-grille-evenements .wp-block-post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wp-block-post-template .wp-block-post-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(7, 40, 69, 0.7);
    margin: 0 22px 16px;
}

.cemg-evenement-date-carte {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #0096BF;
    background: rgba(0, 150, 191, 0.1);
    padding: 6px 14px;
    border-radius: 999px;
    margin: 20px 22px 10px;
}

.cemg-evenement-lieu-carte {
    font-size: 13px;
    color: rgba(7, 40, 69, 0.6);
    margin: 0 22px 8px;
}

/* ---------- Logo dans la carte annuaire (champ ACF Image) ---------- */
.cemg-carte-logo {
    height: 160px;
    background: #F4F9FB;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    margin: 20px 0 0 !important;
}

.cemg-carte-logo > * {
    margin: 0 !important;
}

/* Fallback : quand le champ logo est vide, le bloc ACF Field ne génère
   aucune balise — donc rien à cibler dessus. On réserve l'espace et on
   affiche l'icône de secours directement sur la carte elle-même,
   uniquement si elle ne contient PAS de logo réel. */
.cemg-grille-membres .wp-block-post:not(:has(.cemg-carte-logo)) {
    position: relative;
    padding-top: 180px;
}

.cemg-grille-membres .wp-block-post:not(:has(.cemg-carte-logo))::after {
    content: "";
    position: absolute;
    top: 20px;
    left: 16px;
    right: 16px;
    height: 160px;
    background-color: #F4F9FB;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B0CEDF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M5 21V7l7-4 7 4v14'/%3E%3Cpath d='M9 21v-6h6v6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 44px 44px;
}

.cemg-carte-logo img {
    max-width: 100%;
    max-height: 130px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(7, 40, 69, 0.08));
}

/* Le bloc "Groupe" qui enveloppe titre/secteurs a un padding hérité du modèle
   de départ, appliqué en style direct — on le réduit ici */
.wp-block-post-template .wp-block-post .wp-block-group {
    padding-top: 8px !important;
    padding-bottom: 20px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
}

/* ---------- Fil d'Ariane ---------- */
.cemg-fil-ariane-bleed {
    position: relative;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    background-color: var(--global-palette8) !important;
}

/* Neutralise le padding par défaut que WordPress applique au bloc
   Shortcode sur les pages classiques (Annuaire, Événements), pour que
   l'espacement soit identique à celui des fiches individuelles */
.wp-block-shortcode {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.cemg-fil-ariane {
    max-width: 1200px;
    margin: 32px auto 32px !important;
    padding: 0 24px;
    font-family: 'Cabin', sans-serif !important;
    font-size: 15px !important;
    color: rgba(7, 40, 69, 0.6);
}

.cemg-fil-ariane ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cemg-fil-ariane li {
    margin: 0;
    padding: 0;
}

.cemg-fil-ariane-separateur {
    color: rgba(7, 40, 69, 0.35);
}

.cemg-fil-ariane a {
    color: rgba(7, 40, 69, 0.6);
    text-decoration: none;
}

.cemg-fil-ariane a:hover {
    color: #0096BF;
    text-decoration: underline;
}

.cemg-fil-ariane [aria-current="page"] {
    color: #072845;
    font-weight: 600;
}

/* ==========================================================
   Fiche événement individuelle — réutilise le bandeau de la
   fiche membre (mêmes classes), sans le logo flottant
   ========================================================== */

.cemg-evenement-fiche {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 90px;
    font-family: 'Cabin', sans-serif;
    color: #072845;
}

.cemg-evenement-header .cemg-membre-nom {
    margin-top: 8px;
}

.cemg-evenement-pilules-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.cemg-evenement-pilule-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.95);
    color: #072845;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(7, 40, 69, 0.15);
}

.cemg-evenement-icone {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #0096BF;
}

.cemg-evenement-visuel-principal {
    max-width: 900px;
    margin: -40px auto 0;
    position: relative;
    z-index: 3;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(7, 40, 69, 0.15);
}

.cemg-evenement-visuel-principal img {
    width: 100%;
    height: auto;
    display: block;
}

.cemg-evenement-contenu {
    margin-top: 40px;
    font-size: 16px;
    line-height: 1.75;
}

.cemg-evenement-infos {
    background: #F4F9FB;
    border-radius: 16px;
    padding: 24px 28px 8px;
    margin-bottom: 28px;
}

.cemg-evenement-champ {
    margin: 0;
    padding: 14px 0;
    border-bottom: 1px solid rgba(7, 40, 69, 0.08);
}

.cemg-evenement-champ:last-of-type {
    border-bottom: none;
}

.cemg-evenement-label {
    display: block;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(7, 40, 69, 0.5);
    margin-bottom: 4px;
}

.cemg-evenement-inscription {
    padding: 20px 0 8px;
}

.cemg-evenement-bouton {
    display: inline-block;
    background: #072845;
    color: #FFFFFF;
    padding: 12px 24px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
}

/* ---------- Description de l'événement (champ WYSIWYG) ---------- */
.cemg-evenement-description {
    max-width: 720px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.75;
    color: #072845;
}

.cemg-evenement-description p {
    margin: 0 0 16px;
}

.cemg-evenement-description ul,
.cemg-evenement-description ol {
    margin: 0 0 16px;
    padding-left: 22px;
}

.cemg-evenement-description a {
    color: #0096BF;
}

/* ---------- Marge horizontale du contenu (pages classiques) ---------- */
.content-container.site-container {
    padding-left: 24px;
    padding-right: 24px;
}


/* ---------- Wrapper englobant du motif "En-tête de page" ---------- */
/* Sort le bandeau du conteneur de contenu pour occuper toute la largeur.
   La couleur de fond visible dans les coins découpés est désormais gérée
   nativement par Kadence (réglage "Arrière-plan du contenu"), plus besoin
   de la forcer ici. */
.cemg-page-hero-bleed {
    position: relative;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
}

/* ---------- Stabilité de la largeur de page ---------- */
/* Réserve toujours la place de la barre de défilement verticale, même sur
   les pages courtes qui n'en ont pas besoin — évite un léger décalage
   horizontal du contenu (header compris) d'une page à l'autre. */
html {
    scrollbar-gutter: stable;
}

/* ==========================================================
   Page "Le Club" — Frise historique (horizontale, compacte)
   ========================================================== */

.cemg-frise {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 24px;
}

.cemg-frise > .wp-block-group__inner-container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px;
}

.cemg-frise-etape {
    text-align: center;
}

.cemg-frise-annee {
    display: inline-block;
    background: linear-gradient(90deg, #0096BF, #8AB611);
    color: #FFFFFF;
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .02em;
    padding: 6px 22px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.cemg-frise-carte {
    position: relative !important;
    overflow: hidden;
    background: #FFFFFF;
    border-radius: 16px;
    padding: 26px 20px 22px;
    box-shadow: 0 6px 20px rgba(7, 40, 69, 0.06);
    height: 100%;
}

.cemg-frise-carte::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0096BF, #8AB611);
    border-radius: 16px 16px 0 0;
    border: none !important;
    box-sizing: border-box !important;
}

.cemg-frise-titre {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #072845;
    margin: 0 0 8px;
}

@media (max-width: 780px) {
    .cemg-frise > .wp-block-group__inner-container {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
}

/* ==========================================================
   Page "Le Club" — Section Valeurs (carte blanche + liseré,
   cohérent avec la frise historique et le reste du site)
   ========================================================== */

.cemg-valeurs {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 24px;
}

.cemg-valeurs > .wp-block-group__inner-container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px;
}

.cemg-valeur {
    text-align: center;
}

.cemg-valeur-icone,
.cemg-valeurs .cemg-valeur .wp-block-kadence-icon.cemg-valeur-icone {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 76px !important;
    height: 76px !important;
    margin: 0 auto 16px !important;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid #B0CEDF;
    box-shadow: 0 4px 12px rgba(7, 40, 69, 0.08);
}

.cemg-valeur-icone svg,
.cemg-valeur-icone img {
    width: 32px;
    height: 32px;
}

.cemg-valeur-echanger .cemg-valeur-icone {
    border-color: #0096BF;
    color: #0096BF;
}

.cemg-valeur-collaborer .cemg-valeur-icone {
    border-color: #007A9A;
    color: #007A9A;
}

.cemg-valeur-developper .cemg-valeur-icone {
    border-color: #8AB611;
    color: #8AB611;
}

.cemg-valeur-carte {
    position: relative !important;
    overflow: hidden;
    background: #FFFFFF;
    border-radius: 16px;
    padding: 28px 22px 24px;
    box-shadow: 0 6px 20px rgba(7, 40, 69, 0.06);
    height: 100%;
}

.cemg-valeur-carte::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0096BF, #8AB611);
    border-radius: 16px 16px 0 0;
    border: none !important;
    box-sizing: border-box !important;
}

.cemg-valeur-titre {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 700;
    font-size: 19px;
    color: #072845;
    margin: 0 0 10px;
}

.cemg-valeur-texte,
.cemg-frise-texte {
    font-family: 'Cabin', sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: rgba(7, 40, 69, 0.75);
    margin: 0;
}

@media (max-width: 780px) {
    .cemg-valeurs > .wp-block-group__inner-container {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
}

/* ---------- Titre de section partagé (Valeurs, Historique...) ---------- */
.cemg-section-titre {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: #8AB611;
    text-align: center;
    margin: 0 0 40px;
}

/* ---------- Ligne de connexion derrière les pilules de la frise ---------- */
/* Différencie visuellement la frise des cartes Valeurs : lecture en
   chronologie plutôt qu'en simple rangée de cartes identiques */
.cemg-frise {
    position: relative;
}

.cemg-frise > .wp-block-group__inner-container {
    position: relative;
}

.cemg-frise > .wp-block-group__inner-container::before {
    content: "";
    position: absolute;
    top: 14px;
    left: 16.5%;
    right: 16.5%;
    height: 2px;
    background: linear-gradient(90deg, #0096BF, #8AB611);
    z-index: 0;
}

.cemg-frise-etape {
    position: relative;
    z-index: 1;
}

@media (max-width: 780px) {
    .cemg-frise > .wp-block-group__inner-container::before {
        display: none;
    }
}

/* ==========================================================
   Page "Le Club" — Grille du bureau (photo ronde, rôle, pôle)
   Scopée à cemg-grille-bureau pour ne pas affecter les autres
   grilles (Membres, Événements) qui partagent les mêmes classes.
   ========================================================== */

.cemg-grille-bureau .wp-block-post {
    text-align: center;
    padding-top: 0 !important;
}

.cemg-grille-bureau .wp-block-post::after {
    content: none !important;
}

.cemg-grille-bureau .wp-block-post-title {
    text-align: center;
}

.cemg-bureau-photo {
    width: 96px;
    height: 96px;
    margin: 20px auto 14px !important;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(7, 40, 69, 0.12);
}

.cemg-bureau-photo > * {
    margin: 0 !important;
}

.cemg-bureau-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cemg-bureau-role {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: #0096BF;
    margin: 4px 0 10px;
}

.cemg-bureau-pole {
    display: inline-block;
    background: rgba(138, 182, 17, 0.12);
    border: 1px solid rgba(138, 182, 17, 0.3);
    color: #5c7a0d;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px;
    margin: 0 0 20px;
}

/* ==========================================================
   Grille Bureau — disposition "organigramme"
   1er (Président) seul en haut, 2e/3e (adjoint/trésorier) en
   duo, le reste en grille standard. Repose sur l'ordre défini
   par le plugin de tri (Simple Custom Post Order).
   ========================================================== */

.cemg-grille-bureau .wp-block-post-template {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px;
}

/* Président : centré, sur sa propre ligne, carte légèrement agrandie */
.cemg-grille-bureau .wp-block-post-template > li:nth-child(1) {
    grid-column: 2 / 4;
}

.cemg-grille-bureau .wp-block-post-template > li:nth-child(1) .cemg-bureau-photo {
    width: 120px;
    height: 120px;
}

.cemg-grille-bureau .wp-block-post-template > li:nth-child(1) .wp-block-post-title a {
    font-size: 22px;
}

/* Président adjoint + Trésorier : duo sur la 2e ligne */
.cemg-grille-bureau .wp-block-post-template > li:nth-child(2) {
    grid-column: 1 / 3;
}

.cemg-grille-bureau .wp-block-post-template > li:nth-child(3) {
    grid-column: 3 / 5;
}

/* Reste de l'équipe : grille standard à 4 colonnes à partir d'ici */

@media (max-width: 900px) {
    .cemg-grille-bureau .wp-block-post-template {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .cemg-grille-bureau .wp-block-post-template > li:nth-child(1),
    .cemg-grille-bureau .wp-block-post-template > li:nth-child(2),
    .cemg-grille-bureau .wp-block-post-template > li:nth-child(3) {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .cemg-grille-bureau .wp-block-post-template {
        grid-template-columns: 1fr !important;
    }

    .cemg-grille-bureau .wp-block-post-template > li:nth-child(1),
    .cemg-grille-bureau .wp-block-post-template > li:nth-child(2),
    .cemg-grille-bureau .wp-block-post-template > li:nth-child(3) {
        grid-column: span 1;
    }
}

/* ---------- Texte "Dirigeant chez..." sous le rôle ---------- */
.cemg-bureau-entreprise {
    font-family: 'Cabin', sans-serif;
    font-size: 12.5px;
    font-style: italic;
    color: rgba(7, 40, 69, 0.6);
    margin: 2px 0 10px;
}

/* ---------- Présentation en texte discret (toujours visible) ---------- */
.cemg-bureau-presentation {
    font-family: 'Cabin', sans-serif;
    font-style: italic;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(7, 40, 69, 0.65);
    padding: 0 20px 20px;
    text-align: center;
}

/* ==========================================================
   Page "Partenaires" — badge offre membres
   ========================================================== */

.cemg-grille-partenaires .wp-block-post {
    text-align: center;
}

.cemg-grille-partenaires .wp-block-post-title {
    text-align: center;
}

.cemg-carte-offre {
    display: inline-block;
    background: linear-gradient(90deg, #8AB611, #6d940d);
    color: #FFFFFF;
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .02em;
    padding: 6px 14px;
    border-radius: 999px;
    margin: 0 0 18px;
}

/* ==========================================================
   Page "Adhésion"
   ========================================================== */

/* ---------- Section Qui peut adhérer ---------- */
.cemg-adhesion-intro {
    max-width: 820px;
    margin: 60px auto 40px !important;
    padding: 40px 40px 36px;
    text-align: center;
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(7, 40, 69, 0.05);
}

.cemg-adhesion-texte {
    font-family: 'Cabin', sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: rgba(7, 40, 69, 0.85);
    margin-bottom: 20px;
    text-align: left;
}

.cemg-adhesion-texte-lead {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 600;
    font-size: 19px;
    line-height: 1.5;
    color: #072845;
    text-align: center;
    margin: 0 0 20px;
}

.cemg-communes-liste {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.cemg-commune-pilule {
    display: inline;
    white-space: nowrap;
    background: none;
    border: none;
    color: #072845;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 0;
    margin: 0 !important;
}

.cemg-commune-pilule:not(:last-child)::after {
    content: "·";
    color: #0096BF;
    font-weight: 700;
    margin: 0 8px;
}

/* ---------- Section Pourquoi adhérer (réutilise le style "Valeurs") ---------- */
.cemg-avantages {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 24px 50px;
}

.cemg-avantages-grille > .wp-block-group__inner-container {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    align-items: stretch !important;
    gap: 20px;
}

.cemg-avantage-carte {
    height: 100%;
    position: relative !important;
    overflow: hidden;
    text-align: center;
    background: #FFFFFF;
    border-radius: 16px;
    padding: 30px 18px 24px;
    box-shadow: 0 6px 20px rgba(7, 40, 69, 0.07);
}

.cemg-avantage-carte::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0096BF, #8AB611);
    border-radius: 16px 16px 0 0;
    border: none !important;
    box-sizing: border-box !important;
}

.cemg-avantage-icone {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 76px !important;
    height: 76px !important;
    margin: 0 auto 16px !important;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid #0096BF;
    color: #0096BF;
    box-shadow: 0 6px 16px rgba(7, 40, 69, 0.1);
}

.cemg-avantage-icone svg,
.cemg-avantage-icone img {
    width: 34px;
    height: 34px;
}

.cemg-avantage-titre {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 700;
    font-size: 17px;
    color: #072845;
    margin: 0 0 8px;
}

.cemg-avantage-texte {
    font-family: 'Cabin', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(7, 40, 69, 0.75);
    margin: 0;
}

/* ---------- Section Tarifs ---------- */
.cemg-tarifs {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 24px 50px;
}

.cemg-tarifs-grille > .wp-block-group__inner-container {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px;
    align-items: stretch;
}

.cemg-tarif-carte {
    position: relative !important;
    overflow: hidden;
    background: #FFFFFF;
    border-radius: 18px;
    padding: 48px 28px 32px;
    text-align: center;
    box-shadow: 0 8px 26px rgba(7, 40, 69, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
}

.cemg-tarif-carte::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #0096BF, #8AB611);
    border-radius: 18px 18px 0 0;
    border: none !important;
    box-sizing: border-box !important;
}

.cemg-tarif-carte.cemg-tarif-bienfaiteur {
    background: #072845;
}

.cemg-tarif-carte.cemg-tarif-bienfaiteur::after {
    content: "Soutien renforcé";
    position: absolute;
    top: 22px;
    right: 22px;
    background: rgba(138, 182, 17, 0.18);
    border: 1px solid rgba(138, 182, 17, 0.4);
    color: #8AB611;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
}

.cemg-tarif-carte h3 {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 700;
    font-size: 19px;
    color: #072845;
    margin: 0 0 16px;
}

.cemg-tarif-carte.cemg-tarif-bienfaiteur h3 {
    color: #FFFFFF;
    max-width: 70%;
    margin-left: auto;
    margin-right: auto;
}

.cemg-tarif-montant {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 700;
    font-size: 30px;
    color: #0096BF;
    margin: 0 0 16px;
}

.cemg-tarif-bienfaiteur .cemg-tarif-montant {
    color: #8AB611;
}

.cemg-tarif-note {
    font-family: 'Cabin', sans-serif;
    font-size: 13px;
    font-style: italic;
    color: rgba(7, 40, 69, 0.6);
    margin: 0;
    margin-top: auto;
}

.cemg-tarif-bienfaiteur .cemg-tarif-note {
    color: rgba(255, 255, 255, 0.75);
}

/* ---------- Appel à l'action ---------- */
.cemg-adhesion-cta {
    max-width: 700px;
    margin: 30px auto 70px;
    padding: 44px 32px;
    text-align: center;
    background: linear-gradient(120deg, #0096BF 0%, #072845 65%, #8AB611 130%);
    border-radius: 20px;
}

.cemg-adhesion-cta .cemg-adhesion-texte {
    color: #FFFFFF;
    font-size: 16px;
    margin-bottom: 24px;
    text-align: center;
}

.cemg-adhesion-cta .wp-block-buttons {
    justify-content: center !important;
}

.cemg-adhesion-bouton {
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

.cemg-adhesion-bouton .wp-block-button__link {
    display: inline-block;
    background: #FFFFFF !important;
    color: #072845 !important;
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 700;
    font-size: 17px;
    padding: 16px 40px;
    border-radius: 999px;
    text-decoration: none !important;
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
    transition: background .25s ease, color .25s ease;
}

.cemg-adhesion-bouton .wp-block-button__link:hover {
    background: #072845 !important;
    color: #FFFFFF !important;
    box-shadow: none !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .cemg-avantages-grille > .wp-block-group__inner-container {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .cemg-avantages-grille > .wp-block-group__inner-container,
    .cemg-tarifs-grille > .wp-block-group__inner-container {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================
   Page "Contact"
   ========================================================== */

.cemg-contact-grille > .wp-block-group__inner-container {
    display: grid !important;
    grid-template-columns: 1.4fr 1fr !important;
    gap: 44px;
    max-width: 1100px;
    margin: 50px auto !important;
    padding: 0 24px;
    align-items: start;
}

/* ---------- Colonne formulaire ---------- */
.cemg-contact-formulaire .kadence-form-field label {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: #072845;
}

.cemg-contact-formulaire input[type="text"],
.cemg-contact-formulaire input[type="email"],
.cemg-contact-formulaire input[type="tel"],
.cemg-contact-formulaire select,
.cemg-contact-formulaire textarea {
    border: 1px solid rgba(7, 40, 69, 0.15) !important;
    border-radius: 10px !important;
    font-family: 'Cabin', sans-serif;
}

.cemg-contact-formulaire input:focus,
.cemg-contact-formulaire select:focus,
.cemg-contact-formulaire textarea:focus {
    border-color: #0096BF !important;
    box-shadow: 0 0 0 3px rgba(0, 150, 191, 0.15) !important;
}

.cemg-contact-rgpd {
    font-family: 'Cabin', sans-serif;
    font-size: 12.5px;
    font-style: italic;
    color: rgba(7, 40, 69, 0.55);
    margin-top: 14px;
}

/* ---------- Carte coordonnées ---------- */
.cemg-contact-coordonnees {
    background: #FFFFFF;
    border: 1px solid rgba(7, 40, 69, 0.06);
    border-radius: 20px;
    padding: 30px 30px 26px;
    box-shadow: 0 10px 34px rgba(7, 40, 69, 0.09);
    position: sticky;
    top: 100px;
}

.cemg-contact-coordonnees::before {
    content: "Nous contacter";
    display: block;
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #0096BF;
    margin-bottom: 18px;
}

.cemg-contact-champ {
    margin: 0;
    padding: 14px 0;
    border-bottom: 1px solid rgba(7, 40, 69, 0.08);
}

.cemg-contact-label {
    display: block;
    font-family: 'Libre Franklin', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(7, 40, 69, 0.5);
    margin-bottom: 4px;
}

.cemg-contact-champ:last-of-type {
    border-bottom: none;
}

.cemg-contact-champ,
.cemg-contact-champ a {
    font-family: 'Cabin', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #072845;
}

.cemg-contact-champ a {
    color: #0096BF;
    text-decoration: none;
}

.cemg-contact-champ a:hover {
    text-decoration: underline;
}

/* ---------- Réseaux sociaux ---------- */
.cemg-contact-reseaux {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid rgba(7, 40, 69, 0.08);
}

.cemg-contact-reseaux svg {
    width: 18px;
    height: 18px;
}

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
    .cemg-contact-grille > .wp-block-group__inner-container {
        grid-template-columns: 1fr !important;
    }

    .cemg-contact-coordonnees {
        position: static;
    }
}

/* ==========================================================
   Marge latérale + coins arrondis pour les wrappers "bleed"
   (hero + fil d'Ariane) — plein-écran uniquement sur mobile
   (moins de 601px) ; à partir de la tablette et jusqu'au
   desktop, une marge fixe avec coins arrondis.
   ========================================================== */

@media (min-width: 601px) {

    .cemg-page-hero-bleed,
    .cemg-fil-ariane-bleed,
    .cemg-membre-header-bleed {
        width: min(calc(100vw - 48px), 1200px);
    }

    .cemg-page-hero-bleed,
    .cemg-membre-header-bleed {
        border-radius: 16px;
        overflow: hidden;
    }

}

/* CTA "Rejoindre le Club" (bloc réutilisable 658) — aligner le fond sur la largeur du hero */
.kb-row-layout-id658_50245e-53 {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.cemg-cta-bandeau {
    margin-top: 48px;
}
