/* Simulateur d'aides Pompe à Chaleur — styles spécifiques à /devis */
/* Complète variables.css + landing.css (container, typographie, form-input de base) */

/* --- Fond animé (dégradés flottants) — scopé à cette page uniquement --- */
body {
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.28;
    z-index: 0;
    pointer-events: none;
}

body::before {
    width: 440px;
    height: 440px;
    background: var(--accent);
    top: -140px;
    left: -140px;
}

body::after {
    width: 400px;
    height: 400px;
    background: #3B82F6;
    bottom: -160px;
    right: -140px;
}

.landing-container {
    position: relative;
    z-index: 1;
    animation: simCardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes simCardIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: no-preference) {

    body::before,
    body::after {
        animation: simBlobFloat 16s ease-in-out infinite;
    }

    body::after {
        animation-delay: -8s;
    }
}

@keyframes simBlobFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(26px, -18px) scale(1.08);
    }
}

/* --- Contenant : bandeau sombre (logo + progression) + corps clair --- */
.simulator-container {
    text-align: left;
    max-width: 460px;
    padding: 0;
    overflow: hidden;
    border-radius: 24px;
    background: var(--white);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow:
        0 30px 60px -20px rgba(15, 23, 42, 0.35),
        0 0 0 1px rgba(15, 23, 42, 0.04),
        0 0 80px -20px rgba(0, 216, 99, 0.25);
}

.simulator-container::before {
    content: none;
}

.sim-header {
    position: relative;
    background: linear-gradient(155deg, var(--primary) 0%, var(--primary-light) 55%, #142235 100%);
    padding: 26px 32px 24px;
    overflow: hidden;
}

.simulator-container .logo {
    text-align: center;
    position: relative;
    margin-bottom: 16px;
}

.simulator-container .logo img {
    height: 56px;
    width: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

.sim-body {
    padding: 26px 28px 30px;
}

/* --- Progress bar --- */
.sim-progress {
    position: relative;
    margin-bottom: 0;
}

.sim-progress-bar {
    width: 100%;
    height: 7px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 10px;
}

.sim-progress-fill {
    position: relative;
    height: 100%;
    width: 20%;
    background: linear-gradient(90deg, var(--accent), var(--accent-dark));
    border-radius: var(--radius-full);
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.sim-progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 40%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
}

@media (prefers-reduced-motion: no-preference) {
    .sim-progress-fill::after {
        animation: simShimmer 1.8s ease-in-out infinite;
    }
}

@keyframes simShimmer {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(280%);
    }
}

.sim-progress-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.01em;
}

/* --- Steps --- */
.sim-step {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sim-step.active {
    display: block;
}

.sim-step h1 {
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 8px;
}

.sim-subtitle {
    text-align: center;
    color: var(--gray-500);
    font-weight: 600;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.simulator-container .proof-badge {
    display: flex;
    margin: 0 auto 28px;
    width: fit-content;
}

.sim-question {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 14px;
}

.sim-step .sim-question:not(:first-of-type) {
    margin-top: 28px;
}

/* Étape à question unique (2 à 7) : un peu plus de présence, l'écran reste très court */
.sim-question-solo {
    font-size: 1.25rem;
    margin-top: 4px;
    margin-bottom: 20px;
}

.sim-hint {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: -8px;
    margin-bottom: 14px;
}

/* --- Option cards (choix) --- */
.option-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 8px;
}

.option-cards.two-col {
    grid-template-columns: repeat(2, 1fr);
}

.option-cards.five-col {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.option-cards.three-col {
    grid-template-columns: repeat(3, 1fr);
}

.option-cards.stack {
    grid-template-columns: 1fr;
    gap: 10px;
}

.option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    padding: 16px 10px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 14px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    line-height: 1.25;
    -webkit-tap-highlight-color: transparent;
}

.option-card i {
    font-size: 1.5rem;
    color: var(--gray-400);
    transition: var(--transition);
}

.option-card:hover {
    border-color: var(--gray-300);
    background: white;
}

.option-card:active {
    transform: scale(0.98);
}

.option-card.selected {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 216, 99, 0.1);
}

.option-card.selected i {
    color: var(--accent-dark);
}

@media (prefers-reduced-motion: no-preference) {
    .option-card.selected {
        animation: simSelectPop 0.3s ease;
    }
}

@keyframes simSelectPop {
    0% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Icônes colorées par type de chauffage (étape 2) — repère visuel rapide, prime sur .selected */
.option-cards.three-col .option-card i:first-child {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 2px;
}

.option-cards.three-col .option-card i.chip-amber {
    background: rgba(245, 158, 11, 0.14);
    color: #D97706;
}

.option-cards.three-col .option-card i.chip-orange {
    background: rgba(249, 115, 22, 0.14);
    color: #EA580C;
}

.option-cards.three-col .option-card i.chip-blue {
    background: rgba(59, 130, 246, 0.14);
    color: #2563EB;
}

.option-cards.three-col .option-card i.chip-green {
    background: var(--accent-light);
    color: var(--accent-dark);
}

.option-cards.three-col .option-card i.chip-gray {
    background: var(--gray-100);
    color: var(--gray-500);
}

.option-cards.five-col .option-card {
    padding: 14px 4px;
    font-size: 1.05rem;
    font-weight: 800;
}

/* Cartes en liste horizontale (ex: tranches de revenu) — icône + libellé alignés à gauche */
.option-cards.stack .option-card {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 16px 18px;
    font-size: 1rem;
    gap: 14px;
}

.option-cards.stack .option-card i:first-child {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.option-cards.stack .option-card i.ph-caret-right {
    font-size: 1.1rem;
    margin-left: auto;
    color: var(--gray-300);
}

/* --- Navigation --- */
.sim-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
}

.btn-back,
.btn-next {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 700;
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition);
    min-height: 52px;
}

.btn-back {
    background: transparent;
    border: 2px solid var(--gray-200);
    color: var(--gray-600);
    padding: 14px 18px;
}

.btn-back:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.btn-next {
    flex: 1;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    border: none;
    padding: 16px 20px;
    font-size: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 216, 99, 0.2);
}

.btn-next:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 216, 99, 0.3);
}

.btn-next:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

/* --- Étape finale : déblocage + résultat --- */
.unlock-header {
    text-align: center;
    margin-bottom: 24px;
}

.unlock-header i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 8px;
    display: inline-block;
}

.unlock-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 6px;
}

.unlock-header p {
    color: var(--gray-500);
    font-weight: 600;
    font-size: 0.95rem;
}

.teaser-card {
    position: relative;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 20px;
    padding: 28px 20px;
    margin-bottom: 24px;
    color: white;
    overflow: hidden;
}

.teaser-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.teaser-value {
    display: block;
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    transition: filter 0.5s ease;
}

.teaser-value.blurred {
    filter: blur(9px);
    user-select: none;
}

.teaser-lock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
}

.teaser-lock i {
    font-size: 1.1rem;
    color: #FCD34D;
}

#leadForm .form-group {
    margin-bottom: 16px;
}

#leadForm .form-input {
    font-size: 1.05rem;
    padding: 16px;
}

#leadForm .btn-submit {
    box-shadow: 0 4px 6px -1px rgba(0, 216, 99, 0.25), 0 0 0 0 rgba(0, 216, 99, 0.35);
}

@media (prefers-reduced-motion: no-preference) {
    #leadForm .btn-submit {
        animation: simPulseGlow 2.4s ease-in-out infinite;
    }
}

@keyframes simPulseGlow {

    0%,
    100% {
        box-shadow: 0 4px 6px -1px rgba(0, 216, 99, 0.25), 0 0 0 0 rgba(0, 216, 99, 0.35);
    }

    50% {
        box-shadow: 0 4px 6px -1px rgba(0, 216, 99, 0.25), 0 0 0 10px rgba(0, 216, 99, 0);
    }
}

.trust-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 14px;
}

.trust-line i {
    color: var(--accent-dark);
}

/* --- Résultat révélé --- */
.reveal-result {
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-result .result-total {
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.reveal-result .result-line {
    opacity: 0;
    animation: simSlideUp 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.reveal-result .result-line:nth-child(1) {
    animation-delay: 0.15s;
}

.reveal-result .result-line:nth-child(2) {
    animation-delay: 0.28s;
}

@keyframes simSlideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal-result .result-line {
        opacity: 1;
        animation: none;
    }
}

.reveal-result h2.sim-question {
    text-align: center;
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.result-badge {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 20px;
}

.result-badge strong {
    color: var(--primary);
}

.result-total {
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 20px;
    padding: 28px 20px;
    margin-bottom: 20px;
    color: white;
}

.result-total-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.result-total-value {
    display: block;
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.result-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.result-line {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 12px;
    padding: 14px 16px;
}

.result-line i {
    font-size: 1.3rem;
    color: var(--accent-dark);
    background: var(--accent-light);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.result-line span {
    flex: 1;
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.92rem;
}

.result-line strong {
    font-size: 1.05rem;
    color: var(--primary);
}

.result-cost-note {
    background: var(--accent-light);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 0.88rem;
    color: var(--primary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.result-elig-note {
    display: none;
    background: #FFF7ED;
    border: 1px solid #FED7AA;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 0.85rem;
    color: #9A3412;
    margin-bottom: 16px;
    line-height: 1.5;
}

.result-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 24px;
    line-height: 1.5;
}

.result-disclaimer i {
    flex-shrink: 0;
    margin-top: 2px;
}

.reveal-result .call-box {
    text-align: center;
}

.reveal-result .btn-return {
    display: flex;
    width: fit-content;
    margin: 24px auto 0;
}

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

    .option-cards.three-col {
        grid-template-columns: repeat(2, 1fr);
    }

    .option-cards.five-col {
        grid-template-columns: repeat(5, 1fr);
    }

    .option-card {
        min-height: 56px;
    }

    .option-cards.stack .option-card {
        padding: 15px 16px;
    }

    .result-total-value,
    .teaser-value {
        font-size: 2.2rem;
    }

    .sim-step h1 {
        font-size: 1.35rem;
    }

    .unlock-header i {
        font-size: 2.1rem;
    }

    .unlock-header h2 {
        font-size: 1.2rem;
    }

    #leadForm .form-input {
        font-size: 16px;
        /* évite le zoom auto iOS au focus */
    }

    .simulator-container {
        border-radius: 20px;
    }

    .sim-header {
        padding: 24px 22px 22px;
    }

    .sim-body {
        padding: 24px 22px 28px;
    }

    .simulator-container .logo img {
        height: 46px;
    }
}
