/* ========================================
   AUDIT IMMO - STYLE.CSS
   Design: Dark liquid glass + vivid blue accent
   ======================================== */

/* --- KEYFRAMES --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0,153,255,0.35), 0 0 60px rgba(0,153,255,0.10);
    }
    50% {
        box-shadow: 0 0 30px rgba(0,153,255,0.55), 0 0 80px rgba(0,153,255,0.18);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes resultEntrance {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- RESET & BASE --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'League Spartan', sans-serif;
    background-color: #000000;
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(0,153,255,0.06) 0px,
            rgba(0,153,255,0.06) 1px,
            transparent 1px,
            transparent 54px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(0,153,255,0.06) 0px,
            rgba(0,153,255,0.06) 1px,
            transparent 1px,
            transparent 54px
        );
    color: #ffffff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Glow radial top */
body::before {
    content: '';
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse at center, rgba(0,153,255,0.14) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Glow radial bottom */
body::after {
    content: '';
    position: fixed;
    bottom: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse at center, rgba(0,153,255,0.10) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* --- SCREENS --- */
.screen {
    display: none;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.screen.active {
    display: flex;
    animation: slideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.screen-inner {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

/* --- BADGE --- */
.badge {
    display: inline-block;
    background: rgba(0,153,255,0.08);
    border: 1px solid rgba(0,153,255,0.35);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0099FF;
    padding: 8px 18px;
    border-radius: 30px;
    margin-bottom: 28px;
    box-shadow: 0 0 18px rgba(0,153,255,0.12), inset 0 0 8px rgba(0,153,255,0.06);
}

/* --- TYPOGRAPHY --- */
h1 {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 0 0 40px rgba(0,153,255,0.3), 0 0 80px rgba(0,153,255,0.1);
}

h2 {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: #ffffff;
    letter-spacing: 0.5px;
}

h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255,255,255,0.78);
    margin-bottom: 32px;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255,255,255,0.78);
    line-height: 1.6;
    margin-bottom: 36px;
}

.question-text {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.question-number {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0099FF;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.question-hint {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 24px;
}

/* --- PROGRESS BAR --- */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(0,153,255,0.15);
    border-radius: 2px;
    margin-bottom: 32px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #0099FF;
    border-radius: 2px;
    transition: width 0.3s ease;
    box-shadow: 0 0 12px rgba(0,153,255,0.5), 0 0 24px rgba(0,153,255,0.2);
}

/* --- BUTTONS --- */
.btn-primary {
    display: inline-block;
    background: #0099FF;
    color: #000000;
    font-family: 'League Spartan', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 16px 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0,153,255,0.35), 0 0 60px rgba(0,153,255,0.10);
    transition: box-shadow 0.25s ease, transform 0.15s ease, opacity 0.2s ease;
    text-decoration: none;
    text-align: center;
    animation: pulseGlow 2.5s ease-in-out infinite;
}

.btn-primary:hover {
    box-shadow: 0 0 35px rgba(0,153,255,0.6), 0 0 80px rgba(0,153,255,0.2);
    transform: translateY(-1px);
    animation: none;
}

.btn-primary:active {
    transform: translateY(0);
    animation: none;
}

.btn-primary:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    animation: none;
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: rgba(255,255,255,0.6);
    font-family: 'League Spartan', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    padding: 14px 28px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-secondary:hover {
    border-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.85);
}

.btn-full {
    width: 100%;
}

.nav-buttons {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.nav-buttons .btn-primary {
    flex: 1;
}

/* --- OPTION CARDS (radio/checkbox) --- */
.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.option-card {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid rgba(0,153,255,0.12);
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.option-card:hover {
    border-color: rgba(0,153,255,0.4);
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%);
    transform: translateY(-2px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 24px rgba(0,153,255,0.08);
}

.option-card input[type="radio"],
.option-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.option-card.selected {
    border-color: #0099FF;
    background: rgba(0,153,255,0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 20px rgba(0,153,255,0.18);
}

.option-label {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    user-select: none;
}

.option-card.selected .option-label {
    color: #ffffff;
}

/* --- CONDITIONAL FIELDS --- */
.conditional-field {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.3s ease;
    opacity: 0;
    margin-top: 0;
}

.conditional-field.visible {
    max-height: 200px;
    opacity: 1;
    margin-top: 16px;
}

/* --- FORM INPUTS --- */
.field-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255,255,255,0.78);
    margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(0,153,255,0.15);
    border-radius: 10px;
    padding: 14px 16px;
    color: #ffffff;
    font-family: 'League Spartan', sans-serif;
    font-size: 1rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
    border-color: #0099FF;
    box-shadow: 0 0 16px rgba(0,153,255,0.2);
}

input::placeholder,
textarea::placeholder {
    color: rgba(255,255,255,0.3);
}

textarea {
    resize: vertical;
    min-height: 60px;
}

/* Textarea inside options (Q8, Q10) */
.options[data-type="text"] textarea {
    margin-top: 0;
}

/* --- GATE FORM --- */
.gate-form {
    margin-top: 28px;
}

.form-group {
    margin-bottom: 20px;
}

.checkbox-group {
    margin-top: 24px;
    margin-bottom: 28px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.78);
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: 0;
    height: 0;
    opacity: 0;
    position: absolute;
}

.checkmark {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(0,153,255,0.3);
    border-radius: 5px;
    background: rgba(255,255,255,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease;
    position: relative;
    margin-top: 1px;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkmark {
    background: #0099FF;
    border-color: #0099FF;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkmark::after {
    content: '';
    width: 6px;
    height: 11px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    position: absolute;
    top: 3px;
}

.form-note {
    display: block;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    margin-top: 16px;
}

/* --- LOADING SCREEN --- */
.loading-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(0,153,255,0.15);
    border-top: 3px solid #0099FF;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin-bottom: 32px;
    box-shadow: 0 0 20px rgba(0,153,255,0.25), inset 0 0 10px rgba(0,153,255,0.08);
}

.loading-text {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.78);
    min-height: 28px;
    transition: opacity 0.3s ease;
}

/* --- CONFIRMATION SCREEN --- */
.confirmation-inner {
    text-align: center;
}

.confirmation-check {
    margin-bottom: 24px;
    animation: fadeIn 0.6s ease;
}

.confirmation-box {
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid rgba(0,153,255,0.15);
    border-radius: 16px;
    padding: 8px 24px;
    text-align: left;
    margin-top: 32px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.confirmation-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    color: rgba(255,255,255,0.88);
    font-size: 1rem;
    font-weight: 500;
}

.confirmation-step + .confirmation-step {
    border-top: 1px solid rgba(255,255,255,0.06);
}

.step-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,153,255,0.1);
    border: 1px solid rgba(0,153,255,0.2);
    border-radius: 10px;
}

/* --- RESULTS --- */
.result-subtitle {
    margin-bottom: 36px;
}

.result-block {
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid rgba(0,153,255,0.12);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
    animation: resultEntrance 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.result-block:nth-child(1) {
    animation-delay: 0.1s;
}

.result-block:nth-child(2) {
    animation-delay: 0.25s;
}

.result-block:nth-child(3) {
    animation-delay: 0.4s;
}

.result-block:nth-child(4) {
    animation-delay: 0.55s;
}

.result-block:nth-child(5) {
    animation-delay: 0.7s;
}

/* Accent bar left */
.result-block::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 16px 0 0 16px;
}

.result-block--forces::before {
    background: #34D399;
}

.result-block--zones::before {
    background: #F59E0B;
}

.result-block--leviers::before {
    background: #0099FF;
}

.result-block-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.result-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.result-icon--check {
    color: #34D399;
}

.result-icon--warning {
    color: #F59E0B;
}

.result-icon--rocket {
    color: #0099FF;
}

.result-block-content {
    color: rgba(255,255,255,0.82);
    font-size: 0.95rem;
    line-height: 1.7;
}

.result-block-content p {
    margin-bottom: 8px;
}

.result-block-content p:last-child {
    margin-bottom: 0;
}

.result-block-content strong {
    color: #ffffff;
    font-weight: 600;
}

.result-block-content ul {
    list-style: none;
    padding: 0;
}

.result-block-content ul li {
    padding: 4px 0;
    padding-left: 18px;
    position: relative;
}

.result-block-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
}

.result-block--forces .result-block-content ul li::before {
    background: #34D399;
}

.result-block--zones .result-block-content ul li::before {
    background: #F59E0B;
}

.result-block--leviers .result-block-content ul li::before {
    background: #0099FF;
}

/* --- CTA SECTION --- */
.cta-section {
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid rgba(0,153,255,0.25);
    border-radius: 16px;
    padding: 32px 28px;
    margin-top: 36px;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 30px rgba(0,153,255,0.06);
}

.cta-section p {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.82);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* --- CAL EMBED --- */
.cal-embed-wrapper {
    margin-top: 36px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid rgba(0,153,255,0.15);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.cal-embed-wrapper h3 {
    text-align: center;
    padding: 24px 20px 0;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
}

.cal-embed-wrapper p {
    text-align: center;
    color: rgba(255,255,255,0.65);
    font-size: 0.95rem;
    padding: 8px 20px 16px;
    line-height: 1.5;
}

.cal-inline-embed {
    width: 100%;
    min-height: 500px;
    overflow: hidden;
}

/* --- CTA BUTTON STATE --- */
.btn-cta {
    font-size: 1.15rem;
    padding: 18px 36px;
    letter-spacing: 0.5px;
}

.btn-cta--clicked {
    background: transparent;
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(0,153,255,0.3);
    box-shadow: none;
    animation: none;
    cursor: default;
    font-size: 0.95rem;
    padding: 12px 24px;
}

.btn-cta--clicked:hover {
    transform: none;
    box-shadow: none;
}

/* Cal wrapper slide-in */
.cal-embed-wrapper {
    animation: slideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- RESPONSIVE --- */
@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
        text-shadow: 0 0 30px rgba(0,153,255,0.25), 0 0 60px rgba(0,153,255,0.08);
    }

    h2 {
        font-size: 1.4rem;
    }

    .question-text {
        font-size: 1.2rem;
    }

    .screen-inner {
        padding: 0 4px;
    }

    .btn-primary {
        padding: 14px 24px;
        font-size: 1rem;
    }

    .option-card {
        padding: 14px 16px;
    }

    .result-block {
        padding: 20px 20px;
    }

    .cta-section {
        padding: 24px 20px;
    }

    .nav-buttons {
        flex-direction: column;
    }

    .nav-buttons .btn-secondary {
        order: 2;
    }

    .nav-buttons .btn-primary {
        order: 1;
    }

    .cal-inline-embed {
        min-height: 420px;
    }
}

/* --- UTILITY --- */
.hidden {
    display: none !important;
}

/* Error state for form validation */
.form-group.error input,
.form-group.error textarea {
    border-color: #EF4444;
}

.form-group .error-message {
    color: #EF4444;
    font-size: 0.8rem;
    margin-top: 6px;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

/* --- AUDIT NOT FOUND (results.html) --- */
.not-found {
    text-align: center;
    padding: 60px 20px;
}

.not-found h2 {
    margin-bottom: 16px;
}

.not-found p {
    color: rgba(255,255,255,0.65);
}
