/* ── Google Fonts ─────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=DM+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* ── Variables CF2m ──────────────────────────────────────────────────── */
:root {
    --cf2m-dark:       #08111e;   /* fond hero / navbar */
    --cf2m-navy:       #0d1e35;   /* fond alternatif */
    --cf2m-navy-md:    #142f52;   /* variante mid */
    --cf2m-cyan:       #00b4d8;   /* accent principal */
    --cf2m-cyan-light: #48cae4;   /* cyan clair / hover */
    --cf2m-gold:       #f4c430;   /* accent secondaire — stats, labels */
    --cf2m-light:      #f0f6fa;   /* fond clair sections */
    --cf2m-white:      #ffffff;
    --cf2m-muted:      rgba(255, 255, 255, 0.6);

    --font-display: 'Outfit', sans-serif;
    --font-body:    'DM Sans', sans-serif;

    /* ── Bootstrap dark mode overrides ───────────────────────────────── */
    --bs-body-color:          rgba(255, 255, 255, 0.87);
    --bs-body-color-rgb:      255, 255, 255;
    --bs-secondary-color:     rgba(255, 255, 255, 0.55);
    --bs-emphasis-color:      #ffffff;
    --bs-card-color:          rgba(255, 255, 255, 0.87);
    --bs-card-bg:             transparent;
    --bs-card-border-color:   rgba(255, 255, 255, 0.10);
    --bs-link-color:          #48cae4;
    --bs-link-hover-color:    #ffffff;
    --bs-heading-color:       #ffffff;
    --bs-list-group-color:    rgba(255, 255, 255, 0.87);
    --bs-list-group-bg:       transparent;
    --bs-border-color:        rgba(255, 255, 255, 0.12);
    --bs-alert-color:         rgba(255, 255, 255, 0.87);
}

/* ── Dark mode : surcharges globales Bootstrap ───────────────────────── */
.text-muted {
    color: rgba(255, 255, 255, 0.50) !important;
}
small {
    color: rgba(255, 255, 255, 0.50);
}
.alert {
    --bs-alert-color: rgba(255, 255, 255, 0.87);
}
.alert-success {
    --bs-alert-color:        rgba(255, 255, 255, 0.87);
    --bs-alert-bg:           rgba(25, 135, 84, 0.20);
    --bs-alert-border-color: rgba(25, 135, 84, 0.40);
}
.alert-warning {
    --bs-alert-color:        rgba(255, 255, 255, 0.87);
    --bs-alert-bg:           rgba(255, 193, 7, 0.18);
    --bs-alert-border-color: rgba(255, 193, 7, 0.40);
}
.alert-danger {
    --bs-alert-color:        rgba(255, 255, 255, 0.87);
    --bs-alert-bg:           rgba(220, 53, 69, 0.20);
    --bs-alert-border-color: rgba(220, 53, 69, 0.40);
}
.alert-info {
    --bs-alert-color:        rgba(255, 255, 255, 0.87);
    --bs-alert-bg:           rgba(13, 202, 240, 0.15);
    --bs-alert-border-color: rgba(13, 202, 240, 0.35);
}
a {
    color: var(--cf2m-cyan-light);
}
a:hover {
    color: var(--cf2m-white);
}
/* Labels de section inline (couleur neutre lisible sur fond sombre) */
.cf2m-muted-label {
    color: rgba(255, 255, 255, 0.50);
    letter-spacing: 0.05em;
}

/* ── Base ────────────────────────────────────────────────────────────── */
body {
    font-family: var(--font-body);
    color: rgba(255, 255, 255, 0.87);
    background-color: #05111f;
    background-image:
        linear-gradient(rgba(5, 17, 31, 0.82), rgba(5, 17, 31, 0.82)),
        url('/images/hero-bg.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* ── Pages intérieures : ajustements sur fond hero-bg.jpg ────────────── */

/* Titres de section hors-cartes : blanc sur fond sombre */
body:not(.page-home):not(.page-login) .cf2m-section-title {
    color: var(--cf2m-white);
}

/* Texte muted hors-cartes : blanc atténué */
body:not(.page-home):not(.page-login) .text-muted {
    color: var(--cf2m-muted) !important;
}

/* Breadcrumbs Bootstrap sur fond sombre */
body:not(.page-home):not(.page-login) .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s;
}
body:not(.page-home):not(.page-login) .breadcrumb-item a:hover {
    color: var(--cf2m-cyan);
}
body:not(.page-home):not(.page-login) .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.65);
}
body:not(.page-home):not(.page-login) .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.55);
}

/* Cartes glassmorphisme sombres sur pages intérieures */
body:not(.page-home):not(.page-login) .cf2m-card {
    background: rgba(8, 17, 30, 0.72);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: var(--font-display);
}

/* ── Navbar : lien externe ───────────────────────────────────────────── */
.cf2m-nav-external {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    opacity: 0.65;
    transition: opacity 0.15s;
}
.cf2m-nav-external:hover { opacity: 1; }

.cf2m-external-icon {
    flex-shrink: 0;
    vertical-align: middle;
    margin-top: -2px;
}

/* ── Navbar ──────────────────────────────────────────────────────────── */
.cf2m-navbar {
    background: rgba(6, 14, 26, 0.80);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: none;
    padding-top: calc(0.55rem - 5px);
    padding-bottom: calc(0.55rem - 5px);
    transition: background 0.3s;
}

/* Menu responsive (collapsed) : glassmorphisme + styles cohérents */
@media (max-width: 991.98px) {

    /* Panneau collapse : transparent, la navbar gère déjà le verre */
    .cf2m-navbar .navbar-collapse.show,
    .cf2m-navbar .navbar-collapse.collapsing {
        background: transparent;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        padding: 0.5rem 0 0.75rem;
        margin-top: 0.25rem;
    }

    /* Liens nav : identiques au desktop, adaptés en vertical */
    .cf2m-navbar .nav-link {
        padding: 0.55rem 1rem !important;
        border-radius: 0.5rem;
        font-size: 1.17rem;
    }

    /* Soulignement remplacé par un fond hover en mobile (l'absolu ne convient pas) */
    .cf2m-navbar .nav-link::after {
        display: none;
    }
    .cf2m-navbar .nav-link:hover,
    .cf2m-navbar .nav-link.active {
        background: rgba(0, 180, 216, 0.1);
        color: var(--cf2m-cyan) !important;
    }
    .cf2m-navbar .nav-link.active {
        border-left: 2px solid var(--cf2m-cyan);
    }

    /* Séparateur avant la section auth */
    .cf2m-navbar .navbar-nav + .d-flex,
    .cf2m-navbar .navbar-nav + .ms-lg-auto {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 0.75rem;
        margin-top: 0.5rem;
        width: 100%;
        justify-content: center;
    }

    /* Bouton connexion centré en mobile */
    .cf2m-btn-connexion {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* Sur les pages à fond plein (home, connexion…) : flotte par-dessus le contenu */
.page-home .cf2m-navbar,
.page-login .cf2m-navbar {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 1030;
    width: 100%;
}

/* Sur pages intérieures : sticky, même glassmorphisme que la home */
body:not(.page-home):not(.page-login) .cf2m-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(6, 14, 26, 0.80);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
}

/* Logo : centré verticalement dans la navbar */
.cf2m-navbar .navbar-brand {
    padding: 0;
    display: flex;
    align-items: center;
}
.cf2m-logo-img {
    display: block;
}

/* Liens de navigation */
.cf2m-navbar .nav-link {
    font-family: var(--font-display);
    font-size: 1.14rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82) !important;
    letter-spacing: 0.3px;
    padding: 0.4rem 1rem !important;
    position: relative;
    transition: color 0.2s;
}
.cf2m-navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 1.5px;
    background: var(--cf2m-cyan);
    transform: scaleX(0);
    transition: transform 0.2s ease;
    border-radius: 1px;
}
.cf2m-navbar .nav-link:hover,
.cf2m-navbar .nav-link.active {
    color: var(--cf2m-white) !important;
}
.cf2m-navbar .nav-link:hover::after,
.cf2m-navbar .nav-link.active::after {
    transform: scaleX(1);
}
/* Indicateur dropdown : remplace le soulignement par un chevron */
.cf2m-navbar .nav-link.dropdown-toggle::after {
    content: ' ▾';
    position: static;
    display: inline;
    height: auto;
    width: auto;
    background: none;
    transform: none;
    transition: none;
    border: none;
    font-size: 0.98rem;
    opacity: 0.7;
}

/* Bouton connexion */
.cf2m-btn-connexion {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.07rem;
    padding: 0.38rem 1rem;
    border-radius: 2rem;
    letter-spacing: 0.3px;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.cf2m-btn-connexion:hover {
    border-color: var(--cf2m-cyan);
    color: var(--cf2m-cyan);
    background: rgba(0, 180, 216, 0.08);
}

/* Alignement vertical de la flèche Bootstrap sur les nav-links dropdown */
.nav-link.dropdown-toggle::after {
    vertical-align: middle;
}

/* Dropdown utilisateur connecté */
.cf2m-user-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.07rem;
    padding: 0.38rem 1rem;
    border-radius: 2rem;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.cf2m-user-dropdown-toggle::after {
    /* supprime la flèche Bootstrap par défaut */
    display: none;
}
.cf2m-user-dropdown-toggle:hover,
.cf2m-user-dropdown-toggle[aria-expanded="true"] {
    border-color: var(--cf2m-cyan);
    color: var(--cf2m-cyan);
    background: rgba(0, 180, 216, 0.08);
}
.cf2m-user-avatar-icon {
    display: inline-flex;
    align-items: center;
    opacity: 0.75;
}
.cf2m-user-dropdown {
    min-width: 180px;
}

/* En mobile : le dropdown utilisateur s'aligne à gauche pour rester visible */
@media (max-width: 991.98px) {
    .cf2m-user-dropdown {
        --bs-dropdown-min-width: 180px;
        left: 0 !important;
        right: auto !important;
        transform: none !important;
    }

    /* Dropdowns formations/activités : inline sur mobile → fond opaque cohérent */
    .navbar-nav .cf2m-dropdown {
        position: static !important;
        background: rgba(6, 14, 26, 0.80);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        border-left: 2px solid rgba(0, 180, 216, 0.4);
        border-radius: 0 0.5rem 0.5rem 0;
        box-shadow: none;
        min-width: 100%;
        margin: 0.25rem 0 0.5rem 1rem;
        padding: 0.25rem 0;
    }
}

/* ── Navbar : badge compteur ─────────────────────────────────────────── */
.cf2m-nav-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--cf2m-cyan);
    color: var(--cf2m-dark);
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.3rem;
    border-radius: 1rem;
    margin-left: 0.3rem;
    vertical-align: middle;
}

/* ── Dropdowns (formations + utilisateur) ────────────────────────────── */
.cf2m-dropdown {
    --bs-dropdown-bg: transparent;
    --bs-dropdown-color: rgba(255, 255, 255, 0.82);
    --bs-dropdown-border-color: transparent;
    background: rgba(6, 14, 26, 0.80);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0 0 0.75rem 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    min-width: 300px;
    padding: 0.5rem 0;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cf2m-dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.82);
    font-family: var(--font-body);
    font-size: 0.88rem;
    padding: 0.6rem 1.25rem;
    transition: color 0.15s, padding-left 0.15s;
    white-space: normal;
    line-height: 1.4;
    background: transparent;
}
.cf2m-dropdown-item:hover,
.cf2m-dropdown-item:focus {
    background-color: rgba(0, 180, 216, 0.08);
    color: var(--cf2m-cyan);
    padding-left: 1.6rem;
}

.cf2m-dropdown-arrow {
    color: var(--cf2m-cyan);
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1.4;
    transition: transform 0.15s;
}
.cf2m-dropdown-item:hover .cf2m-dropdown-arrow {
    transform: translateX(3px);
}

.cf2m-dropdown-divider {
    border-color: rgba(255, 255, 255, 0.08);
    margin: 0.25rem 0;
}

.cf2m-dropdown-all {
    color: var(--cf2m-cyan);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.65rem 1.25rem;
    background: transparent;
    transition: background 0.15s;
}
.cf2m-dropdown-all:hover {
    background-color: rgba(0, 180, 216, 0.1);
    color: var(--cf2m-cyan-light);
}

/* ── Hero ────────────────────────────────────────────────────────────── */
.cf2m-hero {
    background-color: transparent;
    background-image: none;
    color: var(--cf2m-white);
    /* Padding-top inclut la hauteur de la navbar (≈70px) car elle est en position:absolute */
    padding: calc(70px + 4rem) 0 5rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Overlay sombre par-dessus la photo — léger pour laisser la photo visible */
.cf2m-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        rgba(5, 12, 28, 0.38) 0%,
        rgba(5, 12, 28, 0.22) 45%,
        rgba(5, 12, 28, 0.08) 100%
    );
    pointer-events: none;
    z-index: 0;
}

/* Lueur cyan en haut à droite */
.cf2m-hero::after {
    content: '';
    position: absolute;
    top: -80px;
    right: -60px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(0, 180, 216, 0.14) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.cf2m-hero .container {
    position: relative;
    z-index: 1;
}

/* ── Panel glassmorphisme ─────────────────────────────────────────────── */
.cf2m-hero-glass {
    background: rgba(5, 12, 28, 0.22);
    backdrop-filter: blur(32px) saturate(2) brightness(0.88);
    -webkit-backdrop-filter: blur(32px) saturate(2) brightness(0.88);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-right-color: rgba(255, 255, 255, 0.08);
    border-bottom-color: rgba(255, 255, 255, 0.06);
    border-radius: 1.75rem;
    padding: 3rem 3.25rem;
    box-shadow:
        0 16px 60px rgba(0, 0, 0, 0.30),
        0 0 0 0.5px rgba(255, 255, 255, 0.08) inset,
        0 2px 0 rgba(255, 255, 255, 0.12) inset,
        0 0 40px rgba(0, 180, 216, 0.05);
}

@media (max-width: 991px) {
    .cf2m-hero-glass {
        background: rgba(5, 12, 28, 0.38);
        border-right-color: rgba(255, 255, 255, 0.14);
    }
}
@media (max-width: 576px) {
    .cf2m-hero-glass {
        padding: 2rem 1.75rem;
        border-radius: 1.25rem;
    }
    .cf2m-hero {
        background-position: unset;
    }
}

/* ── Portrait circulaire (colonne droite du hero) ────────────────────── */
.cf2m-hero-portrait-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.cf2m-hero-portrait-outer {
    position: relative;
    width: clamp(220px, 28vw, 340px);
    height: clamp(220px, 28vw, 340px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.cf2m-hero-portrait-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 148%;
    height: 148%;
    transform: translate(calc(-50% + 3px), calc(-50% + 7px));
    pointer-events: none;
    z-index: 2;
}

.cf2m-hero-portrait {
    width: clamp(220px, 28vw, 340px);
    height: clamp(220px, 28vw, 340px);
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(0, 180, 216, 0.45);
    box-shadow:
        0 0 0 10px rgba(0, 180, 216, 0.08),
        0 0 0 20px rgba(0, 180, 216, 0.04),
        0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

.cf2m-hero-portrait img {
    width: 160%;
    height: 160%;
    object-fit: cover;
    object-position: center center;
    margin-left: calc(-30% + 40px);
    margin-top: calc(-30% - 50px);
}

/* Placeholder si pas d'image portrait */
.cf2m-hero-portrait-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(0, 70, 130, 0.6) 0%,
        rgba(0, 30, 60, 0.9) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: rgba(0, 180, 216, 0.5);
}
.cf2m-hero-portrait-placeholder svg {
    width: 60px;
    height: 60px;
    opacity: 0.4;
}

.cf2m-hero-label {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--cf2m-cyan);
    margin-bottom: 1.2rem;
}

.cf2m-hero h1 {
    font-size: clamp(1.98rem, 4.5vw, 3.42rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.cf2m-hero h1 em {
    font-style: normal;
    color: var(--cf2m-cyan);
}

.cf2m-hero .lead {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    color: var(--cf2m-muted);
    line-height: 1.7;
    max-width: 540px;
}

/* Stats hero */
.cf2m-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 2.5rem 0;
}
.cf2m-stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--cf2m-gold);
    line-height: 1;
}
.cf2m-stat-label {
    font-size: 0.78rem;
    color: var(--cf2m-muted);
    letter-spacing: 0.5px;
    margin-top: 0.2rem;
}

.cf2m-hero-btn {
    display: inline-block;
    background: var(--cf2m-cyan);
    border: none;
    color: var(--cf2m-dark);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.14rem;
    letter-spacing: 0.5px;
    padding: 0.85rem 2.2rem;
    border-radius: 0.4rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(0, 180, 216, 0.35);
}
.cf2m-hero-btn:hover {
    background: var(--cf2m-cyan-light);
    color: var(--cf2m-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 180, 216, 0.45);
}

/* ── Section commune ─────────────────────────────────────────────────── */
.cf2m-section-label {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--cf2m-cyan);
    margin-bottom: 0.5rem;
}

.cf2m-section-title {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--cf2m-white);
    margin-bottom: 2.5rem;
    letter-spacing: -0.3px;
}
.cf2m-section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--cf2m-cyan);
    margin: 0.6rem auto 0;
}

/* ── Titres de sections (accueil) ────────────────────────────────────── */

/* Section formations sur fond sombre : titre et label en blanc */
.page-home #formations .cf2m-section-label,
.page-home #formations .cf2m-section-title {
    color: var(--cf2m-white);
}
.page-home #formations .cf2m-section-title::after {
    background: var(--cf2m-cyan);
}

/* Cartes formations accueil : glassmorphisme sombre */
.page-home #formations .cf2m-card {
    background: rgba(8, 17, 30, 0.78);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
}

/* ── Cards formations ────────────────────────────────────────────────── */
.cf2m-card {
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 0.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.06);
    background: rgba(8, 17, 30, 0.65);
    backdrop-filter: blur(18px) saturate(1.6) brightness(1.05);
    -webkit-backdrop-filter: blur(18px) saturate(1.6) brightness(1.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
    height: 100%;
    overflow: hidden;
}
.cf2m-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 180, 216, 0.16);
    border-color: rgba(0, 180, 216, 0.4);
}
.cf2m-card .card-header {
    background: color-mix(in srgb, var(--card-color-primary, var(--cf2m-dark)) 80%, transparent);
    color: var(--cf2m-white);
    border-bottom: none;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
    line-height: 1.4;
}

/* Icône thématique dans le card-header (dark mode : blanche par défaut) */
.cf2m-formation-icon {
    opacity: 0.90;
    transition: filter 0.2s, opacity 0.2s;
}

/* Light mode : filtre invert → icône blanche devient navy */
[data-theme="light"] .cf2m-formation-icon {
    filter: invert(1) brightness(0.25) sepia(0.4) saturate(3) hue-rotate(190deg);
    opacity: 1;
}
.cf2m-card .card-body,
.cf2m-card .card-footer {
    background: transparent;
}
.cf2m-card .badge-status {
    background-color: var(--cf2m-cyan);
    color: var(--cf2m-dark);
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.2em 0.6em;
    border-radius: 0.3rem;
}
.cf2m-card .card-text {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
    line-height: 1.65;
    hyphens: none;
    word-break: normal;
    overflow-wrap: break-word;
}
.cf2m-card .btn-outline-secondary {
    background: rgba(0, 180, 216, 0.08);
    border: 1px solid rgba(0, 180, 216, 0.35);
    border-radius: 0.6rem;
    color: var(--cf2m-cyan-light);
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.cf2m-card .btn-outline-secondary:hover {
    box-shadow: 0 6px 18px rgba(0, 180, 216, 0.2);
    border-color: var(--cf2m-cyan);
    color: var(--cf2m-white);
    transform: translateY(-2px);
    background: rgba(0, 180, 216, 0.18);
}

/* ── Section partenaires ─────────────────────────────────────────────── */
.cf2m-partners {
    background: linear-gradient(180deg, var(--cf2m-navy) 0%, var(--cf2m-dark) 100%);
}
.cf2m-partner-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 180, 216, 0.2);
    border-radius: 0.6rem;
    padding: 0.9rem 1.5rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.80);
    text-decoration: none;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
    min-width: 140px;
}
.cf2m-partner-item:hover {
    box-shadow: 0 6px 18px rgba(0, 180, 216, 0.2);
    color: var(--cf2m-cyan);
    border-color: var(--cf2m-cyan);
    transform: translateY(-2px);
}

/* ── Page Connexion ──────────────────────────────────────────────────── */
.cf2m-login-section {
    background-color: #06101c;
    background-image:
        radial-gradient(ellipse 55% 50% at 10% 30%, rgba(0, 90, 160, 0.40) 0%, transparent 100%),
        radial-gradient(ellipse 40% 40% at 90% 70%, rgba(0, 180, 216, 0.22) 0%, transparent 100%),
        radial-gradient(ellipse 60% 60% at 50% 100%, rgba(8, 35, 75, 0.50) 0%, transparent 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.cf2m-login-blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.cf2m-login-blob--tl {
    top: -80px;
    left: -80px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(0, 180, 216, 0.14) 0%, transparent 70%);
}
.cf2m-login-blob--br {
    bottom: -100px;
    right: -60px;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(0, 60, 140, 0.25) 0%, transparent 70%);
}

/* Carte glassmorphisme */
.cf2m-login-card {
    width: 100%;
    max-width: 440px;
    background: rgba(6, 16, 30, 0.55);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 1.5rem;
    padding: 2.75rem 2.5rem 2rem;
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        inset 0 0 0 0.5px rgba(0, 180, 216, 0.08);
    position: relative;
    z-index: 1;
}

.cf2m-login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.cf2m-login-logo {
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 12px rgba(0, 180, 216, 0.4));
}

.cf2m-login-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--cf2m-white);
    margin: 0 0 0.25rem;
    letter-spacing: -0.3px;
}

.cf2m-login-subtitle {
    font-size: 0.88rem;
    color: var(--cf2m-muted);
    margin: 0;
}

/* Champs */
.cf2m-login-field {
    margin-bottom: 1.25rem;
}

.cf2m-login-label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.4rem;
    letter-spacing: 0.3px;
}

.cf2m-login-input-wrap {
    position: relative;
}

.cf2m-login-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cf2m-cyan);
    pointer-events: none;
    opacity: 0.7;
}

.cf2m-login-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.6rem;
    color: var(--cf2m-white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.75rem 1rem 0.75rem 2.8rem;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.cf2m-login-input::placeholder {
    color: rgba(255, 255, 255, 0.28);
}
.cf2m-login-input:focus {
    border-color: var(--cf2m-cyan);
    background: rgba(0, 180, 216, 0.06);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
}

/* Lien mot de passe oublié */
.cf2m-login-forgot {
    font-size: 0.78rem;
    color: var(--cf2m-cyan);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.15s;
}
.cf2m-login-forgot:hover { opacity: 1; color: var(--cf2m-cyan-light); }

/* Message d'erreur */
.cf2m-login-error {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.35);
    border-radius: 0.6rem;
    color: #ff8896;
    font-size: 0.88rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

/* Bouton de connexion */
.cf2m-login-btn {
    width: 100%;
    background: var(--cf2m-cyan);
    border: none;
    border-radius: 0.6rem;
    color: var(--cf2m-dark);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 0.85rem;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(0, 180, 216, 0.35);
}
.cf2m-login-btn:hover {
    background: var(--cf2m-cyan-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(0, 180, 216, 0.45);
}
.cf2m-login-btn:active { transform: translateY(0); }

/* Lien retour accueil */
.cf2m-login-back {
    text-align: center;
    margin: 1.5rem 0 0;
}
.cf2m-login-back a {
    font-size: 0.82rem;
    color: var(--cf2m-muted);
    text-decoration: none;
    transition: color 0.15s;
}
.cf2m-login-back a:hover { color: var(--cf2m-white); }

/* ── Formulaire de contact ───────────────────────────────────────────── */
.cf2m-honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.cf2m-contact-form label {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    color: #4a6278;
    margin-bottom: 0.35rem;
}

.cf2m-input {
    background: #f8fafc;
    border: 1.5px solid #d0dce8;
    border-radius: 0.5rem;
    font-size: 0.92rem;
    color: #1a2b3c !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.cf2m-input::placeholder { color: #6a8090; }
.cf2m-input::file-selector-button {
    color: #1a2b3c;
    background: #e2ecf3;
    border-color: #c0d0dc;
}
.cf2m-input:focus {
    background: #fff;
    border-color: var(--cf2m-cyan);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.12);
    outline: none;
    color: #1a2b3c !important;
}
.cf2m-input.is-invalid {
    border-color: #dc3545;
}

.cf2m-contact-form .invalid-feedback,
.cf2m-contact-form ul.form-errors {
    font-size: 0.8rem;
    color: #dc3545;
    margin-top: 0.25rem;
    list-style: none;
    padding: 0;
}

.cf2m-btn-submit {
    background: var(--cf2m-cyan);
    color: var(--cf2m-dark);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.65rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    letter-spacing: 0.3px;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
    display: inline-block;
}
.cf2m-btn-submit:hover {
    background: var(--cf2m-cyan-light);
    color: var(--cf2m-dark);
    transform: translateY(-1px);
}

/* ── Page profil ─────────────────────────────────────────────────────── */
.cf2m-avatar-wrap {
    flex-shrink: 0;
}
.cf2m-avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 180, 216, 0.4);
}
.cf2m-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 180, 216, 0.08);
    border: 2px solid rgba(0, 180, 216, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 180, 216, 0.6);
}
.cf2m-avatar-placeholder svg {
    width: 40px;
    height: 40px;
}

/* ── Formulaire de modification du profil ───────────────────────────── */
.cf2m-form-label {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7a95aa;
    display: block;
    margin-bottom: 0.4rem;
}
.cf2m-avatar-upload .cf2m-avatar-img,
.cf2m-avatar-upload .cf2m-avatar-placeholder {
    width: 72px;
    height: 72px;
}


/* ── Modal de recadrage avatar ──────────────────────────────────────── */
.cf2m-crop-container {
    height: 360px;
    background: #1a1a1a;
    overflow: hidden;
    position: relative;
}
.cf2m-crop-container canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100% !important;
    height: 100% !important;
}
.cf2m-crop-modal-content {
    background: #0d1e2e;
    border: 1px solid rgba(0, 180, 216, 0.2);
    color: rgba(255, 255, 255, 0.87);
}
.cf2m-crop-modal-content .modal-header,
.cf2m-crop-modal-content .modal-footer {
    border-color: rgba(255, 255, 255, 0.1);
}
.cf2m-crop-modal-content .btn-close {
    filter: invert(1) grayscale(1);
}
[data-theme="light"] .cf2m-crop-modal-content {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.15);
    color: #1a2b3c;
}
[data-theme="light"] .cf2m-crop-modal-content .modal-header,
[data-theme="light"] .cf2m-crop-modal-content .modal-footer {
    border-color: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .cf2m-crop-modal-content .btn-close {
    filter: none;
}

/* ── Modale générique CF2m (dark mode par défaut) ────────────────────── */
.cf2m-modal {
    background: #0d1e2e;
    color: rgba(255, 255, 255, 0.87);
    border-color: rgba(255, 255, 255, 0.12);
}
.cf2m-modal .modal-header,
.cf2m-modal .modal-footer {
    border-color: rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.87);
}
.cf2m-modal .modal-title {
    color: rgba(255, 255, 255, 0.95);
}
.cf2m-modal .btn-close {
    filter: invert(1) grayscale(1);
}
.cf2m-modal .form-label {
    color: rgba(255, 255, 255, 0.80);
}
.cf2m-modal .form-control,
.cf2m-modal .form-select {
    background-color: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.87);
    border-color: rgba(255, 255, 255, 0.20);
}
.cf2m-modal .form-control:focus,
.cf2m-modal .form-select:focus {
    background-color: rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.95);
    border-color: var(--cf2m-cyan);
    box-shadow: 0 0 0 0.2rem rgba(0, 180, 216, 0.25);
}
.cf2m-modal .form-control::placeholder {
    color: rgba(255, 255, 255, 0.35);
}
.cf2m-modal .form-control.is-invalid,
.cf2m-modal .form-select.is-invalid {
    border-color: rgba(220, 53, 69, 0.70);
}
.cf2m-modal .invalid-feedback {
    color: #ff8fa3;
}
/* Light mode */
[data-theme="light"] .cf2m-modal {
    background: #ffffff;
    color: #1a2b3c;
    border-color: rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .cf2m-modal .modal-header,
[data-theme="light"] .cf2m-modal .modal-footer {
    border-color: rgba(0, 0, 0, 0.10);
    color: #1a2b3c;
}
[data-theme="light"] .cf2m-modal .modal-title {
    color: #0d1e35;
}
[data-theme="light"] .cf2m-modal .btn-close {
    filter: none;
}
[data-theme="light"] .cf2m-modal .form-label {
    color: #1a2b3c;
}
[data-theme="light"] .cf2m-modal .form-control,
[data-theme="light"] .cf2m-modal .form-select {
    background-color: #ffffff;
    color: #1a2b3c;
    border-color: #ced4da;
}
[data-theme="light"] .cf2m-modal .form-control:focus,
[data-theme="light"] .cf2m-modal .form-select:focus {
    background-color: #ffffff;
    color: #1a2b3c;
    border-color: var(--cf2m-cyan);
    box-shadow: 0 0 0 0.2rem rgba(0, 180, 216, 0.20);
}
[data-theme="light"] .cf2m-modal .form-control::placeholder {
    color: #9fb3c8;
}
[data-theme="light"] .cf2m-modal .invalid-feedback {
    color: #dc3545;
}

/* ── Contenu riche formation et pages (SunEditor |raw) ───────────────── */
.cf2m-formation-description,
.cf2m-page-content {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.85;
    font-size: 0.97rem;
}
.cf2m-formation-description h1, .cf2m-page-content h1,
.cf2m-formation-description h2, .cf2m-page-content h2,
.cf2m-formation-description h3, .cf2m-page-content h3,
.cf2m-formation-description h4, .cf2m-page-content h4,
.cf2m-formation-description h5, .cf2m-page-content h5,
.cf2m-formation-description h6, .cf2m-page-content h6 {
    color: var(--cf2m-white);
    margin-top: 1.75rem;
    margin-bottom: 0.6rem;
    font-family: var(--font-display);
    font-weight: 700;
}
.cf2m-formation-description p,   .cf2m-page-content p   { margin-bottom: 0.9rem; }
.cf2m-formation-description ul,  .cf2m-page-content ul,
.cf2m-formation-description ol,  .cf2m-page-content ol  { padding-left: 1.4rem; margin-bottom: 0.9rem; color: rgba(255,255,255,0.80); }
.cf2m-formation-description li,  .cf2m-page-content li  { margin-bottom: 0.3rem; }
.cf2m-formation-description strong, .cf2m-page-content strong { color: var(--cf2m-white); font-weight: 600; }
.cf2m-formation-description em,     .cf2m-page-content em     { color: var(--cf2m-cyan-light); }
.cf2m-formation-description a,      .cf2m-page-content a      { color: var(--cf2m-cyan-light); text-decoration: underline; }
.cf2m-formation-description a:hover, .cf2m-page-content a:hover { color: var(--cf2m-white); }
.cf2m-formation-description table,  .cf2m-page-content table  { color: rgba(255,255,255,0.82); }
.cf2m-formation-description hr,     .cf2m-page-content hr     { border-color: rgba(255,255,255,0.15); }
.cf2m-formation-description blockquote, .cf2m-page-content blockquote {
    border-left: 3px solid var(--cf2m-cyan);
    padding-left: 1rem;
    color: rgba(255,255,255,0.65);
    font-style: italic;
}

/* ── Liens works sur la page formation ──────────────────────────────── */
.cf2m-works-link {
    color: var(--cf2m-cyan);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.cf2m-works-link:hover {
    color: var(--cf2m-white);
}

/* ── Page works/show ─────────────────────────────────────────────────── */

/* Hero */
.cf2m-work-hero {
    position: relative;
    background: var(--cf2m-dark);
    padding: 5rem 0 3.5rem;
    overflow: hidden;
}
.cf2m-work-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 80% 50%, rgba(0, 180, 216, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 10% 80%, rgba(20, 47, 82, 0.6) 0%, transparent 70%);
    pointer-events: none;
}
.cf2m-work-breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
}
.cf2m-work-breadcrumb .breadcrumb-item a:hover { color: var(--cf2m-cyan) !important; }
.cf2m-work-breadcrumb .breadcrumb-item.active { color: rgba(255,255,255,0.65) !important; font-size: 0.8rem; }
.cf2m-work-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.55) !important; }

.cf2m-work-label {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--cf2m-cyan);
    border: 1px solid rgba(0, 180, 216, 0.35);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    margin-bottom: 1.25rem;
}
.cf2m-work-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--cf2m-white);
    line-height: 1.15;
    margin-bottom: 1.5rem;
    max-width: 800px;
}
.cf2m-work-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}
.cf2m-work-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--cf2m-muted);
}

/* Corps */
.cf2m-work-body { background: transparent; }

.cf2m-work-description-card {
    background: rgba(8, 17, 30, 0.72);
    border: 1px solid rgba(0, 180, 216, 0.12);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.30);
}
.cf2m-work-description-header {
    background: linear-gradient(135deg, var(--cf2m-dark) 0%, var(--cf2m-navy-md) 100%);
    padding: 1rem 1.5rem;
}
.cf2m-work-section-label {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--cf2m-cyan);
}
.cf2m-work-description-body {
    padding: 1.75rem;
    color: rgba(255, 255, 255, 0.80);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* Sidebar */
.cf2m-work-sidebar-block {
    background: rgba(8, 17, 30, 0.72);
    border: 1px solid rgba(0, 180, 216, 0.12);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.cf2m-work-sidebar-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--cf2m-cyan-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Auteurs */
.cf2m-work-authors-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.cf2m-work-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.cf2m-work-author-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cf2m-navy-md), var(--cf2m-cyan));
    color: var(--cf2m-white);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cf2m-work-author-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

/* Lien formation */
.cf2m-work-formation-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 0.4rem;
    background: rgba(0, 180, 216, 0.06);
    border: 1px solid rgba(0, 180, 216, 0.15);
    transition: background 0.2s, color 0.2s;
}
.cf2m-work-formation-link:hover {
    background: rgba(0, 180, 216, 0.12);
    color: var(--cf2m-cyan);
}

/* Bouton retour */
.cf2m-work-back-btn {
    background: transparent;
    border: 1.5px solid rgba(0, 180, 216, 0.35);
    color: var(--cf2m-cyan);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.6rem 1.25rem;
    border-radius: 2rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.cf2m-work-back-btn:hover {
    background: var(--cf2m-cyan);
    border-color: var(--cf2m-cyan);
    color: var(--cf2m-dark);
}

/* ── Page contact : carte sans hauteur fixe ─────────────────────────── */
.page-contact .cf2m-card {
    height: auto;
    overflow: visible;
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.cf2m-footer {
    background: var(--cf2m-dark);
    border-top: 2px solid rgba(0, 180, 216, 0.25);
}
.cf2m-footer .text-muted {
    color: var(--cf2m-muted) !important;
}
.cf2m-footer-link {
    color: var(--cf2m-muted);
    transition: color 0.2s;
}
.cf2m-footer-link:hover {
    color: var(--cf2m-light) !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   BOUTON THÈME (dark/light toggle)
   ═══════════════════════════════════════════════════════════════════════ */
.cf2m-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.80);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
    flex-shrink: 0;
    padding: 0;
}
.cf2m-theme-toggle:hover {
    background: rgba(0, 180, 216, 0.18);
    border-color: var(--cf2m-cyan);
    color: var(--cf2m-white);
    transform: rotate(20deg);
}

/* Icônes pilotées par CSS selon le thème actif */
html:not([data-theme="light"]) .cf2m-theme-sun { display: inline-flex; }
html:not([data-theme="light"]) .cf2m-theme-moon { display: none; }
[data-theme="light"] .cf2m-theme-sun { display: none; }
[data-theme="light"] .cf2m-theme-moon { display: inline-flex; }

/* Bouton thème mobile : pill centré avec texte */
.cf2m-theme-toggle-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    padding: 6px 14px;
    font-size: 0.85rem;
    transition: background 0.2s, border-color 0.2s;
}
.cf2m-theme-toggle-mobile:hover {
    background: rgba(0, 180, 216, 0.20);
    border-color: var(--cf2m-cyan);
    color: var(--cf2m-white);
}

/* ═══════════════════════════════════════════════════════════════════════
   LIGHT MODE — [data-theme="light"] sur <html>
   ═══════════════════════════════════════════════════════════════════════ */

/* Variables Bootstrap réinitialisées */
[data-theme="light"] {
    --bs-body-color:        #1a2b3c;
    --bs-body-color-rgb:    26, 43, 60;
    --bs-secondary-color:   #6c757d;
    --bs-emphasis-color:    #000000;
    --bs-card-color:        #1a2b3c;
    --bs-card-bg:           #ffffff;
    --bs-card-border-color: rgba(0, 0, 0, 0.10);
    --bs-link-color:        #0072a3;
    --bs-link-hover-color:  #0d1e35;
    --bs-heading-color:     #0d1e35;
    --bs-border-color:      rgba(0, 0, 0, 0.12);
    --bs-alert-color:       #1a2b3c;
    --cf2m-muted:           rgba(0, 0, 0, 0.50);
}

/* Body */
[data-theme="light"] body {
    color: #1a2b3c;
    background-color: #c4dff0;
    background-image: none;
}

/* Textes généraux */
[data-theme="light"] small,
[data-theme="light"] .cf2m-muted-label { color: #6c757d; }
[data-theme="light"] .text-muted       { color: #6c757d !important; }
[data-theme="light"] a                 { color: #0072a3; }
[data-theme="light"] a:hover           { color: #0d1e35; }

/* Titres de section */
[data-theme="light"] .cf2m-section-title { color: var(--cf2m-navy); }
[data-theme="light"] .cf2m-section-label { color: var(--cf2m-cyan); }

/* Section formations accueil */
[data-theme="light"] #formations {
    background-image: none !important;
    background-color: #c4dff0 !important;
    border-top: 2px solid rgba(0, 100, 160, 0.20) !important;
    box-shadow: inset 0 4px 24px rgba(0, 80, 140, 0.08) !important;
}
[data-theme="light"] .page-home #formations .cf2m-section-label,
[data-theme="light"] .page-home #formations .cf2m-section-title { color: var(--cf2m-navy); }
[data-theme="light"] .page-home #formations .cf2m-section-title::after { background: var(--cf2m-cyan); }

/* Cards (toutes) */
[data-theme="light"] .cf2m-card,
[data-theme="light"] .page-home #formations .cf2m-card,
[data-theme="light"] body:not(.page-home):not(.page-login) .cf2m-card {
    background: #ffffff;
    border: 1px solid rgba(0, 60, 120, 0.10);
    box-shadow:
        0 2px 6px rgba(0, 30, 60, 0.07),
        0 8px 28px rgba(0, 30, 60, 0.11),
        0 1px 0 rgba(255, 255, 255, 1) inset;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
[data-theme="light"] .cf2m-card .card-text       { color: #4a6070; }
[data-theme="light"] .cf2m-card .btn-outline-secondary {
    background: #ffffff;
    border-color: rgba(0, 180, 216, 0.35);
    color: var(--cf2m-navy);
}
[data-theme="light"] .cf2m-card .btn-outline-secondary:hover {
    background: rgba(0, 180, 216, 0.08);
    border-color: var(--cf2m-cyan);
    color: var(--cf2m-navy);
}

/* Section partenaires */
[data-theme="light"] .cf2m-partners {
    background: linear-gradient(180deg, #ddeef5 0%, #c8e4f0 100%);
}
[data-theme="light"] .cf2m-partners .cf2m-section-title,
[data-theme="light"] .cf2m-partners .cf2m-section-label { color: var(--cf2m-navy); }
[data-theme="light"] .cf2m-partner-item {
    background: #ffffff;
    color: var(--cf2m-navy);
    border-color: rgba(0, 180, 216, 0.25);
    box-shadow: 0 1px 8px rgba(0,0,0,0.07);
}
[data-theme="light"] .cf2m-partner-item:hover { color: var(--cf2m-cyan); }

/* Breadcrumbs */
[data-theme="light"] body:not(.page-home):not(.page-login) .breadcrumb-item a   { color: #0d1e35; }
[data-theme="light"] body:not(.page-home):not(.page-login) .breadcrumb-item a:hover { color: var(--cf2m-cyan); }
[data-theme="light"] body:not(.page-home):not(.page-login) .breadcrumb-item.active { color: #6c757d; }
[data-theme="light"] body:not(.page-home):not(.page-login) .breadcrumb-item + .breadcrumb-item::before { color: #adb5bd; }
/* Hero works toujours sombre → breadcrumb reste blanc quel que soit le thème */
/* Hero works toujours sombre → tout le contenu du hero reste blanc */
[data-theme="light"] .cf2m-work-breadcrumb .breadcrumb-item a   { color: rgba(255, 255, 255, 0.85) !important; }
[data-theme="light"] .cf2m-work-breadcrumb .breadcrumb-item a:hover { color: var(--cf2m-cyan) !important; }
[data-theme="light"] .cf2m-work-breadcrumb .breadcrumb-item.active { color: rgba(255, 255, 255, 0.60) !important; }
[data-theme="light"] .cf2m-work-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, 0.45) !important; }
[data-theme="light"] .cf2m-work-title       { color: #ffffff !important; }
[data-theme="light"] .cf2m-work-meta-item   { color: rgba(255, 255, 255, 0.72) !important; }
[data-theme="light"] .cf2m-work-meta-item svg { color: rgba(255, 255, 255, 0.72) !important; }
[data-theme="light"] .cf2m-work-label       { color: var(--cf2m-cyan) !important; border-color: rgba(0, 180, 216, 0.40) !important; }

/* Contenu riche (SunEditor) */
[data-theme="light"] .cf2m-formation-description,
[data-theme="light"] .cf2m-page-content { color: #1a2b3c; }
[data-theme="light"] .cf2m-formation-description h1, [data-theme="light"] .cf2m-page-content h1,
[data-theme="light"] .cf2m-formation-description h2, [data-theme="light"] .cf2m-page-content h2,
[data-theme="light"] .cf2m-formation-description h3, [data-theme="light"] .cf2m-page-content h3,
[data-theme="light"] .cf2m-formation-description h4, [data-theme="light"] .cf2m-page-content h4,
[data-theme="light"] .cf2m-formation-description h5, [data-theme="light"] .cf2m-page-content h5,
[data-theme="light"] .cf2m-formation-description h6, [data-theme="light"] .cf2m-page-content h6 { color: #0d1e35; }
[data-theme="light"] .cf2m-formation-description ul,  [data-theme="light"] .cf2m-page-content ul,
[data-theme="light"] .cf2m-formation-description ol,  [data-theme="light"] .cf2m-page-content ol { color: #2a3f52; }
[data-theme="light"] .cf2m-formation-description strong, [data-theme="light"] .cf2m-page-content strong { color: #0d1e35; }
[data-theme="light"] .cf2m-formation-description em,    [data-theme="light"] .cf2m-page-content em    { color: var(--cf2m-cyan); }
[data-theme="light"] .cf2m-formation-description a,     [data-theme="light"] .cf2m-page-content a     { color: #0072a3; }
[data-theme="light"] .cf2m-formation-description a:hover,[data-theme="light"] .cf2m-page-content a:hover { color: #0d1e35; }

/* Works show */
[data-theme="light"] .cf2m-work-description-card {
    background: #ffffff;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
[data-theme="light"] .cf2m-work-description-body { color: #2a3f52; }
[data-theme="light"] .cf2m-work-sidebar-block {
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
[data-theme="light"] .cf2m-work-sidebar-title { color: #7a95aa; }

/* Bouton thème en light mode */
[data-theme="light"] .cf2m-theme-toggle {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

/* ── Light mode : corrections lisibilité ─────────────────────────────── */

/* Navbar + dropdowns : fond toujours sombre → texte toujours blanc */
[data-theme="light"] .cf2m-navbar .nav-link,
[data-theme="light"] .cf2m-navbar .nav-link:hover,
[data-theme="light"] .cf2m-navbar .nav-link.active,
[data-theme="light"] .cf2m-navbar a { color: rgba(255, 255, 255, 0.85) !important; }
[data-theme="light"] .cf2m-navbar .nav-link:hover,
[data-theme="light"] .cf2m-navbar .nav-link.active { color: var(--cf2m-white) !important; }

[data-theme="light"] .cf2m-btn-connexion { color: rgba(255,255,255,0.85); }
[data-theme="light"] .cf2m-user-dropdown-toggle { color: rgba(255,255,255,0.85); }

[data-theme="light"] .cf2m-dropdown,
[data-theme="light"] .cf2m-dropdown * { color: rgba(255, 255, 255, 0.82); }
[data-theme="light"] .cf2m-dropdown-item { color: rgba(255, 255, 255, 0.82); }
[data-theme="light"] .cf2m-dropdown-item:hover,
[data-theme="light"] .cf2m-dropdown-item:focus { color: var(--cf2m-cyan); }
[data-theme="light"] .cf2m-dropdown-all { color: var(--cf2m-cyan); }

/* Footer : fond toujours sombre → texte blanc */
[data-theme="light"] .cf2m-footer a,
[data-theme="light"] .cf2m-footer .cf2m-footer-link { color: rgba(255,255,255,0.55); }
[data-theme="light"] .cf2m-footer .cf2m-footer-link:hover { color: #ffffff !important; }
[data-theme="light"] .cf2m-footer .text-muted { color: rgba(255,255,255,0.55) !important; }

/* Liens dans les cartes de contenu (fond clair) */
[data-theme="light"] .cf2m-card a:not(.btn) { color: #0072a3; }
[data-theme="light"] .cf2m-card a:not(.btn):hover { color: #0d1e35; }
[data-theme="light"] .cf2m-works-link { color: var(--cf2m-cyan); }
[data-theme="light"] .cf2m-work-author-name    { color: #1a2b3c; }
[data-theme="light"] .cf2m-work-formation-link { color: #0072a3; }
[data-theme="light"] .cf2m-work-back-btn { color: var(--cf2m-cyan); border-color: rgba(0,180,216,0.4); }

/* Contact page : formulaire */
[data-theme="light"] label { color: #1a2b3c; }
[data-theme="light"] .cf2m-input {
    background: #ffffff;
    color: #1a2b3c;
    border-color: rgba(0, 0, 0, 0.18);
}
[data-theme="light"] .cf2m-input::placeholder { color: #9aacba; }
[data-theme="light"] .cf2m-input:focus {
    background: #ffffff;
    border-color: var(--cf2m-cyan);
    color: #1a2b3c;
}

/* Profil : labels de section */
[data-theme="light"] .cf2m-muted-label { color: #6c757d; }

/* Alertes Bootstrap : fond clair → texte sombre + restauration des couleurs Bootstrap */
[data-theme="light"] .alert-success {
    --bs-alert-color:        #0a3622;
    --bs-alert-bg:           #d1e7dd;
    --bs-alert-border-color: #badbcc;
}
[data-theme="light"] .alert-warning {
    --bs-alert-color:        #664d03;
    --bs-alert-bg:           #fff3cd;
    --bs-alert-border-color: #ffecb5;
}
[data-theme="light"] .alert-danger {
    --bs-alert-color:        #58151c;
    --bs-alert-bg:           #f8d7da;
    --bs-alert-border-color: #f5c2c7;
}
[data-theme="light"] .alert-info {
    --bs-alert-color:        #055160;
    --bs-alert-bg:           #cff4fc;
    --bs-alert-border-color: #b6effb;
}

/* Bouton thème : adapter si on veut (la navbar reste sombre, donc pas de changement) */
[data-theme="light"] .cf2m-theme-toggle:hover {
    background: rgba(0, 180, 216, 0.25);
    border-color: var(--cf2m-cyan);
    color: var(--cf2m-white);
}

/* Titres de section sur pages intérieures (spécificité identique à la règle dark) */
[data-theme="light"] body:not(.page-home):not(.page-login) .cf2m-section-title {
    color: var(--cf2m-navy);
}
[data-theme="light"] body:not(.page-home):not(.page-login) .cf2m-section-label {
    color: var(--cf2m-cyan);
}
[data-theme="light"] body:not(.page-home):not(.page-login) .text-muted {
    color: #6c757d !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   LIGHT MODE — Hero glassmorphisme & contrastes accueil
   ═══════════════════════════════════════════════════════════════════════ */

/* Hero : la photo est sur le body en dark mode (fixed), on la reporte sur la section en light */
[data-theme="light"] .cf2m-hero {
    background-image:
        linear-gradient(rgba(196, 223, 240, 0.08), rgba(196, 223, 240, 0.08)),
        url('/images/hero-bg.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
}

/* Overlay photo : allégé car le verre est maintenant blanc et opaque */
[data-theme="light"] .cf2m-hero::before {
    background: linear-gradient(
        110deg,
        rgba(5, 12, 28, 0.32) 0%,
        rgba(5, 12, 28, 0.18) 45%,
        rgba(5, 12, 28, 0.06) 100%
    );
}

/* Panel glassmorphisme : verre blanc opaque, ombre forte */
[data-theme="light"] .cf2m-hero-glass {
    background: rgba(255, 255, 255, 0.42);
    backdrop-filter: blur(22px) saturate(2.2) brightness(1.08);
    -webkit-backdrop-filter: blur(22px) saturate(2.2) brightness(1.08);
    border: 1px solid rgba(255, 255, 255, 0.70);
    border-bottom-color: rgba(180, 220, 255, 0.30);
    border-right-color: rgba(180, 220, 255, 0.20);
    box-shadow:
        0 4px 16px rgba(0, 20, 50, 0.10),
        0 16px 48px rgba(0, 20, 50, 0.16),
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 0 0 0.5px rgba(200, 230, 255, 0.40) inset;
}

/* Textes hero sur fond de verre blanc → navy */
[data-theme="light"] .cf2m-hero h1            { color: #0d1e35; text-shadow: 0 1px 4px rgba(255,255,255,0.60); }
[data-theme="light"] .cf2m-hero h1 em         { color: #0a6ea0; }
[data-theme="light"] .cf2m-hero .lead         { color: #1e3a52; text-shadow: 0 1px 3px rgba(255,255,255,0.50); }
[data-theme="light"] .cf2m-hero-stats .cf2m-stat-label { color: #3a5870; }
[data-theme="light"] .cf2m-hero-label         { color: #0a6ea0; }
[data-theme="light"] .cf2m-stat-value         { color: #0d5a8a; }

/* Lueur cyan du hero : couleur adoucie en light */
[data-theme="light"] .cf2m-hero::after {
    background: radial-gradient(circle, rgba(0, 180, 216, 0.08) 0%, transparent 65%);
}

/* Section partenaires : bord supérieur et ombre */
[data-theme="light"] .cf2m-partners {
    box-shadow: inset 0 4px 20px rgba(0, 80, 140, 0.07);
    border-top: 2px solid rgba(0, 100, 160, 0.12);
}

/* Partner items : ombre plus marquée */
[data-theme="light"] .cf2m-partner-item {
    box-shadow: 0 2px 10px rgba(0, 30, 60, 0.09), 0 1px 0 rgba(255,255,255,1) inset;
}

/* Works : ombre sur les blocs sidebar */
[data-theme="light"] .cf2m-work-sidebar-block {
    box-shadow: 0 2px 14px rgba(0, 30, 60, 0.10);
}
[data-theme="light"] .cf2m-work-description-card {
    box-shadow: 0 4px 24px rgba(0, 30, 60, 0.12);
}

/* ═══════════════════════════════════════════════════════════════════════
   LIGHT MODE — Page connexion
   ═══════════════════════════════════════════════════════════════════════ */

/* Fond de la section : remplace le #06101c par le bleu clair */
[data-theme="light"] .cf2m-login-section {
    background-color: #c4dff0;
    background-image:
        radial-gradient(ellipse 55% 50% at 10% 30%, rgba(0, 120, 200, 0.18) 0%, transparent 100%),
        radial-gradient(ellipse 40% 40% at 90% 70%, rgba(0, 180, 216, 0.12) 0%, transparent 100%),
        radial-gradient(ellipse 60% 60% at 50% 100%, rgba(0, 80, 160, 0.12) 0%, transparent 100%);
}

/* Blobs décoratifs : teintes claires */
[data-theme="light"] .cf2m-login-blob--tl {
    background: radial-gradient(circle, rgba(0, 180, 216, 0.18) 0%, transparent 70%);
}
[data-theme="light"] .cf2m-login-blob--br {
    background: radial-gradient(circle, rgba(0, 80, 160, 0.14) 0%, transparent 70%);
}

/* Carte : verre blanc opaque comme le hero glass */
[data-theme="light"] .cf2m-login-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.96);
    border-bottom-color: rgba(0, 40, 80, 0.10);
    box-shadow:
        0 6px 24px rgba(0, 20, 50, 0.14),
        0 20px 56px rgba(0, 20, 50, 0.18),
        0 1px 0 rgba(255, 255, 255, 1) inset;
}

/* Textes dans la carte */
[data-theme="light"] .cf2m-login-title    { color: #0d1e35; }
[data-theme="light"] .cf2m-login-subtitle { color: #4a6878; }
[data-theme="light"] .cf2m-login-label    { color: #2e4a62; }
[data-theme="light"] .cf2m-login-forgot   { color: #4a7090; }
[data-theme="light"] .cf2m-login-forgot:hover { color: var(--cf2m-cyan); }
[data-theme="light"] .cf2m-login-back a   { color: #2e4a62; }
[data-theme="light"] .cf2m-login-back a:hover { color: #0d1e35; }

/* Champs de saisie */
[data-theme="light"] .cf2m-login-input {
    background: rgba(0, 60, 120, 0.05);
    border-color: rgba(0, 60, 120, 0.18);
    color: #0d1e35;
}
[data-theme="light"] .cf2m-login-input::placeholder { color: rgba(0, 30, 60, 0.35); }
[data-theme="light"] .cf2m-login-input:focus {
    border-color: var(--cf2m-cyan);
    background: rgba(0, 180, 216, 0.06);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.18);
}

/* Logo connexion : version claire masquée par défaut (dark mode) */
.cf2m-login-logo--light { display: none; }
.cf2m-login-logo--dark  { display: inline-block; }

/* Logo connexion : en mode clair, on swap vers le logo foncé */
[data-theme="light"] .cf2m-login-logo--light {
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(0, 100, 160, 0.30));
}
[data-theme="light"] .cf2m-login-logo--dark { display: none; }

/* ─── Titres dans les card-header (pages et formations) : plus lumineux ─── */
/* Titres dans les card-header (pages et formations) : plus lumineux */
.cf2m-card .card-header h1,
.cf2m-card .card-header h2,
.cf2m-card .card-header h3,
.cf2m-card .card-header h4 {
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}
