/* ==========================================================================
   FORMULAIRE D'ESTIMATION — EPO Tools
   Design: carte blanche sur fond sombre + wizard 3 étapes
   Mobile-first
   ========================================================================== */

/* Section */
.pompe-estimation-section {
    padding: 50px 20px;
}

.pompe-estimation-container {
    max-width: 720px;
    margin: 0 auto;
}

/* Form Card — white on dark */
.pompe-estimation-form {
    background: #fff;
    border-radius: 16px;
    padding: 32px 24px;
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.15),
        0 1px 3px rgba(0, 0, 0, 0.08);
    border-top: 3px solid transparent;
    border-image: linear-gradient(135deg, #BF953F, #d4af37, #AA771C) 1;
    border-image-slice: 1;
    position: relative;
    overflow: hidden;
}

/* Gold top bar (replaces border-image for rounded corners) */
.pompe-estimation-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #BF953F, #d4af37, #AA771C);
}

/* Reset border-image (incompatible with border-radius) */
.pompe-estimation-form {
    border-image: none;
    border-top: none;
}

/* ─── WIZARD STEPS PROGRESS ─── */
.pompe-ef-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
    padding: 0 10px;
}

.pompe-ef-step-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.pompe-ef-step-indicator:not(.active):not(.completed) {
    opacity: 0.4;
}

.pompe-ef-step-indicator.completed {
    opacity: 0.7;
}

.pompe-ef-step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    border: 2px solid #ddd;
    color: #999;
    background: #fff;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.pompe-ef-step-indicator.active .pompe-ef-step-dot {
    background: linear-gradient(135deg, #BF953F, #AA771C);
    color: #fff;
    border-color: #BF953F;
    box-shadow: 0 2px 12px rgba(191, 149, 63, 0.3);
}

.pompe-ef-step-indicator.completed .pompe-ef-step-dot {
    background: #BF953F;
    color: #fff;
    border-color: #BF953F;
}

.pompe-ef-step-label {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #999;
    display: none;
}

.pompe-ef-step-indicator.active .pompe-ef-step-label {
    color: #1a1a2e;
    font-weight: 600;
}

.pompe-ef-step-indicator.completed .pompe-ef-step-label {
    color: #BF953F;
}

.pompe-ef-step-line {
    width: 40px;
    height: 2px;
    background: #e0e0e0;
    margin: 0 8px;
    transition: background 0.3s;
    flex-shrink: 0;
}

.pompe-ef-step-line.completed {
    background: #BF953F;
}

/* ─── WIZARD PANELS ─── */
.pompe-ef-panel {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.pompe-ef-panel.active {
    display: block;
}

.pompe-ef-panel.visible {
    opacity: 1;
    transform: translateX(0);
}

.pompe-ef-panel.slide-out-left {
    opacity: 0;
    transform: translateX(-20px);
}

/* Panel header */
.pompe-ef-panel-header {
    margin-bottom: 24px;
}

.pompe-ef-panel-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 6px 0;
}

.pompe-ef-panel-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #777;
    margin: 0;
}

/* ─── FORM GROUPS ─── */
.pompe-ef-group {
    margin-bottom: 20px;
}

.pompe-ef-row {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ─── LABELS ─── */
.pompe-ef-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.pompe-ef-req {
    color: #BF953F;
}

.pompe-ef-hint {
    font-size: 12px;
    font-weight: 400;
    color: #999;
}

/* ─── INPUTS / SELECTS / TEXTAREAS ─── */
.pompe-ef-input,
.pompe-ef-select,
.pompe-ef-textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #1a1a2e;
    background: #f8fafb;
    border: 1.5px solid #e0e4e8;
    border-radius: 10px;
    transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
    appearance: none;
    box-sizing: border-box;
}

.pompe-ef-input:focus,
.pompe-ef-select:focus,
.pompe-ef-textarea:focus {
    outline: none;
    border-color: #BF953F;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(191, 149, 63, 0.12);
}

.pompe-ef-input::placeholder,
.pompe-ef-textarea::placeholder {
    color: #aaa;
}

.pompe-ef-input.error,
.pompe-ef-select.error,
.pompe-ef-textarea.error {
    border-color: #e74c3c;
    background: #fef7f6;
}

/* Select arrow */
.pompe-ef-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23BF953F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
    background-color: #f8fafb;
}

.pompe-ef-select option {
    background: #fff;
    color: #1a1a2e;
}

/* Textarea */
.pompe-ef-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ─── ERROR MESSAGES ─── */
.pompe-ef-error {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #e74c3c;
    margin-top: 4px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.pompe-ef-group.has-error .pompe-ef-error {
    max-height: 40px;
    opacity: 1;
}

/* Valid field */
.pompe-ef-group.is-valid .pompe-ef-input,
.pompe-ef-group.is-valid .pompe-ef-select,
.pompe-ef-group.is-valid .pompe-ef-textarea {
    border-color: rgba(39, 174, 96, 0.4);
}

/* ─── SECTION TITLE (dynamic sections) ─── */
.pompe-ef-section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #BF953F;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 8px 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(191, 149, 63, 0.2);
}

/* ─── CHECKBOX ─── */
.pompe-ef-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.pompe-ef-checkbox input {
    display: none;
}

.pompe-ef-checkbox-box {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 5px;
    flex-shrink: 0;
    position: relative;
    margin-top: 1px;
    transition: background-color 0.3s, border-color 0.3s;
}

.pompe-ef-checkbox input:checked + .pompe-ef-checkbox-box {
    background: #BF953F;
    border-color: #BF953F;
}

.pompe-ef-checkbox input:checked + .pompe-ef-checkbox-box::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.pompe-ef-checkbox-text a {
    color: #BF953F;
    text-decoration: underline;
}

/* ─── FILE UPLOAD ─── */
.pompe-ef-upload {
    position: relative;
    border: 2px dashed #d0d5da;
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    background: #f8fafb;
}

.pompe-ef-upload:hover,
.pompe-ef-upload.dragover {
    background: rgba(191, 149, 63, 0.04);
    border-color: #BF953F;
}

.pompe-ef-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.pompe-ef-upload-icon {
    color: #BF953F;
    margin-bottom: 10px;
    opacity: 0.7;
}

.pompe-ef-upload-text {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #666;
    margin: 0 0 4px 0;
}

.pompe-ef-upload-text span {
    color: #BF953F;
    font-weight: 600;
    text-decoration: underline;
}

.pompe-ef-upload-formats {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: #aaa;
    margin: 0;
}

/* Upload Preview */
.pompe-ef-preview {
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    min-height: 70px;
}

.pompe-ef-preview:not(:empty) {
    display: flex !important;
}

.pompe-ef-preview-item {
    position: relative;
    width: 70px;
    height: 70px;
    min-width: 70px;
    min-height: 70px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #f0f0f0;
    flex-shrink: 0;
}

.pompe-ef-preview-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pompe-ef-preview-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 22px;
    height: 22px;
    background: rgba(231, 76, 60, 0.9);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    transition: background-color 0.3s, transform 0.3s;
}

.pompe-ef-preview-remove:hover {
    background: #e74c3c;
    transform: scale(1.1);
}

/* ─── NAVIGATION BUTTONS ─── */
.pompe-ef-nav {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.pompe-ef-nav-back {
    padding: 13px 24px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #777;
    background: none;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.pompe-ef-nav-back:hover {
    border-color: #999;
    color: #444;
}

.pompe-ef-nav-next {
    flex: 1;
    padding: 13px 28px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    background: linear-gradient(135deg, #BF953F, #AA771C);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(191, 149, 63, 0.25);
}

.pompe-ef-nav-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(191, 149, 63, 0.4);
}

/* ─── SUBMIT BUTTON ─── */
.pompe-ef-submit {
    margin-top: 28px;
}

.pompe-ef-button {
    width: 100%;
    padding: 16px 32px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #fff;
    background: linear-gradient(135deg, #BF953F 0%, #d4af37 50%, #AA771C 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: block;
    text-align: center;
    box-shadow: 0 4px 20px rgba(191, 149, 63, 0.3);
}

.pompe-ef-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(191, 149, 63, 0.4);
}

.pompe-ef-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.pompe-ef-button.loading .pompe-ef-btn-text {
    visibility: hidden;
}

.pompe-ef-button .pompe-ef-btn-loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    align-items: center;
    gap: 10px;
    color: #fff;
}

.pompe-ef-button.loading .pompe-ef-btn-loading {
    display: flex;
}

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

.pompe-ef-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pompe-ef-spin 0.6s linear infinite;
}

.pompe-ef-button--secondary {
    background: transparent;
    color: #BF953F;
    border: 2px solid #BF953F;
    box-shadow: none;
}

.pompe-ef-button--secondary:hover {
    background: #BF953F;
    color: #fff;
}

/* ─── MENTIONS / TRUST ─── */
.pompe-ef-mentions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #eee;
}

.pompe-ef-mentions span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #999;
}

.pompe-ef-mentions svg {
    color: #BF953F;
    flex-shrink: 0;
}

/* ─── SUCCESS MESSAGE ─── */
@keyframes pompe-ef-fadeScale {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.pompe-ef-success {
    display: none;
    text-align: center;
    padding: 50px 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    animation: pompe-ef-fadeScale 0.5s ease both;
}

.pompe-ef-success-icon {
    color: #BF953F;
    margin-bottom: 20px;
}

.pompe-ef-success-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 12px 0;
}

.pompe-ef-success-text {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #666;
    margin: 0 0 28px 0;
    line-height: 1.6;
}

/* ─── DYNAMIC SECTIONS ─── */
.pompe-ef-dynamic-section {
    display: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.pompe-ef-dynamic-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Photos group — hidden until category is selected */
.pompe-ef-photos-group {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pompe-ef-photos-group.active {
    display: block;
    opacity: 1;
}

/* Skip link (optional photos) */
.pompe-ef-skip {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #999;
    cursor: pointer;
    border: none;
    background: none;
    text-decoration: underline;
    transition: color 0.3s;
}

.pompe-ef-skip:hover {
    color: #666;
}

/* ─── HEADER (standalone title — used when not in wizard) ─── */
.pompe-estimation-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    text-align: center;
    margin: 0 0 28px 0;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
    line-height: 1.3;
    display: none; /* hidden in wizard mode — panels have their own headers */
}

/* ==========================================================================
   Tablet (600px+)
   ========================================================================== */
@media (min-width: 600px) {
    .pompe-estimation-section {
        padding: 60px 30px;
    }

    .pompe-estimation-form {
        padding: 40px 36px;
    }

    .pompe-ef-row--2cols {
        flex-direction: row;
        gap: 16px;
    }

    .pompe-ef-row--2cols .pompe-ef-group {
        flex: 1;
    }

    .pompe-ef-mentions {
        flex-direction: row;
        justify-content: center;
        gap: 28px;
    }

    .pompe-ef-preview-item {
        width: 90px;
        height: 90px;
    }

    .pompe-ef-step-label {
        display: block;
    }

    .pompe-ef-step-line {
        width: 60px;
    }
}

/* ==========================================================================
   Desktop (1024px+)
   ========================================================================== */
@media (min-width: 1024px) {
    .pompe-estimation-section {
        padding: 80px 40px;
    }

    .pompe-estimation-container {
        max-width: 780px;
    }

    .pompe-estimation-form {
        padding: 48px 44px;
    }

    .pompe-ef-panel-title {
        font-size: 22px;
    }

    .pompe-ef-button {
        width: auto;
        min-width: 320px;
        margin: 0 auto;
    }

    .pompe-ef-submit {
        text-align: center;
    }

    .pompe-ef-step-line {
        width: 80px;
    }
}
