/* EasyFilm Devis Form Stylesheet - Custom Match */

.easyfilm-devis-container {
    font-family: Arial, Helvetica, sans-serif;
    max-width: 1000px;
    margin: 20px auto;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: none;
}

/* Header */
.easyfilm-devis-header {
    text-align: center;
    margin-bottom: 30px;
}

.easyfilm-devis-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.easyfilm-devis-title::after {
    display: none;
}

.easyfilm-devis-subtitle {
    font-size: 14px;
    color: #4a4a4a;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Form Sections - Flat layout */
.ef-form-section {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: none;
}

.ef-form-section:hover {
    box-shadow: none;
}

/* Hide Section Titles & Descriptions to match the screenshot */
.ef-section-title,
.ef-section-desc {
    display: none;
}

/* Grids */
.ef-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.ef-grid-3 {
    display: grid;
    grid-template-columns: 1.5fr 4.25fr 4.25fr;
    gap: 15px;
}

@media (max-width: 768px) {
    .ef-grid-2, .ef-grid-3 {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Form Controls */
.ef-form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.ef-form-group label {
    font-size: 12px;
    font-weight: 700;
    color: #555555;
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.ef-form-group label::after {
    content: '';
}

/* Dynamic Red Asterisk for Required Fields */
.ef-form-group label[for*="civilite"]::after,
.ef-form-group label[for*="nom"]::after,
.ef-form-group label[for*="prenom"]::after,
.ef-form-group label[for*="email"]::after,
.ef-form-group label[for*="telephone"]::after,
.ef-form-group label[for*="adresse"]::after,
.ef-form-group label[for*="code_postal"]::after,
.ef-form-group label[for*="ville"]::after,
.ef-form-group label[for*="raison_sociale"]::after,
.ef-form-group label[for*="siret"]::after,
.ef-form-group label[for*="project_description"]::after {
    content: ' *';
    color: #ef4444;
}

.ef-form-group input[type="text"],
.ef-form-group input[type="email"],
.ef-form-group input[type="tel"],
.ef-form-group select {
    font-family: inherit;
    font-size: 14px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    background-color: #ffffff;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.ef-form-group textarea {
    font-family: inherit;
    font-size: 14px;
    padding: 10px 12px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    background-color: #ffffff;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.ef-form-group input:focus,
.ef-form-group select:focus,
.ef-form-group textarea:focus {
    border-color: #66cc00;
    box-shadow: none;
    background-color: #ffffff;
}

.ef-form-group input::placeholder,
.ef-form-group textarea::placeholder {
    color: #b3b3b3;
}

/* Client Type Cards */
.ef-client-type-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.ef-client-type-label {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border: 2px solid #cccccc;
    border-radius: 4px;
    cursor: pointer;
    background-color: #ffffff;
    transition: all 0.25s ease;
}

.ef-client-type-label:hover {
    border-color: #999999;
    background-color: #fafafa;
}

.ef-client-type-label.active {
    border-color: #66cc00;
    background-color: #ffffff;
    box-shadow: 0 5px 15px rgba(102, 204, 0, 0.15);
    transform: translateY(-2px);
}

.ef-client-type-label .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #666666;
    margin-bottom: 0;
    margin-right: 8px;
}

.ef-client-type-label.active .dashicons {
    color: #66cc00;
}

.ef-client-type-label .label-text {
    font-size: 14px;
    font-weight: 700;
    color: #555555;
    text-transform: uppercase;
}

.ef-client-type-label.active .label-text {
    color: #66cc00;
}

/* Glazing Table Styles */
.ef-vitrages-table-wrapper {
    border: 1px solid #cccccc;
    border-radius: 4px;
    background: #ffffff;
    margin-bottom: 15px;
}

.ef-vitrages-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.ef-vitrages-table th {
    background: #f2f2f2;
    color: #555555;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 10px 12px;
    border-bottom: 1px solid #cccccc;
}

.ef-vitrages-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #dddddd;
}

/* Responsive Table Layout for Mobile & Tablet */
@media (max-width: 768px) {
    .ef-vitrages-table-wrapper {
        border: none !important;
        background: transparent !important;
        margin-bottom: 20px !important;
        box-shadow: none !important;
    }
    .ef-vitrages-table {
        min-width: unset !important;
        display: block !important;
        border: none !important;
        background: transparent !important;
    }
    .ef-vitrages-table thead {
        display: none !important;
    }
    .ef-vitrages-table tbody {
        display: block !important;
        border: none !important;
        background: transparent !important;
    }
    .ef-vitrages-table tr {
        display: grid !important;
        grid-template-columns: 3fr 3fr 2fr 38px !important;
        gap: 8px !important;
        background: #ffffff !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 8px !important;
        padding: 12px !important;
        margin-bottom: 12px !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04) !important;
        position: relative !important;
        box-sizing: border-box !important;
        align-items: end !important;
    }
    .ef-vitrages-table td {
        display: block !important;
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
    }
    
    /* Grid placement */
    .ef-vitrages-table td:nth-child(1) {
        grid-column: 1 !important;
        grid-row: 1 !important;
    }
    .ef-vitrages-table td:nth-child(2) {
        grid-column: 2 !important;
        grid-row: 1 !important;
    }
    .ef-vitrages-table td:nth-child(3) {
        grid-column: 3 !important;
        grid-row: 1 !important;
    }
    .ef-vitrages-table td:nth-child(4) {
        grid-column: 4 !important;
        grid-row: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        position: static !important;
        margin-bottom: 0 !important;
        z-index: 10 !important;
    }

    /* Labels above inputs */
    .ef-vitrages-table td::before {
        display: block !important;
        font-size: 9px !important;
        font-weight: 700 !important;
        color: #555555 !important;
        text-transform: uppercase !important;
        margin-bottom: 6px !important;
        text-align: center !important;
        border: none !important;
        background: transparent !important;
        white-space: nowrap !important;
    }
    .ef-vitrages-table td:nth-child(1)::before {
        content: "Larg. (cm)" !important;
    }
    .ef-vitrages-table td:nth-child(2)::before {
        content: "Haut. (cm)" !important;
    }
    .ef-vitrages-table td:nth-child(3)::before {
        content: "Qté" !important;
    }
    .ef-vitrages-table td:nth-child(4)::before {
        content: " " !important;
        display: block !important;
        height: 11px !important;
        margin-bottom: 6px !important;
    }
    
    .ef-table-input {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        box-sizing: border-box !important;
        padding: 8px 4px !important;
        font-size: 13px !important;
    }
    
    /* Stylize Delete Button on Mobile Card */
    .ef-btn-delete-row {
        background: #fdf2f2 !important;
        color: #ef4444 !important;
        border: 1px solid #fee2e2 !important;
        padding: 0 !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        margin: 0 !important;
        box-shadow: none !important;
        width: 38px !important;
        height: 38px !important;
        box-sizing: border-box !important;
    }
    .ef-btn-delete-row:hover {
        background: #fee2e2 !important;
        color: #b91c1c !important;
        border-color: #fca5a5 !important;
    }
}

.ef-table-input {
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
    padding: 8px 10px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    background-color: #ffffff;
    outline: none;
    transition: all 0.2s ease;
}

.ef-table-input:focus {
    border-color: #66cc00;
    box-shadow: none;
}

.ef-btn-delete-row {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin: 0 auto;
}

.ef-btn-delete-row:hover {
    background-color: #fee2e2;
    color: #b91c1c;
    transform: scale(1.1);
}

.easyfilm-devis-btn-secondary {
    background-color: #66cc00;
    border: none;
    border-radius: 4px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 10px 20px;
    display: block;
    margin: 20px auto 20px auto; /* Center button with bottom margin inside white container */
    cursor: pointer;
    transition: all 0.2s ease;
}

.easyfilm-devis-btn-secondary:hover,
.easyfilm-devis-btn-secondary:focus,
.easyfilm-devis-btn-secondary:active {
    background-color: #52a300 !important;
    color: #ffffff !important;
    outline: none !important;
    box-shadow: none !important;
}

/* File Upload Dropzone */
.ef-dropzone-label {
    font-size: 12px;
    font-weight: 700;
    color: #555555;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: block;
}

.ef-dropzone {
    border: 1px solid #cccccc;
    border-radius: 4px;
    background-color: #ffffff;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease;
    margin-bottom: 15px;
}

.ef-dropzone:hover, .ef-dropzone.dragover {
    border-color: #66cc00;
    background-color: #fafafa;
}

.ef-dropzone .dashicons-cloud-upload {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #888888;
    margin-bottom: 8px;
}

.ef-dropzone:hover .dashicons-cloud-upload {
    color: #66cc00;
}

.ef-dropzone p {
    font-size: 13px;
    color: #666666;
    font-weight: 500;
}

/* File Items in list (Grid of 3 columns, square aspect ratio) */
.ef-files-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

@media (max-width: 576px) {
    .ef-files-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 360px) {
    .ef-files-list {
        grid-template-columns: 1fr;
    }
}

.ef-file-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid #cccccc;
    border-radius: 4px;
    background-color: #ffffff;
    box-sizing: border-box;
    overflow: hidden;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.ef-file-preview-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 48px);
    z-index: 1;
    background-color: #f6f6f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ef-file-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ef-file-icon {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #888888;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ef-file-icon.pdf-icon {
    color: #ef4444;
}

.ef-file-icon .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.ef-file-info {
    position: absolute;
    bottom: 0;
    left: 0;
    background: #ffffff; /* White background container */
    border-top: 1px solid #e5e7eb;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    z-index: 2;
    height: 48px;
}

.ef-file-name {
    font-size: 11px;
    font-weight: 600;
    color: #1a1a1a; /* Dark text */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.ef-file-size {
    font-size: 10px;
    color: #666666; /* Gray text */
}

.ef-btn-remove-file {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    background: #ffffff !important;
    border: 1px solid #cccccc !important;
    color: #ef4444 !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: all 0.2s ease !important;
    z-index: 10 !important;
}

.ef-btn-remove-file:hover {
    background-color: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
    transform: scale(1.08) !important;
}

.ef-btn-remove-file .dashicons-trash {
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ef-file-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: #66cc00;
    z-index: 4;
    transition: width 0.2s ease;
    width: 0%;
}

.ef-file-progress-bar.error-bar {
    background-color: #ef4444;
}

.ef-file-status {
    display: none !important; /* Hide checkmark by default */
}

.ef-file-status.error {
    display: block !important; /* Show only if error */
    color: #ef4444 !important;
    background-color: #fee2e2 !important;
    border: 1px solid #fecaca !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 3px 6px !important;
    border-radius: 3px !important;
    position: absolute !important;
    bottom: 54px !important; /* Just above the white info bar */
    left: 8px !important;
    right: 8px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    text-align: center !important;
    z-index: 6 !important;
}

/* Response Messages */
.ef-form-response {
    border-radius: 4px;
    padding: 12px 16px;
    font-size: 14px;
}

/* Buttons */
.ef-submit-wrapper {
    text-align: center;
    margin-top: 25px;
}

.easyfilm-devis-btn-primary {
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    background: #66cc00; /* Solid Bright Green from screenshot */
    border: none;
    padding: 12px 40px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.2s ease;
}

.easyfilm-devis-btn-primary:hover,
.easyfilm-devis-btn-primary:focus,
.easyfilm-devis-btn-primary:active {
    background: #52a300 !important;
    color: #ffffff !important;
    outline: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.easyfilm-devis-btn-primary:disabled {
    background: #cccccc !important;
    color: #666666;
}

/* Success Screen Styles */
.ef-success-screen {
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    max-width: 650px;
    margin: 20px auto;
    animation: efPopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

@keyframes efPopIn {
    0% { transform: scale(0.96); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.ef-success-icon-wrapper {
    width: 72px;
    height: 72px;
    background-color: rgba(102, 204, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

.ef-success-icon {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #66cc00;
}

.ef-success-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    margin: 0 0 10px 0;
    letter-spacing: 0.5px;
}

.ef-success-intro {
    font-size: 15px;
    color: #555555;
    line-height: 1.5;
    margin: 0 0 25px 0;
}

.ef-success-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 25px 0;
}

.ef-success-steps {
    text-align: left;
    margin-bottom: 25px;
}

.ef-steps-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    margin: 0 0 20px 0;
    letter-spacing: 0.5px;
}

.ef-step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.ef-step-item:last-child {
    margin-bottom: 0;
}

.ef-step-number {
    background-color: #66cc00;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    margin-top: 2px;
}

.ef-step-content {
    flex-grow: 1;
}

.ef-step-content h5 {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    margin: 0 0 4px 0;
    letter-spacing: 0.3px;
}

.ef-step-content p {
    font-size: 13px;
    color: #666666;
    line-height: 1.4;
    margin: 0;
}

.ef-success-footer {
    font-size: 13px;
    color: #888888;
    line-height: 1.4;
}

.ef-success-footer p {
    margin: 0;
}

/* Honeypot field wrapper styling to hide it from human users */
.ef-form-row-extra {
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -9999 !important;
}
