/* ===== ESTIMATION PAGE STYLES ===== */
/* Self-contained — can be used standalone or with main site */

/* Hero */
.est-hero {
    background: var(--beige, #FDF6E8);
    padding: 50px 0 40px;
    text-align: center;
}

.est-hero-sub {
    font-size: 14px;
    color: var(--gray-600, #4b5563);
    margin-bottom: 8px;
}

.est-hero h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary, #1A1A1A);
}

.est-hero-line {
    width: 60px;
    height: 3px;
    background: var(--accent, #E8A020);
    margin: 20px auto 0;
    border-radius: 3px;
}

/* Section */
.est-section {
    padding: 40px 0 80px;
    background: var(--white, #fff);
}

/* Card Container */
.est-card {
    max-width: 800px;
    margin: 0 auto;
}

/* Questions */
.est-question {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary, #1A1A1A);
    margin: 32px 0 16px;
}

.est-question:first-child {
    margin-top: 0;
}

/* ===== ROOM ROWS ===== */
.est-rooms {
    display: flex;
    flex-direction: column;
}

.est-room-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}

.est-room-row:last-child {
    border-bottom: none;
}

.est-room-label {
    font-size: 15px;
    color: var(--gray-700, #374151);
    font-weight: 500;
}

.est-counter {
    display: flex;
    align-items: center;
    gap: 0;
    user-select: none;
}

.est-counter-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: var(--gray-700, #374151);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.est-counter-btn:first-child {
    border-radius: 6px 0 0 6px;
}

.est-counter-btn:last-child {
    border-radius: 0 6px 6px 0;
}

.est-counter-btn:hover {
    background: var(--accent, #E8A020);
    color: #fff;
    border-color: var(--accent, #E8A020);
}

.est-counter-btn.active {
    background: var(--accent, #E8A020);
    color: #fff;
    border-color: var(--accent, #E8A020);
}

.est-counter-val {
    width: 44px;
    height: 36px;
    border-top: 1px solid #d1d5db;
    border-bottom: 1px solid #d1d5db;
    background: #fff;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary, #1A1A1A);
    line-height: 36px;
}

.est-counter-val.has-value {
    background: #eef2ff;
    color: var(--accent, #E8A020);
    font-weight: 700;
}

/* ===== SURFACE INPUTS ===== */
.est-surfaces-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #e5e7eb;
}

.est-info-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--beige, #FDF6E8);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--gray-700, #374151);
    line-height: 1.6;
}

.est-info-box i {
    color: var(--accent, #E8A020);
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.est-surface-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.est-surface-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.est-surface-row label {
    font-size: 14px;
    color: var(--gray-700, #374151);
    font-weight: 500;
}

.est-surface-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.est-surface-input-wrap input {
    width: 70px;
    height: 38px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary, #1A1A1A);
    background: #f9fafb;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.est-surface-input-wrap input:focus {
    border-color: var(--accent, #E8A020);
    box-shadow: 0 0 0 3px rgba(232,160,32,0.18);
}

.est-surface-input-wrap span {
    font-size: 14px;
    color: var(--gray-600, #4b5563);
}

/* ===== CHECKBOXES ===== */
.est-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.est-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
    font-size: 14px;
    color: var(--gray-700, #374151);
}

.est-checkbox-label:hover {
    background: #f3f4f6;
}

.est-checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s;
}

.est-checkbox-label input[type="checkbox"]:checked {
    background: var(--accent, #E8A020);
    border-color: var(--accent, #E8A020);
}

.est-checkbox-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

/* ===== RADIO BUTTONS ===== */
.est-prestation-group {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.est-prestation-group h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary, #1A1A1A);
    margin-bottom: 12px;
}

.est-radios {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.est-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
    font-size: 14px;
    color: var(--gray-700, #374151);
}

.est-radio-label:hover {
    background: #f3f4f6;
}

.est-radio-label input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s;
}

.est-radio-label input[type="radio"]:checked {
    border-color: var(--accent, #E8A020);
}

.est-radio-label input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent, #E8A020);
}

/* ===== SUBMIT BUTTON ===== */
.est-submit {
    margin-top: 36px;
    width: 100%;
    justify-content: center;
    font-size: 16px;
    padding: 18px;
}

.est-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ===== RESULTS ===== */
.est-result-header {
    margin-bottom: 28px;
}

.est-result-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary, #1A1A1A);
    margin-bottom: 12px;
}

.est-result-header p {
    font-size: 14px;
    color: var(--gray-600, #4b5563);
    line-height: 1.7;
}

/* Result Table */
.est-result-table-wrap {
    overflow-x: auto;
    margin-bottom: 20px;
}

.est-result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.est-result-table thead th {
    text-align: left;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600, #4b5563);
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.est-result-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    color: var(--gray-700, #374151);
    vertical-align: middle;
}

.est-result-table .room-header td {
    font-weight: 700;
    color: var(--primary, #1A1A1A);
    padding-top: 20px;
    padding-bottom: 8px;
    border-bottom: none;
    font-size: 15px;
}

.est-result-table .tva-row td {
    text-align: right;
    font-weight: 500;
    border-bottom: 2px solid #e5e7eb;
    padding-top: 12px;
}

.est-total-row {
    background: #fef2f2;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    margin: 20px 0;
}

.est-total-row .est-total-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #b91c1c;
    font-weight: 500;
}

.est-total-row .est-total-label i {
    font-size: 16px;
}

.est-total-row .est-total-value {
    font-size: 28px;
    font-weight: 800;
    color: #b91c1c;
}

/* Result Note */
.est-result-note {
    margin-bottom: 24px;
}

.est-result-note p {
    font-size: 13px;
    color: var(--gray-400, #9ca3af);
    font-style: italic;
}

/* Result Actions */
.est-result-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.btn-outline {
    background: transparent;
    color: var(--gray-700, #374151);
    border: 1px solid #d1d5db;
}

.btn-outline:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* Result Contact */
.est-result-contact {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px 24px;
    text-align: center;
}

.est-result-contact p {
    font-size: 14px;
    color: var(--gray-600, #4b5563);
}

.est-result-contact a {
    color: var(--accent, #E8A020);
}

.est-result-contact a:hover {
    text-decoration: underline;
}

/* ===== PROGRESS BAR ===== */
.est-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
}

.est-progress-step {
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: #e5e7eb;
    transition: background 0.4s;
}

.est-progress-step.active {
    background: var(--accent, #E8A020);
}

/* ===== ANIMATION ===== */
.est-step {
    animation: estFadeIn 0.4s ease;
}

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

.est-prestation-group {
    animation: estFadeIn 0.3s ease;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .est-hero h1 {
        font-size: 24px;
    }

    .est-room-row {
        padding: 12px 0;
    }

    .est-room-label {
        font-size: 14px;
    }

    .est-result-table {
        font-size: 13px;
    }

    .est-result-table thead th,
    .est-result-table tbody td {
        padding: 8px 10px;
    }

    .est-total-row {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .est-result-actions {
        flex-direction: column;
    }

    .est-result-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .est-counter-btn {
        width: 34px;
        height: 34px;
    }

    .est-counter-val {
        width: 40px;
        height: 34px;
        line-height: 34px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .top-bar, .header, .footer, .floating-btn,
    .est-hero, .est-result-actions, .est-result-contact { display: none !important; }

    .est-section { padding: 0; }
    .est-card { max-width: 100%; }

    .est-result-header h2::before {
        content: 'Peintre Charles Multiservices - ';
    }

    .est-total-row {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
