/* ==========================================================================
   FORMULAIRE D'ESTIMATION — EPO Tools
   Adapté au design system pompe (dark / or / cyan)
   Mobile-first
   ========================================================================== */

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

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

/* Header (title only, no subtitle) */
.pompe-estimation-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, #BF953F, #FCF6BA, #B38728, #FBF5B7, #AA771C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin: 0 0 32px 0;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(74, 155, 168, 0.2);
    line-height: 1.3;
}

/* Form Card */
.pompe-estimation-form {
    background: linear-gradient(135deg, #0d1a26 0%, #132535 50%, #1a3347 100%);
    border: 1px solid rgba(74, 155, 168, 0.3);
    border-radius: 16px;
    padding: 32px 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Section Title */
.pompe-ef-section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #4a9ba8;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 28px 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(74, 155, 168, 0.3);
}

.pompe-ef-section-title:first-of-type {
    margin-top: 0;
}

/* Form Groups & Rows */
.pompe-ef-group {
    margin-bottom: 20px;
}

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

/* Labels */
.pompe-ef-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
}

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

.pompe-ef-hint {
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.45);
}

/* Inputs, Selects, Textareas */
.pompe-ef-input,
.pompe-ef-select,
.pompe-ef-textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    transition: border-color 0.3s, background-color 0.3s, box-shadow 0.3s;
    appearance: none;
    box-sizing: border-box;
}

.pompe-ef-input:focus,
.pompe-ef-select:focus,
.pompe-ef-textarea:focus {
    outline: none;
    border-color: #4a9ba8;
    background: rgba(74, 155, 168, 0.1);
    box-shadow: 0 0 0 3px rgba(74, 155, 168, 0.2);
}

.pompe-ef-input::placeholder,
.pompe-ef-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.pompe-ef-input.error,
.pompe-ef-select.error,
.pompe-ef-textarea.error {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.08);
}

/* 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='%234a9ba8' 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;
}

/* Select option styling for dropdown */
.pompe-ef-select option {
    background: #1a2332;
    color: #fff;
}

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

/* Error Messages */
.pompe-ef-error {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #e74c3c;
    margin-top: 6px;
    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 feedback */
.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);
}

/* Checkbox */
.pompe-ef-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

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

.pompe-ef-checkbox-box {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(191, 149, 63, 0.6);
    border-radius: 4px;
    flex-shrink: 0;
    position: relative;
    margin-top: 2px;
    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: 3px;
    left: 6px;
    width: 6px;
    height: 10px;
    border: solid #0d1a26;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

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

.pompe-ef-checkbox-text a:hover {
    color: #4a9ba8;
}

/* File Upload Zone */
.pompe-ef-upload {
    position: relative;
    border: 2px dashed rgba(74, 155, 168, 0.4);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    background: rgba(74, 155, 168, 0.06);
}

.pompe-ef-upload:hover,
.pompe-ef-upload.dragover {
    background: rgba(74, 155, 168, 0.12);
    border-color: #4a9ba8;
}

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

.pompe-ef-upload-icon {
    color: #4a9ba8;
    margin-bottom: 12px;
}

.pompe-ef-upload-text {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 6px 0;
}

.pompe-ef-upload-text span {
    color: #4a9ba8;
    text-decoration: underline;
}

.pompe-ef-upload-formats {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    margin: 0;
}

/* Upload Preview */
.pompe-ef-preview {
    display: none;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    min-height: 80px;
}

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

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

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

.pompe-ef-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    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: 16px;
    line-height: 1;
    transition: background-color 0.3s, transform 0.3s;
}

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

/* Submit Button */
.pompe-ef-submit {
    margin-top: 30px;
}

.pompe-ef-button {
    width: 100%;
    padding: 18px 32px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #0d1a26;
    background: linear-gradient(135deg, #D4AF37 0%, #BF953F 50%, #AA771C 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.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: #0d1a26;
}

.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(13, 26, 38, 0.3);
    border-top-color: #0d1a26;
    border-radius: 50%;
    animation: pompe-ef-spin 0.6s linear infinite;
}

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

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

/* Mentions */
.pompe-ef-mentions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.pompe-ef-mentions svg {
    color: #4a9ba8;
    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: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(191, 149, 63, 0.2);
    border-radius: 16px;
    animation: pompe-ef-fadeScale 0.5s ease both;
}

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

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

.pompe-ef-success-text {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 30px 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 {
    opacity: 1;
}

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

/* ==========================================================================
   Section sur fond clair (.pompe-bg-white)
   ========================================================================== */
.pompe-bg-white .pompe-estimation-title {
    background: linear-gradient(135deg, #BF953F, #FCF6BA, #B38728, #FBF5B7, #AA771C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pompe-bg-white .pompe-estimation-subtitle {
    color: #4a9ba8;
}

.pompe-bg-white .pompe-estimation-form {
    background: linear-gradient(135deg, #0d1a26 0%, #132535 50%, #1a3347 100%);
    border: 1px solid rgba(74, 155, 168, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.pompe-bg-white .pompe-ef-label {
    color: rgba(255, 255, 255, 0.85);
}

.pompe-bg-white .pompe-ef-hint {
    color: rgba(255, 255, 255, 0.45);
}

.pompe-bg-white .pompe-ef-input,
.pompe-bg-white .pompe-ef-select,
.pompe-bg-white .pompe-ef-textarea {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.pompe-bg-white .pompe-ef-input:focus,
.pompe-bg-white .pompe-ef-select:focus,
.pompe-bg-white .pompe-ef-textarea:focus {
    border-color: #4a9ba8;
    background: rgba(74, 155, 168, 0.1);
    box-shadow: 0 0 0 3px rgba(74, 155, 168, 0.2);
}

.pompe-bg-white .pompe-ef-input::placeholder,
.pompe-bg-white .pompe-ef-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.pompe-bg-white .pompe-ef-select option {
    background: #1a2332;
    color: #fff;
}

.pompe-bg-white .pompe-ef-checkbox {
    color: rgba(255, 255, 255, 0.7);
}

.pompe-bg-white .pompe-ef-upload {
    background: rgba(74, 155, 168, 0.06);
    border-color: rgba(74, 155, 168, 0.4);
}

.pompe-bg-white .pompe-ef-upload-text {
    color: rgba(255, 255, 255, 0.7);
}

.pompe-bg-white .pompe-ef-upload-formats {
    color: rgba(255, 255, 255, 0.35);
}

.pompe-bg-white .pompe-ef-mentions span {
    color: rgba(255, 255, 255, 0.5);
}

.pompe-bg-white .pompe-ef-mentions {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.pompe-bg-white .pompe-ef-success {
    background: linear-gradient(135deg, #0d1a26 0%, #132535 50%, #1a3347 100%);
    border: 1px solid rgba(74, 155, 168, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.pompe-bg-white .pompe-ef-success-title {
    color: #fff;
}

.pompe-bg-white .pompe-ef-success-text {
    color: rgba(255, 255, 255, 0.7);
}

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

    .pompe-estimation-title {
        font-size: 32px;
    }

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

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

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

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

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

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

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

    .pompe-estimation-title {
        font-size: 36px;
    }

    .pompe-estimation-form {
        padding: 50px;
    }

    .pompe-ef-button {
        width: auto;
        min-width: 350px;
        margin: 0 auto;
        display: block;
    }

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