/* Frontend CSS pour shortcodes et widgets */

/* ===== STATISTIQUES ===== */
.sinistre-shortcode-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 144, 217, 0.15);
    border-top: 4px solid #0090d9;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 144, 217, 0.25);
}

.stat-card-total {
    border-top-color: #667eea;
}

.stat-card-assurance {
    border-top-color: #007bff;
}

.stat-card-client {
    border-top-color: #dc3545;
}

.stat-card-cloture {
    border-top-color: #28a745;
}

.stat-card-montant {
    border-top-color: #ffc107;
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    background: linear-gradient(135deg, #0090d9 0%, #0073aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 10px 0;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* ===== TABLEAU ===== */
.sinistre-shortcode-tableau,
.sinistre-shortcode-filtre {
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tableau-header {
    padding: 20px;
    background: linear-gradient(135deg, #0090d9 0%, #0073aa 100%);
    color: white;
    border-bottom: none;
    box-shadow: 0 4px 12px rgba(0, 144, 217, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.tableau-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 220px;
}

.tableau-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 220px;
    justify-content: flex-end;
}

.sinistre-search-input {
    flex: 1 1 200px;
    min-width: 160px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.18);
    color: #0b3d60;
    font-size: 14px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.sinistre-search-input::placeholder {
    color: rgba(11, 61, 96, 0.7);
}

.sinistre-search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 144, 217, 0.4);
}

.sinistre-btn-export {
    padding: 10px 18px;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.sinistre-btn-export:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.tableau-header h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.tableau-count {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.sinistre-row-cloture {
    background-color: #f0fff4 !important;
    border-left: 5px solid #28a745 !important;
}

.col-observations-readonly {
    color: #666;
    font-size: 11px;
    white-space: normal;
    max-width: 200px;
}

.col-status {
    text-align: center;
    font-weight: 600;
}

.sinistre-frontend-table,
.sinistre-filtre-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.sinistre-frontend-table thead,
.sinistre-filtre-table thead {
    background: linear-gradient(135deg, #0090d9 0%, #0073aa 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 144, 217, 0.2);
}

.sinistre-frontend-table th,
.sinistre-filtre-table th {
    padding: 12px;
    text-align: left;
    font-size: 13px;
}

.sinistre-frontend-table td,
.sinistre-filtre-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

/* ===== ÉLÉMENTS ÉDITABLES ===== */
.sinistre-frontend-table.editable {
    font-size: 12px;
}

.sinistre-frontend-table.editable.complete {
    overflow-x: auto;
    width: 100%;
    display: block;
    white-space: nowrap;
}

.sinistre-frontend-table.complete {
    table-layout: fixed;
    min-width: 1400px;
}

.sinistre-frontend-table.complete td {
    padding: 6px 5px;
    font-size: 11px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.sinistre-frontend-table.complete th {
    padding: 8px 5px;
    font-size: 10px;
    white-space: normal;
    word-wrap: break-word;
}

/* Colonnes de lecture seule */
.col-readonly {
    background-color: #f5f5f5;
    color: #666;
    font-weight: 500;
}

/* Sélecteur de couleur */
.col-couleur {
    padding: 2px !important;
    background-color: #f9f9f9;
    text-align: center;
}

.color-picker {
    width: 30px;
    height: 24px;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-picker:hover {
    border-color: #0090d9;
    box-shadow: 0 0 6px rgba(0, 144, 217, 0.5);
    transform: scale(1.08);
}

.color-picker:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 8px rgba(0, 144, 217, 0.6);
}

.col-couleur.updated {
    background-color: #d4edda !important;
    animation: pulse-bool 0.6s ease;
}

/* Observations éditables */
.col-observations {
    cursor: pointer;
    background-color: #fffef0;
    transition: all 0.3s ease;
    max-width: 300px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.col-observations:hover {
    background-color: #ffffcc;
    box-shadow: inset 0 0 3px rgba(255, 200, 0, 0.3);
}

.col-observations .obs-text {
    display: block;
    font-size: 11px;
    color: #333;
    padding: 4px;
    line-height: 1.5;
    white-space: normal;
    word-wrap: break-word;
}

.col-observations .obs-edit {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    border: 2px solid #0090d9;
    border-radius: 8px;
    font-size: 11px;
    font-family: Arial, sans-serif;
    resize: vertical;
    background: #f9fbfd;
}

.col-observations .obs-edit:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 8px rgba(0, 144, 217, 0.5);
    background: white;
}

/* Sélecteurs booléens */
.col-editable-bool {
    padding: 3px !important;
    background-color: #f9f9f9;
    min-width: 70px;
}

.bool-select {
    width: 100%;
    min-width: 65px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230090d9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 18px;
    padding-right: 32px;
}

.bool-select option {
    padding: 8px 6px;
    font-size: 13px;
    color: #333;
    background: white;
    line-height: 1.8;
    display: block;
}

.bool-select:hover {
    border-color: #0090d9;
    background-color: #e0f2ff;
    box-shadow: 0 0 4px rgba(0, 144, 217, 0.4);
}

.bool-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 6px rgba(0, 144, 217, 0.5);
}

.bool-select option {
    padding: 4px 6px;
}

.col-editable-bool.updated {
    background-color: #d4edda !important;
    animation: pulse-bool 0.6s ease;
}

@keyframes pulse-bool {
    0% { background-color: #d4edda; }
    50% { background-color: #c3e6cb; }
    100% { background-color: #f9f9f9; }
}

.sinistre-frontend-table tbody tr:hover,
.sinistre-filtre-table tbody tr:hover {
    background-color: #f9f9f9;
}

.sinistre-row-assurance {
    border-left: 4px solid #007bff;
    background-color: #f0f7ff;
}

.sinistre-row-client {
    border-left: 4px solid #dc3545;
    background-color: #fff5f5;
}

.statut-assurance,
.filtre-statut-assurance {
    background-color: #e7f3ff;
    padding: 4px 8px;
    border-radius: 4px;
    color: #0066cc;
    font-weight: 600;
}

.statut-client,
.filtre-statut-client {
    background-color: #ffe7e7;
    padding: 4px 8px;
    border-radius: 4px;
    color: #cc0000;
    font-weight: 600;
}

/* ===== FILTRAGE ===== */
.filtre-controls {
    padding: 15px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 10px;
    align-items: center;
}

.filtre-controls label {
    font-weight: 600;
    color: #333;
}

.filtre-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

/* ===== FORMULAIRE ===== */
.sinistre-shortcode-formulaire {
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 144, 217, 0.12);
    background: #ffffff;
}

.sinistre-form-header {
    padding: 26px 32px;
    background: linear-gradient(135deg, #0090d9 0%, #0073aa 100%);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.sinistre-form-heading {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sinistre-form-heading h3 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
}

.sinistre-form-heading p {
    margin: 6px 0 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 520px;
}

.sinistre-form {
    padding: 26px 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 26px;
    background: #fff;
}

.sinistre-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px 24px;
}

.sinistre-form .form-group {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sinistre-form label {
    font-weight: 600;
    color: #0b3d60;
    font-size: 13px;
    letter-spacing: 0.2px;
}

.sinistre-form input,
.sinistre-form textarea,
.sinistre-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(0, 144, 217, 0.18);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #f7fbff;
    color: #1f3f54;
}

.sinistre-form input:focus,
.sinistre-form textarea:focus,
.sinistre-form select:focus {
    outline: none;
    border-color: #28a8ff;
    box-shadow: 0 0 0 3px rgba(0, 144, 217, 0.15);
    background: #ffffff;
}

.sinistre-form textarea {
    resize: vertical;
    min-height: 100px;
}

.sinistre-form select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230090d9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    padding-right: 42px;
}

.sinistre-form select option {
    padding: 10px 8px;
    font-size: 14px;
    color: #0b3d60;
    background: #fff;
}

.form-group-wide {
    grid-column: 1 / -1;
}

.form-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.form-footer .sinistre-btn-submit {
    width: auto;
    padding: 12px 28px;
    font-size: 15px;
}

.form-message {
    flex: 1 1 280px;
    min-height: 0;
    border-radius: 10px;
    border: 1px solid transparent;
}

.sinistre-btn-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #0090d9 0%, #0073aa 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 144, 217, 0.3);
}

.sinistre-btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 144, 217, 0.4);
}

.sinistre-btn-submit:active {
    transform: translateY(-1px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .sinistre-shortcode-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .tableau-header {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 12px;
    }

    .tableau-header-actions {
        width: 100%;
        justify-content: stretch;
        gap: 8px;
    }

    .tableau-header-left,
    .tableau-header-actions {
        flex: 1 1 auto;
    }

    .sinistre-search-input {
        flex: 1 1 auto;
        padding: 8px 12px;
        border-radius: 14px;
    }

    .sinistre-btn-export {
        padding: 10px 16px;
        border-radius: 14px;
    }

    .sinistre-btn-export {
        flex: 0 0 auto;
    }

    .sinistre-form-header {
        padding: 22px;
        align-items: flex-start;
    }

    .sinistre-form-heading h3 {
        font-size: 22px;
    }

    .sinistre-form {
        padding: 22px;
    }

    .sinistre-frontend-table.complete,
    .sinistre-frontend-table.readonly {
        display: block;
        min-width: 0;
        width: 100%;
        white-space: normal;
        overflow: visible;
    }

    .sinistre-frontend-table.complete thead,
    .sinistre-frontend-table.readonly thead {
        display: none;
    }

    .sinistre-frontend-table.complete tbody,
    .sinistre-frontend-table.readonly tbody {
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

    .sinistre-frontend-table.complete tbody tr,
    .sinistre-frontend-table.readonly tbody tr {
        display: flex;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.96);
        border-radius: 14px;
        box-shadow: 0 10px 24px rgba(0, 74, 116, 0.14);
        border: none;
        overflow: hidden;
    }

    .sinistre-frontend-table.complete tbody tr td,
    .sinistre-frontend-table.readonly tbody tr td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 12px 16px;
        border: none;
        border-bottom: 1px solid rgba(0, 144, 217, 0.08);
        font-size: 13px;
        background: transparent;
        white-space: normal;
    }

    .sinistre-frontend-table.complete tbody tr td:last-child,
    .sinistre-frontend-table.readonly tbody tr td:last-child {
        border-bottom: none;
    }

    .sinistre-frontend-table.complete tbody tr td::before,
    .sinistre-frontend-table.readonly tbody tr td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #0b3d60;
        font-size: 12px;
        opacity: 0.85;
        letter-spacing: 0.1px;
    }

    .sinistre-frontend-table.complete tbody tr .col-couleur,
    .sinistre-frontend-table.readonly tbody tr .col-couleur {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .sinistre-frontend-table.complete tbody tr .col-couleur::before,
    .sinistre-frontend-table.readonly tbody tr .col-couleur::before {
        margin: 0;
    }

    .sinistre-frontend-table.complete tbody tr .color-picker {
        width: 34px;
        height: 30px;
    }

    .sinistre-frontend-table.complete tbody tr .col-observations .obs-text {
        max-height: none;
        white-space: normal;
        font-size: 13px;
        line-height: 1.5;
    }

    .sinistre-frontend-table.complete tbody tr select.bool-select,
    .sinistre-frontend-table.complete tbody tr .text-edit,
    .sinistre-frontend-table.complete tbody tr .obs-edit {
        width: 100%;
    }

    .sinistre-frontend-table.complete tbody tr .btn-cloture-sinistre {
        width: 100%;
        margin-top: 6px;
    }

    .bool-select {
        width: 100%;
        font-size: 13px;
        padding: 9px 10px;
        border-radius: 12px;
    }
}

@media (max-width: 768px) {
    .sinistre-shortcode-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-icon {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .tableau-header {
        padding: 15px;
        flex-direction: column;
        align-items: stretch;
    }

    .tableau-header-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .sinistre-search-input {
        width: 100%;
        padding: 8px 12px;
        font-size: 13px;
        border-radius: 16px;
    }

    .sinistre-btn-export {
        width: 100%;
        text-align: center;
    }

    .sinistre-shortcode-tableau,
    .sinistre-shortcode-filtre {
        margin: 15px 0;
        border-radius: 6px;
    }

    .sinistre-form-header {
        padding: 18px;
    }

    .sinistre-form-heading h3 {
        font-size: 20px;
    }

    .sinistre-form-heading p {
        font-size: 13px;
    }

    .sinistre-form {
        padding: 18px;
        gap: 20px;
    }

    .sinistre-form-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .form-footer .sinistre-btn-submit {
        width: 100%;
    }

    .form-message {
        width: 100%;
    }
    
    .sinistre-form input,
    .sinistre-form textarea,
    .sinistre-form select {
        font-size: 14px;
    }
    
    .sinistre-btn-submit {
        padding: 12px;
        font-size: 14px;
    }
    
    .filtre-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .filtre-select {
        width: 100%;
    }
    
    .suivi-timeline {
        padding-left: 25px;
    }
    
    .suivi-timeline::before {
        left: 2px;
    }
    
    .timeline-marker {
        left: -18px;
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
    
    .timeline-item {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .timeline-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .timeline-controls {
        flex-direction: column;
        width: 100%;
        gap: 4px;
    }
    
    .etape-status-select,
    .btn-edit-etape,
    .btn-delete-etape {
        width: 100%;
        font-size: 11px;
        padding: 6px;
    }
    

    .sinistre-search-input {
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 14px;
    }
    .btn-add-etape,
    .btn-reset-etapes {
        width: 100%;
        padding: 10px;
        font-size: 12px;
    }
    
    .modal-etape .modal-content {
        width: 90%;
        margin: 30% auto;
        padding: 15px;
    }
    
    .modal-etape .form-group input,
    .modal-etape .form-group textarea,
    .modal-etape .form-group select {
        font-size: 16px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .sinistre-frontend-table.complete tbody tr td,
    .sinistre-frontend-table.readonly tbody tr td {
        padding: 10px 12px;
        font-size: 12px;
    }

    .sinistre-frontend-table.complete tbody tr td::before,
    .sinistre-frontend-table.readonly tbody tr td::before {
        font-size: 11px;
        letter-spacing: 0.2px;
    }

    .sinistre-frontend-table.complete tbody tr .btn-cloture-sinistre {
        font-size: 12px;
        padding: 10px;
    }

    .bool-select {
        font-size: 12px;
        padding: 8px 10px;
        border-radius: 10px;
    }
    
    .stat-card {
        padding: 12px;
        border-radius: 8px;
        margin-bottom: 8px;
    }
    
    .stat-icon {
        font-size: 20px;
    }
    
    .stat-number {
        font-size: 22px;
        margin: 8px 0;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .sinistre-shortcode-tableau,
    .sinistre-shortcode-filtre {
        margin: 10px 0;
        padding: 0;
    }
    
    .tableau-header {
        padding: 12px;
        border-radius: 6px 6px 0 0;
        flex-direction: column;
        align-items: stretch;
    }
    
    .tableau-header h3 {
        font-size: 14px;
        margin-bottom: 3px;
    }
    
    .tableau-count {
        font-size: 10px;
    }

    .tableau-header-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .sinistre-search-input {
        width: 100%;
    }

    .sinistre-btn-export {
        width: 100%;
    }

    .sinistre-form-header {
        padding: 16px;
    }

    .sinistre-form-heading h3 {
        font-size: 18px;
    }

    .sinistre-form-heading p {
        font-size: 12px;
    }

    .sinistre-form {
        padding: 16px;
        gap: 16px;
    }

    .sinistre-form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .sinistre-form input,
    .sinistre-form textarea,
    .sinistre-form select {
        font-size: 15px;
        padding: 12px;
    }

    .form-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .form-footer .sinistre-btn-submit {
        width: 100%;
    }

    .form-message {
        width: 100%;
    }
    
    /* Tableau en cartes sur mobile */
    .sinistre-frontend-table {
        display: block;
        width: 100%;
    }
    
    .sinistre-frontend-table.complete {
        min-width: 100%;
    }
    
    .sinistre-frontend-table thead {
        display: none;
    }
    
    .sinistre-frontend-table tbody {
        display: block;
    }
    
    .sinistre-frontend-table tbody tr {
        display: block;
        margin-bottom: 12px;
        padding: 12px;
        background: white;
        border: 1px solid #e0f2ff;
        border-radius: 6px;
        box-shadow: 0 2px 6px rgba(0, 144, 217, 0.1);
        border-left: 4px solid #0090d9;
    }
    
    .sinistre-frontend-table tbody tr:hover {
        background: white;
        box-shadow: 0 4px 10px rgba(0, 144, 217, 0.15);
    }
    
    .sinistre-frontend-table.complete td {
        display: block;
        padding: 8px 0;
        border-bottom: none;
        text-align: left;
        word-wrap: break-word;
    }
    
    .sinistre-frontend-table.complete td[data-label]:before {
        content: attr(data-label);
        font-weight: 700;
        color: #0090d9;
        display: block;
        font-size: 11px;
        margin-bottom: 6px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .col-readonly {
        background: transparent;
        font-size: 12px;
    }
    
    .col-couleur {
        text-align: center;
        padding: 4px !important;
    }
    
    .color-picker {
        width: 40px;
        height: 30px;
    }
    
    .col-editable-text,
    .col-editable-number,
    .col-observations {
        padding: 4px 0 !important;
        background: transparent;
    }
    
    .col-editable-bool {
        padding: 4px 0 !important;
    }
    
    .bool-select {
        width: 100%;
        min-width: auto;
        font-size: 13px;
        padding: 8px 6px;
        padding-right: 32px;
    }
    
    .bool-select option {
        font-size: 14px;
        padding: 10px 8px;
        color: #333;
        background: white;
        line-height: 1.8;
    }
    
    .filtre-controls {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }
    
    .filtre-select {
        width: 100%;
        font-size: 14px;
    }
    
    .suivi-timeline {
        padding-left: 20px;
    }
    
    .suivi-timeline::before {
        left: 0;
    }
    
    .timeline-marker {
        left: -15px;
        width: 16px;
        height: 16px;
    }
    
    .timeline-item {
        padding: 8px;
        margin-bottom: 12px;
    }
    
    .timeline-label strong {
        font-size: 12px;
    }
    
    .timeline-description {
        font-size: 11px;
    }
    
    .timeline-content {
        flex-direction: column;
        gap: 6px;
    }
    
    .timeline-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .etape-status-select,
    .btn-edit-etape,
    .btn-delete-etape {
        width: 100%;
        font-size: 10px;
        padding: 6px;
    }
    
    .btn-add-etape,
    .btn-reset-etapes {
        width: 100%;
        padding: 10px;
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .suivi-actions {
        flex-direction: column;
    }
    
    .btn-cloture-sinistre {
        width: 100%;
        padding: 8px;
        font-size: 12px;
    }
    
    .modal-etape .modal-content {
        width: 95%;
        margin: 40% auto;
    }
    
    .modal-etape .form-group {
        margin-bottom: 10px;
    }
    
    .modal-etape .form-group input,
    .modal-etape .form-group textarea,
    .modal-etape .form-group select {
        font-size: 16px;
        padding: 10px;
    }
    
    .modal-etape .form-actions {
        flex-direction: column;
    }
    
    .btn-save-etape,
    .btn-cancel-modal {
        width: 100%;
        padding: 10px;
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .sinistre-manager-wrap h1 {
        font-size: 16px;
    }
    
    .stat-card {
        padding: 10px;
        border-top-width: 3px;
    }
    
    .tableau-header h3 {
        font-size: 12px;
    }
    
    .sinistre-frontend-table.complete td:before {
        font-size: 9px;
    }
    
    .sinistre-btn-submit,
    .btn-add-etape,
    .btn-reset-etapes {
        font-size: 12px;
        padding: 10px;
    }
}

/* ===== SUIVI DES ÉTAPES (TIMELINE) ===== */
.sinistre-suivi-etapes {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.suivi-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #0090d9;
}

.suivi-header h3 {
    background: linear-gradient(135deg, #0090d9 0%, #0073aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 700;
}

.suivi-info {
    color: #666;
    font-size: 13px;
    margin: 0;
}

.statut-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
}

.statut-badge.assurance {
    background: #e7f3ff;
    color: #0066cc;
}

.statut-badge.client {
    background: #ffe7e7;
    color: #cc0000;
}

/* ===== TIMELINE ===== */
.suivi-timeline {
    position: relative;
    padding-left: 40px;
}

.suivi-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #0090d9 0%, #0073aa 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 3px solid #ddd;
    transition: all 0.3s ease;
}

.timeline-item:hover {
    background: #f5f5f5;
    border-left-color: #667eea;
}

.timeline-item.timeline-completed {
    background: #f0fff4;
    border-left-color: #28a745;
}

.timeline-item.timeline-failed {
    background: #fff5f5;
    border-left-color: #dc3545;
}

.timeline-item.timeline-pending {
    background: #f5f9ff;
    border-left-color: #ffc107;
}

.timeline-marker {
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    background: white;
    border: 2px solid #0090d9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(0, 144, 217, 0.3);
}

.timeline-completed .timeline-marker {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.timeline-failed .timeline-marker {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.timeline-pending .timeline-marker {
    background: #ffc107;
    border-color: #ffc107;
    color: white;
}

.timeline-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.timeline-label {
    flex: 1;
}

.timeline-label strong {
    color: #333;
    font-size: 14px;
    display: block;
}

.timeline-description {
    color: #666;
    font-size: 12px;
    margin: 5px 0 0 0;
    font-style: italic;
}

.timeline-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.etape-status-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    background: white;
    cursor: pointer;
}

.btn-edit-etape,
.btn-delete-etape {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    background: #e9ecef;
    color: #333;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.btn-edit-etape:hover {
    background: #667eea;
    color: white;
}

.btn-delete-etape:hover {
    background: #dc3545;
    color: white;
}

/* ===== ACTIONS ===== */
.suivi-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.btn-add-etape,
.btn-reset-etapes {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #0090d9 0%, #0073aa 100%);
    color: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 144, 217, 0.3);
}

.btn-add-etape:hover,
.btn-reset-etapes:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 144, 217, 0.4);
}

/* ===== ÉDITION INLINE - CHAMPS TEXTE/NOMBRE ===== */
.col-editable-text,
.col-editable-number {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    padding: 3px 5px !important;
}

.col-editable-text:hover,
.col-editable-number:hover {
    background-color: #fff3cd;
    box-shadow: inset 0 0 3px rgba(255, 193, 7, 0.5);
}

.col-editable-text .text-display,
.col-editable-number .text-display {
    display: block;
    padding: 2px 2px;
    min-height: 16px;
    font-size: 10px;
}

.col-editable-text .text-edit,
.col-editable-number .text-edit {
    width: 100%;
    padding: 4px 6px;
    border: 2px solid #0090d9;
    border-radius: 6px;
    font-family: inherit;
    font-size: 10px;
    box-sizing: border-box;
    background: #f9fbfd;
}

.col-editable-text .text-edit:focus,
.col-editable-number .text-edit:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 8px rgba(0, 144, 217, 0.5);
    background: white;
}

/* Indication de succès */
.col-editable-text.updated,
.col-editable-number.updated {
    background-color: #d4edda;
    animation: fadeUpdated 0.5s ease;
}

@keyframes fadeUpdated {
    0% {
        background-color: #d4edda;
    }
    100% {
        background-color: transparent;
    }
}

/* ===== MESSAGES FORMULAIRE ===== */
#fe-message {
    border-radius: 4px;
    animation: slideIn 0.4s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#fe-message strong {
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}

/* Message succès */
#fe-message[style*="d4edda"] {
    background-color: #d4edda !important;
    color: #155724 !important;
    border-left: 4px solid #28a745;
}

/* Message erreur */
#fe-message[style*="f8d7da"] {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border-left: 4px solid #dc3545;
}

/* ===== MODAL ÉTAPE ===== */
.modal-etape {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    animation: fadeIn 0.3s ease;
}

.modal-etape .modal-content {
    background: white;
    margin: 10% auto;
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: slideDown 0.3s ease;
}

.modal-etape .modal-content h3 {
    color: #005a87;
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #0090d9;
}

.modal-etape .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-etape .close:hover {
    color: #000;
}

.modal-etape .form-group {
    margin-bottom: 15px;
}

.modal-etape .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.modal-etape .form-group input,
.modal-etape .form-group textarea,
.modal-etape .form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    box-sizing: border-box;
}

.modal-etape .form-group input:focus,
.modal-etape .form-group textarea:focus,
.modal-etape .form-group select:focus {
    outline: none;
    border-color: #0090d9;
    box-shadow: 0 0 6px rgba(0, 144, 217, 0.4);
}

.modal-etape .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.btn-save-etape {
    padding: 10px 18px;
    background: linear-gradient(135deg, #0090d9 0%, #0073aa 100%);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 144, 217, 0.3);
    transition: all 0.3s ease;
}

.btn-save-etape:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 144, 217, 0.4);
}

.btn-cancel-modal {
    padding: 8px 16px;
    background: #e9ecef;
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.btn-cancel-modal:hover {
    background: #ddd;
}

/* ===== CLOSURE BUTTON ===== */
.col-closure-btn {
    text-align: center;
    padding: 4px 2px !important;
    white-space: nowrap;
}

.btn-cloture-sinistre {
    padding: 6px 12px;
    background: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(255, 140, 0, 0.3);
    white-space: nowrap;
}

.btn-cloture-sinistre:hover {
    background: linear-gradient(135deg, #ff8c00 0%, #ff7700 100%);
    box-shadow: 0 6px 12px rgba(255, 140, 0, 0.4);
    transform: translateY(-2px);
}

.btn-cloture-sinistre:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* ===== RESPONSIVE TIMELINE ===== */
@media (max-width: 1200px) {
    /* Améliorer la visibilité du tableau sur les moyens écrans */
    .sinistre-frontend-table.complete {
        font-size: 11px;
    }
    
    .sinistre-frontend-table.complete td,
    .sinistre-frontend-table.complete th {
        padding: 8px 6px;
        font-size: 10px;
    }
    
    .bool-select {
        min-width: 75px;
        font-size: 11px;
        padding: 5px 3px;
    }
    
    .col-editable-bool {
        min-width: 80px;
    }
}

@media (max-width: 768px) {
    .suivi-timeline {
        padding-left: 30px;
    }
    
    .suivi-timeline::before {
        left: 5px;
    }
    
    .timeline-marker {
        left: -20px;
    }
    
    .timeline-content {
        flex-direction: column;
    }
    
    .timeline-controls {
        width: 100%;
    }
    
    .etape-status-select,
    .btn-edit-etape,
    .btn-delete-etape {
        width: 100%;
    }
    
    /* Tableau sur petit écran */
    .sinistre-frontend-table.complete {
        font-size: 10px;
    }
    
    .sinistre-frontend-table.complete td,
    .sinistre-frontend-table.complete th {
        padding: 6px 4px;
        font-size: 9px;
    }
    
    .bool-select {
        min-width: 65px;
        font-size: 10px;
        padding: 4px 2px;
    }
    
    .col-editable-bool {
        min-width: 70px;
    }
}

@media (max-width: 480px) {
    .suivi-actions {
        flex-direction: column;
    }
    
    .btn-add-etape,
    .btn-reset-etapes {
        width: 100%;
    }
}

/* ===== ANIMATION NOUVELLE LIGNE ===== */
@keyframes highlightNewRow {
    0% {
        background-color: #fff3cd;
    }
    100% {
        background-color: transparent;
    }
}

.sinistre-frontend-table tbody tr.new-row {
    animation: highlightNewRow 3s ease-out forwards;
}
