.fr-form {
    --fr-bg: #fafaf7;
    --fr-paper: #ffffff;
    --fr-ink: #0f1419;
    --fr-ink-2: #3d4147;
    --fr-ink-3: #6b7079;
    --fr-line: #ebe9e2;
    --fr-line-2: #d8d5cc;
    --fr-coral: #d88751;
    --fr-coral-soft: #faeedd;
    --fr-coral-deep: #b96d3a;
    --fr-success: #2f8a4f;
    --fr-radius-sm: 8px;
    --fr-radius-md: 14px;
    --fr-radius-lg: 22px;
    --fr-radius-xl: 28px;
    --fr-shadow-sm: 0 1px 2px rgba(15, 20, 25, 0.04), 0 2px 6px rgba(15, 20, 25, 0.05);
    --fr-shadow-md: 0 6px 18px -6px rgba(15, 20, 25, 0.08), 0 10px 30px -10px rgba(15, 20, 25, 0.06);
    --fr-shadow-lg: 0 12px 36px -8px rgba(15, 20, 25, 0.14), 0 22px 60px -16px rgba(15, 20, 25, 0.08);

    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--fr-bg);
    color: var(--fr-ink);
    padding: 110px 0 80px;
    min-height: 100vh;
}
.fr-form * { box-sizing: border-box; }

/* Colle le wrapper sous le header fixe */
.site-main:has(> .fr-form),
.site-content:has(> .fr-form) {
    background: var(--fr-bg);
    padding-top: 0;
}

.fr-form-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2.5rem);
}

.fr-form-container .fs-breadcrumb,
.fr-form-container .breadcrumb {
    margin: 0 0 28px;
    font-size: 13px;
    color: var(--fr-ink-3);
}

/* ===== Layout 2 colonnes ===== */
.fr-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
}

@media (max-width: 1024px) {
    .fr-form-layout {
        grid-template-columns: minmax(0, 1fr) 360px;
        gap: 2rem;
    }
}

@media (max-width: 960px) {
    .fr-form-layout {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
    .fr-form-aside { order: -1; }
}

/* ===== Header éditorial ===== */
.fr-form-header { margin-bottom: 36px; }

/* ============================================================
   MINI-HERO — décliné du hero de /formations/ (palette coral)
   en plus contenu pour préserver la hiérarchie avec l'archive.
============================================================ */
.fr-form-hero {
    /* Espacement aligné sur le hero parent /formations/ : peu d'air en
       haut (déjà sous la nav), beaucoup en bas avant les stats. */
    padding: clamp(1rem, 2vw, 1.5rem) 0 clamp(2.5rem, 5vw, 4rem);
}
/* Le hero respire un peu plus large que le contenu pour rappeler
   le hero parent /formations/ (1560px), tout en restant plus
   contenu (le contenu page est à 1280px). */
.fr-form-hero .fr-form-container {
    max-width: 1400px;
}
.fr-form-hero-card {
    background: linear-gradient(120deg, #fff5ed 0%, #ffe9d4 100%);
    border-radius: 24px;
    padding: 2rem 2.5rem;
    overflow: hidden;
    position: relative;
}
.fr-form-hero-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: stretch;
}
.fr-form-hero-side {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
}
.fr-form-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1rem 0.625rem 1.25rem;
    background: transparent;
    color: var(--fs-text, #0f172a);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    border-bottom: 2px solid var(--fs-text, #0f172a);
    align-self: end;
    margin-bottom: 0.25rem;
    transition: gap 160ms ease, color 160ms ease;
}
.fr-form-hero-cta svg {
    width: 22px;
    height: auto;
    transition: transform 160ms ease;
}
.fr-form-hero-cta:hover {
    color: #ea580c;
    border-bottom-color: #ea580c;
    gap: 0.875rem;
}
.fr-form-hero-cta:hover svg { transform: translateX(2px); }
@media (max-width: 720px) {
    .fr-form-hero-content { grid-template-columns: 1fr; }
    .fr-form-hero-cta { align-self: start; margin-bottom: 0; }
    .fr-form-hero-side { align-items: flex-start; gap: 0.875rem; }
}
.fr-form-hero-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}
.fr-form-hero-titlerow + .fr-form-hero-lead {
    margin-top: 0.625rem;
}
.fr-form-hero-titlerow {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.fr-form-hero-sign {
    flex-shrink: 0;
    width: 56px;
    height: auto;
    display: block;
}
.fr-form-hero-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}
.fr-form-hero-pill {
    display: inline-flex;
    align-self: flex-start;
    padding: 0.25rem 0.75rem;
    background: #f97316;
    color: #fff;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: box-shadow 200ms ease, color 200ms ease;
}
.fr-form-hero-pill--link:hover {
    color: #fff;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18);
}
@media (max-width: 720px) {
    .fr-form-hero-sign { width: 44px; }
    .fr-form-hero-titlerow { gap: 0.75rem; }
}
.fr-form-crumbs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1.25rem;
    font-size: 0.8125rem;
    color: var(--fs-text-2, #475569);
    line-height: 1.2;
}
.fr-form-crumbs a {
    color: var(--fs-text-2, #475569);
    text-decoration: none;
    transition: color 160ms ease;
}
.fr-form-crumbs a:hover { color: var(--fs-text, #0f172a); }
.fr-form-crumbs span[aria-hidden] { color: var(--fs-text-3, #94a3b8); }
.fr-form-crumbs [aria-current] {
    color: var(--fs-text, #0f172a);
    font-weight: 600;
}
.fr-form-hero-pill {
    display: inline-flex;
    align-self: flex-start;
    padding: 0.25rem 0.75rem;
    background: #f97316;
    color: #fff;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.fr-form-hero-title {
    margin: 0;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: clamp(1.875rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--fs-text, #0f172a);
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.fr-form-hero-lead {
    margin: 0;
    font-size: 1rem;
    color: var(--fs-text-2, #475569);
    line-height: 1.6;
    max-width: 60ch;
}
@media (max-width: 720px) {
    .fr-form-hero-card { padding: 1.5rem 1.5rem; }
}

.fr-form-eyebrow {
    display: inline-block;
    padding: 6px 14px;
    background: var(--fr-coral-soft);
    color: var(--fr-coral-deep);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 18px;
}

.fr-form-title {
    font-family: 'DM Sans', 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: clamp(2rem, 4.2vw, 3.25rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0 0 18px;
    color: var(--fr-ink);
}

.fr-form-lead {
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    line-height: 1.55;
    color: var(--fr-ink-2);
    margin: 0 0 28px;
    max-width: 60ch;
}

.fr-form-stats {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-top: 1px solid var(--fr-line);
    border-bottom: 1px solid var(--fr-line);
    padding: 18px 0;
}
.fr-form-stats li {
    flex: 1 1 auto;
    min-width: 110px;
    padding: 0 18px;
    border-right: 1px solid var(--fr-line);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.fr-form-stats li:first-child { padding-left: 0; }
.fr-form-stats li:last-child { border-right: 0; }
.fr-form-stat-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fr-ink-3);
}
.fr-form-stat-value {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--fr-ink);
}

.fr-form-author {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
}
.fr-form-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--fr-coral-soft);
}
.fr-form-author-avatar--lg {
    width: 80px;
    height: 80px;
}
.fr-form-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.fr-form-author-meta { display: flex; flex-direction: column; gap: 2px; }
.fr-form-author-role {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fr-ink-3);
}
.fr-form-author-name {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--fr-ink);
}

/* ===== Tabs ===== */
.fr-form-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--fr-line);
    margin: 0 0 36px;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.fr-form-tabs::-webkit-scrollbar { display: none; }
.fr-form-tab {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 14px 4px;
    margin-right: 28px;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--fr-ink-3);
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: color 0.2s ease;
}
.fr-form-tab:hover { color: var(--fr-ink); }
.fr-form-tab.is-active {
    color: var(--fr-ink);
    font-weight: 600;
}
.fr-form-tab.is-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--fr-coral);
    border-radius: 2px 2px 0 0;
}

/* ===== Panels ===== */
.fr-form-panel { display: none; }
.fr-form-panel.is-active { display: block; }
.fr-form-panel > * + * { margin-top: 36px; }

.fr-form-h2 {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: clamp(1.5rem, 2.4vw, 1.875rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--fr-ink);
    margin: 0 0 18px;
}

.fr-form-prose {
    font-size: 16px;
    line-height: 1.7;
    color: var(--fr-ink-2);
}
.fr-form-prose p { margin: 0 0 16px; }
.fr-form-prose p:last-child { margin-bottom: 0; }
.fr-form-prose strong { color: var(--fr-ink); font-weight: 600; }
.fr-form-prose a {
    color: var(--fr-coral-deep);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.fr-form-prose img {
    max-width: 100%;
    height: auto;
    border-radius: var(--fr-radius-md);
    margin: 24px 0;
    display: block;
}
.fr-form-prose ul, .fr-form-prose ol {
    margin: 0 0 16px;
    padding-left: 22px;
}
.fr-form-prose li { margin-bottom: 8px; }

.fr-form-prose--callout {
    background: var(--fr-coral-soft);
    border-radius: var(--fr-radius-lg);
    padding: clamp(1.5rem, 3vw, 2rem);
    border: 1px solid rgba(216, 135, 81, 0.18);
}
.fr-form-prose--callout .fr-form-h2 { color: var(--fr-coral-deep); }

.fr-form-rich p { margin: 0 0 12px; }
.fr-form-rich p:last-child { margin-bottom: 0; }
.fr-form-rich ul, .fr-form-rich ol { padding-left: 22px; margin: 0 0 12px; }
.fr-form-rich li { margin-bottom: 6px; }

.fr-form-video {
    border-radius: var(--fr-radius-lg);
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
    margin-bottom: 36px;
}
.fr-form-video iframe,
.fr-form-video video,
.fr-form-video embed,
.fr-form-video object {
    width: 100% !important;
    height: 100% !important;
    border: 0;
    display: block;
}

.fr-form-author-bio {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: var(--fr-paper);
    border: 1px solid var(--fr-line);
    border-radius: var(--fr-radius-lg);
    padding: 24px;
}
.fr-form-author-name-lg {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--fr-ink);
}

/* ===== Liste programme ===== */
.fr-form-panel-lead {
    font-size: 15px;
    color: var(--fr-ink-3);
    margin: 0 0 24px;
}

.fr-form-courses {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.fr-form-course {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 18px 22px;
    background: var(--fr-paper);
    border: 1px solid var(--fr-line);
    border-radius: var(--fr-radius-md);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.fr-form-course:hover:not(.is-locked) {
    border-color: var(--fr-coral);
    transform: translateY(-1px);
    box-shadow: var(--fr-shadow-sm);
}
.fr-form-course.is-done {
    background: rgba(47, 138, 79, 0.04);
    border-color: rgba(47, 138, 79, 0.25);
}
.fr-form-course.is-locked { opacity: 0.65; }
.fr-form-course-num {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--fr-coral-deep);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--fr-coral-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.fr-form-course--quiz .fr-form-course-num {
    background: linear-gradient(135deg, var(--fr-coral), var(--fr-coral-deep));
    color: #fff;
}
.fr-form-course-body { min-width: 0; }
.fr-form-course-title {
    margin: 0 0 4px;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--fr-ink);
    line-height: 1.3;
}
.fr-form-course-title a {
    color: inherit;
    text-decoration: none;
}
.fr-form-course-title a:hover { color: var(--fr-coral-deep); }
.fr-form-course-meta {
    font-size: 13px;
    color: var(--fr-ink-3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.fr-form-course-status {
    font-size: 20px;
    color: var(--fr-ink-3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}
.fr-form-course.is-done .fr-form-course-status { color: var(--fr-success); }

.fr-form-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.fr-form-tag {
    display: inline-block;
    padding: 7px 14px;
    background: var(--fr-paper);
    border: 1px solid var(--fr-line);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--fr-ink-2);
    text-decoration: none;
    transition: all 0.2s ease;
}
.fr-form-tag:hover {
    background: var(--fr-coral-soft);
    border-color: var(--fr-coral);
    color: var(--fr-coral-deep);
}
.fr-form-tag--metier {
    background: var(--fr-coral-soft);
    border-color: rgba(216, 135, 81, 0.25);
    color: var(--fr-coral-deep);
}

.fr-form-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--fr-ink-3);
    background: var(--fr-paper);
    border: 1px dashed var(--fr-line-2);
    border-radius: var(--fr-radius-md);
}

/* ===== Sidebar / Card ===== */
.fr-form-aside {
    position: sticky;
    top: 100px;
    align-self: start;
}
@media (max-width: 960px) {
    .fr-form-aside {
        position: static;
        top: auto;
    }
}

.fr-form-card {
    background: var(--fr-paper);
    border: 1px solid var(--fr-line);
    border-radius: var(--fr-radius-xl);
    overflow: hidden;
    box-shadow: var(--fr-shadow-md);
}

.fr-form-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--fr-coral-soft);
    overflow: hidden;
}
.fr-form-card-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
}
.fr-form-card-media-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--fr-coral-soft), #f4dcbb);
    color: var(--fr-coral-deep);
    font-size: 64px;
}
.fr-form-card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(6px);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fr-coral-deep);
}

.fr-form-card-body {
    padding: clamp(1.25rem, 2vw, 1.75rem);
}

.fr-form-progress {
    background: var(--fr-coral-soft);
    border-radius: var(--fr-radius-md);
    padding: 14px 16px;
    margin-bottom: 18px;
}
.fr-form-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--fr-ink-2);
}
.fr-form-progress-head strong {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--fr-coral-deep);
}
.fr-form-progress-bar {
    height: 6px;
    background: rgba(216, 135, 81, 0.18);
    border-radius: 999px;
    overflow: hidden;
}
.fr-form-progress-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--fr-coral), var(--fr-coral-deep));
    border-radius: 999px;
    transition: width 0.6s ease;
}

.fr-form-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}
.fr-form-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 22px;
    width: 100%;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 14px;
    border: 0;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.fr-form-btn--primary {
    background: var(--fr-ink);
    color: #fff;
    box-shadow: 0 6px 18px -4px rgba(15, 20, 25, 0.25);
}
.fr-form-btn--primary:hover {
    background: var(--fr-coral-deep);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -6px rgba(185, 109, 58, 0.45);
    color: #fff;
}
.fr-form-btn--done {
    background: rgba(47, 138, 79, 0.1);
    color: var(--fr-success);
    cursor: default;
}
.fr-form-btn-link {
    display: inline-block;
    text-align: center;
    padding: 8px;
    font-size: 13px;
    color: var(--fr-ink-3);
    text-decoration: none;
}
.fr-form-btn-link:hover {
    color: var(--fr-coral-deep);
    text-decoration: underline;
}

.fr-form-specs {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--fr-line);
}
.fr-form-specs li {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--fr-line);
}
.fr-form-specs li:last-child { border-bottom: 0; }
.fr-form-spec-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--fr-coral-soft);
    color: var(--fr-coral-deep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.fr-form-spec-label {
    font-size: 14px;
    color: var(--fr-ink-2);
}
.fr-form-spec-value {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--fr-ink);
}

/* Petits écrans : sidebar compacte */
@media (max-width: 600px) {
    .fr-form { padding-top: 90px; }
    .fr-form-stats li { min-width: 100px; padding: 0 12px; }
    .fr-form-stats li:first-child { padding-left: 0; }
    .fr-form-course { grid-template-columns: 44px 1fr auto; padding: 14px 16px; gap: 12px; }
    .fr-form-course-num { width: 36px; height: 36px; }
    .fr-form-author-bio { flex-direction: column; gap: 14px; }
}
