/* ==================================================
   LAYOUT GLOBAL
================================================== */

.onsa-wizard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 60px;
    align-items: start;
    max-width: 1200px;
    margin: 80px auto;
}


.onsa-wizard__themes h3 {
    grid-column: 1 / -1;
    width: 100%;
    margin-bottom: 25px;
}
/* ==================================================
   BOUTON : RETOUR
================================================== */


.onsa-back-button {
    background: #0b8ea2;
    color: #fff;
    border: 1px solid #0b8ea2;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

.onsa-back-button:hover {
    background: #087785;
    border-color: #087785;
}


/* ==================================================
   SOMMAIRE TYPE ARIANNE EN HAUT - SUMMARY
================================================== */

.onsa-wizard-summary {
    width: 100%;
    margin-bottom: 50px;
}

.onsa-wizard-topbar {
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding-bottom: 34px;
    border-bottom: 1px solid #ececec;
}

.onsa-step {
    font-size: 20px;
    font-weight: 600;
    color: #2f3747;
    margin: 0;
}

.onsa-breadcrumb-track {
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: nowrap;
}

.onsa-breadcrumb-step {
    display: flex;
    align-items: center;
    gap: 14px;
    opacity: .45;
    transition: all .25s ease;
}

.onsa-breadcrumb-step.is-current {
    opacity: 1;
}

.onsa-breadcrumb-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid #d8dde5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    color: #008b95;
    flex-shrink: 0;
}

.onsa-breadcrumb-step.is-current .onsa-breadcrumb-number {
    background: #008b95;
    color: white;
    border-color: #008b95;
}

.onsa-breadcrumb-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.onsa-breadcrumb-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #8d8d8d;
}

.onsa-breadcrumb-step strong {
    font-size: 18px;
    font-weight: 600;
    color: #1e1e1e;
}

.onsa-breadcrumb-step.is-current strong {
    color: #008b95;
}

.onsa-breadcrumb-sep {
    font-size: 34px;
    color: #d0d4db;
}


.onsa-wizard-summary-inner {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.onsa-summary-block {
    flex: 1;
    min-width: 220px;
}

.onsa-wizard-summary h3 {
    margin-bottom: 25px;
    font-size: 24px;
}


/* ==================================================
   SEARCH
================================================== */


.onsa-wizard-search-global {
    margin: 30px 0 40px;
}

.onsa-wizard-search-global input {
    width: 100%;
    max-width: 480px;
    padding: 16px 18px;
    border: 1px solid #dbe2ea;
    border-radius: 12px;
    font-size: 15px;
}



/* ==================================================
   ETAPES
================================================== */

.onsa-summary-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.onsa-summary-steps li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: #6d7682;
}

.onsa-summary-steps li span {
    width: 28px;
    height: 28px;
    border: 1px solid #dbe2ea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.onsa-summary-steps li.is-current {
    font-weight: 600;
    color: #111827;
}

.onsa-summary-steps li.is-current span {
    border-color: #008b95;
}

/* ==================================================
   RECAP
================================================== */

.onsa-summary-steps li {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 24px;
}

.onsa-step-line {
    display: flex;
    align-items: center;
    gap: 12px;
}

.onsa-summary-steps small {
    margin-left: 42px;
    color: #6d7682;
    font-size: 13px;
    line-height: 1.4;
}


.onsa-next-button[disabled] {
    opacity: .4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==================================================
   WIZARD DROITE
================================================== */

.onsa-wizard {
    width: 100%;
}

.onsa-wizard__header {
    margin-bottom: 30px;
}

.onsa-wizard__header h2 {
    margin-bottom: 12px;
}

/* ==================================================
   GRILLES
================================================== */

.onsa-wizard__themes,
.onsa-subtheme-grid,
.onsa-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 220px);
    gap: 24px;
    justify-content: start;
}

/* ==================================================
   CARDS
================================================== */

.onsa-theme-card,
.onsa-subtheme-card,
.onsa-detail-card {
    width: 100%;
    min-height: 170px;
    border: 1px solid #dbe2ea;
    border-radius: 18px;
    background: #fff;
    padding: 24px 18px;
    cursor: pointer;
    transition: all .25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    text-align: center;
}

.onsa-theme-card:hover,
.onsa-subtheme-card:hover,
.onsa-detail-card:hover {
    transform: translateY(-2px);
}


.onsa-card-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.onsa-card-icon img,
.onsa-card-icon svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ==================================================
   FORM
================================================== */

.onsa-wizard__form form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.onsa-wizard__form input,
.onsa-wizard__form textarea,
.onsa-wizard__form select {
    width: 100%;
    border: 1px solid #dbe2ea;
    border-radius: 10px;
    padding: 14px;
}


.onsa-theme-card.is-selected,
.onsa-subtheme-card.is-selected,
.onsa-detail-card.is-selected {
    background: #fff7f1;
    border-color: #ef7d57;
    color: #ef7d57;
    font-weight: 600;
}


/* ==================================================
   TYPOGRAPHIE
================================================== */
.onsa-wizard-stage h3 {
    font-size: 30px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.onsa-wizard-stage p {
    font-size: 17px;
    line-height: 1.6;
    color: #5f6368;
}

.onsa-theme-title,
.onsa-subtheme-card span,
.onsa-detail-card span {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
}



/* ==================================================
   ANIMATION SLIDE
================================================== */


.onsa-wizard-stage {
    position: relative;
    min-height: 900px;
}


.onsa-wizard-stage {
    position: relative;
    overflow: hidden;
    min-height: 700px;
}

.onsa-step-panel,
.onsa-wizard__themes {
    width: 100%;
    display: none;
    animation-duration: .35s;
    animation-fill-mode: both;
}

.onsa-wizard__themes {
    grid-template-columns: repeat(6, minmax(180px, 1fr));
    gap: 28px;
}

.onsa-step-panel.is-active,
.onsa-wizard__themes.is-active {
    display: block;
}

.onsa-wizard__themes.is-active {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.slide-in-right {
    animation-name: slideInRight;
}

.slide-in-left {
    animation-name: slideInLeft;
}


.onsa-step-actions{
    margin-top:32px;
    display:flex;
    gap:12px;
}
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===============================
   STEP 4 MODERN FORM
================================ */

.onsa-modern-form {
    width: 100%;
    max-width: 1200px;
}

.onsa-modern-form h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 18px;
    line-height: 1.1;
}

.onsa-form-selection {
    font-size: 20px;
    color: #707070;
    margin-bottom: 40px;
}

.onsa-form-selection strong {
    color: #0b8ea2;
}

.onsa-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 30px;
}

.onsa-form-group {
    display: flex;
    flex-direction: column;
}

.onsa-form-full {
    width: 100%;
    margin-bottom: 30px;
}

.onsa-modern-form label {
    font-size: 1.25em;
    font-weight: 700;
    margin-bottom: 12px;
    color: #02797e;
    letter-spacing: 0;
    font-variant: normal;
    text-transform: none;
    line-height: 1.4;
}

.onsa-modern-form input,
.onsa-modern-form select,
.onsa-modern-form textarea {
    width: 100%;
    min-height: 58px;
    border: 1px solid #d8dde3;
    border-radius: 12px;
    padding: 16px 18px;
    font-size: 1.25em;
    transition: all .2s ease;
    background: #fff;
}

.onsa-modern-form textarea {
    min-height: 140px;
    resize: vertical;
}

.onsa-modern-form input:focus,
.onsa-modern-form select:focus,
.onsa-modern-form textarea:focus {
    outline: none;
    border-color: #0b8ea2;
    box-shadow: 0 0 0 4px rgba(11,142,162,.12);
}

.onsa-modern-form small {
    margin-top: 8px;
    font-size: 14px;
    color: #8f8f8f;
}

.onsa-form-divider {
    height: 1px;
    background: #e8e8e8;
    margin: 40px 0;
}

.onsa-form-actions {
    display: flex;
    gap: 18px;
    margin-top: 45px;
}

.onsa-submit-button {
    background: #0b8ea2;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 18px 28px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s ease;
}

.onsa-submit-button:hover {
    background: #087785;
}

/* Responsive */

@media (max-width: 900px) {

    .onsa-modern-form h3 {
        font-size: 34px;
    }

    .onsa-form-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .onsa-form-actions {
        flex-direction: column;
    }

    .onsa-submit-button,
    .onsa-back-button {
        width: 100%;
    }
}


/* ==========================
   SEARCH RESULTS
========================== */

.onsa-search-results {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.onsa-search-result {
    width: 100%;
    text-align: left;
    background: white;
    border: 1px solid #dfe5ea;
    padding: 16px 18px;
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s ease;
    font-size: 15px;
    font-weight: 600;
}

.onsa-search-result:hover {
    border-color: #0b8ea2;
    background: #f4fbfc;
}

.onsa-search-empty {
    padding: 14px 16px;
    color: #7a7a7a;
    font-size: 14px;
}

/* ==========================
   BLOCKS
========================== */

.onsa-search-block,
.onsa-deposit-block {
    background: #fff;
    border: 1px solid #e8edf1;
    border-radius: 22px;
    padding: 34px;
    margin-bottom: 30px;
}

.onsa-block-head {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 26px;
}

.onsa-block-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #eef9fb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.onsa-block-text h2 {
    margin: 0 0 6px;
    font-size: 34px;
    line-height: 1.2;
    font-weight: 700;
}

.onsa-block-text p {
    margin: 0;
    font-size: 17px;
    color: #6b7280;
    line-height: 1.5;
}

.onsa-search-helper {
    margin-top: 16px;
    background: #f7fafb;
    border-radius: 12px;
    font-size: 15px;
    color: #555;
}

.onsa-wizard-shell {
    display: flex;
    align-items: flex-start;
    gap: 24px; /* réduit l’espace */
}

.onsa-deposit-block {
    flex: 1.65;
    min-width: 0;
}

.onsa-search-block {
    flex: 1;
    min-width: 340px;
    position: sticky;
    top: 30px;
}


.onsa-quartier-help {
    margin-top: 10px;
    font-size: 14px;
    color: #6b7280;
}

.onsa-quartier-help a {
    font-weight: 600;
    text-decoration: underline;
}

.onsa-map-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 9999;
    padding: 40px;
}

.onsa-map-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.onsa-map-modal-content {
    position: relative;
    background: white;
    padding: 20px;
    border-radius: 14px;
    max-width: 1000px;
    width: 100%;
}

.onsa-map-modal-content img {
    width: 100%;
    height: auto;
    display: block;
}

.onsa-map-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: none;
    font-size: 30px;
    cursor: pointer;
}

/* tablette + mobile */
@media (max-width: 1200px) {
    .onsa-wizard-shell {
        flex-direction: column;
        gap: 28px;
    }

    .onsa-deposit-block,
    .onsa-search-block {
        width: 100%;
        min-width: 100%;
    }

    .onsa-search-block {
        position: static;
    }
}
