/* Local font declarations */
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/cormorant-garamond-italic-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/cormorant-garamond-italic-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/cormorant-garamond-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/cormorant-garamond-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/cormorant-garamond-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/cormorant-garamond-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/cormorant-garamond-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/cormorant-garamond-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/cormorant-garamond-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/cormorant-garamond-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Parisienne';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/parisienne-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Parisienne';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/parisienne-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/source-sans-3-italic-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/source-sans-3-italic-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/fonts/source-sans-3-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/fonts/source-sans-3-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/source-sans-3-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/source-sans-3-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/source-sans-3-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/source-sans-3-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/source-sans-3-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/source-sans-3-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/source-sans-3-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/source-sans-3-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Custom styles - Bootstrap is imported via app.js */

/* Accessibility: hide elements explicitly marked aria-hidden="true" (visual only) */
[aria-hidden="true"] {
    display: none !important;
}

:root {
    --bs-body-bg: #f8f9fa;
    --navbar-height: 80px;
    --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-body: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--navbar-height);
}

/* Turbo page transitions */
main {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered nav item entrance */
@keyframes navItemIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-custom .nav>li:not(.nav-highlight-pill) {
    opacity: 0;
    animation: navItemIn 0.4s ease-out forwards;
    animation-delay: calc(0.1s + var(--nav-item-index, 0) * 0.06s);
}

.navbar-custom.nav-entered .nav>li:not(.nav-highlight-pill) {
    opacity: 1;
    animation: none;
}

/* Turbo loading state */
html.turbo-loading main {
    opacity: 0.7;
    transition: opacity 0.2s ease-out;
}

.navbar-custom {
    height: var(--navbar-height);
}

/* Color Picker (Pickr) */
.color-picker-btn {
    transition: box-shadow 0.2s ease;
    background-color: #ffffff;
}

.color-picker-btn:hover {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.pcr-app {
    z-index: 10000;
}

/* Admin sidebar */
.admin-sidebar {
    min-height: 100vh;
    background-color: #212529;
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Admin button resets — prevent v2.css pill styles from leaking */
.admin-sidebar~main .btn {
    border-radius: 0.375rem;
    font-weight: 500;
    box-shadow: none;
    transform: none;
}

.admin-sidebar~main .btn-primary {
    background: var(--bs-btn-bg, #0d6efd);
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.admin-sidebar~main .btn-primary:hover {
    transform: none;
    box-shadow: none;
}

.admin-sidebar~main .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
}

/* Admin tables: prevent action buttons from wrapping */
.admin-sidebar~main table td:last-child {
    white-space: nowrap;
}

/* Admin sticky header */
.admin-sticky-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    margin: -1rem -1rem 1rem -1rem;
}

/* Front menu */
.navbar-brand {
    font-weight: 600;
}

/* Block styles */
.block-header {
    min-height: 400px;
    background-size: cover;
    background-position: center;
}

.block-mini {
    min-height: 200px;
}

.block-grand {
    min-height: 500px;
}

/* Drag and drop for block ordering */
.block-item {
    cursor: grab;
    transition: all 0.2s ease;
}

.block-item:active {
    cursor: grabbing;
}

.block-item.dragging {
    opacity: 0.5;
    background-color: #e9ecef;
}

.block-item.drag-over {
    border-top: 3px solid #0d6efd;
    padding-top: calc(0.5rem - 3px);
}

.drag-handle {
    font-size: 1.2rem;
    user-select: none;
}

/* Sortable table rows */
.sortable-row {
    cursor: grab;
    transition: all 0.2s ease;
}

.sortable-row:active {
    cursor: grabbing;
}

.sortable-row.dragging {
    opacity: 0.5;
    background-color: #e9ecef;
}

.sortable-row.drag-over {
    border-top: 3px solid #0d6efd;
}

/* =========================================
   Redesign Theme Variables & Styles
   ========================================= */
:root {
    /* Base Colors - Refined Medical Warmth */
    --bs-body-bg: #FAFAF7;
    --theme-primary: #1E3F8B;
    /* Logo Dark Blue */
    --theme-secondary: #E8DDD3;
    /* Soft Warm Beige */
    --theme-accent: #C4A882;
    /* Warm Copper Accent */
    --theme-text: #3A3A3A;
    /* Deep Warm Charcoal */
    --theme-bg: #FAFAF7;
    --theme-bg-alt: #F5F0EB;

    /* Service Category Colors - Logo blue palette */
    --cat-conf-bg: #dce8fb;
    --cat-conf-border: #5BC5D5;

    --cat-coach-bg: #e0f2f5;
    --cat-coach-border: #3A6FD8;

    --cat-form-bg: #e8ecf8;
    --cat-form-border: #1E3F8B;
}

/* Dynamic category styles - uses CSS variables from getCategoriesStyles() */
.service-card[class*="categorie-"] {
    background: color-mix(in srgb, var(--categorie-bg) 25%, #ffffff 75%);
    border-bottom: 4px solid var(--categorie-border);
    border-top: 1px solid color-mix(in srgb, var(--categorie-bg) 40%, #ffffff 60%);
    color: var(--categorie-text);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card[class*="categorie-"] a {
    color: var(--categorie-link);
}

.service-card[class*="categorie-"]:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(30, 63, 139, 0.12);
}

/* Service card avec image de fond */
.service-card.has-bg-image {
    position: relative;
    overflow: hidden;
}

.service-card.has-bg-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--categorie-image);
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 0;
}

.service-card.has-bg-image:hover::before {
    opacity: 0.25;
    transform: scale(1.05);
}

.service-card.has-bg-image>* {
    position: relative;
    z-index: 1;
}


.formation-grid-item[class*="categorie-"] {
    border-left: 5px solid color-mix(in srgb, var(--categorie-border), #ffffff 40%);
    background-color: #ffffff;
    background-image: linear-gradient(90deg,
            var(--categorie-bg) 0%,
            var(--categorie-bg) 15%,
            color-mix(in srgb, var(--categorie-bg), #ffffff 40%) 20%,
            #ffffff 25%);
    background-size: 200% 100%;
    background-position: 100% 50%;
    background-repeat: no-repeat;
    transition: all 0.3s ease-out;
    transition: background-position 0.4s ease;
    opacity: 0.85;
}

.formation-grid-item[class*="categorie-"] strong {
    color: var(--categorie-text);
}

.formation-grid-item[class*="categorie-"]:hover {
    opacity: 1;
    box-shadow: 0 6px 16px rgba(139, 125, 107, 0.12);
    transform: translateY(-2px);
    transition: all 0.3s ease-in;
}

body {
    color: var(--theme-text);
    font-family: var(--font-body);
}

/* Iframe block: take remaining viewport height (like hero) */
.iframe-block {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.iframe-block__frame {
    width: 100%;
    flex: 1;
    border: 0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--theme-primary);
    font-weight: 600;
}

/* Formation detail: sticky breadcrumb + sidebar */
.formation-breadcrumb {
    position: sticky;
    top: var(--navbar-height, 60px);
    z-index: 1020;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.formation-sidebar {
    position: sticky;
    top: calc(var(--navbar-height, 60px) + 50px);
}

/* Navbar overrides */
.navbar-custom {
    background-color: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: background-color 0.35s ease, box-shadow 0.35s ease, padding 0.2s ease;
}

/* Center nav items across full width, ignoring the logo */
@media (min-width: 992px) {
    .navbar-custom>.container {
        position: relative;
    }

    .navbar-custom>.container>.col-md-3 {
        position: absolute;
        left: calc(var(--bs-gutter-x, 0.75rem) * 0.5);
        z-index: 1;
    }
}

.navbar-custom.scrolled {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    background-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0.5px 0 rgba(0, 0, 0, 0.12);
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(1px)) {
    .navbar-custom {
        background-color: rgba(255, 255, 255, 0.96);
    }

    .navbar-custom.scrolled {
        background-color: #ffffff;
    }
}

.navbar-custom img {
    /* Le logo suit proportionnellement la hauteur de la navbar (50% de 80px = 40px, 50% de 60px = 30px) */
    height: calc(var(--navbar-height) *0.9);
    width: auto;
    /* Pas de transition sur la hauteur car elle est pilotée par JS via --navbar-height */
}



.navbar-custom .nav-link {
    color: var(--theme-text) !important;
    font-weight: 500;
    position: relative;
}

/* Effet de barre animée uniquement pour les liens directs (pas les toggles de dropdown) */
.navbar-custom .nav-link:not(.dropdown-toggle):not(.dropdown-toggle-split)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(135deg, #5BC5D5, #1E3F8B);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    will-change: opacity;
}

.navbar-custom .nav-link.active,
.navbar-custom .nav-link.current,
.navbar-custom .nav-link:hover {
    color: var(--theme-primary) !important;
}

.navbar-custom .nav-link:not(.dropdown-toggle):not(.dropdown-toggle-split):hover::after,
.navbar-custom .nav-link:not(.dropdown-toggle):not(.dropdown-toggle-split).current::after,
.navbar-custom .nav-link:not(.dropdown-toggle):not(.dropdown-toggle-split).active::after {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

/* Fadeout rapide de l'élément actif quand on survole un autre */
.navbar-custom .nav:hover .nav-link:not(.dropdown-toggle):not(.dropdown-toggle-split).current:not(:hover)::after,
.navbar-custom .nav:hover .nav-link:not(.dropdown-toggle):not(.dropdown-toggle-split).active:not(:hover)::after {
    opacity: 0;
    transition: opacity 0.15s ease-out;
}

/* ---- Moving Highlight Pill ---- */

/* Mobile: opaque navbar, stack nav items, hide pill */
@media (max-width: 991.98px) {
    .navbar-custom {
        background-color: rgba(255, 255, 255, 0.96);
    }

    .navbar-custom .nav {
        flex-direction: column;
        align-items: stretch;
    }

    .navbar-custom .nav>.nav-highlight-pill {
        display: none;
    }
}

.navbar-custom .nav {
    position: relative;
}

.navbar-custom .nav>.nav-highlight-pill {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(135deg, #5BC5D5, #1E3F8B);
    border-radius: 1px;
    opacity: 0;
    pointer-events: none;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.2s ease;
    will-change: left, width, opacity;
    z-index: 10;
    list-style: none;
}

#navbarNav .toRight {
    margin-left: auto;
}

.softWhiteBg {
    background-color: rgba(250, 250, 247, 0.92);
}

.softBlackBg {
    background-color: rgba(0, 0, 0, 0.88);
}

.softBg {
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--categorie-bg, var(--theme-primary));
    border-left-width: 5px;
    border-radius: 10px;
    padding: 10px;
}

/* Dropdowns: styling and animations */
.navbar-custom .dropdown-menu {
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
    pointer-events: none;
    margin-top: 0;
    background-color: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(139, 125, 107, 0.1);
    border-radius: 14px;
}

.navbar-custom .dropdown-menu.show,
.navbar-custom .nav-item.dropdown:hover>.dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    display: block;
}

.navbar-custom .nav-item.dropdown:hover li {
    background-color: white;
}

.navbar-custom .dropdown-item {
    padding: 0.5rem 1rem;
    transition: background-color 0.3s ease-out, color 0.3s ease-out;
}

.navbar-custom .dropdown-item:hover,
.navbar-custom .dropdown-item:focus {
    background-color: var(--theme-primary);
    color: white !important;
}

.navbar-custom .dropdown-item.active {
    background-color: rgba(var(--theme-primary-rgb, 13, 110, 253), 0.1);
    color: var(--theme-primary) !important;
}

/* Dropdowns: open on hover (desktop only) */
@media (hover: hover) and (pointer: fine) {
    .navbar-custom .nav-item.dropdown:hover>.dropdown-menu {
        display: block;
    }

    .navbar-custom .nav-item.dropdown:hover .dropdown-toggle,
    .navbar-custom .nav-item.dropdown:hover .dropdown-toggle-split {
        color: var(--theme-primary) !important;
    }

    /* Hide individual link underlines on desktop -- the pill replaces them */
    .navbar-custom .nav-link:not(.dropdown-toggle):not(.dropdown-toggle-split)::after {
        display: none;
    }

    .navbar-custom .nav>.nav-highlight-pill.visible {
        opacity: 1;
    }

    /* Resting state: subtle persistent indicator for current page */
    .navbar-custom .nav>.nav-highlight-pill.visible.resting {
        opacity: 0.35;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
            width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.4s ease;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 4rem;
    overflow: hidden;
}

.hero-wrapper {
    width: 100%;
    padding: 0 5%;
}

.hero-overlay {
    background: rgba(255, 255, 255, 0.88);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(139, 125, 107, 0.1);
}

/* Split layout: hero text + formations panel side by side */
.hero-wrapper--split {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.hero-wrapper--split .hero-overlay {
    flex: 1;
    min-width: 0;
}

.hero-wrapper--split .hero-formations {
    margin-top: -20vh;
}

/* Hero Formations Panel (separate block) */
.hero-formations {
    flex: 0 0 420px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 18px;
    padding: 2rem 2.25rem;
    box-shadow: 0 8px 32px rgba(139, 125, 107, 0.18);
    max-height: 80vh;
    overflow-y: auto;
    border-top: 3px solid var(--color-primary, #5B8A8A);
}

.hero-formations__heading {
    font-family: var(--font-display, Georgia, serif);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-primary-dark, #4A7070);
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-primary-light, #8AB5B0);
}

.hero-formations__list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-formations__item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--categorie-bg, #f0f4f8) 20%, #ffffff 80%);
    border-left: 3px solid var(--categorie-bg, var(--color-primary, #5B8A8A));
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.15s ease, background 0.2s ease;
}

.hero-formations__item:hover {
    box-shadow: 0 3px 14px rgba(139, 125, 107, 0.14);
    transform: translateX(3px);
    text-decoration: none;
    color: inherit;
    background: color-mix(in srgb, var(--categorie-bg, #f0f4f8) 35%, #ffffff 65%);
}

.hero-formations__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    min-width: 2.75rem;
    flex-shrink: 0;
}

.hero-formations__day {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--categorie-text, var(--color-primary-dark, #4A7070));
}

.hero-formations__month {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--categorie-text, #6c757d);
}

.hero-formations__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hero-formations__title {
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.3;
    color: var(--color-text, #3A3A3A);
}

.hero-formations__meta {
    font-size: 0.8rem;
    color: var(--color-dark-gray, #7A7067);
    margin-top: 0.2rem;
}

.hero-formations__more {
    display: block;
    text-align: center;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary, #5B8A8A);
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.hero-formations__more:hover {
    background: rgba(91, 138, 138, 0.1);
    color: var(--color-primary-dark, #4A7070);
    text-decoration: none;
}

/* Responsive: stack on smaller screens */
@media (max-width: 991px) {
    .hero-wrapper--split {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-formations {
        flex: none;
        max-height: 50vh;
    }

    .hero-wrapper--split .hero-formations {
        margin-top: 0;
    }
}

/* Service Cards */
.service-card {
    border: none;
    border-radius: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(139, 125, 107, 0.06);
}

.service-card:hover {
    box-shadow: 0 6px 20px rgba(139, 125, 107, 0.12);
}

.service-title {
    padding: 1.5rem;
    font-size: 1.25rem;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.service-title i {
    font-size: 3rem;
    display: block;
}

/* Grid Items */
.formation-grid-item {
    border-radius: 14px;
    padding: 1.5rem;
    height: 100%;
    border: 1px solid rgba(139, 125, 107, 0.06);
    transition: background-position 0.4s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(139, 125, 107, 0.06);
}

.formation-grid-item:hover {
    box-shadow: 0 6px 16px rgba(139, 125, 107, 0.12);
}

/* Trust Section */
.trust-section {
    position: relative;
    margin: 5rem 0;
    overflow: hidden;
}

/* Trust Cards - Synergy layout with overlapping center */
.trust-card {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
    overflow: visible;
}

/* Gradient top border via pseudo-element (works with border-radius) */
.trust-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #5BC5D5, #1E3F8B);
    border-radius: 1rem 1rem 0 0;
    z-index: 1;
}

.trust-card:hover {
    box-shadow: 0 8px 24px rgba(30, 63, 139, 0.12) !important;
    transform: translateY(-4px);
}

/* Remove stagger offset on side columns */
.block-trust-section .col-lg-4:not(.order-lg-0) {
    margin-top: 0;
}

/* Tighter gap for overlap effect */
.block-trust-section .row.g-4 {
    --bs-gutter-x: 0.5rem;
}

/* Center card (moi) - overlapping emphasis */
.trust-card-moi {
    background: linear-gradient(135deg, #f5f8ff 0%, #ffffff 100%);
    box-shadow: 0 8px 32px rgba(30, 63, 139, 0.14) !important;
    border: none;
    z-index: 2;
}

.trust-card-moi::before {
    height: 4px;
}

/* Overflow the center card onto side cards */
@media (min-width: 992px) {
    .block-trust-section .col-lg-6 {
        z-index: 2;
    }

    .trust-card-moi {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        padding-left: 2.5rem;
        padding-right: 2.5rem;
        border-radius: 1.5rem !important;
        min-height: 100%;
    }

    /* Side cards: inset to accommodate overlap */
    .trust-card-confiance,
    .trust-card-partenaire {
        margin-top: 1.5rem;
    }

    /* Gradient connector lines from center card */
    .trust-card-moi::after {
        content: '';
        position: absolute;
        top: 50%;
        left: -1.5rem;
        right: -1.5rem;
        height: 2px;
        background: linear-gradient(90deg, #5BC5D5, #1E3F8B, #5BC5D5);
        z-index: -1;
        transform: translateY(-50%);
    }
}

/* Side cards - subtle styling */
.trust-card:not(.trust-card-moi) {
    top: 0;
    position: relative;
    z-index: 1;
}

.trust-card:not(.trust-card-moi):hover {
    z-index: 3;
}

.trust-card-confiance {
    right: 0;
}

.trust-card-partenaire {
    left: 0;
}

.trust-item {
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    background: #fff;
    border: 1px solid #F0EBE3;
    border-radius: 14px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
}

@media (min-width: 992px) {
    .trust-item {
        border: 1px solid #F0EBE3;
        border-radius: 14px;
        margin: 0;
        background: #fff;
    }
}

/* CTA Section */
.cta-section {
    background-color: var(--theme-primary);
    color: white;
    padding: 4rem 0;
    text-align: center;
    border: none;
}

.cta-section h2 {
    color: white;
}

/* Custom Footer */
.footer-custom {
    background-color: #FAFAF7;
    border-top: 2px solid #E8DDD3;
    color: var(--theme-text);
}

/* Agenda Item Layout */
.agenda-item {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    padding: 0 !important;
    overflow: hidden;
    border: none;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(139, 125, 107, 0.06);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.agenda-item:hover {
    box-shadow: 0 6px 16px rgba(139, 125, 107, 0.1);
    transform: translateY(-2px);
}

.agenda-item__date-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    min-width: 80px;
    background: color-mix(in srgb, var(--categorie-bg, #f8f9fa) 70%, #ffffff 30%);
    border-right: 3px solid color-mix(in srgb, var(--categorie-border, #dee2e6) 50%, rgba(255, 255, 255, 0.65) 50%);
    color: var(--categorie-text, var(--theme-text));
}

.agenda-item__icon {
    font-size: 1.8rem;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.agenda-item__day {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.agenda-item__month {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.agenda-item__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 1rem 1rem 0;
    flex: 1;
}

.agenda-item__title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--theme-text);
    margin-bottom: 0.25rem;
}

.agenda-item__meta {
    font-size: 0.9rem;
    color: #6c757d;
}

.agenda-item__location {
    font-size: 0.9rem;
    color: #6c757d;
}

#formations {
    background-size: cover;
}

#aPropos {
    min-height: 800px;
    background-size: cover;
}

/* =========================================
   Scroll FX - Apple-style reveal animations
   ========================================= */

[data-scroll-fx]:not(.sfx-visible):not([data-scroll-fx="parallax"]) {
    opacity: 0;
    will-change: opacity, transform;
}

[data-scroll-fx="fade-up"]:not(.sfx-visible) {
    transform: translateY(20px);
}

[data-scroll-fx="fade-left"]:not(.sfx-visible) {
    transform: translateX(25px);
}

[data-scroll-fx="fade-right"]:not(.sfx-visible) {
    transform: translateX(-25px);
}

[data-scroll-fx="scale-in"]:not(.sfx-visible) {
    transform: scale(0.95);
}

.sfx-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: var(--sfx-delay, 0ms);
}

[data-scroll-fx="parallax"] {
    will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
    [data-scroll-fx]:not(.sfx-visible) {
        opacity: 1;
        transform: none;
    }

    .sfx-visible {
        transition: none;
    }

    [data-scroll-fx="parallax"] {
        transform: none !important;
    }
}

@media (max-width: 767.98px) {
    [data-scroll-fx="fade-up"]:not(.sfx-visible) {
        transform: translateY(15px);
    }

    [data-scroll-fx="fade-left"]:not(.sfx-visible) {
        transform: translateX(18px);
    }

    [data-scroll-fx="fade-right"]:not(.sfx-visible) {
        transform: translateX(-18px);
    }
}

/* =========================================
   Mobile Responsive Enhancements
   ========================================= */

/* ---- Mobile Navbar ---- */
@media (max-width: 991.98px) {
    .navbar-custom {
        height: auto;
        min-height: 60px;
        padding: 0.5rem 0;
    }

    .navbar-custom img {
        height: 48px;
    }

    .navbar-custom .navbar-toggler {
        border: none;
        padding: 0.4rem 0.6rem;
        border-radius: 10px;
        background: rgba(30, 63, 139, 0.06);
        transition: background 0.2s ease;
    }

    .navbar-custom .navbar-toggler:focus {
        box-shadow: none;
        background: rgba(30, 63, 139, 0.1);
    }

    .navbar-custom .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-radius: 0 0 16px 16px;
        margin: 0.5rem -0.75rem 0;
        padding: 0.75rem 1.25rem 1.25rem;
        box-shadow: 0 8px 32px rgba(30, 63, 139, 0.08);
    }

    .navbar-custom .nav {
        gap: 0.15rem;
    }

    .navbar-custom .nav>li {
        opacity: 1 !important;
        animation: none !important;
    }

    .navbar-custom .nav-link {
        padding: 0.75rem 1rem !important;
        border-radius: 10px;
        font-size: 1.05rem;
        transition: background 0.2s ease;
    }

    .navbar-custom .nav-link:hover,
    .navbar-custom .nav-link.active,
    .navbar-custom .nav-link.current {
        background: rgba(30, 63, 139, 0.06);
    }

    .navbar-custom .nav-link:not(.dropdown-toggle):not(.dropdown-toggle-split)::after {
        display: none;
    }

    .navbar-custom .dropdown-menu {
        background: rgba(245, 240, 235, 0.7);
        border: none;
        border-radius: 10px;
        box-shadow: none;
        padding: 0.25rem 0 0.25rem 1rem;
        margin-top: 0;
    }

    .navbar-custom .dropdown-item {
        border-radius: 8px;
        padding: 0.5rem 0.75rem;
        font-size: 0.95rem;
    }
}

/* ---- Mobile Hero ---- */
@media (max-width: 767.98px) {
    .hero-section {
        min-height: auto !important;
        padding: 2rem 0;
        margin-bottom: 0;
    }

    .hero-wrapper {
        padding: 0 1rem;
    }

    .hero-overlay {
        padding: 2rem 1.5rem;
        border-radius: 14px;
    }

    .hero-overlay .display-4 {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .hero-overlay .gradient-text {
        font-size: 1.35rem;
    }

    .hero-overlay .lead {
        font-size: 0.95rem;
    }

    .hero-overlay .btn-lg {
        font-size: 0.95rem;
        padding: 0.65rem 1.75rem;
    }

    /* Hero formations panel on mobile */
    .hero-formations {
        border-radius: 14px;
        padding: 1.25rem 1rem;
        max-height: none;
        box-shadow: 0 4px 20px rgba(139, 125, 107, 0.12);
    }

    .hero-formations__heading {
        font-size: 1.15rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }

    .hero-formations__list {
        gap: 0.6rem;
    }

    .hero-formations__item {
        padding: 0.75rem;
        gap: 0.75rem;
        border-radius: 10px;
    }

    .hero-formations__day {
        font-size: 1.2rem;
    }

    .hero-formations__title {
        font-size: 0.85rem;
    }

    .hero-formations__meta {
        font-size: 0.75rem;
    }

    .hero-formations__more {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* ---- Mobile Formations/Categories Section ---- */
@media (max-width: 767.98px) {
    #formations {
        min-height: auto !important;
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    #formations .softWhiteBg {
        padding: 1.5rem 1rem !important;
    }

    #formations .display-5 {
        font-size: 1.5rem;
    }

    #formations .lead {
        font-size: 0.95rem;
    }

    .service-card {
        border-radius: 14px;
    }

    .service-title {
        padding: 1.25rem 1rem;
        font-size: 1rem;
        letter-spacing: 0.5px;
    }

    .service-title i {
        font-size: 2.25rem;
    }

    .service-card .card-body {
        padding: 1rem;
        font-size: 0.9rem;
    }
}

/* ---- Mobile Agenda ---- */
@media (max-width: 767.98px) {
    #dates .h3 {
        font-size: 1.35rem;
    }

    .agenda-item {
        border-radius: 12px;
    }

    .agenda-item__date-block {
        min-width: 64px;
        padding: 0.75rem;
    }

    .agenda-item__icon {
        font-size: 1.4rem;
    }

    .agenda-item__day {
        font-size: 1.5rem;
    }

    .agenda-item__month {
        font-size: 0.75rem;
    }

    .agenda-item__content {
        padding: 0.75rem 0.75rem 0.75rem 0;
    }

    .agenda-item__title {
        font-size: 0.95rem;
    }

    .agenda-item__meta,
    .agenda-item__location {
        font-size: 0.8rem;
    }
}

/* ---- Mobile Trust / About Section ---- */
@media (max-width: 991.98px) {
    #aPropos {
        min-height: auto !important;
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .block-trust-section .row.g-4 {
        --bs-gutter-x: 1rem;
    }

    .trust-card {
        border-radius: 14px !important;
    }

    .trust-card-moi {
        margin-left: 0;
        margin-right: 0;
        order: -1;
    }

    .trust-card-confiance,
    .trust-card-partenaire {
        margin-top: 0;
    }
}

@media (max-width: 767.98px) {
    .trust-card {
        padding: 1.5rem !important;
    }

    .trust-card .h4,
    .trust-card .h5 {
        font-size: 1.1rem;
    }

    .trust-card-moi img[style*="120px"] {
        width: 90px !important;
        height: 90px !important;
    }

    .trust-card-moi .text-muted {
        font-size: 0.9rem;
    }

    .partenaire-item img[style*="120px"] {
        width: 90px !important;
        height: 90px !important;
    }
}

/* ---- Mobile Contact Section ---- */
@media (max-width: 767.98px) {
    .contact-section {
        padding: 2.5rem 0;
    }

    .contact-section .section-title {
        font-size: 1.5rem;
        text-align: center;
    }

    .contact-description {
        font-size: 0.95rem;
        text-align: center;
    }

    .contact-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
        flex-shrink: 0;
    }

    .contact-item strong {
        font-size: 1rem;
    }

    .contact-item p {
        font-size: 0.9rem;
    }

    .cta-rdv {
        padding: 1.25rem;
    }

    .cta-rdv h3 {
        font-size: 1.1rem;
    }

    .contact-form-container {
        padding: 1.25rem;
        border-radius: 14px;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
        /* Prevents iOS zoom on focus */
        padding: 0.65rem 0.85rem;
    }

    .contact-form>button[type="submit"],
    .contact-section .btn-primary.btn-large {
        width: 100%;
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
        text-align: center;
    }
}

/* ---- Mobile Footer ---- */
@media (max-width: 767.98px) {
    .footer-custom {
        padding: 1.5rem 0;
        font-size: 0.85rem;
    }

    .footer-custom p {
        line-height: 1.6;
    }
}

/* ---- Global Mobile Utilities ---- */
@media (max-width: 767.98px) {

    /* Smoother section transitions */
    section {
        scroll-margin-top: 60px;
    }

    /* Prevent horizontal overflow */
    .container {
        overflow-x: hidden;
    }

    /* Better touch targets */
    a.btn,
    button.btn,
    .btn-primary,
    .btn-secondary {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}
