/* ---------- Design tokens ---------- */
:root {
    --brand: #0d6efd;
    --ink: #12161c;
    --ink-soft: #4b5563;
    --paper: #ffffff;
    --paper-soft: #f6f7f9;
    --border: #e6e8eb;
    --radius: 16px;
    --shadow: 0 8px 24px -12px rgba(18, 22, 28, 0.18);
    --shadow-hover: 0 16px 32px -14px rgba(18, 22, 28, 0.28);
    font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; }

.text-muted { color: var(--ink-soft); }

/* ---------- Bandeau d'annonce ---------- */
.site-banner {
    position: relative;
    z-index: 41;
    font-size: 0.92rem;
    font-weight: 600;
}

.site-banner--info {
    background: #e7f1ff;
    color: #0a4a9e;
}

.site-banner--alert {
    background: #fff2e0;
    color: #93450a;
}

.site-banner__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.7rem 1.5rem;
    text-align: center;
}

.site-banner__button {
    flex: none;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.site-banner--info .site-banner__button {
    color: #fff;
    background: #0a4a9e;
}

.site-banner--alert .site-banner__button {
    color: #fff;
    background: #93450a;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--ink-soft);
}

.site-brand__logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
}

.site-brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
}

.site-brand__text strong {
    color: var(--ink);
    font-size: 1.05rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.site-nav a {
    color: var(--ink-soft);
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: var(--ink);
    border-color: var(--brand);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown__caret {
    font-size: 0.65em;
    margin-left: 0.15rem;
    opacity: 0.7;
}

.nav-dropdown__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 50;
    margin: 0.6rem 0 0;
    padding: 0.5rem;
    min-width: 220px;
    list-style: none;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu {
    display: block;
}

.nav-dropdown__menu a {
    display: block;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border-bottom: none;
    font-weight: 600;
    font-size: 0.92rem;
}

.nav-dropdown__menu a:hover,
.nav-dropdown__menu a.is-active {
    background: var(--paper-soft);
    border-color: transparent;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    margin: 0 auto;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero ---------- */
.hero {
    background:
        radial-gradient(1200px 400px at 15% -10%, color-mix(in srgb, var(--brand) 22%, transparent), transparent),
        linear-gradient(180deg, var(--paper-soft), var(--paper));
    border-bottom: 1px solid var(--border);
}

.hero__inner {
    padding: 5.5rem 1.5rem 4.5rem;
    max-width: 780px;
}

.hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--brand);
    margin: 0 0 0.75rem;
}

.hero__title {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    margin: 0 0 1.25rem;
}

.hero__description {
    color: var(--ink-soft);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.hero__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ---------- Hero slider ---------- */
.hero-slider {
    position: relative;
    height: min(70vh, 640px);
    min-height: 420px;
    overflow: hidden;
    background: var(--ink);
}

.hero-slider__track {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slider__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.1s ease;
}

.hero-slider__slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.hero-slider__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 12, 16, 0.35), rgba(10, 12, 16, 0.68));
}

.hero-slider__content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    color: #fff;
}

.hero-slider__title,
.hero-slider__subtitle,
.hero-slider__content .btn {
    opacity: 0;
    transform: translateY(18px);
}

.hero-slider__slide.is-active .hero-slider__title {
    animation: hero-rise 0.8s ease forwards;
}

.hero-slider__slide.is-active .hero-slider__subtitle {
    animation: hero-rise 0.8s ease 0.12s forwards;
}

.hero-slider__slide.is-active .hero-slider__content .btn {
    animation: hero-rise 0.8s ease 0.24s forwards;
}

@keyframes hero-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-slider__title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin: 0 0 1rem;
}

.hero-slider__subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.92);
    margin: 0 0 1.75rem;
}

.hero-slider__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1.5rem;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.hero-slider__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-slider__dot.is-active {
    background: #fff;
    transform: scale(1.25);
}

@media (prefers-reduced-motion: reduce) {
    .hero-slider__slide {
        transition: none;
    }

    .hero-slider__title,
    .hero-slider__subtitle,
    .hero-slider__content .btn {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn--primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 10px 20px -8px color-mix(in srgb, var(--brand) 60%, transparent);
}

.btn--primary:hover { transform: translateY(-2px); }

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--border);
}

.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Sections ---------- */
.section { padding: 4rem 1.5rem; }

.section__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.section__header h2 { font-size: 1.8rem; margin: 0; }

.section__link {
    font-weight: 700;
    color: var(--brand);
    white-space: nowrap;
}

.page-title { margin-bottom: 2.5rem; }
.page-title h1 { font-size: 2.2rem; margin: 0 0 0.5rem; }

.empty-state {
    color: var(--ink-soft);
    background: var(--paper-soft);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 3rem;
    text-align: center;
}

/* ---------- News grid / cards ---------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.75rem;
}

.news-card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.news-card__link { display: block; }

.news-card__media {
    aspect-ratio: 3 / 2;
    background: var(--paper-soft);
    overflow: hidden;
}

.news-card__media[data-placeholder="true"] {
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 18%, white), var(--paper-soft));
}

.news-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-card__body { padding: 1.4rem; }

.news-card__date {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand);
    margin-bottom: 0.5rem;
}

.news-card__title {
    font-size: 1.15rem;
    margin: 0 0 0.5rem;
}

.news-card__excerpt {
    color: var(--ink-soft);
    font-size: 0.92rem;
    margin: 0 0 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__cta {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--ink);
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    font-weight: 600;
}

.pagination__link { color: var(--brand); }
.pagination__status { color: var(--ink-soft); font-size: 0.9rem; }

/* ---------- Article ---------- */
.article { max-width: 760px; }

.back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.article__header h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin: 0.4rem 0 1.5rem;
}

.article__cover {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    aspect-ratio: 2 / 1;
    object-fit: cover;
}

.article__content {
    font-size: 1.05rem;
    color: #1f2430;
}

.article__content img { max-width: 100%; border-radius: 12px; }
.article__content p { margin: 0 0 1.25rem; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--ink);
    color: #cfd3d9;
    margin-top: 3rem;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    padding: 3.5rem 1.5rem 2rem;
}

.site-footer h3 {
    color: #fff;
    font-size: 1rem;
    margin: 0 0 0.9rem;
}

.site-footer p { margin: 0 0 0.5rem; font-size: 0.92rem; }
.site-footer a:hover { color: #fff; }

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.25rem 1.5rem;
    font-size: 0.82rem;
    color: #9aa0aa;
}

/* ---------- Flash messages ---------- */
.flash {
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 1rem;
}

.flash--success {
    background: #e8f7ee;
    color: #0f6b3a;
    border: 1px solid #b9e6c9;
}

.flash--danger {
    background: #fdecec;
    color: #a11f1f;
    border: 1px solid #f4c2c2;
}

/* ---------- État civil ---------- */
.civil-section {
    margin-bottom: 3rem;
}

.civil-section:last-child {
    margin-bottom: 0;
}

.civil-section__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    margin: 0 0 1rem;
}

.civil-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.civil-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.9rem 1.3rem;
    border-bottom: 1px solid var(--border);
}

.civil-item:last-child {
    border-bottom: none;
}

.civil-item__name {
    font-weight: 700;
}

.civil-item__meta {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

/* ---------- Documents ---------- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.category-card__icon {
    font-size: 1.8rem;
}

.category-card__title {
    font-weight: 700;
    font-size: 1.05rem;
}

.category-card__count {
    color: var(--ink-soft);
    font-size: 0.85rem;
}

.document-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.document-sort {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.document-sort a {
    font-weight: 600;
    color: var(--ink-soft);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
}

.document-sort a.is-active {
    color: #fff;
    background: var(--brand);
}

.document-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.document-item {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.1rem 1.3rem;
}

.document-item__badge {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--brand) 12%, white);
    color: var(--brand);
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

.document-item__body {
    flex: 1;
    min-width: 0;
}

.document-item__title {
    display: block;
    font-weight: 700;
    color: var(--ink);
}

.document-item__description {
    margin: 0.2rem 0 0;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.document-item__date {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.82rem;
    color: var(--ink-soft);
}

.document-item__download {
    flex: none;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

@media (max-width: 600px) {
    .document-item {
        flex-wrap: wrap;
    }

    .document-item__download {
        margin-left: calc(52px + 1.1rem);
    }
}

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.contact-form-card,
.contact-info-card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-field label {
    font-weight: 600;
    font-size: 0.9rem;
}

.form-field input,
.form-field textarea {
    font: inherit;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--paper-soft);
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: 2px solid color-mix(in srgb, var(--brand) 50%, transparent);
    outline-offset: 1px;
    background: var(--paper);
}

.contact-form .btn {
    align-self: flex-start;
    border: none;
    cursor: pointer;
}

.contact-info-card p {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
}

.contact-map {
    margin-top: 0.5rem;
    height: 260px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

@media (max-width: 860px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .nav-toggle { display: flex; }

    .site-nav {
        position: fixed;
        inset: 76px 0 0 0;
        background: var(--paper);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 1rem 1.5rem;
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.15s ease, transform 0.15s ease;
    }

    .site-nav.is-open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .site-nav a {
        width: 100%;
        padding: 0.9rem 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown__menu {
        display: block;
        position: static;
        min-width: 0;
        margin: 0;
        padding: 0 0 0 1.25rem;
        border: none;
        box-shadow: none;
        background: transparent;
    }

    .nav-dropdown__menu a {
        padding: 0.7rem 0;
        font-weight: 500;
    }
}

/* ---------- Agenda / calendrier ---------- */
.calendar {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 3rem;
}

.calendar__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.calendar__title {
    margin: 0;
    font-size: 1.3rem;
    min-width: 12ch;
    text-align: center;
}

.calendar__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    flex-shrink: 0;
}

.calendar__nav:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.calendar__today-link {
    text-align: center;
    margin-bottom: 1rem;
}

.calendar__today-link a {
    color: var(--brand);
    font-size: 0.9rem;
    text-decoration: none;
}

.calendar__today-link a:hover {
    text-decoration: underline;
}

.calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar__weekday {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ink-soft);
    text-transform: uppercase;
    padding-bottom: 0.5rem;
}

.calendar__day {
    min-height: 90px;
    padding: 0.4rem;
    border-radius: 8px;
    background: var(--paper-soft);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.calendar__day--empty {
    background: transparent;
}

.calendar__day--today {
    background: color-mix(in srgb, var(--brand) 12%, var(--paper-soft));
    border: 1px solid var(--brand);
}

.calendar__day-number {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink-soft);
}

.calendar__event {
    display: block;
    font-size: 0.72rem;
    line-height: 1.3;
    background: var(--brand);
    color: #fff;
    border-radius: 4px;
    padding: 1px 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .calendar {
        padding: 1rem 0.5rem;
    }

    .calendar__day {
        min-height: 60px;
        padding: 0.25rem;
    }

    .calendar__weekday {
        font-size: 0.65rem;
    }

    .calendar__event {
        font-size: 0.6rem;
    }
}

.event-upcoming {
    margin-top: 2rem;
}

.event-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.event-item {
    display: flex;
    gap: 1.25rem;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
}

.event-item__media {
    flex-shrink: 0;
    width: 140px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--paper-soft);
}

.event-item__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-item__date {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 0.25rem;
}

.event-item__title {
    margin: 0 0 0.25rem;
    font-size: 1.15rem;
}

.event-item__location {
    display: block;
    color: var(--ink-soft);
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.event-item__desc {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.92rem;
}

@media (max-width: 600px) {
    .event-item {
        flex-direction: column;
    }

    .event-item__media {
        width: 100%;
        height: 160px;
    }
}

/* ---------- Signalement (wizard) ---------- */
.wizard__steps {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
    gap: 0.5rem 1.25rem;
}

.wizard__step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.wizard__step::before {
    content: attr(data-step-label);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--paper-soft);
    border: 1px solid var(--border);
    font-size: 0.8rem;
}

.wizard__step.is-active {
    color: var(--ink);
}

.wizard__step.is-active::before {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.wizard__step.is-done::before {
    content: "✓";
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.wizard__progress {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.wizard__progress-bar {
    height: 100%;
    width: 20%;
    background: var(--brand);
    transition: width 0.25s ease;
}

.wizard__card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
}

.wizard__title {
    font-size: 1.3rem;
    margin: 0 0 0.4rem;
}

.wizard__subtitle {
    color: var(--ink-soft);
    margin: 0 0 1.5rem;
}

.wizard__hint {
    color: var(--ink-soft);
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

.wizard__field {
    margin-top: 1.25rem;
}

.wizard__nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.wizard__submit {
    width: 100%;
    margin-top: 1.5rem;
    border: none;
    cursor: pointer;
}

@keyframes wizard-shake {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(4px); }
    30%, 50%, 70% { transform: translateX(-8px); }
    40%, 60% { transform: translateX(8px); }
}

.wizard--shake .wizard__card {
    animation: wizard-shake 0.4s;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.option-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--paper);
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
}

.option-card:hover {
    border-color: var(--brand);
}

.option-card.is-selected {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 8%, var(--paper));
    box-shadow: 0 0 0 1px var(--brand);
}

.option-card__icon {
    font-size: 1.6rem;
}

.option-card__label {
    font-weight: 700;
}

.subcat-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.subcat-item {
    text-align: left;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--paper);
    cursor: pointer;
    font: inherit;
    color: inherit;
    font-weight: 600;
}

.subcat-item:hover {
    border-color: var(--brand);
}

.subcat-item.is-selected {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 8%, var(--paper));
}

.recap-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--paper-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.5rem;
}

.recap-card__eyebrow {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
    font-weight: 700;
}

.recap-card__value {
    font-weight: 700;
}

.recap-card__edit {
    background: none;
    border: none;
    color: var(--brand);
    font-weight: 600;
    cursor: pointer;
    font: inherit;
    flex-shrink: 0;
}

.recap-card__edit:hover {
    text-decoration: underline;
}

.recap-summary {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

.recap-summary__row {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--border);
}

.recap-summary__row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.recap-summary__label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
    font-weight: 700;
}

.recap-summary__value {
    white-space: pre-wrap;
}

.wizard-map {
    height: 320px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

@media (max-width: 700px) {
    .option-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wizard__card {
        padding: 1.25rem;
    }
}
