/* ==========================================================================
   Carnet équestre — standalone rider progress site (carnet-equestre.fr)
   "Prairie" theme: bright and friendly, deep meadow green, sage, sun yellow,
   big rounded cards and real horse photos. Bootstrap 5.3 underneath.
   Everything custom is prefixed ce-.
   ========================================================================== */

/* Self-hosted fonts (no third-party call), OFL licensed. */
@font-face {
    font-family: 'Bricolage Grotesque';
    font-style: normal;
    font-weight: 500 800;
    font-display: swap;
    src: url("../fonts/bricolage-latin-k0HXNf5.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: 'Bricolage Grotesque';
    font-style: normal;
    font-weight: 500 800;
    font-display: swap;
    src: url("../fonts/bricolage-latin-ext-HOPDPv1.woff2") format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: 'Figtree';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/figtree-latin-Dj9csJy.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: 'Figtree';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/figtree-latin-ext-iZEjIKs.woff2") format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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;
}

:root {
    --ce-ink: #24402a;
    --ce-ink-soft: #4c6047;
    --ce-muted: #6a7d64;
    --ce-green: #24402a;
    --ce-green-dark: #16291a;
    --ce-sage: #e8eedf;
    --ce-sage-2: #e4ebdc;
    --ce-sage-3: #f3f6ee;
    --ce-line: #e4ebdc;
    --ce-cream: #fbfaf5;
    --ce-paper: #ffffff;
    --ce-sun: #efc25a;
    --ce-sun-soft: #fdf1d3;
    --ce-sun-ink: #5b4510;
    --ce-coral: #d27a5c;
    --ce-coral-soft: #fbe3dc;
    --ce-coral-ink: #7a3320;
    --ce-radius: 32px;
    --ce-radius-sm: 22px;
    --ce-display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;

    --bs-body-font-family: 'Figtree', system-ui, sans-serif;
    --bs-body-color: var(--ce-ink);
    --bs-body-bg: var(--ce-cream);
    --bs-link-color: var(--ce-green);
    --bs-link-color-rgb: 36, 64, 42;
    --bs-link-hover-color: var(--ce-green-dark);
    --bs-link-hover-color-rgb: 22, 41, 26;
    --bs-border-color: var(--ce-line);
    --bs-secondary-color: #5d6f58;
    --bs-border-radius: 14px;
}

body.ce {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--ce-cream);
    line-height: 1.55;
}

.ce h1, .ce h2, .ce h3, .ce .ce-display { font-family: var(--ce-display); font-weight: 800; letter-spacing: -0.015em; }

/* Required asterisk (same rule as MaZone's app.css, which is not loaded here). */
.ce label.required::after,
.ce .form-label.required::after,
.ce legend.required::after { content: " *"; color: #c0392b; font-weight: 700; }
.ce .form-check-label.required::after { content: none; }
.ce legend.form-label,
.ce legend.col-form-label { font-size: 1rem; font-weight: 600; font-family: inherit; }

.ce .form-label { font-weight: 600; }
.ce .form-control,
.ce .form-select { border-radius: 16px; background-color: #fff; border-color: #d6e0cb; padding: .7rem 1rem; }
.ce .form-control:focus,
.ce .form-select:focus,
.ce .form-check-input:focus { border-color: var(--ce-green); box-shadow: 0 0 0 .22rem rgba(36, 64, 42, .18); }
.ce .form-check-input:checked { background-color: var(--ce-green); border-color: var(--ce-green); }
.ce .form-text { color: #5d6f58; }

/* ---------- Buttons ---------- */

.ce-btn-primary {
    --bs-btn-color: var(--ce-cream);
    --bs-btn-bg: var(--ce-green);
    --bs-btn-border-color: var(--ce-green);
    --bs-btn-hover-color: var(--ce-cream);
    --bs-btn-hover-bg: var(--ce-green-dark);
    --bs-btn-hover-border-color: var(--ce-green-dark);
    --bs-btn-active-bg: var(--ce-green-dark);
    --bs-btn-active-color: var(--ce-cream);
    border-radius: 999px;
    font-weight: 700;
    padding-inline: 1.4rem;
}
.ce-btn-sun {
    --bs-btn-color: var(--ce-ink);
    --bs-btn-bg: var(--ce-sun);
    --bs-btn-border-color: var(--ce-sun);
    --bs-btn-hover-color: var(--ce-ink);
    --bs-btn-hover-bg: #e5b23f;
    --bs-btn-hover-border-color: #e5b23f;
    --bs-btn-active-bg: #e5b23f;
    border-radius: 999px;
    font-weight: 700;
    padding-inline: 1.4rem;
}
.ce-btn-ghost {
    --bs-btn-color: var(--ce-ink);
    --bs-btn-bg: var(--ce-sage-2);
    --bs-btn-border-color: var(--ce-sage-2);
    --bs-btn-hover-bg: #d9e3cd;
    --bs-btn-hover-color: var(--ce-ink);
    --bs-btn-hover-border-color: #d9e3cd;
    border-radius: 999px;
    font-weight: 700;
    padding-inline: 1.4rem;
}
.ce .btn-outline-secondary { border-radius: 999px; }
.ce .btn-sm { border-radius: 999px; }

/* ---------- Navbar / footer ---------- */

.ce-navbar { background: rgba(251, 250, 245, .94); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; padding-block: .8rem; }
.ce-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ce-ink); font-family: var(--ce-display); font-weight: 800; font-size: 1.3rem; }
.ce-brand:hover { color: var(--ce-ink); }
.ce-brand__logo { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ce-sun); }
.ce-navbar .nav-link { color: var(--ce-ink); font-weight: 600; padding: .55rem 1rem !important; border-radius: 999px; }
.ce-navbar .nav-link:hover,
.ce-navbar .nav-link.active { background: var(--ce-sage-2); color: var(--ce-ink); }
.ce-navbar .dropdown-menu { border-radius: 20px; border-color: var(--ce-line); padding: .5rem; box-shadow: 0 16px 40px rgba(36, 64, 42, .14); }
.ce-navbar .dropdown-item { border-radius: 12px; padding: .55rem .8rem; }

.ce-main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 12px 16px 64px; }
.ce-flash { border-radius: 20px; border: 0; }
.ce .alert-success { background: #e1efd6; color: #1f4422; }
.ce .alert-info { background: var(--ce-sage); color: var(--ce-ink); }
.ce .alert-warning { background: var(--ce-sun-soft); color: var(--ce-sun-ink); }
.ce .alert-danger { background: var(--ce-coral-soft); color: var(--ce-coral-ink); }

.ce-footer { padding: 32px 16px 40px; color: var(--ce-ink-soft); font-size: .95rem; border-top: 1px solid var(--ce-line); }
.ce-footer__inner { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.ce-footer p { margin: 0 0 6px; }
.ce-footer__small { font-size: .82rem; color: #5d6f58; max-width: 720px; }

/* ---------- Generic blocks ---------- */

.ce-card { display: block; padding: 28px; border-radius: var(--ce-radius); background: var(--ce-paper); border: 1px solid var(--ce-line); color: inherit; }
a.ce-card { text-decoration: none; transition: transform .15s, box-shadow .15s; }
a.ce-card:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(36, 64, 42, .10); color: inherit; }
.ce-card--sage { background: var(--ce-sage); border-color: transparent; }
.ce-card--sun { background: var(--ce-sun-soft); border-color: #f4d78b; }
.ce-card--danger { background: #fff5f2; border-color: #f2cbbd; }
.ce-card__title { font-size: 1.35rem; margin-bottom: 14px; }

.ce-kicker { margin: 0 0 8px; color: #5f7449; font-weight: 700; font-size: .92rem; }
.ce-page-title { font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.04; margin-bottom: 14px; }
.ce-section-title { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 14px; }
.ce-page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.ce-lead { font-size: 1.1rem; color: var(--ce-ink-soft); }
.ce-form-card { max-width: 760px; }
.ce-prose { max-width: 880px; margin: 0 auto; }
.ce-prose h2 { font-size: 1.45rem; margin-top: 1.8rem; }
.ce-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 8px; }
.ce-toc a { padding: 6px 14px; border-radius: 999px; background: var(--ce-sage-2); text-decoration: none; font-weight: 600; font-size: .92rem; }
.ce-source { margin-top: 18px; font-size: .86rem; color: var(--ce-ink-soft); }
.ce-credit { position: absolute; right: 14px; top: 12px; margin: 0; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .38); font-size: .72rem; color: #fff; }

.ce-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 16px; font-size: .95rem; color: var(--ce-ink-soft); }
.ce-breadcrumb a { padding: 6px 14px; border-radius: 999px; background: var(--ce-paper); border: 1px solid var(--ce-line); text-decoration: none; font-weight: 600; }
.ce-breadcrumb span[aria-current] { font-weight: 700; color: var(--ce-ink); }

.ce-empty { text-align: center; max-width: 600px; margin: 24px auto; }
.ce-empty__img { width: 100%; height: 220px; object-fit: cover; border-radius: var(--ce-radius-sm); margin-bottom: 16px; }

.ce-pill { font-weight: 700; }
.ce .badge { border-radius: 999px; font-weight: 700; }
.ce-badge-target { background: var(--ce-sun); color: var(--ce-ink); }

/* ---------- Photo blocks ---------- */

.ce-photo-card { position: relative; overflow: hidden; border-radius: var(--ce-radius); min-height: 320px; background: var(--ce-sage); }
.ce-photo-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ce-photo-card__panel { position: relative; margin: 28px; max-width: 580px; padding: 34px; border-radius: 28px; background: rgba(251, 250, 245, .95); }

/* ---------- Home ---------- */

.ce-hero { display: flex; align-items: flex-end; min-height: 620px; margin-bottom: 64px; }
.ce-hero__title { margin: 0; font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1; letter-spacing: -0.03em; }
.ce-hero__lead { margin: 18px 0 26px; font-size: 1.1rem; line-height: 1.6; color: #42563f; }
.ce-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }

.ce-how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; margin-bottom: 80px; }
.ce-mosaic { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.ce-mosaic img { width: 100%; object-fit: cover; border-radius: 28px; }
.ce-mosaic__tall { height: 360px; }
.ce-mosaic__short { height: 172px; }
.ce-pos-hero { object-position: 50% 45%; }
.ce-section-title--xl { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.ce-steps3 { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.ce-steps3 li { display: flex; gap: 16px; }
.ce-steps3 h3 { margin: 0 0 4px; font-size: 1.2rem; }
.ce-steps3 p { margin: 0; color: var(--ce-ink-soft); }
.ce-num { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--ce-sun); font-family: var(--ce-display); font-weight: 800; font-size: 1.15rem; }

.ce-path { margin: 0 -16px 80px; padding: 72px 16px; background: var(--ce-sage); }
.ce-path__inner { max-width: 1200px; margin: 0 auto; }
.ce-path__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; position: relative; }
.ce-path__list::before { content: ""; position: absolute; left: 4%; right: 4%; top: 22px; height: 6px; border-radius: 999px; background: #cfdbc2; }
.ce-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.ce-step__name { font-weight: 700; font-size: .9rem; line-height: 1.2; }
.ce-step__cycle { font-size: .78rem; color: var(--ce-ink-soft); }

.ce-cta-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 48px; border-radius: 36px; background: var(--ce-sun); }
.ce-cta-band h2 { margin: 0; font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.05; }

/* ---------- Level medal (dot) ---------- */

.ce-shoe {
    --ce-size: 44px;
    position: relative;
    z-index: 1;
    display: inline-grid;
    place-items: center;
    flex: none;
    width: var(--ce-size);
    height: var(--ce-size);
    border-radius: 50%;
    background: var(--ce-cream);
    border: calc(var(--ce-size) * .12) solid var(--ce-step, var(--ce-green));
    color: #fff;
    font-size: calc(var(--ce-size) * .42);
}
.ce-shoe--done { background: var(--ce-step, var(--ce-green)); }

/* ---------- Gauges / ring ---------- */

.ce-gauge__label { display: flex; justify-content: space-between; gap: 8px; font-size: .92rem; color: var(--ce-ink-soft); margin-bottom: 6px; }
.ce-gauge__label strong { color: var(--ce-ink); }
.ce-gauge__track { height: 12px; border-radius: 999px; background: var(--ce-sage-2); overflow: hidden; }
.ce-gauge__fill { width: var(--ce-fill, 0%); height: 100%; border-radius: 999px; background: var(--ce-green); transition: width .4s ease; }
.ce-gauge--sun .ce-gauge__fill { background: #a77c12; }
.ce-ring { flex: none; }
.ce-stat { padding: 18px; border-radius: var(--ce-radius-sm); background: var(--ce-cream); }
.ce-stat__label { margin: 0; font-size: .85rem; font-weight: 700; color: #5f7449; }
.ce-stat__value { margin: 4px 0 10px; font-family: var(--ce-display); font-weight: 800; font-size: 1.8rem; line-height: 1; }

/* ---------- Auth pages ---------- */

.ce-auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: stretch; padding: 8px 0 24px; }
.ce-auth__photo { position: relative; border-radius: var(--ce-radius); overflow: hidden; min-height: 520px; }
.ce-auth__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ce-auth__card { align-self: center; width: 100%; max-width: 480px; margin: 0 auto; }
.ce-auth__links { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 18px; font-size: .95rem; }

/* ---------- Riders ---------- */

.ce-avatar { flex: none; border-radius: 50%; object-fit: cover; }
.ce-rider-switch { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.ce-rider-switch a { display: flex; align-items: center; gap: 10px; padding: 6px 18px 6px 6px; border-radius: 999px; background: var(--ce-paper); border: 1px solid var(--ce-line); text-decoration: none; font-weight: 700; color: var(--ce-ink); }
.ce-rider-switch a[aria-current] { background: var(--ce-green); color: var(--ce-cream); border-color: var(--ce-green); }
.ce-rider-switch .ce-rider-switch__add { padding: 12px 18px; border: 2px dashed #cfdbc2; background: transparent; }

.ce-rider-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.ce-card.ce-rider-card { padding: 0; overflow: hidden; }
.ce-rider-card__photo { display: block; width: 100%; height: 190px; object-fit: cover; }
.ce-rider-card__body { padding: 20px 22px 24px; }
.ce-rider-card__name { font-size: 1.6rem; margin: 0; }
.ce-rider-card__meta { margin: 2px 0 12px; font-size: .95rem; color: var(--ce-ink-soft); }
.ce-rider-card__target { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }

.ce-rider-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: stretch; margin-bottom: 24px; }
.ce-rider-hero__photo { min-height: 400px; display: flex; align-items: flex-end; }
.ce-rider-hero__name { position: relative; margin: 20px; padding: 18px 22px; border-radius: 24px; background: rgba(251, 250, 245, .95); flex: 1; }
.ce-rider-hero__name h1 { margin: 0; font-size: 2.6rem; line-height: 1; }
.ce-target { display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
.ce-target__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.ce-target__title { margin: 0; font-size: 2.6rem; line-height: 1; }
.ce-target__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ce-ready { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; background: #dff0d2; color: #1f4422; font-weight: 700; }

.ce-avatar-picker { display: flex; flex-wrap: wrap; gap: 12px; }
.ce-avatar-choice { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; border-radius: 22px; border: 2px solid var(--ce-line); background: #fff; cursor: pointer; font-size: .9rem; font-weight: 600; }
.ce-avatar-choice:has(input:checked) { border-color: var(--ce-green); background: var(--ce-sage); }
.ce-avatar-choice:has(input:focus-visible) { outline: 3px solid rgba(36, 64, 42, .35); }
.ce-avatar-choice img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }

.ce-two { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; align-items: start; }

.ce-trail { display: flex; flex-wrap: wrap; gap: 10px; }
.ce-trail__cycle { width: 100%; margin: 10px 0 0; font-size: .85rem; font-weight: 700; color: #5f7449; }
.ce-trail__step { display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border-radius: 999px; background: #f3f1ea; text-decoration: none; color: var(--ce-muted); font-weight: 700; font-size: .95rem; }
.ce-trail__step:hover { background: var(--ce-sage-2); color: var(--ce-ink); }
.ce-trail__step.is-done { background: var(--ce-sage-2); color: var(--ce-ink); }
.ce-trail__step.is-target { background: var(--ce-sun); color: var(--ce-ink); }
.ce-trail__body { display: flex; flex-direction: column; line-height: 1.2; }
.ce-trail__name { font-weight: 700; }
.ce-trail__meta { font-size: .78rem; font-weight: 600; opacity: .85; }
.ce-trail__chevron, .ce-trail__bar { display: none; }

.ce-attempts { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 10px; }
.ce-attempts__row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--ce-radius-sm); background: var(--ce-sage-3); }
.ce-attempts__score { display: grid; place-items: center; flex: none; width: 58px; height: 58px; border-radius: 50%; font-weight: 800; font-size: .95rem; }
.ce-attempts__score--good { background: var(--ce-green); color: var(--ce-cream); }
.ce-attempts__score--mid { background: var(--ce-sun); color: var(--ce-ink); }
.ce-attempts__score--low { background: var(--ce-coral-soft); color: var(--ce-coral-ink); }

/* ---------- Level / bilan ---------- */

.ce-level-head { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 28px; margin-bottom: 18px; border-radius: var(--ce-radius); background: var(--ce-sage); }
.ce-level-head__tagline { margin: 0; color: var(--ce-ink-soft); font-size: 1.05rem; }
.ce-level-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ce-level-desc { color: var(--ce-ink-soft); max-width: 880px; }

.ce-summary { margin-bottom: 20px; }
.ce-summary__banner { margin: -6px 0 18px; padding: 12px 16px; border-radius: 18px; background: #dff0d2; color: #1f4422; font-weight: 700; }
.ce-quiz-launch { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--ce-line); }
.ce-quiz-launch__label { font-weight: 700; margin-right: 4px; }

.ce-area { margin-bottom: 20px; padding: 24px; border-radius: var(--ce-radius); background: var(--ce-paper); border: 1px solid var(--ce-line); }
.ce-area__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ce-area__title { flex: 1; margin: 0; font-size: 1.3rem; }
.ce-area__count { padding: 4px 12px; border-radius: 999px; background: var(--ce-sage-2); font-weight: 700; font-size: .92rem; }
.ce-area__bar { height: 8px; margin: 12px 0 8px; border-radius: 999px; background: var(--ce-sage-2); overflow: hidden; }
.ce-area__bar span { display: block; height: 100%; border-radius: 999px; background: var(--ce-green); }

.ce-skills { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ce-skill { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px; border-radius: var(--ce-radius-sm); background: var(--ce-sage-3); }
.ce-skill__text { display: flex; gap: 12px; flex: 1 1 340px; min-width: 0; }
.ce-skill__kind { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--ce-ink); }
.ce-skill__label { margin: 0; font-weight: 600; }
.ce-skill__detail { margin: 2px 0 0; font-size: .88rem; color: var(--ce-ink-soft); }
.ce-skill__action { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ce-skill--acquired, .ce-skill--mastered { background: #e5f0dc; }

.ce-toggle { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: #fff; }
.ce-toggle__btn { border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; font: inherit; font-size: .88rem; font-weight: 700; color: var(--ce-ink-soft); cursor: pointer; white-space: nowrap; }
.ce-toggle__btn:hover { background: var(--ce-sage-3); }
.ce-toggle__btn.is-active { color: #fff; }
.ce-toggle__btn--not_yet.is-active { background: #5b6b57; }
.ce-toggle__btn--in_progress.is-active { background: var(--ce-sun); color: var(--ce-ink); }
.ce-toggle__btn--acquired.is-active { background: var(--ce-green); }

/* ---------- Remaining ("reste à faire") ---------- */

.ce-remain-hero { position: relative; overflow: hidden; border-radius: 36px; margin-bottom: 30px; background: var(--ce-sage); }
.ce-remain-hero > img { position: absolute; right: 0; top: 0; width: 40%; height: 100%; object-fit: cover; }
.ce-remain-hero__text { position: relative; max-width: 640px; padding: 40px; }
.ce-remain-hero__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.ce-chip { display: inline-block; padding: 10px 16px; border-radius: 999px; font-weight: 700; }
.ce-chip--green { background: var(--ce-green); color: var(--ce-cream); }
.ce-chip--sun { background: var(--ce-sun); color: var(--ce-ink); }
.ce-remain-areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; margin-bottom: 40px; }
.ce-remain-theory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.ce-remain-item { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 20px; background: var(--ce-sage-3); font-size: .98rem; line-height: 1.45; }
.ce-remain-item--sun { background: #fffaf0; }
.ce-tag { align-self: flex-start; padding: 4px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.ce-tag--progress { background: #fbe7b8; color: var(--ce-sun-ink); }
.ce-tag--todo { background: var(--ce-sage-2); color: #42563f; }
.ce-tag--fail { background: var(--ce-coral-soft); color: var(--ce-coral-ink); }
.ce-tag.ce-chip--green { padding: 4px 10px; }
.ce-done-box { padding: 20px 24px; border-radius: var(--ce-radius-sm); background: var(--ce-paper); border: 1px solid var(--ce-line); }

/* ---------- Quiz ---------- */

.ce-quiz-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.ce-quiz-progress { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.ce-quiz-dots { display: flex; gap: 6px; }
.ce-quiz-dots span { width: 14px; height: 14px; border-radius: 50%; background: #cfdbc2; }
.ce-quiz-dots .is-right { background: var(--ce-green); }
.ce-quiz-dots .is-wrong { background: var(--ce-coral); }
.ce-quiz-dots .is-current { background: var(--ce-sun); box-shadow: 0 0 0 3px var(--ce-cream); }
.ce-quiz-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: stretch; }
.ce-quiz-photo { position: relative; border-radius: 36px; overflow: hidden; min-height: 320px; }
.ce-quiz-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ce-quiz-photo figcaption { position: absolute; left: 18px; right: 18px; bottom: 18px; padding: 14px 18px; border-radius: 22px; background: rgba(251, 250, 245, .95); font-size: .92rem; }

.ce-question { padding: 36px; border-radius: 36px; background: var(--ce-paper); border: 1px solid var(--ce-line); }
.ce-question__skill { font-size: .9rem; font-weight: 700; color: #5f7449; margin-bottom: 8px; }
.ce-question__prompt { font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.08; margin-bottom: 8px; }
.ce-question__instruction { color: var(--ce-ink-soft); margin-bottom: 20px; font-size: 1.02rem; }
.ce-question__actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 24px; }
.ce-question__actions .btn-lg { margin-left: auto; }

.ce-choices { display: flex; flex-direction: column; gap: 12px; }
.ce-choices--tf { flex-direction: row; }
.ce-choices--tf .ce-choice { flex: 1; justify-content: center; }
.ce-choice { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 999px; border: 2px solid var(--ce-line); background: #fff; cursor: pointer; font-size: 1.05rem; font-weight: 600; }
.ce-choice:hover { border-color: #b8c9a6; }
.ce-choice:has(input:checked) { border-color: var(--ce-green); background: #eef3e6; }
.ce-choice input { width: 22px; height: 22px; accent-color: var(--ce-green); flex: none; }
.ce-choice--big { font-size: 1.2rem; font-weight: 700; }

.ce-ordering { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ce-ordering__item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 22px; border: 2px solid var(--ce-line); background: #fff; font-weight: 600; }
.ce-ordering__select { width: 80px; flex: none; }

.ce-feedback__verdict { font-family: var(--ce-display); font-size: 1.6rem; font-weight: 800; margin-bottom: 10px; }
.ce-feedback--right .ce-feedback__verdict { color: #2c5a2f; }
.ce-feedback--wrong .ce-feedback__verdict { color: var(--ce-coral-ink); }
.ce-feedback--right { box-shadow: inset 0 8px 0 var(--ce-green); }
.ce-feedback--wrong { box-shadow: inset 0 8px 0 var(--ce-coral); }

.ce-correction { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.ce-correction--ordered { list-style: decimal; padding-left: 1.4rem; }
.ce-correction__item { padding: 10px 16px; border-radius: 999px; background: var(--ce-sage-3); }
.ce-correction__item.is-right { background: #dff0d2; color: #1f4422; font-weight: 600; }
.ce-correction__item.is-wrong { background: var(--ce-coral-soft); color: var(--ce-coral-ink); }
.ce-explanation { margin-top: 16px; padding: 14px 18px; border-radius: 22px; background: var(--ce-sun-soft); color: var(--ce-sun-ink); }

.ce-result { text-align: center; max-width: 880px; margin: 0 auto; background: var(--ce-sage); border: 0; }
.ce-result__stars { font-size: 2.6rem; color: #c99512; letter-spacing: 6px; }
.ce-result__score { font-family: var(--ce-display); font-size: 3rem; font-weight: 800; margin: 0; }
.ce-result__message { color: var(--ce-ink-soft); font-size: 1.1rem; }
.ce-result .ce-gauge { text-align: left; }

.ce-review { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ce-review__item--right { box-shadow: inset 6px 0 0 var(--ce-green); }
.ce-review__item--wrong { box-shadow: inset 6px 0 0 var(--ce-coral); }
.ce-review__prompt { font-weight: 700; margin-bottom: 4px; }
.ce-review__item--right .ce-review__prompt .bi { color: var(--ce-green); }
.ce-review__item--wrong .ce-review__prompt .bi { color: var(--ce-coral); }
.ce-review__explanation { margin: 6px 0 0; font-size: .94rem; color: var(--ce-ink-soft); }

/* ---------- Admin ---------- */

.ce-admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 20px; padding: 8px; border-radius: 999px; background: var(--ce-green); }
.ce-admin-nav__title { color: var(--ce-sun); font-weight: 700; padding: 0 12px; }
.ce-admin-nav a { padding: 8px 16px; border-radius: 999px; color: var(--ce-cream); text-decoration: none; font-weight: 600; }
.ce-admin-nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.ce-admin-nav a.is-active { background: var(--ce-cream); color: var(--ce-ink); }

.ce-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.ce-stats .ce-stat { background: var(--ce-paper); border: 1px solid var(--ce-line); }
.ce-stat__value { display: block; }
.ce-admin-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ce-admin-level { display: flex; align-items: center; gap: 12px; padding: 16px 18px; }
.ce-admin-level.is-off { opacity: .6; }

.ce-table { --bs-table-bg: transparent; }
.ce-table thead th { color: var(--ce-ink-soft); font-weight: 700; font-size: .9rem; background: var(--ce-sage-3); }
.ce-table-wrap { border-radius: var(--ce-radius-sm); overflow: hidden; }

.ce-admin-skills { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.ce-admin-skill { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; border-radius: 20px; background: var(--ce-sage-3); }
.ce-admin-skill.is-off { opacity: .55; }
.ce-admin-skill > .flex-grow-1 { flex: 1 1 320px; min-width: 0; }
.ce-admin-skill__order { display: flex; flex-direction: column; }
.ce-admin-skill__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.ce-filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.ce-filters > div { min-width: 180px; }

.ce-admin-questions__skill { font-size: 1.05rem; margin: 22px 0 8px; display: flex; gap: 8px; align-items: baseline; }
.ce-admin-question { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 16px 18px; margin-bottom: 8px; border-radius: var(--ce-radius-sm); }
.ce-admin-question.is-off { opacity: .6; }
.ce-admin-question > .flex-grow-1 { flex: 1 1 340px; min-width: 0; }

.ce-answer-panel { margin-bottom: 16px; padding: 16px; border-radius: var(--ce-radius-sm); background: var(--ce-sage-3); border: 1px dashed #cfdbc2; }
.ce-choice-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ce-choice-row__n { width: 24px; text-align: center; font-weight: 700; color: var(--ce-ink-soft); }
.ce-choice-row .mb-3 { margin-bottom: 0 !important; }
.ce-mode-help { margin-top: -8px; }
.ce-preview { position: sticky; top: 96px; }

/* ---------- Combobox (MaZone controller; its CSS lives in app.css, not loaded here) ---------- */

.bk-combobox { position: relative; }
.bk-combobox__list { position: absolute; z-index: 20; left: 0; right: 0; max-height: 320px; overflow-y: auto; margin: 4px 0 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--ce-line); border-radius: 18px; box-shadow: 0 16px 36px rgba(36, 64, 42, .12); }
.bk-combobox__group { padding: 6px 10px 2px; font-size: .76rem; font-weight: 700; color: #5f7449; }
.bk-combobox__item { padding: 7px 10px; border-radius: 12px; cursor: pointer; font-size: .92rem; }
.bk-combobox__item:hover,
.bk-combobox__item.is-active { background: var(--ce-sage); }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
    .ce-how, .ce-cta-band, .ce-rider-hero, .ce-two, .ce-quiz-layout, .ce-auth { grid-template-columns: minmax(0, 1fr); }
    .ce-remain-areas, .ce-remain-theory { grid-template-columns: minmax(0, 1fr); }
    .ce-remain-hero > img { position: static; width: 100%; height: 200px; }
    .ce-path__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
    .ce-path__list::before { display: none; }
    .ce-auth__photo { min-height: 220px; }
    .ce-hero { min-height: 560px; }
}

@media (max-width: 575px) {
    .ce-card, .ce-area, .ce-question { padding: 20px; }
    .ce-photo-card__panel { margin: 14px; padding: 22px; }
    .ce-remain-hero__text, .ce-cta-band { padding: 26px; }
    .ce-skill__action { width: 100%; }
    .ce-toggle { width: 100%; }
    .ce-toggle__btn { flex: 1; padding: 9px 4px; }
    .ce-choices--tf { flex-direction: column; }
    .ce-choice { border-radius: 22px; }
    .ce-question__actions .btn-lg { width: 100%; }
    .ce-target__stats { grid-template-columns: minmax(0, 1fr); }
}
