/* CFPPA Formations — Frontend */

/* ===========================================
   Header immersif — page d'accueil
   =========================================== */

/* Header : superpose au hero */
body.home .elementor-location-header {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}
body.home.admin-bar .elementor-location-header {
    top: 32px;
}
body.home .elementor-location-header .top-bar-wrapper .sub-menu {
    top: 40px !important;
}
/* Top bar : fond transparent — specifite elevee pour surcharger Elementor inline */
body.home .elementor-location-header .top-bar-wrapper,
body.home .elementor-location-header .top-bar-wrapper.e-con,
body.home .elementor-location-header [class*="top-bar-wrapper"] {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* Menu principal : fond transparent */
body.home .elementor-location-header .menu-principal-wrapper,
body.home .elementor-location-header .menu-principal-wrapper.e-con,
body.home .elementor-location-header [class*="menu-principal-wrapper"] {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

/* Texte blanc (pas sur hover) */
body.home .elementor-location-header a:not(:hover),
body.home .elementor-location-header span:not(:hover),
body.home .elementor-location-header p,
body.home .elementor-location-header i,
body.home .elementor-location-header svg {
    color: #fff !important;
    fill: #fff !important;
}

/* Recherche */
body.home .elementor-location-header input {
    background: rgba(255,255,255,0.15) !important;
    border-color: rgba(255,255,255,0.4) !important;
    color: #fff !important;
}
body.home .elementor-location-header input::placeholder {
    color: rgba(255,255,255,0.7) !important;
}

/* Dropdown resultats recherche : lisible sur fond blanc */
body.home .elementor-location-header .e-search-results,
body.home .elementor-location-header .elementor-search-form__results,
body.home .elementor-location-header [class*="search-results"] {
    background: #fff !important;
}
body.home .elementor-location-header .e-search-results a,
body.home .elementor-location-header .e-search-results span,
body.home .elementor-location-header .e-search-results p,
body.home .elementor-location-header .elementor-search-form__results a,
body.home .elementor-location-header .elementor-search-form__results span,
body.home .elementor-location-header .elementor-search-form__results p,
body.home .elementor-location-header [class*="search-results"] a,
body.home .elementor-location-header [class*="search-results"] span,
body.home .elementor-location-header [class*="search-results"] p {
    color: #333 !important;
}

/* Icones sociales */
body.home .elementor-location-header .elementor-social-icon {
    background: transparent !important;
}

/* Bouton Candidatez — specificite max */
body.home .elementor-9295 .elementor-element.elementor-element-27c4e3e.elementor-widget-button .elementor-button {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 2px solid #fff !important;
    color: #fff !important;
}
body.home .elementor-9295 .elementor-element.elementor-element-27c4e3e.elementor-widget-button .elementor-button:hover {
    background: rgba(255,255,255,0.2) !important;
    color: #fff !important;
}

/* Mega menu : fond transparent sur le conteneur full-width */
body.home .elementor-location-header .mega-menu-formations {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
/* Mega menu : fond noir sur le conteneur intérieur boxed */
body.home .elementor-location-header .mega-menu-formations > .e-con-inner {
    background: rgba(0,0,0,0.85) !important;
    border-radius: 12px;
    box-shadow: none !important;
    padding: 30px !important;
}
/* Mega menu accueil : pas d'ombres */
body.home .elementor-location-header .mega-menu-formations,
body.home .elementor-location-header .mega-menu-formations * {
    box-shadow: none !important;
}
/* Dropdown mobile */
body.home .elementor-location-header .elementor-nav-menu--dropdown {
    background: rgba(0,0,0,0.85) !important;
}

/* Mega menu : conteneurs intermediaires transparents (sauf images domaines) */
body.home .elementor-location-header .mega-menu-formations [id^="e-n-menu-content-"],
body.home .elementor-location-header .mega-menu-formations .e-con:not(.mega-menu-domaines .e-con[href]) {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
/* Mega menu : images domaines visibles */
body.home .elementor-location-header .mega-menu-domaines a.e-con {
    background-size: cover !important;
    background-position: center !important;
}

/* Mega menu : sous-blocs transparents */
body.home .elementor-9295 .elementor-element.elementor-element-0934417,
body.home .elementor-9295 .elementor-element.elementor-element-c615ea9,
body.home .elementor-location-header .mega-menu-domaines,
body.home .elementor-location-header .mega-menu-liens {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* Mega menu : texte blanc (seulement quand PAS en sticky) */
body.home .elementor-location-header .menu-principal-wrapper:not(.elementor-sticky--effects) .mega-menu-domaines a,
body.home .elementor-location-header .menu-principal-wrapper:not(.elementor-sticky--effects) .mega-menu-domaines span,
body.home .elementor-location-header .menu-principal-wrapper:not(.elementor-sticky--effects) .mega-menu-domaines h1,
body.home .elementor-location-header .menu-principal-wrapper:not(.elementor-sticky--effects) .mega-menu-domaines h2,
body.home .elementor-location-header .menu-principal-wrapper:not(.elementor-sticky--effects) .mega-menu-domaines h3,
body.home .elementor-location-header .menu-principal-wrapper:not(.elementor-sticky--effects) .mega-menu-domaines h4,
body.home .elementor-location-header .menu-principal-wrapper:not(.elementor-sticky--effects) .mega-menu-domaines p,
body.home .elementor-location-header .menu-principal-wrapper:not(.elementor-sticky--effects) .mega-menu-liens a,
body.home .elementor-location-header .menu-principal-wrapper:not(.elementor-sticky--effects) .mega-menu-liens span,
body.home .elementor-location-header .elementor-nav-menu--dropdown a {
    color: #fff !important;
}

/* Hover : laisser Elementor gérer les effets */
body.home .elementor-location-header .mega-menu-domaines a:hover,
body.home .elementor-location-header .mega-menu-domaines a:hover span,
body.home .elementor-location-header .mega-menu-liens a:hover,
body.home .elementor-location-header .mega-menu-liens a:hover span {
    color: #8D8D8D !important;
}

/* Hover menu principal : uniquement les liens de navigation */
body.home .elementor-location-header .menu-principal-wrapper .elementor-widget-n-menu a:hover,
body.home .elementor-location-header .menu-principal-wrapper .e-n-menu-title:hover {
    opacity: 0.8;
}

/* Titre du site : blanc seulement hors sticky (exclut mega-menu-domaines) */
body.home .elementor-location-header .menu-principal-wrapper:not(.elementor-sticky--effects) .elementor-widget-heading:not(.mega-menu-domaines .elementor-widget-heading) a,
body.home .elementor-location-header .menu-principal-wrapper:not(.elementor-sticky--effects) .elementor-widget-heading:not(.mega-menu-domaines .elementor-widget-heading) a:hover,
body.home .elementor-location-header .menu-principal-wrapper:not(.elementor-sticky--effects) .elementor-widget-heading:not(.mega-menu-domaines .elementor-widget-heading) .elementor-heading-title {
    color: #fff !important;
    opacity: 1 !important;
}

/* Sticky : titres domaines — specificite maximale par data-id */
body.home .elementor-location-header .menu-principal-wrapper.elementor-sticky--effects .elementor-element-0934417 .elementor-widget-heading a,
body.home .elementor-location-header .menu-principal-wrapper.elementor-sticky--effects .elementor-element-0934417 .elementor-heading-title {
    color: var(--color-agricole, #333) !important;
    opacity: 1 !important;
}
body.home .elementor-location-header .menu-principal-wrapper.elementor-sticky--effects .elementor-element-8423a3b .elementor-widget-heading a,
body.home .elementor-location-header .menu-principal-wrapper.elementor-sticky--effects .elementor-element-8423a3b .elementor-heading-title {
    color: var(--color-foret, #333) !important;
    opacity: 1 !important;
}
body.home .elementor-location-header .menu-principal-wrapper.elementor-sticky--effects .elementor-element-2c44c84 .elementor-widget-heading a,
body.home .elementor-location-header .menu-principal-wrapper.elementor-sticky--effects .elementor-element-2c44c84 .elementor-heading-title {
    color: var(--color-paysage, #333) !important;
    opacity: 1 !important;
}

/* Hover top bar */
body.home .elementor-location-header .top-bar-wrapper a:hover,
body.home .elementor-location-header .top-bar-wrapper a:hover span {
    opacity: 0.7;
}

/* Mega menu : images normales */
body.home .elementor-location-header .mega-menu-domaines img,
body.home .elementor-location-header .mega-menu-liens img {
    filter: none !important;
}

/* Logo blanc */
body.home .elementor-location-header img {
    filter: brightness(0) invert(1);
}

/* Decaler legerement le header vers le bas */
body.home .elementor-location-header {
    padding-top: 30px;
}

/* ========================================
   Sticky scroll : retour etat normal
   Elementor ajoute .elementor-sticky--effects
   ======================================== */
body.home .menu-principal-wrapper.elementor-sticky--effects,
body.home .elementor-element.menu-principal-wrapper.elementor-sticky--effects {
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
}

/* Sticky : seulement les liens de nav + titre site reviennent en couleur initiale */
body.home .menu-principal-wrapper.elementor-sticky--effects .elementor-widget-n-menu a,
body.home .menu-principal-wrapper.elementor-sticky--effects .elementor-widget-n-menu span,
body.home .menu-principal-wrapper.elementor-sticky--effects .elementor-widget-n-menu i,
body.home .menu-principal-wrapper.elementor-sticky--effects .elementor-widget-n-menu svg,
body.home .menu-principal-wrapper.elementor-sticky--effects .elementor-widget-heading a,
body.home .menu-principal-wrapper.elementor-sticky--effects .elementor-widget-heading span {
    color: initial !important;
    fill: initial !important;
}

/* Sticky : titres domaines — couleur par domaine via data-id Elementor */
/* Agricole (data-id=0934417) */
body.home .elementor-location-header .elementor-sticky--effects .elementor-element-0934417 a,
body.home .elementor-location-header .elementor-sticky--effects .elementor-element-0934417 .elementor-heading-title {
    color: var(--color-agricole, #333) !important;
}
/* Foret (data-id=8423a3b) */
body.home .elementor-location-header .elementor-sticky--effects .elementor-element-8423a3b a,
body.home .elementor-location-header .elementor-sticky--effects .elementor-element-8423a3b .elementor-heading-title {
    color: var(--color-foret, #333) !important;
}
/* Paysage (data-id=2c44c84) */
body.home .elementor-location-header .elementor-sticky--effects .elementor-element-2c44c84 a,
body.home .elementor-location-header .elementor-sticky--effects .elementor-element-2c44c84 .elementor-heading-title {
    color: var(--color-paysage, #333) !important;
}
/* Sticky : titres domaines hover */
body.home .elementor-location-header .elementor-sticky--effects .mega-menu-domaines a:hover,
body.home .elementor-location-header .elementor-sticky--effects .mega-menu-domaines a:hover span {
    opacity: 0.7;
}

/* Sticky : toggle menu (hamburger) revient en noir */
body.home .elementor-location-header .elementor-sticky--effects .elementor-menu-toggle svg,
body.home .elementor-location-header .elementor-sticky--effects .elementor-menu-toggle i {
    color: #000 !important;
    fill: #000 !important;
}
body.home .menu-principal-wrapper.elementor-sticky--effects .elementor-button,
body.home .menu-principal-wrapper.elementor-sticky--effects .elementor-button span {
    color: #fff !important;
}

/* Bouton Candidatez : retour normal au scroll */
body.home .elementor-9295 .elementor-sticky--effects.elementor-element.elementor-element-0545766 .elementor-element.elementor-element-27c4e3e.elementor-widget-button .elementor-button,
body.home .menu-principal-wrapper.elementor-sticky--effects .elementor-button {
    background: #4EA3C6 !important;
    background-color: #4EA3C6 !important;
    background-image: none !important;
    border-color: #4EA3C6 !important;
    border-width: 1px !important;
    color: #fff !important;
}

/* Logo : retour normal au scroll */
body.home .menu-principal-wrapper.elementor-sticky--effects img {
    filter: none !important;
}

/* Mega menu : fond normal au scroll */
body.home .menu-principal-wrapper.elementor-sticky--effects .mega-menu-formations {
    background: #fff !important;
}
body.home .menu-principal-wrapper.elementor-sticky--effects .mega-menu-formations > .e-con-inner {
    background: transparent !important;
    border-radius: 0;
    padding: 20px !important;
    box-shadow: none !important;
}
body.home .menu-principal-wrapper.elementor-sticky--effects .mega-menu-formations {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}
/* Mega menu sticky : liens en sombre, titres domaines non touchés */
body.home .menu-principal-wrapper.elementor-sticky--effects .mega-menu-liens a,
body.home .menu-principal-wrapper.elementor-sticky--effects .mega-menu-liens span {
    color: #333 !important;
}

/* ===========================================
   Classes utilitaires — domaines
   Utilisables sur n'importe quel widget Elementor
   via le champ "Classes CSS" dans l'onglet Avance.
   Variables --color-{slug} disponibles sur toutes les pages.
   =========================================== */

/* Fond couleur domaine */
.bg-agricole { background-color: var(--color-agricole) !important; }
.bg-foret { background-color: var(--color-foret) !important; }
.bg-paysage { background-color: var(--color-paysage) !important; }

/* Texte couleur domaine */
.text-agricole { color: var(--color-agricole) !important; }
.text-foret { color: var(--color-foret) !important; }
.text-paysage { color: var(--color-paysage) !important; }

/* Bordure couleur domaine */
.border-agricole { border-color: var(--color-agricole) !important; }
.border-foret { border-color: var(--color-foret) !important; }
.border-paysage { border-color: var(--color-paysage) !important; }

/* Icone couleur domaine (SVG Elementor) */
.icon-agricole .elementor-icon svg { fill: var(--color-agricole) !important; }
.icon-foret .elementor-icon svg { fill: var(--color-foret) !important; }
.icon-paysage .elementor-icon svg { fill: var(--color-paysage) !important; }

/* Icone couleur domaine — Icon List */
.icon-agricole .elementor-icon-list-icon svg { fill: var(--color-agricole) !important; }
.icon-foret .elementor-icon-list-icon svg { fill: var(--color-foret) !important; }
.icon-paysage .elementor-icon-list-icon svg { fill: var(--color-paysage) !important; }

/* Icone avec fond rond couleur domaine */
.icon-bg-agricole .elementor-icon { background-color: var(--color-agricole) !important; }
.icon-bg-foret .elementor-icon { background-color: var(--color-foret) !important; }
.icon-bg-paysage .elementor-icon { background-color: var(--color-paysage) !important; }

/* Fond image domaine */
.bg-image-agricole { background-image: var(--image-agricole) !important; background-size: cover; background-position: center; }
.bg-image-foret { background-image: var(--image-foret) !important; background-size: cover; background-position: center; }
.bg-image-paysage { background-image: var(--image-paysage) !important; background-size: cover; background-position: center; }

/* ===========================================
   Couleur dynamique du domaine
   Utilise var(--couleur-domaine) injecte par le plugin
   dans le <head> de chaque fiche formation.
   =========================================== */

/* Hero : lisere gauche */
.formation-hero {
    border-left: 5px solid var(--couleur-domaine, #333) !important;
}

/* Badge domaine */
.formation-badge-domaine {
    background: var(--couleur-domaine, #333) !important;
    color: #fff !important;
    display: inline-block;
    padding: 2px 15px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.cfppa-badge-domaine {
    border-radius: 30px !important;
    padding: 2px 15px !important;
}

/* Titres H2 des sections */
.single-formation h2.elementor-heading-title {
    color: var(--couleur-domaine, #1a1a1a);
}

/* Fleches debouches */
.cfppa-debouches-list li::before {
    color: var(--couleur-domaine, #999);
}

/* Indicateurs : compteurs colores */
.cfppa-indicateur-valeur {
    color: var(--couleur-domaine, #4caf50);
}

/* Tableau modules : ligne total */
.cfppa-modules-total td {
    border-top-color: var(--couleur-domaine, #333);
}

/* Tableau modules : en-tete */
.cfppa-modules-table thead th {
    border-bottom-color: var(--couleur-domaine, #e0e0e0);
}

/* Icones (icon-list Elementor) */
.single-formation .elementor-icon-list-icon i,
.single-formation .elementor-icon-list-icon svg {
    color: var(--couleur-domaine, #333) !important;
    fill: var(--couleur-domaine, #333) !important;
}

/* Section CTA finale : fond teinte */
.formation-cta-section {
    background: color-mix(in srgb, var(--couleur-domaine, #4d4d4d85) 8%, white) !important;
}

/* Bouton outline (Demander une info) */
.formation-btn-outline .elementor-button {
    border-color: var(--couleur-domaine, #333) !important;
    color: var(--couleur-domaine, #333) !important;
}
.formation-btn-outline .elementor-button:hover {
    background: var(--couleur-domaine, #333) !important;
    color: #fff !important;
}

/* Fil d'Ariane : lien domaine colore */
.single-formation .rank-math-breadcrumb a:nth-child(2) {
    color: var(--couleur-domaine, inherit);
}

/* Badge formation courte (in-flow par defaut) */
.cfppa-badge-courte {
    display: inline-block;
    background: #fff;
    color: var(--couleur-domaine, #555);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Variante overlay : badge superpose sur l'image (haut-gauche) */
.elementor-widget-theme-post-featured-image,
.cfppa-image-relative {
    position: relative;
}

.cfppa-badge-courte.is-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

/* Bouton productions */
a.cfppa-btn-productions,
a.cfppa-btn-productions:visited,
a.cfppa-btn-productions:link {
    display: inline-block;
    padding: 10px 20px;
    background: var(--couleur-domaine, #4EA3C6) !important;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    transition: opacity 0.2s;
    margin-top: 20px;
}
a.cfppa-btn-productions:hover {
    opacity: 0.85;
    color: #fff !important;
}

/* Description domaine : override du width fixe */
.elementor .description-domaine {
    width: 100% !important;
    margin: 0 auto;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 8px !important;
}
/* Page racine formations : description centrée pleine largeur */
body.post-type-archive-formation .elementor-element-3beb6df {
    flex-wrap: wrap !important;
    justify-content: center !important;
}
body.post-type-archive-formation .elementor-element-2aa5018 {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
    align-items: center !important;
}
body.post-type-archive-formation .elementor-element-2aa5018 .elementor-widget-text-editor {
    text-align: center !important;
}
body.post-type-archive-formation .elementor-element-2aa5018 p {
    text-align: center !important;
    margin: 0 auto !important;
}

/* Masquer les boutons 3 domaines uniquement sur les archives domaine */
body.tax-domaine .bloc-btn-3-domaines {
    display: none !important;
}

/* Page racine /formations/ : masquer vidéo + description */
body.post-type-archive-formation .video-domaine-wrapper,
body.post-type-archive-formation .description-domaine {
    display: none !important;
}

/* Vidéo domaine responsive */
.cfppa-video-domaine {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
}
.cfppa-video-domaine iframe {
    width: 100%;
    height: 100%;
    display: block;
}

/* ===========================================
   Menu : lisere domaine sur les items de nav
   Ajouter la classe domaine-color-{slug}
   sur l'item de menu dans Apparence > Menus.
   =========================================== */

.menu-item[class*="domaine-color-"] > a {
    padding-left: 12px;
}

.menu-item.domaine-color-agricole > a {
    border-left: 4px solid var(--color-agricole) !important;
}

.menu-item.domaine-color-foret > a {
    border-left: 4px solid var(--color-foret) !important;
}

.menu-item.domaine-color-paysage > a {
    border-left: 4px solid var(--color-paysage) !important;
}

/* ===========================================
   Modules UC
   =========================================== */

/* Modules UC */
.cfppa-modules-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.cfppa-modules-table thead th {
    text-align: left;
    padding: 10px 14px;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
    font-size: 14px;
    color: #555;
}

.cfppa-modules-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
}

.cfppa-modules-table .cfppa-heures {
    text-align: right;
    white-space: nowrap;
    color: #666;
}

.cfppa-modules-table .cfppa-modules-total td {
    border-top: 2px solid #333;
    border-bottom: none;
    padding-top: 12px;
}

/* Lien PDF sur un module (unites du programme) */
.cfppa-modules-table a.cfppa-module-pdf {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    font-weight: 500;
}

.cfppa-modules-table a.cfppa-module-pdf:hover {
    color: #2e7d32;
}

.cfppa-module-pdf-icon::before {
    content: "\1F4C4"; /* 📄 */
    margin-left: 6px;
    font-size: 0.9em;
    text-decoration: none;
    display: inline-block;
    vertical-align: baseline;
}

/* Debouches */
.cfppa-debouches-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cfppa-debouches-list li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 14px;
    background: color-mix(in srgb, var(--couleur-domaine, #4caf50) 8%, white);
    border: 1px solid color-mix(in srgb, var(--couleur-domaine, #4caf50) 20%, white);
    border-radius: 20px;
    color: #333;
}

.cfppa-debouches-list li::before {
    content: "\2192";
    color: var(--couleur-domaine, #999);
    font-size: 12px;
}

/* Indicateurs */
.cfppa-indicateurs {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    padding: 20px 0;
}

.cfppa-indicateur {
    text-align: center;
    min-width: 100px;
}

.cfppa-indicateur-valeur {
    font-size: 32px;
    font-weight: 700;
    /* couleur geree par la section dynamique plus haut */
    line-height: 1.2;
}

.cfppa-indicateur-label {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* Resultats generaux (compteur anime) */
.cfppa-resultats-generaux {
    padding: 3rem 2rem;
}

.cfppa-resultats-generaux__inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.cfppa-resultats-generaux__title {
    font-size: 1.5rem;
    color: #000;
    font-weight: 700;
    margin-bottom: 2rem;
}

.cfppa-resultats-generaux__counters {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 1.5rem;
}

.cfppa-rg-counter {
    flex: 1;
    min-width: 120px;
}

.cfppa-rg-number {
    font-family: 'DIN', 'Roboto Condensed', sans-serif;
    font-size: 3rem;
    font-weight: 600;
    color: var(--couleur-domaine, #4caf50);
    line-height: 1;
}

.cfppa-rg-number--empty {
    color: #c4c4c4;
}

.cfppa-rg-suffix {
    margin-left: 2px;
}

.cfppa-rg-label {
    font-size: 0.85rem;
    color: #555;
    margin-top: 0.5rem;
    font-weight: 400;
}

.cfppa-rg-mark {
    font-size: 1rem;
    margin-left: 2px;
    color: var(--couleur-domaine, #4caf50);
    opacity: 0.7;
    font-weight: 500;
}

.cfppa-rg-note {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: #777;
    font-style: italic;
}

@media (max-width: 600px) {
    .cfppa-resultats-generaux {
        padding: 2rem 1rem;
    }
    .cfppa-resultats-generaux__counters {
        gap: 1rem;
    }
    .cfppa-rg-counter {
        flex: 1 1 40%;
        min-width: 100px;
    }
    .cfppa-rg-number {
        font-size: 2rem;
    }
}

/* Boutons PDF telechargeables */
.cfppa-pdfs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.cfppa-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--couleur-domaine, #4caf50);
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: opacity 0.2s;
}

.cfppa-pdf-btn:hover {
    opacity: 0.85;
    color: #fff !important;
}

.cfppa-pdf-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #fff !important;
}
a.cfppa-pdf-btn,
a.cfppa-pdf-btn span,
a.cfppa-pdf-btn .dashicons,
.elementor-kit-9286 a.cfppa-pdf-btn,
.elementor-kit-9286 a.cfppa-pdf-btn span {
    color: #fff !important;
}



/* ===========================================
   Cartes formation (archives / listings)
   Chaque carte porte .domaine-color-{slug}
   qui definit --couleur-domaine localement.
   =========================================== */

.cfppa-formations-grid {
    display: grid;
    gap: 20px;
}
.cfppa-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.cfppa-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.cfppa-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.cfppa-formation-card {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none !important;
    color: #333 !important;
    transition: box-shadow 0.2s, transform 0.2s;
    background: #fff;
}

.cfppa-formation-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.cfppa-card-image {
    height: 160px;
    background-size: cover;
    background-position: center;
}

.cfppa-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cfppa-card-badge {
    display: inline-block;
    align-self: flex-start;
    background: var(--couleur-domaine, #333);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 3px;
    margin-bottom: 8px;
}

.cfppa-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.cfppa-card-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.cfppa-card-lieux {
    font-size: 12px;
    color: #999;
    margin-top: auto;
    padding-top: 8px;
}

/* ===========================================
   Loop Grid Elementor : couleur par domaine
   La classe .domaine-color-{slug} est propagee
   sur le .e-loop-item par front-domaine.js.
   Les couleurs sont definies dans le <head>
   par le plugin (cfppa_domaine_css_variable).
   Utiliser var(--couleur-domaine) dans le CSS
   personnalise des widgets Elementor.
   =========================================== */

/* Responsive */
@media (max-width: 768px) {
    .cfppa-formations-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 600px) {
    .cfppa-indicateurs {
        gap: 16px;
    }

    .cfppa-indicateur {
        min-width: 80px;
    }

    .cfppa-indicateur-valeur {
        font-size: 24px;
    }

    .cfppa-modules-table thead {
        display: none;
    }

    .cfppa-modules-table tbody td {
        display: block;
        padding: 6px 14px;
        border-bottom: none;
    }

    .cfppa-modules-table tbody td.cfppa-heures {
        text-align: left;
        color: #999;
        font-size: 13px;
        padding-top: 0;
        padding-bottom: 12px;
        border-bottom: 1px solid #eee;
    }
}

/* ===========================================
   Swipe hint — menu ancres mobile
   Degrade qui fade le bord droit (suggere "plus de contenu")
   + icone main qui glisse, dans la zone de degrade.
   =========================================== */
@media (max-width: 767px) {
    .e-n-menu-wrapper {
        position: relative;
    }

    .e-n-menu-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 70px;
        background:
            url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 11V6a2 2 0 1 1 4 0v5'/><path d='M13 7v3'/><path d='M5 12h14a2 2 0 0 1 2 2v3a4 4 0 0 1-4 4H9a4 4 0 0 1-4-4v-5z'/></svg>") right 10px center / 22px 22px no-repeat,
            linear-gradient(to right, transparent, var(--couleur-domaine, #333) 60%);
        pointer-events: none;
        transition: opacity 0.3s;
        animation: swipe-hint 1.6s ease-in-out infinite;
    }

    .e-n-menu-wrapper.scroll-hint-hidden::after {
        opacity: 0;
    }

    /* Le doigt (background-image) glisse subtilement */
    @keyframes swipe-hint {
        0%   { background-position: right 10px center, 0 0; }
        40%  { background-position: right 22px center, 0 0; }
        60%  { background-position: right 22px center, 0 0; }
        100% { background-position: right 10px center, 0 0; }
    }
}

/* ===========================================
   Galerie Elementor : onglets colores par domaine
   Les couleurs sont appliquees en inline par JS
   via front-domaine.js (colorGalleryTabs).
   =========================================== */

.elementor-gallery-title.elementor-item-active {
    border-bottom-width: 3px;
    border-bottom-style: solid;
    transition: color .2s, border-color .2s;
}

/* ===========================================
   Filtres archive formations [cfppa_filtres]
   Style popup lateral (a la Leboncoin)
   =========================================== */

:root {
    --cfppa-filtres-color: var(--couleur-domaine, #727272);
}

.cfppa-filtres-wrapper {
    display: inline-block;
}

button.cfppa-filtres-trigger {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 10px 30px !important;
    border: solid 2px var(--cfppa-filtres-color) !important;
    border-radius: 30px !important;
    background: transparent !important;
    color: var(--cfppa-filtres-color) !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: background .2s, color .2s;
}

button.cfppa-filtres-trigger:hover,
button.cfppa-filtres-trigger:focus-visible {
    background: var(--cfppa-filtres-color) !important;
    color: #fff !important;
    outline: none;
}

.cfppa-filtres-count {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--cfppa-filtres-color);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.cfppa-filtres-overlay,
.cfppa-filtres-panel {
    display: none;
}

.cfppa-filtres-wrapper.is-open .cfppa-filtres-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 9998;
    animation: cfppa-fade-in .2s ease;
}

.cfppa-filtres-wrapper.is-open .cfppa-filtres-panel {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(420px, 100vw);
    background: #fff;
    z-index: 9999;
    box-shadow: -4px 0 24px rgba(0, 0, 0, .15);
    animation: cfppa-slide-in .25s ease;
}

/* Decaler panel + overlay sous la barre d'admin WP */
body.admin-bar .cfppa-filtres-wrapper.is-open .cfppa-filtres-overlay,
body.admin-bar .cfppa-filtres-wrapper.is-open .cfppa-filtres-panel {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .cfppa-filtres-wrapper.is-open .cfppa-filtres-overlay,
    body.admin-bar .cfppa-filtres-wrapper.is-open .cfppa-filtres-panel {
        top: 46px;
    }
}

@keyframes cfppa-fade-in  { from { opacity: 0; }                  to { opacity: 1; } }
@keyframes cfppa-slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }

body.cfppa-filtres-no-scroll {
    overflow: hidden;
}

.cfppa-filtres-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.cfppa-filtres-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #222;
}

button.cfppa-filtres-close {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 50% !important;
    color: #555 !important;
    cursor: pointer;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: background .2s, color .2s;
}

button.cfppa-filtres-close:hover,
button.cfppa-filtres-close:focus-visible {
    background: #f0f0f0 !important;
    color: #222 !important;
    outline: none;
}

.cfppa-filtres-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    margin: 0;
}

.cfppa-filtres-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cfppa-filtres-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cfppa-filtres-field > span {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.cfppa-filtres-field select {
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: #222;
}

.cfppa-filtres-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    padding: 6px 0;
    cursor: pointer;
}

.cfppa-filtres-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--cfppa-filtres-color);
}

.cfppa-filtres-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

.cfppa-filtres-reset {
    color: #555;
    text-decoration: underline;
    font-size: 14px;
}

.cfppa-filtres-reset:hover {
    color: #222;
}

button.cfppa-filtres-submit {
    border-radius: 30px !important;
    padding: 10px 30px !important;
    border: solid 2px var(--cfppa-filtres-color) !important;
    background: transparent !important;
    color: var(--cfppa-filtres-color) !important;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: background .2s, color .2s;
}

button.cfppa-filtres-submit:hover,
button.cfppa-filtres-submit:focus-visible {
    background: var(--cfppa-filtres-color) !important;
    color: #fff !important;
    outline: none;
}

/* Tri dans le popup : cache par defaut (desktop), visible mobile */
.cfppa-filtres-tri-mobile {
    display: none;
}

@media (max-width: 600px) {
    /* Sur mobile : on cache le tri du header [cfppa_resultats_header],
       et on affiche le tri integre dans le popup [cfppa_filtres] */
    .cfppa-resultats-tri {
        display: none;
    }
    .cfppa-filtres-tri-mobile {
        display: flex;
    }
}

@media (max-width: 480px) {
    .cfppa-filtres-wrapper.is-open .cfppa-filtres-panel {
        width: 100vw;
    }
}

/* ===========================================
   Tooltips niveau et acronymes (abbr / span title)
   Souligne pointille discret pour ne pas saturer les cartes
   =========================================== */

.cfppa-niveau-tooltip,
.cfppa-acronyme {
    text-decoration-line: underline !important;
    text-decoration-style: dotted !important;
    text-decoration-color: currentColor !important;
    text-decoration-thickness: 1.5px !important;
    text-underline-offset: 4px !important;
    text-decoration-skip-ink: none !important;
    opacity: 1;
    cursor: help;
}

/* Sur les loop cards : version plus discrete (pour ne pas saturer) */
.e-loop-item .cfppa-niveau-tooltip,
.e-loop-item .cfppa-acronyme {
    text-decoration-color: rgba(0, 0, 0, 0.3) !important;
    text-underline-offset: 3px !important;
}

.cfppa-niveau-tooltip:hover,
.cfppa-acronyme:hover,
.e-loop-item .cfppa-niveau-tooltip:hover,
.e-loop-item .cfppa-acronyme:hover {
    text-decoration-color: var(--couleur-domaine, currentColor) !important;
}

/* ===========================================
   Header resultats archive [cfppa_resultats_header]
   =========================================== */

.cfppa-resultats-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
}

.cfppa-resultats-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.cfppa-resultats-count {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-right: 4px;
}

.cfppa-resultats-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #f0f0f0;
    border-radius: 30px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: background .2s, color .2s;
}

.cfppa-resultats-tag:hover,
.cfppa-resultats-tag:focus-visible {
    background: var(--cfppa-filtres-color, #555);
    color: #fff;
    outline: none;
}

.cfppa-resultats-tag span {
    font-weight: 700;
    line-height: 1;
}

.cfppa-resultats-clear {
    font-size: 13px;
    color: #777;
    text-decoration: underline;
    margin-left: 4px;
}

.cfppa-resultats-clear:hover {
    color: #222;
}

.cfppa-resultats-tri {
    margin: 0;
}

.cfppa-resultats-tri label {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    white-space: nowrap;
}

.cfppa-resultats-tri span {
    font-size: 13px;
    color: #555;
    white-space: nowrap;
}

.cfppa-resultats-tri select {
    padding: 6px 26px 6px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    color: #222;
    cursor: pointer;
}

/* Cache les items icon-list au texte vide (geres par front-domaine.js) */
.elementor-icon-list-item.cfppa-icon-list-empty {
    display: none !important;
}

/* ===========================================
   CTA "Voir la fiche" dans les loop cards (widget Heading)
   Le wrapper Elementor a la classe .cfppa-cta-text, mais le texte
   visible est dans <h6 class="elementor-heading-title"> a l'interieur.
   On cible donc le <h6> pour color + ::after (sinon la fleche tombe
   sur une nouvelle ligne car le wrapper est block).
   =========================================== */

/* Cible le Heading widget (cas formation card "Voir la fiche") */
.cfppa-cta-text .elementor-heading-title,
/* Cible le Button widget (cas blog/productions card "Lire la suite") */
.cfppa-cta-text .elementor-button,
.cfppa-cta-text .elementor-button-text,
.cfppa-cta-text .elementor-button-icon,
.cfppa-cta-text .elementor-button-icon svg {
    color: var(--couleur-domaine, #555) !important;
    fill: var(--couleur-domaine, #555) !important;
    font-weight: 600;
    transition: color .2s ease, transform .2s ease;
}

/* Fleche animee : sur Heading on l'ajoute via ::after, sur Button elle existe deja via icon */
.cfppa-cta-text .elementor-heading-title::after {
    content: " \2192";
    display: inline-block;
    margin-left: 6px;
    transition: transform .2s ease;
}

/* Reset background/border que Elementor pose sur les Button widgets */
.cfppa-cta-text .elementor-button {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Hover : assombri */
.e-loop-item:hover .cfppa-cta-text .elementor-heading-title,
.e-loop-item:hover .cfppa-cta-text .elementor-button,
.e-loop-item:hover .cfppa-cta-text .elementor-button-text,
.e-loop-item:hover .cfppa-cta-text .elementor-button-icon,
.e-loop-item:hover .cfppa-cta-text .elementor-button-icon svg {
    color: color-mix(in srgb, var(--couleur-domaine, #555) 75%, black) !important;
    fill: color-mix(in srgb, var(--couleur-domaine, #555) 75%, black) !important;
}

/* Hover : translateX sur la fleche (Heading et Button icon) */
.e-loop-item:hover .cfppa-cta-text .elementor-heading-title::after,
.e-loop-item:hover .cfppa-cta-text .elementor-button-icon {
    transform: translateX(4px);
}

/* ===========================================
   Tooltip popup (compatible mobile)
   Genere par JS (front-domaine.js).
   =========================================== */

.cfppa-tooltip-popup {
    position: absolute;
    background: rgba(20, 20, 20, 0.92);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    max-width: 280px;
    z-index: 99999;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    animation: cfppa-tooltip-fade-in .15s ease;
}

@keyframes cfppa-tooltip-fade-in {
    from { opacity: 0; transform: translateY(-3px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===========================================
   Classes utilitaires de visibilite responsive
   Breakpoints alignes sur Elementor (768 / 1024).
   =========================================== */

/* Mobile (≤ 768px) */
@media (max-width: 768px) {
    .cfppa-hide-mobile { display: none !important; }
}

/* Tablette (769 - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .cfppa-hide-tablet { display: none !important; }
}

/* Desktop (≥ 1025px) */
@media (min-width: 1025px) {
    .cfppa-hide-desktop { display: none !important; }
}

/* Variantes "afficher uniquement sur" (cache partout sauf le breakpoint) */
.cfppa-mobile-only,
.cfppa-tablet-only,
.cfppa-desktop-only {
    display: none !important;
}

@media (max-width: 768px) {
    .cfppa-mobile-only { display: revert !important; }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .cfppa-tablet-only { display: revert !important; }
}
@media (min-width: 1025px) {
    .cfppa-desktop-only { display: revert !important; }
}

/* ===========================================
   Loop card : pousser le CTA "Voir la fiche" en bas
   - Le conteneur intérieur (.cfppa-card-inner) prend toute la hauteur
   - Le widget CTA (.cfppa-cta-text) flotte en bas via margin-top: auto
   Necessite que le conteneur extérieur ait une hauteur definie
   (ce qui est le cas avec Loop Grid + Equal Height).
   =========================================== */

.e-loop-item .cfppa-card-inner {
    flex-grow: 1 !important;
}

.e-loop-item .cfppa-cta-text {
    margin-top: auto !important;
}

/* Cache le widget Elementor devenu vide apres deplacement du badge */
.cfppa-widget-empty {
    display: none !important;
}

/* Loop card multi-domaines : couleur bleu marque (transversal CFPPA) */
.domaine-color-multi {
    --couleur-domaine: var(--bleu-ciel, #4EA3C6);
}

/* ===========================================
   Productions liées [cfppa_productions_liees]
   Grille de cartes cliquables vers les articles
   de la catégorie Productions (UC3, UCARE).
   =========================================== */

.cfppa-productions-liees {
    display: grid;
    grid-template-columns: repeat(var(--cols, 2), 1fr);
    gap: 16px;
    margin: 16px 0;
}

.cfppa-productions-liees[data-cols="3"] { --cols: 3; }
.cfppa-productions-liees[data-cols="4"] { --cols: 4; }

@media (max-width: 768px) {
    .cfppa-productions-liees {
        grid-template-columns: 1fr !important;
    }
}

.cfppa-production-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.cfppa-production-card:hover,
.cfppa-production-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--couleur-domaine, #4EA3C6);
    outline: none;
}

.cfppa-production-card__img {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
}

.cfppa-production-card__img > img,
.cfppa-production-card__img > .cfppa-production-card__img-placeholder {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    display: block !important;
}

.cfppa-production-card__body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.cfppa-production-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
}

.cfppa-production-card__excerpt {
    margin: 0;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    flex: 1;
}

.cfppa-production-card__cta {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--couleur-domaine, #4EA3C6);
    transition: transform .2s ease;
    display: inline-block;
}

.cfppa-production-card:hover .cfppa-production-card__cta {
    transform: translateX(3px);
}

/* ===========================================
   Masque automatique du wrapper "specialisations"
   si ni bouton ni grille de productions a l'interieur.
   Evite d'afficher un bloc vide quand la fiche n'a pas de productions.
   =========================================== */

.specialisations-wrapper:not(:has(.cfppa-btn-productions)):not(:has(.cfppa-productions-liees)) {
    display: none;
}

/* Placeholder image quand l'article n'a pas de featured image : fond neutre */
.cfppa-production-card__img-placeholder {
    background: #f0f0f0;
}

/* ===========================================
   Hero icons : forcer blanc + text-shadow
   pour la lisibilité sur photo de fond.
   Classe CSS à poser sur le widget Icon List du hero.
   =========================================== */

.cfppa-hero-icons,
.cfppa-hero-icons .elementor-icon-list-text,
.cfppa-hero-icons .elementor-icon-list-text * {
    color: #fff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.cfppa-hero-icons .elementor-icon-list-icon i,
.cfppa-hero-icons .elementor-icon-list-icon svg {
    color: #fff !important;
    fill: #fff !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* ===========================================
   Formations similaires en bas de fiche single
   [cfppa_formations_similaires]
   =========================================== */

.cfppa-formations-similaires {
    margin: 48px 0 24px;
}

.cfppa-formations-similaires__titre {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
    color: #222;
}

.cfppa-formations-similaires__grid {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), 1fr);
    gap: 16px;
}

.cfppa-formations-similaires__grid[data-cols="2"] { --cols: 2; }
.cfppa-formations-similaires__grid[data-cols="4"] { --cols: 4; }

@media (max-width: 768px) {
    .cfppa-formations-similaires__grid {
        grid-template-columns: 1fr !important;
    }
}

.cfppa-formation-similaire-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.cfppa-formation-similaire-card:hover,
.cfppa-formation-similaire-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--couleur-domaine, #4EA3C6);
    outline: none;
}

.cfppa-formation-similaire-card__img {
    position: relative;
    height: 160px;
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
    border-bottom: 3px solid var(--couleur-domaine, #ddd);
}

.cfppa-formation-similaire-card__img > img,
.cfppa-formation-similaire-card__img > .cfppa-formation-similaire-card__img-placeholder {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    display: block !important;
}

.cfppa-formation-similaire-card__img-placeholder {
    background: #f0f0f0;
}

.cfppa-formation-similaire-card__body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.cfppa-formation-similaire-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
}

.cfppa-formation-similaire-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    font-size: 13px;
    color: #555;
}

.cfppa-formation-similaire-card__cta {
    margin-top: auto;
    padding-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--couleur-domaine, #4EA3C6);
    transition: transform .2s ease;
    display: inline-block;
}

.cfppa-formation-similaire-card:hover .cfppa-formation-similaire-card__cta {
    transform: translateX(3px);
}


/* ===========================================
   Bloc Parcoursup (single formation)
   =========================================== */
.cfppa-parcoursup {
    background: #f6f9fc;
    border-left: 4px solid var(--couleur-domaine, #4EA3C6);
    padding: 24px 28px;
    margin: 24px 0;
    border-radius: 4px;
}

.cfppa-parcoursup-title {
    margin: 0 0 12px;
    font-size: 1.4em;
    color: var(--couleur-domaine, #2c3e50);
}

.cfppa-parcoursup-text {
    margin: 0 0 16px;
    line-height: 1.5;
}

.cfppa-parcoursup-cta {
    margin: 0;
}

.cfppa-parcoursup-button {
    display: inline-block;
    background: var(--couleur-domaine, #4EA3C6);
    color: #fff !important;
    padding: 12px 24px;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: 600;
    transition: background .2s ease, transform .2s ease;
}

.cfppa-parcoursup-button:hover {
    background: var(--couleur-domaine-hover, #3a87a5);
    transform: translateY(-1px);
}


/* ===========================================
   Scroll vers les ancres
   ===========================================
   Le scroll vers les ancres est gere dynamiquement par
   front-anchors.js qui mesure la hauteur reelle du menu sticky
   et de la barre admin a chaque clic. Pas de magic number ici.
   =========================================== */


/* ===========================================
   Listes dans les sections ACF
   ===========================================
   Remplace les puces par defaut (disc) par une fleche dans la couleur
   du domaine. Cohérent avec les badges Débouchés qui utilisent deja "→".
   =========================================== */

/* Cible toutes les listes des sections ACF SAUF celles qui ont
   leur propre styling (debouches en pills, etc.). */
.cfppa-acf-section ul:not(.cfppa-debouches-list) {
    list-style: none;
    padding-left: 0;
    margin: 12px 0;
}

.cfppa-acf-section ul:not(.cfppa-debouches-list) > li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
    line-height: 1.5;
}

.cfppa-acf-section ul:not(.cfppa-debouches-list) > li::before {
    content: "\2192";
    position: absolute;
    left: 0;
    top: -3px;
    color: var(--couleur-domaine, #4EA3C6);
    font-weight: 700;
    font-size: 1.1em;
}

/* Listes imbriquees : retrait + marqueur plus discret */
.cfppa-acf-section ul:not(.cfppa-debouches-list) ul {
    margin: 6px 0 6px 8px;
}

.cfppa-acf-section ul:not(.cfppa-debouches-list) ul > li::before {
    content: "\00B7";
    font-size: 1.4em;
    top: -4px;
}


/* ===========================================
   Bloc "Apres la formation" — aeration
   ===========================================
   Le shortcode wrapper sort H2 + H3 directement, sans les marges
   automatiques d'Elementor. On les recree pour matcher le rendu
   des autres sections (Informations pratiques, etc.)
   =========================================== */

.cfppa-apres-formation-title {
    margin-top: 0;
    margin-bottom: 20px;
}

.cfppa-apres-formation-title + .cfppa-debouches-title,
.cfppa-apres-formation-title ~ .cfppa-poursuite-etudes-title,
.cfppa-debouches-title,
.cfppa-poursuite-etudes-title {
    margin-top: 30px !important;
    margin-bottom: 12px;
}

/* Pas de marge top sur le 1er H3 (juste apres le H2) */
.cfppa-apres-formation-title + .cfppa-debouches-title,
.cfppa-apres-formation-title + .cfppa-poursuite-etudes-title {
    margin-top: 8px;
}

/* Liste poursuite d'etudes : un peu d'air avant aussi */
.cfppa-poursuite-etudes-list {
    margin-top: 8px;
}


/* ===========================================
   Menu mobile : eviter chevauchement avec a11y toolbar
   ===========================================
   Sur mobile, le #pojo-a11y-toolbar (positionne fixed a droite)
   chevauche le dernier item du menu sticky quand on scrolle a fond.
   Le menu utilise le widget Elementor "n-menu" (Nested Menu) avec
   horizontal_scroll_mobile=enable, donc .e-n-menu-heading est l'ul
   scrollable horizontalement.
   =========================================== */

@media (max-width: 767px) {
    /* Padding a droite sur le container scrollable du menu pour reserver
       juste assez de place pour la toolbar a11y (icone ~32px + petite marge) */
    .single-formation .e-n-menu-wrapper,
    .single-formation .e-n-menu-heading {
        padding-right: 36px !important;
    }
}


/* ===========================================
   Header sticky principal : compactage au scroll
   ===========================================
   Quand le menu principal devient sticky (.elementor-sticky--active),
   on reduit padding + taille du logo pour gagner de la hauteur.
   Transition douce pour eviter le saut visuel.
   =========================================== */

.menu-principal-wrapper {
    transition: padding-top 0.25s ease, padding-bottom 0.25s ease !important;
}

.menu-principal-wrapper > .e-con-inner {
    transition: padding-top 0.25s ease, padding-bottom 0.25s ease !important;
}

/* Compactage du container quand sticky */
.menu-principal-wrapper.elementor-sticky--active {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

.menu-principal-wrapper.elementor-sticky--active > .e-con-inner {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

/* Logo : reduction de taille en mode sticky */
.menu-principal-wrapper .elementor-widget-theme-site-logo img {
    transition: max-height 0.25s ease, max-width 0.25s ease !important;
}

.menu-principal-wrapper.elementor-sticky--active .elementor-widget-theme-site-logo img {
    max-height: 40px !important;
    width: auto !important;
    height: auto !important;
}

/* Bouton Candidatez : taille reduite en sticky */
.menu-principal-wrapper.elementor-sticky--active .btn-candidatez .elementor-button {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    font-size: 14px !important;
}


/* ===========================================
   Bloc "Mise en avant accueil" (page d'accueil)
   ===========================================
   Reutilise la card .cfppa-formation-similaire-card existante.
   Ajoute juste le label du domaine au-dessus du titre pour que le
   visiteur identifie rapidement le secteur.
   =========================================== */

.cfppa-formations-mise-en-avant {
    margin: 32px 0;
}

.cfppa-formations-mise-en-avant__titre {
    text-align: center;
    margin-bottom: 24px;
}

.cfppa-formation-similaire-card__domaine {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--couleur-domaine, #4EA3C6);
    margin-bottom: 6px;
}

/* ===========================================
   Bouton "En savoir plus sur ce domaine"
   Affiche en haut d'archive si description_longue
   ACF est remplie sur le terme domaine.
   =========================================== */
.cfppa-btn-en-savoir-plus {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    margin-top: 12px;
    background: transparent;
    color: var(--couleur-domaine, #333) !important;
    border: 2px solid var(--couleur-domaine, #333);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s, color 0.2s;
}

.cfppa-btn-en-savoir-plus:hover {
    background: var(--couleur-domaine, #333);
    color: #fff !important;
}

.cfppa-btn-en-savoir-plus .cfppa-arrow {
    transition: transform 0.2s;
    display: inline-block;
}

.cfppa-btn-en-savoir-plus:hover .cfppa-arrow {
    transform: translateY(3px);
}

.cfppa-domaine-description, .cfppa-domaine-intro {
    color: #5b5b5b;
}

/* Decalage de l'ancre pour eviter que le header sticky ne cache le titre */
#domaine-description {
    scroll-margin-top: 100px;
}

/* ===========================================
   Listes a puces dans l'intro/description domaine
   Remplace les puces standard par des fleches
   couleur domaine (comme les debouches).
   =========================================== */
.cfppa-domaine-intro ul,
.cfppa-domaine-description ul {
    list-style: none;
    padding-left: 0;
    margin: 12px 0;
}

.cfppa-domaine-intro ul > li,
.cfppa-domaine-description ul > li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 8px;
    line-height: 1.6;
}

.cfppa-domaine-intro ul > li::before,
.cfppa-domaine-description ul > li::before {
    content: "\2192";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--couleur-domaine, #999);
    font-weight: 700;
    font-size: 16px;
}

/* Listes imbriquees : meme fleche, taille plus petite */
.cfppa-domaine-intro ul ul,
.cfppa-domaine-description ul ul {
    margin-top: 6px;
    margin-bottom: 6px;
}

.cfppa-domaine-intro ul ul > li::before,
.cfppa-domaine-description ul ul > li::before {
    font-size: 13px;
}

/* Titres dans la description longue du domaine : couleur domaine */
.cfppa-domaine-description h2,
.cfppa-domaine-description h3 {
    color: var(--couleur-domaine, #333) !important;
}
.cfppa-domaine-description h3 {
    font-size: 1.5rem;
    margin-top: 25px;
}

/* ============================================================
   Élagage des fiches CATALOGUE de formations courtes (body.formation-courte)
   Retour client (PDF 17/06/2026) : sur ces pages de regroupement, on retire
   Objectifs, Infos pratiques et Résultats, et on met « Candidatez » en avant.
   Cible : widgets du template « single formation » (12252) par leur id Elementor.
   NB : les sections « Objectifs/Admission/Accessibilité/Résultats » ne concernent
   qu'une seule formation, sans sens sur une page multi-formations.
   « Financements » est conservé mais renommé « Renseignement et inscription »
   (géré côté PHP : cfppa_shortcode_acf_section).
   ============================================================ */

/* Menu sticky d'ancres internes (Description/Objectifs/Infos pratiques/Résultats…) */
body.formation-courte .elementor-element-40f436a3,
/* Bloc « Objectifs » (ancre + shortcode) */
body.formation-courte .elementor-element-12ce5182,
body.formation-courte .elementor-element-0c6d2d4,
/* Bloc « Infos pratiques » : ancre, onglets modalités, titre, âge,
   durée/rythme/calendrier/lieux, Admission, Accessibilité */
body.formation-courte .elementor-element-35a20708,
body.formation-courte .elementor-element-1a370ec,
body.formation-courte .elementor-element-73733b4e,
body.formation-courte .elementor-element-3d35b932,
body.formation-courte .elementor-element-2ca827c3,
body.formation-courte .elementor-element-b7efee6,
body.formation-courte .elementor-element-348420b,
/* Bloc « Résultats de la formation » (indicateurs/taux) */
body.formation-courte .elementor-element-48c873a {
    display: none !important;
}

/* « Candidatez » plus visible après élagage (bouton du CTA bas de page) */
body.formation-courte .elementor-element-3c0f4e8e .elementor-button {
    font-size: 18px;
    padding: 16px 38px;
}

/* Le sous-menu sticky coloré sous le hero étant supprimé sur les fiches
   courtes, on masque aussi la vague (shape divider bas) du hero, qui sinon
   se retrouve orpheline au-dessus du contenu blanc. */
body.formation-courte .elementor-element-63da3f46 .elementor-shape-bottom {
    display: none !important;
}
