/**
 * Styles pour l'espace "Mes Fichiers" client
 * Style cartouche d'architecte : bordures noires, pas d'arrondis, structure rigide
 */

/* Container principal */
.ooblik-customer-files-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* En-tête */
.ooblik-files-header {
    border: 1px solid #000;
    border-bottom: 2px solid #000;
    padding: 20px;
    margin-bottom: 30px;
    background: #fff;
}

.ooblik-files-header h2 {
    margin: 0 0 10px 0;
    padding: 0 0 10px 0;
    border-bottom: 1px solid #000;
    color: #DC2626;
    font-size: 24px;
    font-weight: 600;
}

.ooblik-files-intro {
    margin: 10px 0 0 0;
    color: #333;
}

/* Aucune commande */
.ooblik-no-orders {
    border: 1px solid #000;
    padding: 40px;
    text-align: center;
    background: #F3F4F6;
}

.ooblik-no-orders p {
    margin: 0 0 20px 0;
    font-size: 16px;
}

.ooblik-no-orders .button {
    background: #DC2626;
    border: 1px solid #000;
    border-radius: 0;
    color: #fff;
    padding: 12px 24px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.ooblik-no-orders .button:hover {
    background: #B91C1C;
}

/* Liste des commandes */
.ooblik-orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Carte commande */
.ooblik-order-card {
    border: 1px solid #000;
    background: #fff;
}

/* En-tête commande */
.ooblik-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #000;
    background: #F3F4F6;
}

.ooblik-order-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.ooblik-order-number {
    font-weight: 600;
    color: #000;
    font-size: 16px;
}

.ooblik-order-date {
    color: #555;
    font-size: 14px;
}

.ooblik-order-status {
    padding: 4px 12px;
    border: 1px solid #000;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.ooblik-order-status.status-processing {
    background: #FEF3C7;
    color: #92400E;
}

.ooblik-order-status.status-completed {
    background: #D1FAE5;
    color: #065F46;
}

.ooblik-order-status.status-cancelled {
    background: #FEE2E2;
    color: #991B1B;
}

.ooblik-order-files-count {
    color: #666;
    font-size: 14px;
}

.ooblik-toggle-details {
    background: #DC2626;
    border: 1px solid #000;
    border-radius: 0;
    color: #fff;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.ooblik-toggle-details:hover {
    background: #B91C1C;
}

.ooblik-toggle-details .dashicons {
    transition: transform 0.3s;
}

.ooblik-toggle-details[aria-expanded="true"] .dashicons {
    transform: rotate(180deg);
}

/* Détails commande */
.ooblik-order-details {
    padding: 20px;
}

.ooblik-files-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Container fichiers */
.ooblik-files-container {
    border-top: 1px solid #000;
}

/* Liste fichiers */
.ooblik-file-item {
    display: grid;
    grid-template-columns: 40px 1fr auto auto auto;
    gap: 15px;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #000;
}

.ooblik-file-item:last-child {
    border-bottom: none;
}

.ooblik-file-icon {
    font-size: 32px;
    color: #DC2626;
}

.ooblik-file-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ooblik-file-name {
    font-weight: 600;
    color: #000;
    font-size: 14px;
}

.ooblik-file-meta {
    font-size: 12px;
    color: #666;
}

.ooblik-file-type-badge {
    padding: 4px 8px;
    border: 1px solid #000;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    background: #F3F4F6;
}

/* Badge deadline */
.ooblik-deadline-badge {
    padding: 6px 12px;
    border: 1px solid #000;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.ooblik-deadline-badge.deadline-ok {
    background: #D1FAE5;
    color: #065F46;
}

.ooblik-deadline-badge.deadline-warning {
    background: #FEF3C7;
    color: #92400E;
}

.ooblik-deadline-badge.deadline-critical {
    background: #FEE2E2;
    color: #991B1B;
}

.ooblik-deadline-badge.deadline-expired {
    background: #E5E7EB;
    color: #6B7280;
}

/* Bouton remplacer */
.ooblik-replace-btn {
    background: #DC2626;
    border: 1px solid #000;
    border-radius: 0;
    color: #fff;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.ooblik-replace-btn:hover {
    background: #B91C1C;
}

.ooblik-replace-btn:disabled {
    background: #E5E7EB;
    color: #9CA3AF;
    cursor: not-allowed;
}

/* Modal */
.ooblik-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ooblik-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.ooblik-modal-content {
    position: relative;
    background: #fff;
    border: 2px solid #000;
    width: 90%;
    max-width: 500px;
    z-index: 10000;
}

.ooblik-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 2px solid #000;
    background: #DC2626;
    color: #fff;
    cursor: move;
    user-select: none;
}

.ooblik-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.ooblik-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

.ooblik-modal-body {
    padding: 20px;
}

/* Champs d'information dans la modale - Style cartouche */
.ooblik-modal-field {
    padding: 12px 0;
    border-top: 1px solid #000;
}

.ooblik-modal-field:first-child {
    border-top: none;
    padding-top: 0;
}

.ooblik-modal-field:last-child {
    padding-bottom: 0;
}

.ooblik-modal-field strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: #000;
}

.ooblik-modal-field span {
    display: block;
    color: #333;
    font-size: 14px;
}

.ooblik-file-info {
    background: #F3F4F6;
    border: 1px solid #000;
    padding: 15px;
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.6;
}

.ooblik-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #000;
    background: #F3F4F6;
}

.ooblik-modal-footer .button {
    border: 1px solid #000;
    border-radius: 0;
    padding: 8px 16px;
}

.ooblik-modal-footer .button-primary {
    background: #DC2626;
    color: #fff;
}

.ooblik-modal-footer .button-primary:hover {
    background: #B91C1C;
}

/* Progress bar */
.ooblik-upload-progress {
    margin: 20px 0;
}

.ooblik-progress-bar {
    height: 24px;
    border: 1px solid #000;
    background: #fff;
    overflow: hidden;
}

.ooblik-progress-fill {
    height: 100%;
    background: #DC2626;
    transition: width 0.3s;
}

.ooblik-progress-text {
    display: block;
    text-align: center;
    margin-top: 8px;
    font-weight: 600;
    font-size: 14px;
}

/* Message de succès après upload */
.ooblik-upload-success {
    margin: 20px 0;
    padding: 15px;
    background: #D1FAE5;
    border: 2px solid #000;
    text-align: center;
}

.ooblik-upload-success .success-icon {
    font-size: 42px;
    color: #065F46;
    margin-bottom: 8px;
    line-height: 1;
}

.ooblik-upload-success .success-title {
    font-weight: 600;
    color: #065F46;
    margin: 0 0 6px 0;
    font-size: 15px;
}

.ooblik-upload-success .success-message {
    color: #047857;
    margin: 0;
    font-size: 12px;
}

/* Messages */
#ooblik-message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
}

.ooblik-message {
    border: 2px solid #000;
    padding: 15px 20px;
    margin-bottom: 10px;
    min-width: 300px;
    animation: slideIn 0.3s ease-out;
}

.ooblik-message.message-success {
    background: #D1FAE5;
    color: #065F46;
}

.ooblik-message.message-error {
    background: #FEE2E2;
    color: #991B1B;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .ooblik-file-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ooblik-order-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .ooblik-order-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .ooblik-toggle-details {
        width: 100%;
        justify-content: center;
    }
}
