/* =========================================================================
   Symbios — fiche formation / accompagnement
   Styles des blocs générés par inc/fiche-shortcodes.php
   ========================================================================= */

:root {
    --sym-blue: #4863a8;
    --sym-text: #2b3140;
    --sym-muted: #687085;
    --sym-line: #d9dfec;
    --sym-card: #f6f8fc;
    --sym-card-top: #c9d3ea;
    --sym-hero-text: #ffffff;
    --sym-fs-list: 14px;        /* texte des listes : programme et objectifs */
    --sym-lh-list: 1.55;   /* textes posés sur le hero bleu */

    --hbdi-blue: #5ba8e8;
    --hbdi-green: #6db14d;
    --hbdi-red: #e0303e;
    --hbdi-yellow: #f5c65a;
}

/* Titre de section généré par l'attribut titre="…" — aligné sur les titres H2 de la fiche.
   Ajuster --sym-title-size si les titres Elementor ont une autre taille. */
:root {
    --sym-title-size: 27px;
    --sym-title-weight: 600;
    --sym-section-gap: 50px;    /* espace au-dessus d'une section titrée */
}
.sym-section { margin-top: var(--sym-section-gap); }
@media (max-width: 767px) {
    :root { --sym-title-size: 22px; }   /* titres de section sur mobile */
}
.sym-section-title,
.elementor-widget-shortcode .sym-section-title {
    margin: 0 0 16px;
    padding: 0;
    font-size: var(--sym-title-size);
    font-weight: var(--sym-title-weight);
    line-height: 1.25;
    color: var(--sym-blue);
}

/* Contenu brut (fallback quand la structure attendue est absente) */
.sym-raw > :first-child { margin-top: 0; }
.sym-raw > :last-child { margin-bottom: 0; }

/* ---------- Pastilles (hero, cartes du listing) ---------- */
.sym-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.sym-pills .pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.sym-pills .pill.dur { background: #e2edf9; color: #2d5d8f; }
.sym-pills .pill.fmt { background: #e7f2de; color: #3f6d26; }
.sym-pills .pill.lvl { background: #fcefd0; color: #83600f; }
.sym-pills .pill.rtx { background: #fbe3e5; color: #a3202b; }

/* ---------- Carte (même style que la carte « En résumé ») ---------- */
.sym-card {
    background: var(--sym-card);
    border: 1px solid var(--sym-line);
    border-top: 3px solid var(--sym-card-top);
    border-radius: 10px;
    padding: 22px 24px;
}

/* ---------- Objectifs : une carte par objectif, 2 par ligne ---------- */
.sym-objs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.sym-obj {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 0;
    padding: 18px 20px;
    color: var(--sym-text);
    font-size: var(--sym-fs-list);
    line-height: var(--sym-lh-list);
}
.sym-obj.is-wide { grid-column: 1 / -1; }
.sym-obj::before {
    content: "";
    flex: none;
    width: 12px;
    height: 12px;
    margin-top: .35em;
    border-radius: 50%;
}
.sym-obj.c1::before { background: var(--hbdi-blue); }
.sym-obj.c2::before { background: var(--hbdi-green); }
.sym-obj.c3::before { background: var(--hbdi-red); }
.sym-obj.c4::before { background: var(--hbdi-yellow); }

/* ---------- Programme ---------- */
.sym-prog-intro { margin-bottom: 16px; color: var(--sym-muted); }
.sym-prog-intro > :last-child { margin-bottom: 0; }

.sym-mod {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 18px;
    padding-block: 18px;
    border-top: 1px solid var(--sym-line);
}
.sym-mod:last-child { border-bottom: 1px solid var(--sym-line); }

.sym-mod-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sym-blue);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.sym-mod-body { min-width: 0; }
.sym-mod-eyebrow {
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--sym-muted);
}
.sym-mod-body h3 {
    margin: 6px 0 0;
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--sym-text);
}
.sym-mod-eyebrow + h3 { margin-top: 0; }
.sym-mod-body ul {
    display: grid;
    gap: 4px;
    margin: 10px 0 0;
    padding-left: 18px;
    font-size: var(--sym-fs-list);
    line-height: var(--sym-lh-list);
    color: var(--sym-muted);
}
.sym-mod-body li { margin: 0; }
.sym-mod-body p { margin: 10px 0 0; font-size: var(--sym-fs-list); color: var(--sym-muted); }

/* ---------- Moyens pédagogiques ---------- */
.sym-chips {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.sym-chip {
    margin: 0;
    padding: 6px 12px;
    border: 1px solid var(--sym-line);
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    line-height: 1.4;
    color: var(--sym-text);
}

/* ---------- Compétences visées ---------- */
.sym-checks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 32px;
}
.sym-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--sym-text);
}
.sym-check::before {
    content: "✓";
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: .1em;
    border-radius: 50%;
    background: #e7f2de;
    color: #3f6d26;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
    .sym-card { padding: 18px; }
    .sym-objs,
    .sym-checks { grid-template-columns: 1fr; }
}

/* ---------- Prix ([symbios_prix]) ---------- */
.sym-prix { display: inline-flex; align-items: baseline; gap: 6px; }
.sym-prix b { font-size: 30px; font-weight: 700; line-height: 1.1; color: var(--sym-blue); font-variant-numeric: tabular-nums; }
.sym-ht { font-size: 13px; color: var(--sym-muted); }
/* Durée variable : « À partir de » sur sa propre ligne, montant un peu plus petit */
.sym-prix { flex-wrap: wrap; }
.sym-prix-from {
    flex-basis: 100%;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--sym-muted);
}
.sym-prix.is-from { row-gap: 2px; }
.sym-prix.is-from b { font-size: 26px; }
.sym-prix-detail { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--sym-muted); }

/* ---------- Remise à zéro des espacements Elementor / Hello ----------
   Ajouter la classe CSS « sym-fiche » au conteneur racine du template.
   Les espacements se règlent ensuite uniquement par le gap des conteneurs. */
.sym-fiche .elementor-heading-title { margin: 0; }
.sym-fiche .elementor-widget-text-editor > :first-child,
.sym-fiche .elementor-widget-text-editor .elementor-widget-container > :first-child { margin-top: 0; }
.sym-fiche .elementor-widget-text-editor > :last-child,
.sym-fiche .elementor-widget-text-editor .elementor-widget-container > :last-child { margin-bottom: 0; }
.sym-fiche .elementor-widget-text-editor p:empty { display: none; }
.sym-fiche .elementor-widget-shortcode .elementor-shortcode > :last-child { margin-bottom: 0; }

/* ---------- Sur-titre du hero ([symbios_eyebrow]) ---------- */
.sym-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sym-hero-text);
}
.sym-eyebrow .sym-eyebrow-text,
.sym-eyebrow .sym-eyebrow-text a,
.sym-eyebrow .sym-eyebrow-text a:visited { color: var(--sym-hero-text); text-decoration: none; }
.sym-eyebrow .sym-eyebrow-text a:hover { color: var(--sym-hero-text); text-decoration: underline; }
.sym-dots { display: inline-flex; gap: 6px; }
.sym-dots i { display: block; width: 12px; height: 12px; border-radius: 50%; }
.sym-dots .d1 { background: var(--hbdi-blue); }
.sym-dots .d2 { background: var(--hbdi-green); }
.sym-dots .d3 { background: var(--hbdi-red); }
.sym-dots .d4 { background: var(--hbdi-yellow); }

/* ---------- Fil d'Ariane ([symbios_breadcrumb]) ---------- */
.sym-crumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
    line-height: 1.4;
}
.sym-crumbs li {
    display: inline-flex;
    align-items: center;
    margin: 0;
    min-width: 0;
    color: var(--sym-hero-text);
}
.sym-crumbs li + li::before {
    content: "›";
    margin: 0 8px;
    opacity: .6;
}
/* Sélecteurs renforcés : la couleur de lien du kit Elementor (.elementor-kit-XX a) passerait devant */
.sym-crumbs ol li a,
.sym-crumbs ol li a:link,
.sym-crumbs ol li a:visited {
    color: var(--sym-hero-text);
    opacity: .85;
    text-decoration: none;
}
.sym-crumbs ol li a:hover,
.sym-crumbs ol li a:focus-visible {
    color: var(--sym-hero-text);
    opacity: 1;
    text-decoration: underline;
}
.sym-crumbs [aria-current="page"] span {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 48ch;
}
@media (max-width: 767px) {
    .sym-crumbs [aria-current="page"] span { max-width: 22ch; }
}

/* ---------- Chiffres clés ([symbios_chiffres]) ----------
   Colonnes strictement égales : 4 chiffres = 25 % chacun, 3 = 33 %, 2 = 50 %.
   Le nombre de colonnes est transmis par le shortcode (--sym-keys-n). */
.sym-keys {
    display: grid;
    grid-template-columns: repeat(var(--sym-keys-n, 4), minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}
/* Le widget Shortcode d'Elementor prend sinon la largeur de son contenu */
.elementor-widget-shortcode:has(.sym-keys) {
    width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
}
.sym-key {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
}
.sym-key-val {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--sym-blue);
    font-variant-numeric: tabular-nums;
}
.sym-key-unit {
    font-size: .6em;
    font-weight: 500;
    margin-left: 1px;
}
.sym-key-label {
    font-size: 11px;
    line-height: 1.4;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--sym-muted);
}
@media (max-width: 767px) {
    .sym-keys { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Affichage selon le type de fiche ----------
   Classe à ajouter sur un conteneur Elementor (Avancé → Classes CSS) :
     sym-only-formation        visible uniquement sur les formations
     sym-only-accompagnement   visible uniquement sur les accompagnements
     sym-hide-coaching-individuel / sym-hide-coaching-collectif / sym-hide-mission
                               masqué sur ce type d'accompagnement
   Les classes de <body> sont ajoutées par le plugin (sym-fiche-*, sym-cat-*). */
.sym-fiche-accompagnement .sym-only-formation,
.sym-fiche-formation .sym-only-accompagnement,
.sym-cat-coaching-individuel .sym-hide-coaching-individuel,
.sym-cat-coaching-collectif .sym-hide-coaching-collectif,
.sym-cat-mission-daccompagnement .sym-hide-mission {
    display: none !important;
}
/* Dans l'éditeur Elementor : bloc estompé au lieu d'être caché, pour pouvoir l'éditer */
.elementor-editor-active .sym-fiche-accompagnement .sym-only-formation,
.elementor-editor-active .sym-fiche-formation .sym-only-accompagnement,
body.elementor-editor-active.sym-fiche-accompagnement .sym-only-formation,
body.elementor-editor-active.sym-fiche-formation .sym-only-accompagnement {
    display: block !important;
    opacity: .35;
    outline: 2px dashed #b26a00;
}
