:root {
    --brand-primary: #05386b;
    --brand-bg: #dde5d1;
    --brand-secondary: #96adc1;
    --color-accent: #f97316;
    --border-color: #e2e8f0;
    --b: #04d0d0; --o: #f6b26b; --m: #df40df; --r: #ff6b65; --g: #6587a4; --v: #b0f2b6;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Quicksand', sans-serif;
}
body {
    color: var(--brand-primary);
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.5s ease;
    background-color: var(--brand-bg);
    position: relative;
}
.watermark-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='120' viewBox='0 0 300 120'%3E%3Ctext x='20' y='60' fill='%2305386b' font-family='Quicksand, sans-serif' font-size='14' font-weight='800' transform='rotate(-15 150 60)'%3EPROPRIÉTÉ EXCLUSIVE LA RUCHE®%3C/text%3E%3C/svg%3E");
    background-repeat: repeat;
}
body.bg-step-1 {
    background: linear-gradient(135deg, rgba(5, 56, 107, 0.85) 0%, rgba(4, 208, 208, 0.78) 100%),
                url('../assets/images/PHOTO_AXE_1.jpg') center/cover no-repeat fixed;
}
body.bg-step-2 {
    background: linear-gradient(135deg, rgba(223, 64, 223, 0.8) 0%, rgba(5, 56, 107, 0.85) 100%),
                url('../assets/images/PHOTO_AXE_2.jpg') center/cover no-repeat fixed;
}
body.bg-step-3 {
    background: linear-gradient(135deg, rgba(101, 135, 164, 0.85) 0%, rgba(246, 178, 107, 0.82) 100%),
                url('../assets/images/PHOTO_AXE_3.jpg') center/cover no-repeat fixed;
}

.diag-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
@media (min-width: 900px) {
    .diag-layout {
        grid-template-columns: 280px 1fr;
    }
}

.sidebar-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 20px;
}
.sidebar-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.progress-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
}
.progress-bar-track { background: #e2e8f0; border-radius: 999px; height: 10px; width: 100%; overflow: hidden; }
.progress-bar-fill { background: var(--o); height: 100%; width: 33.33%; transition: width 0.35s ease; }

.sidebar-nav-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #94a3b8;
    text-transform: uppercase;
}
.sidebar-nav-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.nav-dim-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    font-size: 13.5px;
    font-weight: 600;
    transition: all 0.25s ease;
}
.nav-dim-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-dim-icon {
    font-size: 12px;
    color: #94a3b8;
}
.nav-dim-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.nav-dim-item.active {
    border-color: var(--o);
    background: #fffdfa;
    color: var(--brand-primary);
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(246, 178, 107, 0.2);
}
.nav-dim-item.active .nav-dim-icon {
    color: var(--o);
}
.nav-dim-item.active .nav-dim-badge {
    background: var(--o);
    color: var(--brand-primary);
}
.nav-dim-item.completed {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #334155;
}
.nav-dim-item.completed .nav-dim-badge {
    background: var(--brand-primary);
    color: #ffffff;
}

.sidebar-dim-info {
    background: #eef4f8;
    border-left: 4px solid var(--o);
    border-radius: 16px;
    padding: 14px 16px;
    margin-top: 5px;
    transition: all 0.3s ease;
}
.sidebar-dim-info h4 {
    font-size: 13px;
    font-weight: 800;
    color: var(--brand-primary);
    margin-bottom: 6px;
}
.sidebar-dim-info p {
    font-size: 12px;
    color: #475569;
    line-height: 1.45;
    margin-bottom: 8px;
    font-weight: 600;
}
.sidebar-dim-info p:last-child {
    margin-bottom: 0;
}
.sidebar-dim-info strong {
    color: var(--brand-primary);
}

.main-content {
    width: 100%;
}

.dimension-desc-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 22px 26px;
    margin-bottom: 20px;
    border-left: 6px solid var(--o);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}
.dimension-desc-card h3 {
    font-size: 19px;
    font-weight: 800;
    color: var(--brand-primary);
    margin-bottom: 6px;
}
.dimension-desc-card p {
    font-size: 13.5px;
    color: #475569;
    font-weight: 600;
    line-height: 1.5;
}

.step-section {
    display: none;
}
.step-section.active {
    display: block;
    animation: fadeIn 0.35s ease;
}

.card {
    background: #ffffff;
    padding: 20px;
    border-radius: 18px;
    margin-bottom: 20px;
    border-left: 6px solid var(--brand-secondary);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.q-text { font-size: 15px; font-weight: 700; color: var(--brand-primary); margin-bottom: 16px; display: flex; align-items: center; gap: 10px; line-height: 1.45; }
.badge { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

.options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
}
.opt-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}
.opt-label:hover {
    border-color: var(--o);
    background: #fffcf8;
}
.opt-label input[type="radio"] {
    margin: 0;
    width: 20px;
    height: 20px;
    accent-color: var(--o);
    cursor: pointer;
    flex-shrink: 0;
}
.opt-label:has(input:checked) {
    border-color: var(--o);
    background: #fffdfa;
    box-shadow: 0 0 0 1px var(--o);
    color: var(--brand-primary);
    font-weight: 700;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    flex-direction: column;
    background: rgba(5, 56, 107, 0.45);
    padding: 14px;
    border-radius: 16px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
}
@media (min-width: 500px) { .step-actions { flex-direction: row; } }
.btn-prev {
    flex: 1;
    padding: 15px 20px;
    background-color: #ffffff;
    color: var(--brand-primary);
    border: 2px solid #ffffff;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.btn-prev:hover {
    background-color: var(--border-color);
    border-color: var(--border-color);
    transform: translateY(-1px);
}
.btn-next {
    flex: 2;
    padding: 15px 20px;
    background-color: var(--o);
    color: var(--brand-primary);
    border: 2px solid var(--o);
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    text-align: center;
}
.btn-next:hover {
    background-color: #ffffff;
    border-color: #ffffff;
    color: var(--brand-primary);
    transform: translateY(-1px);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 56, 107, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 15px;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-card {
    width: 100%;
    max-width: 780px;
    background: #ffffff;
    border-radius: 28px;
    padding: 24px 32px;
    box-shadow: 0 25px 50px rgba(5, 56, 107, 0.35);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    text-align: left;
    border-top: 6px solid var(--o);
    max-height: 94vh;
    overflow-y: auto;
}
.modal-overlay.active .modal-card {
    transform: scale(1);
}
.modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 800;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.modal-close:hover { background: #e2e8f0; color: var(--brand-primary); }
.card-logo {
    max-height: 95px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin: 0 auto 10px auto;
    display: block;
}
.modal-title {
    font-size: clamp(20px, 3.8vw, 24px);
    font-weight: 800;
    color: var(--brand-primary);
    margin-bottom: 4px;
    text-align: center;
}
.modal-subtext {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.4;
    text-align: center;
}
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 8px;
}
@media (min-width: 520px) {
    .form-grid-2 { grid-template-columns: 1fr 1fr; }
}
.form-group-wapply {
    text-align: left;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
}
.form-group-wapply label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 4px;
}
.form-control-wapply {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--brand-primary);
    border-radius: 10px;
    font-size: 13px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    outline: none;
    background: #ffffff;
    color: var(--brand-primary);
    transition: all 0.2s ease;
}
.form-control-wapply:focus {
    border-color: var(--b);
    box-shadow: 0 0 0 3px rgba(4, 208, 208, 0.2);
}
select.form-control-wapply {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2305386b' d='M6 8.825L1.175 4 2.238 2.938 6 6.7 9.763 2.938 10.825 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}
.recaptcha-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0 10px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 20px rgba(5, 56, 107, 0.12);
}
.btn-submit-wapply {
    width: 100%;
    padding: 13px;
    background-color: var(--o);
    color: var(--brand-primary);
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 800;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(246, 178, 107, 0.4);
    text-align: center;
}
.btn-submit-wapply:hover { 
    background-color: #e09b52; 
    transform: translateY(-1px);
}
.btn-secondary-wapply {
    width: 100%;
    padding: 12px;
    background-color: #ffffff;
    color: var(--brand-primary);
    border: 2px solid var(--brand-primary);
    border-radius: 12px;
    font-size: 14px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 800;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s ease;
    text-align: center;
}
.btn-secondary-wapply:hover {
    background-color: #f1f5f9;
}
.form-footer-wapply {
    margin-top: 12px;
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
    text-align: center;
    font-weight: 600;
}
.submit-error-banner {
    display: none;
    background: #fef2f2;
    border: 1.5px solid #ef4444;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    margin-top: 12px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.15);
    line-height: 1.4;
}
