* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #00a2b8 0%, #007f90 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 900px;
    width: 100%;
}

/* Site logo in header */
.site-logo {
    display: block;
    max-height: 64px;
    width: auto;
    margin-bottom: 12px;
}

.eyebrow {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #00a2b8;
    margin-bottom: 10px;
}

h1 {
    font-size: 2.5rem;
    color: #2d3748;
    margin-bottom: 15px;
}

.lead {
    font-size: 1.1rem;
    color: #718096;
    line-height: 1.6;
    margin-bottom: 40px;
}

.simulator {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.option-group {
    margin-bottom: 0;
    scroll-margin-top: 24px;
    padding-top: 10px;
}

.option-group + .option-group {
    padding-top: 18px;
    border-top: 1px solid #edf2f7;
}

.option-group h2 {
    font-size: 1.3rem;
    color: #2d3748;
    margin-bottom: 20px;
    font-weight: 600;
}

.option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.option-header h2 {
    margin-bottom: 0;
}

.secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #00a2b8;
    background: #ffffff;
    color: #007f90;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.secondary-action:hover {
    background: #e2fbfd;
    transform: translateY(-1px);
}

.color-examples {
    margin: 0 0 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
}

.color-examples img {
    display: block;
    width: 100%;
    height: auto;
}

.base-price-summary {
    border: 1px solid #d9edf2;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fcfd 0%, #eefbfd 100%);
    padding: 16px 18px;
}

.base-price-label {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #007f90;
    margin-bottom: 6px;
}

.base-price-value {
    font-size: 1.15rem;
    font-weight: 600;
    color: #2d3748;
}

.base-price-value strong {
    color: #00a2b8;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.option-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-family: inherit;
}

.option-card:hover {
    border-color: #00a2b8;
    box-shadow: 0 4px 12px rgba(0, 162, 184, 0.1);
    transform: translateY(-2px);
}

.option-card.is-selected {
    border-color: #00a2b8;
    background: linear-gradient(135deg, rgba(0, 162, 184, 0.05) 0%, rgba(0, 127, 144, 0.05) 100%);
    box-shadow: 0 8px 24px rgba(0, 162, 184, 0.2);
}

/* Primary action button used for next/pass buttons */
.primary-action {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    background: linear-gradient(90deg, #00a2b8 0%, #007f90 100%);
    color: #ffffff;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 127, 144, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    text-align: center;
}

.primary-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 127, 144, 0.22);
}

.primary-action:disabled,
.primary-action.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Large primary button variant for estimation */
.primary-action.large {
    padding: 14px 22px;
    font-size: 1.15rem;
    border-radius: 10px;
}

/* Center the estimation container inside result card */
#estimation-container {
    text-align: center;
}

.pdf-export-container {
    margin-top: 14px;
    text-align: center;
}

.pdf-export-container .secondary-action {
    min-width: 220px;
}

/* Info icon + tooltip */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 8px;
    background: #e2fbfd;
    color: #007f90;
    border-radius: 50%;
    border: 1px solid rgba(0, 162, 184, 0.15);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.info-icon::after {
    content: '?';
}

.tooltip {
    position: fixed;
    max-width: 360px;
    max-height: calc(100vh - 24px);
    overflow: auto;
    background: white;
    color: #2d3748;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    padding: 12px 14px;
    font-size: 0.95rem;
    line-height: 1.4;
    z-index: 1200;
    display: none;
}

.tooltip.show {
    display: block;
    animation: sectionFadeIn 220ms ease both;
}

.tooltip .muted {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #718096;
}

.required-asterisk {
    color: #00a2b8;
    font-weight: 800;
    margin-left: 6px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.card-price {
    font-size: 1rem;
    font-weight: 700;
    color: #00a2b8;
    margin-bottom: 10px;
}

.card-description {
    font-size: 0.9rem;
    color: #718096;
    line-height: 1.5;
}

.result-card {
    background: linear-gradient(135deg, #00a2b8 0%, #007f90 100%);
    border-radius: 12px;
    padding: 30px;
    color: white;
    margin-bottom: 30px;
    text-align: center;
}

.result-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.result-value {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.result-note,
.result-empty {
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.95;
}

.result-note {
    display: none;
}

.back-link {
    display: inline-block;
    color: #00a2b8;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: color 0.3s ease;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
}

.back-link:hover {
    color: #007f90;
    border-bottom-color: #007f90;
}

/* Responsive design */
@media (max-width: 768px) {
    .page-card {
        padding: 25px;
    }

    h1 {
        font-size: 2rem;
    }

    .lead {
        font-size: 1rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .result-value {
        font-size: 2rem;
    }

    .secondary-action {
        font-size: 0.9rem;
        padding: 7px 10px;
    }

    .pdf-export-container .secondary-action {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .page-card {
        padding: 15px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .option-card {
        padding: 15px;
    }

    .result-card {
        padding: 20px;
    }
}

/* util */
.hidden {
    display: none;
}

.fade-in-section {
    animation: sectionFadeIn 420ms ease forwards;
}

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .fade-in-section {
        animation: none;
    }
}

/* Visuel pour option désactivée */
.option-card.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    text-decoration: line-through;
}
