:root {
    --bg: #050814;
    --bg-soft: #0c1225;
    --panel: rgba(16, 24, 49, .86);
    --panel-solid: #111a34;
    --border: rgba(255, 255, 255, .12);
    --text: #f7f4ee;
    --muted: #adb6cc;
    --gold: #e1bd65;
    --gold-2: #f4df9b;
    --violet: #8b5cf6;
    --violet-2: #c4a7ff;
    --green: #41c98a;
    --orange: #f0a04b;
    --red: #ef6b73;
    --shadow: 0 24px 70px rgba(0, 0, 0, .32);
    --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: radial-gradient(circle at 15% 8%, rgba(139, 92, 246, .18), transparent 32%),
                radial-gradient(circle at 88% 18%, rgba(225, 189, 101, .14), transparent 30%),
                var(--bg);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .28;
    background-image:
        radial-gradient(circle at 20% 20%, #fff 0 1px, transparent 1.5px),
        radial-gradient(circle at 75% 30%, #fff 0 1px, transparent 1.5px),
        radial-gradient(circle at 45% 70%, #fff 0 1px, transparent 1.5px);
    background-size: 150px 150px, 220px 220px, 260px 260px;
}

a { color: var(--gold-2); text-decoration: none; }
a:hover { color: #fff; }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; }
img, video, audio, iframe { max-width: 100%; }

.cosmos {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 0 45%, rgba(139,92,246,.04) 60%, transparent 78%);
    z-index: -1;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px clamp(18px, 4vw, 56px);
    background: rgba(5, 8, 20, .78);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(225,189,101,.55);
    border-radius: 50%;
    color: var(--gold);
    background: radial-gradient(circle, rgba(225,189,101,.18), transparent 68%);
    box-shadow: 0 0 28px rgba(225,189,101,.16);
    font-size: 23px;
}
.brand strong { display: block; font-family: Cinzel, serif; font-size: clamp(16px, 2vw, 21px); color: var(--gold-2); }
.brand small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .03em; }

.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a, .subnav a {
    padding: 9px 13px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}
.main-nav a:hover, .main-nav a.active, .subnav a:hover, .subnav a.active {
    color: var(--text);
    background: rgba(255,255,255,.08);
}
.nav-toggle { display: none; }

.page-shell { width: min(1220px, calc(100% - 32px)); margin: 0 auto; padding: 38px 0 80px; }
.page-heading { margin: 12px 0 28px; max-width: 850px; }
.page-heading h1 { margin: 4px 0 8px; font-family: Cinzel, serif; font-size: clamp(30px, 5vw, 52px); line-height: 1.12; }
.page-heading > p:last-child { color: var(--muted); max-width: 760px; }
.eyebrow { margin: 0; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }

.hero {
    min-height: calc(100vh - 76px);
    display: grid;
    align-items: center;
    padding: 70px 0;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(30px, 7vw, 90px); align-items: center; }
.hero h1 { margin: 12px 0 22px; font-family: Cinzel, serif; font-size: clamp(42px, 7vw, 84px); line-height: 1.02; }
.hero h1 span { display: block; color: var(--gold); }
.hero-copy { color: var(--muted); font-size: clamp(17px, 2vw, 21px); max-width: 680px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-card {
    position: relative;
    min-height: 470px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(225,189,101,.28);
    border-radius: 36px;
    background: radial-gradient(circle at 50% 45%, rgba(139,92,246,.34), transparent 28%),
                linear-gradient(145deg, rgba(225,189,101,.12), rgba(139,92,246,.08));
    box-shadow: var(--shadow);
}
.hero-card::before, .hero-card::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(225,189,101,.28);
    border-radius: 50%;
}
.hero-card::before { width: 280px; height: 280px; }
.hero-card::after { width: 190px; height: 190px; border-style: dashed; animation: spin 25s linear infinite; }
.sacred-symbol { position: relative; z-index: 1; color: var(--gold-2); font-family: Cinzel, serif; font-size: 90px; text-shadow: 0 0 40px rgba(225,189,101,.5); }
@keyframes spin { to { transform: rotate(360deg); } }

.panel {
    padding: clamp(20px, 3vw, 32px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}
.panel + .panel { margin-top: 22px; }
.panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 22px; }
.panel-header h2, .panel h2 { margin: 0; font-family: Cinzel, serif; }
.panel-header p { margin: 5px 0 0; color: var(--muted); }

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

.stat-card { padding: 22px; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,255,255,.035); }
.stat-card strong { display: block; font-size: clamp(27px, 4vw, 42px); line-height: 1; color: var(--gold-2); }
.stat-card span { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }

.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.course-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 340px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: linear-gradient(160deg, color-mix(in srgb, var(--course-color, #8b5cf6) 22%, #111a34), #0c1225 65%);
    box-shadow: var(--shadow);
    transition: transform .2s ease, border-color .2s ease;
}
.course-card:hover { transform: translateY(-5px); border-color: rgba(225,189,101,.48); }
.course-visual { min-height: 145px; display: grid; place-items: center; background: radial-gradient(circle, color-mix(in srgb, var(--course-color, #8b5cf6) 35%, transparent), transparent 68%); }
.course-visual img { width: 100%; height: 170px; object-fit: cover; }
.course-glyph { font-family: Cinzel, serif; font-size: 54px; color: var(--gold-2); }
.course-body { display: flex; flex-direction: column; flex: 1; padding: 22px; }
.course-body h2 { margin: 0 0 9px; font-family: Cinzel, serif; font-size: 21px; }
.course-body p { margin: 0; color: var(--muted); font-size: 14px; }
.course-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.course-actions { margin-top: auto; padding-top: 16px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid transparent; }
.badge-success { color: #b9f6d8; background: rgba(65,201,138,.12); border-color: rgba(65,201,138,.28); }
.badge-warning { color: #ffe0aa; background: rgba(240,160,75,.12); border-color: rgba(240,160,75,.28); }
.badge-danger { color: #ffc2c6; background: rgba(239,107,115,.12); border-color: rgba(239,107,115,.28); }
.badge-neutral { color: #d4d9e6; background: rgba(173,182,204,.11); border-color: rgba(173,182,204,.22); }

.button, button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 13px;
    color: #090d18;
    background: linear-gradient(135deg, var(--gold), var(--gold-2));
    font-weight: 800;
    box-shadow: 0 10px 26px rgba(225,189,101,.16);
}
.button:hover { color: #090d18; filter: brightness(1.05); }
.button-secondary { color: var(--text); background: rgba(255,255,255,.07); border-color: var(--border); box-shadow: none; }
.button-secondary:hover { color: #fff; background: rgba(255,255,255,.11); }
.button-violet { color: white; background: linear-gradient(135deg, #7552dc, #a982ff); }
.button-danger { color: white; background: rgba(239,107,115,.17); border-color: rgba(239,107,115,.36); box-shadow: none; }
.button-small { min-height: 36px; padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.button-full { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }

form { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.field { display: grid; gap: 7px; }
.field-full { grid-column: 1 / -1; }
label { font-weight: 700; font-size: 14px; }
.help { color: var(--muted); font-size: 12px; }
input, select, textarea {
    width: 100%;
    min-height: 45px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    color: var(--text);
    background: rgba(2, 6, 18, .7);
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: rgba(225,189,101,.62); box-shadow: 0 0 0 4px rgba(225,189,101,.08); }
input[type="checkbox"] { width: 18px; min-height: 18px; }
.checkbox-row { display: flex; align-items: center; gap: 9px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.searchbar { display: grid; grid-template-columns: minmax(220px,1fr) 180px auto; gap: 10px; margin-bottom: 20px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { color: var(--muted); background: rgba(255,255,255,.035); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
tr:last-child td { border-bottom: 0; }
td small { display: block; color: var(--muted); }

.alert { margin-bottom: 18px; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--panel-solid); }
.alert ul { margin: 8px 0 0; }
.alert-success { border-color: rgba(65,201,138,.35); }
.alert-warning { border-color: rgba(240,160,75,.4); }
.alert-danger { border-color: rgba(239,107,115,.4); }

.login-shell { min-height: calc(100vh - 180px); display: grid; place-items: center; padding: 30px 0; }
.login-card { width: min(480px, 100%); }
.login-card h1 { font-family: Cinzel, serif; font-size: 36px; margin: 0 0 8px; }
.login-card > p { color: var(--muted); margin: 0 0 24px; }
.login-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 18px; font-size: 14px; }

.subnav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 24px; padding: 7px; border: 1px solid var(--border); border-radius: 15px; background: rgba(255,255,255,.025); }
.empty-state { text-align: center; padding-block: 54px; }
.empty-state h1, .empty-state h2 { margin-bottom: 8px; }
.empty-state p { color: var(--muted); }

.progress { height: 9px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.09); }
.progress > span { display: block; height: 100%; width: var(--progress, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--gold)); }

.resource-list { display: grid; gap: 12px; }
.resource-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border: 1px solid var(--border); border-radius: 15px; background: rgba(255,255,255,.025); }
.resource-item h3 { margin: 0; font-size: 16px; }
.resource-item p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.resource-icon { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: rgba(139,92,246,.16); }
.resource-main { display: flex; align-items: center; gap: 12px; flex: 1; }

.legacy-frame { width: 100%; min-height: 850px; border: 1px solid var(--border); border-radius: 18px; background: #050814; }
.two-column { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 22px; align-items: start; }
.sticky-card { position: sticky; top: 98px; }

.site-footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; padding: 28px 20px 40px; color: var(--muted); font-size: 13px; }
.site-footer a { color: var(--muted); }

@media (max-width: 980px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .course-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .hero-grid, .two-column { grid-template-columns: 1fr; }
    .hero-card { min-height: 330px; }
    .sticky-card { position: static; }
}

@media (max-width: 760px) {
    .topbar { align-items: center; }
    .nav-toggle { display: inline-flex; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: rgba(255,255,255,.06); }
    .main-nav { display: none; position: absolute; top: 70px; left: 16px; right: 16px; flex-direction: column; align-items: stretch; padding: 12px; border: 1px solid var(--border); border-radius: 15px; background: #0a1021; box-shadow: var(--shadow); }
    .main-nav.open { display: flex; }
    .page-shell { width: min(100% - 22px, 1220px); padding-top: 25px; }
    .grid-2, .grid-3, .grid-4, .course-grid, .form-grid { grid-template-columns: 1fr; }
    .field-full { grid-column: auto; }
    .searchbar { grid-template-columns: 1fr; }
    .panel-header, .resource-item { flex-direction: column; align-items: stretch; }
    .hero { min-height: auto; padding: 45px 0; }
    .hero h1 { font-size: 44px; }
    .hero-card { min-height: 280px; }
    .legacy-frame { min-height: 680px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
//* ==========================================================================
   FORMATIONS — BLOCS BANNIÈRES COMPACTS
   ========================================================================== */

.training-banner-list,
.training-banner-list *,
.training-banner-list *::before,
.training-banner-list *::after {
    box-sizing: border-box;
}


/* Liste verticale des formations */

.training-banner-list {
    display: flex;
    flex-direction: column;

    width: 100%;
    min-width: 0;

    gap: 12px;
}


/* Bannière principale */

.training-banner {
    display: grid;

    grid-template-columns:
        88px
        minmax(0, 1fr)
        175px;

    align-items: stretch;

    width: 100%;
    min-width: 0;
    min-height: 92px;

    overflow: hidden;

    border:
        1px solid rgba(255, 255, 255, 0.12);

    border-left:
        4px solid var(--course-color, #8b5cf6);

    border-radius: 13px;

    background:
        linear-gradient(
            120deg,
            rgba(255, 255, 255, 0.055),
            rgba(255, 255, 255, 0.018)
        );

    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.16);

    transition:
        transform 160ms ease,
        border-color 160ms ease,
        background 160ms ease;
}

.training-banner:hover {
    transform: translateY(-1px);

    border-color:
        rgba(255, 255, 255, 0.2);

    background:
        linear-gradient(
            120deg,
            rgba(255, 255, 255, 0.075),
            rgba(255, 255, 255, 0.025)
        );
}


/* ==========================================================================
   IMAGE À GAUCHE
   ========================================================================== */

.training-banner__image {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 0;
    min-height: 92px;

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            var(--course-color, #8b5cf6),
            rgba(10, 12, 30, 0.95)
        );
}

.training-banner__image img {
    position: absolute;
    inset: 0;

    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.training-banner__image span {
    position: relative;
    z-index: 1;

    font-size: 34px;

    color:
        rgba(255, 255, 255, 0.9);

    text-shadow:
        0 4px 16px rgba(0, 0, 0, 0.45);
}


/* ==========================================================================
   CONTENU CENTRAL
   ========================================================================== */

.training-banner__content {
    display: flex;
    flex-direction: column;
    justify-content: center;

    min-width: 0;

    padding:
        11px
        17px;
}

.training-banner__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    min-width: 0;

    gap: 14px;
}

.training-banner__heading h3 {
    min-width: 0;

    margin: 0;

    overflow: hidden;

    font-family:
        "Cinzel",
        serif;

    font-size: 1rem;
    line-height: 1.25;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.training-banner__badges {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;

    align-items: center;
    justify-content: flex-end;

    gap: 5px;
}

.training-banner__badges .badge {
    padding:
        4px
        7px;

    font-size: 0.64rem;
    line-height: 1.1;

    white-space: nowrap;
}

.training-banner__description {
    display: -webkit-box;

    margin:
        5px
        0
        7px;

    overflow: hidden;

    color:
        rgba(225, 229, 245, 0.72);

    font-size: 0.77rem;
    line-height: 1.3;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}


/* ==========================================================================
   PROGRESSION
   ========================================================================== */

.training-banner__progress-line {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto;

    align-items: center;

    width: 100%;
    min-width: 0;

    gap: 9px;
}

.training-banner__progress {
    position: relative;

    display: block;

    width: 100%;
    min-width: 0;
    height: 6px;

    overflow: hidden;

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.11);
}

.training-banner__progress span {
    position: absolute;

    top: 0;
    bottom: 0;
    left: 0;

    display: block;

    max-width: 100%;
    height: 100%;

    border-radius: inherit;

    background:
        var(--course-color, #8b5cf6);
}

.training-banner__progress-line strong {
    min-width: 38px;

    font-size: 0.7rem;
    line-height: 1;

    text-align: right;
}

.training-banner__date {
    display: block;

    margin-top: 4px;

    overflow: hidden;

    color:
        rgba(225, 229, 245, 0.62);

    font-size: 0.68rem;
    line-height: 1.2;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ==========================================================================
   BOUTON À DROITE
   ========================================================================== */

.training-banner__actions {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 0;

    padding:
        12px
        14px;

    border-left:
        1px solid rgba(255, 255, 255, 0.08);

    background:
        rgba(4, 7, 22, 0.17);
}

.training-banner__button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-width: 0;
    min-height: 35px;

    padding:
        8px
        10px;

    font-size: 0.72rem;
    line-height: 1.2;

    text-align: center;
}


/* ==========================================================================
   TABLETTES
   ========================================================================== */

@media (max-width: 850px) {

    .training-banner {
        grid-template-columns:
            78px
            minmax(0, 1fr);
    }

    .training-banner__actions {
        grid-column:
            1 / -1;

        justify-content: flex-end;

        padding:
            8px
            11px;

        border-top:
            1px solid rgba(255, 255, 255, 0.08);

        border-left: 0;
    }

    .training-banner__button {
        width: auto;
        min-width: 170px;
    }
}


/* ==========================================================================
   TÉLÉPHONES
   ========================================================================== */

@media (max-width: 600px) {

    .training-banner {
        grid-template-columns:
            70px
            minmax(0, 1fr);

        min-height: 88px;
    }

    .training-banner__image {
        min-height: 88px;
    }

    .training-banner__content {
        padding:
            10px
            12px;
    }

    .training-banner__heading {
        align-items: flex-start;
        flex-direction: column;

        gap: 5px;
    }

    .training-banner__heading h3 {
        width: 100%;

        font-size: 0.9rem;
    }

    .training-banner__badges {
        justify-content: flex-start;
    }

    .training-banner__description {
        display: none;
    }

    .training-banner__actions {
        justify-content: stretch;
    }

    .training-banner__button {
        width: 100%;
        min-width: 0;
    }
}