/**
 * Onboarding Form Styles
 */

.client-onboarding-wrapper {
    max-width: 1440px;
    margin: 98px auto;
    padding: 16px;
}

.onboarding-wrapper {
    display: flex;
    align-items: flex-start;
}

.onboarding-sidebar {
    width: 260px;
    margin-right: 32px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 24px 18px;
    min-height: 300px;
    position: sticky;
    top: 132px;
    /* Ajustez selon la hauteur de votre header */
    z-index: 10;
}

.header-container h1 {
    color: white;
}

.onboarding-sidebar-title {
    font-size: 16px;
    font-weight: 600;
    padding: 12px 16px;
    display: block;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.onboarding-sidebar-title:hover {
    background-color: #146EF4;
    color: white;
}

.onboarding-sidebar-title.active,
.onboarding-sidebar-title:active {
    background-color: #146EF4;
    color: white;
}

.yellow-form-group {
    background-color: #F4E9BA;
    color: #751000;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.client-onboarding-wrapper h1 {
    text-align: center;
    margin-bottom: 30px;
}

.onboarding-form {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-group textarea {
    height: 300px;
}

.form-group button[type="submit"] {
    background-color: #146EF4;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.form-group button[type="submit"]:hover {
    background-color: #005a87;
}

/* Product/Service Items */
.products-services-section {
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.product-service-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 15px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ps-inputs {
    flex: 1;
}

.ps-inputs input,
.ps-inputs textarea {
    width: 100%;
    margin-bottom: 10px;
}

.remove-product-service {
    color: #c62828;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.remove-product-service:hover {
    background-color: #d32f2f;
}

.add-button {
    background-color: #146EF4;
    margin-top: 16px;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.3s;
}

.add-button:hover {
    background-color: #005a87;
}

.add-button span {
    margin-right: 5px;
    font-size: 18px;
}

/* Status Message */
.status-message {
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
}

.error-message {
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    color: #c62828;
}

.success-message {
    background-color: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
    padding: 20px;
    text-align: center;
    font-size: 18px;
}

/* File Upload Section */
.files-upload-section {
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 4px;
    background-color: #f9f9f9;
    margin-bottom: 20px;
}

.files-upload-section .description {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.file-upload-container {
    margin-bottom: 10px;
}

.client-file-input {
    width: 100%;
    padding: 10px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    background-color: white;
}

.file-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    min-height: 60px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    padding: 10px;
    background-color: white;
}

.file-preview-container.drag-over {
    background-color: #e8f5e9;
    border-color: #4CAF50;
}

.file-preview {
    display: flex;
    align-items: center;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f5f5f5;
    width: calc(50% - 5px);
    position: relative;
}

.file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-right: 10px;
    font-weight: bold;
}

.file-icon.pdf {
    background-color: #f44336;
    color: white;
}

.file-icon.generic {
    background-color: #2196F3;
    color: white;
}

.file-thumbnail {
    width: 40px;
    height: 40px;
    object-fit: cover;
    margin-right: 10px;
    border-radius: 4px;
}

.file-info {
    flex: 1;
    overflow: hidden;
}

.file-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 0.8em;
    color: #666;
}

.remove-file {
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    transition: background-color 0.3s;
}

.remove-file:hover {
    background-color: #d32f2f;
}

/* Responsive styles */
@media (max-width: 768px) {
    .file-preview {
        width: 100%;
    }
}

/* Admin Styles */
.ps-admin-list {
    max-height: 300px;
    overflow-y: auto;
}

.ps-admin-list .ps-item {
    border-bottom: 1px solid #eee;
    padding: 8px 0;
}

.ps-admin-list .ps-item:last-child {
    border-bottom: none;
}

.ps-admin-list .ps-item p {
    margin: 5px 0 0;
    font-size: 13px;
}

/* Existing Files Styles */
.existing-files-container {
    margin-bottom: 20px;
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 15px;
}

.existing-files-container h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
}

.existing-files-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.existing-file-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f8f8;
    width: calc(50% - 5px);
    transition: background-color 0.2s;
}

.existing-file-item:hover {
    background-color: #f0f0f0;
}

.existing-file-item .file-thumbnail {
    width: 45px;
    height: 45px;
    object-fit: cover;
    margin-right: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.existing-file-item .file-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-right: 10px;
    font-weight: bold;
    font-size: 12px;
}

.existing-file-item .file-info {
    flex: 1;
    overflow: hidden;
}

.existing-file-item .file-name {
    font-weight: 500;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.existing-file-item .file-name a {
    color: #146EF4;
    text-decoration: none;
}

.existing-file-item .file-name a:hover {
    color: #00a0d2;
    text-decoration: underline;
}

.existing-file-item .file-size {
    font-size: 0.8em;
    color: #666;
}

.files-admin-list {
    margin-top: 10px;
}

.file-item {
    margin-bottom: 5px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
    display: flex;
    align-items: center;
}

.file-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    margin-right: 10px;
    font-weight: bold;
    font-size: 10px;
}

.file-icon.pdf {
    background-color: #f44336;
    color: white;
}

.file-icon.image {
    background-color: #4CAF50;
    color: white;
}

.file-icon.generic {
    background-color: #2196F3;
    color: white;
}

.file-thumbnail {
    width: 30px;
    height: 30px;
    object-fit: cover;
    margin-right: 10px;
    border-radius: 3px;
}

.file-name {
    flex: 1;
}

.file-size {
    color: #666;
    font-size: 0.8em;
    margin-left: 10px;
}

@media (max-width: 768px) {
    .existing-file-item {
        width: 100%;
    }
}

.badge {
    display: inline-block;
    padding: 8px 12px 8px 8px;
    border-radius: 1em;
    font-size: 1em;
    font-weight: 600;
    line-height: 1.2;
    margin-right: 0.5em;
}

.badge-blue {
    background: #e6f0ff;
    color: #2a4a8a;
}

.badge-yellow {
    background: #fff6d6;
    color: #a05a00;
}

.badge-green {
    background: #e6faea;
    color: #217a3c;
}

.badge-red {
    background: #ffe6e6;
    color: #a02a2a;
}

.badge svg {
    display: inline-block;
    vertical-align: middle;
    height: 1.2em;
    width: 1.2em;
    margin-right: 0.4em;
    stroke: currentColor;
    fill: none;
}

.badge svg circle,
.badge svg path {
    stroke: currentColor;
    fill: none;
}

#etat-projet,
#infos-client,
#produits-services,
#documents-images,
#remarques {
    scroll-margin-top: 132px;
    /* même valeur que le top de ta sidebar sticky ou la hauteur de ton header */
}
/* Masquer les champs ACF pour les utilisateurs non-administrateurs */
body:not(.administrator) .acf-field-group[data-name="user_fields"],
body:not(.administrator) .acf-field[data-name="project_status"],
body:not(.administrator) .acf-field[data-name="form_state"] {
    display: none !important;
}