/* ============================================================================
   STYLES POUR PAPS - ACTIVITÉS ÉCONOMIQUES - paps-economic.css
   Design moderne et premium avec animations et gradients
   ============================================================================ */

/* ============================================================================
   CONTENEUR PRINCIPAL
   ============================================================================ */

.paps-economic-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================================================
   BANNIÈRE D'INFORMATION
   ============================================================================ */

.paps-info-banner {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    animation: slideInDown 0.6s ease-out;
}

.paps-info-icon {
    font-size: 2em;
    line-height: 1;
    flex-shrink: 0;
}

.paps-info-content {
    flex: 1;
    line-height: 1.6;
}

.paps-info-content strong {
    font-size: 1.1em;
    display: block;
    margin-bottom: 5px;
}

/* ============================================================================
   CONTEXTE (PK et Code bien)
   ============================================================================ */

.paps-context-info {
    margin-bottom: 30px;
    animation: fadeIn 0.8s ease-out;
}

.paps-context-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #667eea;
}

.paps-context-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.paps-context-label {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

.paps-context-value {
    font-size: 1.2em;
    font-weight: 700;
    color: #333;
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
}

/* ============================================================================
   SECTIONS ÉCONOMIQUES
   ============================================================================ */

.paps-economic-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

.paps-economic-section:hover {
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

.paps-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.paps-section-title-box {
    display: flex;
    align-items: center;
    gap: 15px;
}

.paps-section-icon {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite;
}

.paps-section-title-box h3 {
    font-size: 1.5em;
    color: #333;
    font-weight: 700;
    margin: 0;
}

/* ============================================================================
   BOUTONS
   ============================================================================ */

.paps-btn-add-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.paps-btn-add-row:hover {
    background: linear-gradient(135deg, #20c997, #28a745);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(40, 167, 69, 0.4);
}

.paps-btn-add-row:active {
    transform: translateY(-1px);
}

.paps-btn-add-row .btn-icon {
    font-size: 1.2em;
}

/* ============================================================================
   TABLEAUX
   ============================================================================ */

.paps-table-container {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.paps-economic-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 1000px;
}

.paps-economic-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.paps-economic-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95em;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.paps-economic-table tbody tr {
    border-bottom: 1px solid #e8e8e8;
    transition: all 0.3s ease;
}

.paps-economic-table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
}

.paps-economic-table td {
    padding: 12px;
    vertical-align: middle;
}

.paps-economic-table td input,
.paps-economic-table td select,
.paps-economic-table td textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95em;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fafafa;
}

.paps-economic-table td input:focus,
.paps-economic-table td select:focus,
.paps-economic-table td textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.paps-economic-table td textarea {
    min-height: 60px;
    resize: vertical;
}

/* Bouton de suppression dans les tableaux */
.paps-btn-remove {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
}

.paps-btn-remove:hover {
    background: linear-gradient(135deg, #c82333, #dc3545);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

/* ============================================================================
   ÉTAT VIDE (Empty State)
   ============================================================================ */

.paps-empty-state {
    display: none;
    text-align: center;
    padding: 50px 20px;
    color: #999;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    margin-top: 20px;
    border: 2px dashed #ccc;
}

.paps-empty-state.visible {
    display: block;
    animation: fadeIn 0.6s ease-out;
}

.paps-empty-state .empty-state-icon {
    font-size: 4em;
    margin-bottom: 15px;
    opacity: 0.5;
}

.paps-empty-state p {
    font-size: 1.2em;
    color: #666;
    margin: 10px 0;
    font-weight: 600;
}

.paps-empty-state small {
    font-size: 0.95em;
    color: #999;
    font-style: italic;
}

/* ============================================================================
   BOUTONS D'ACTION (Footer)
   ============================================================================ */

.paps-action-buttons {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 3px solid #e8e8e8;
    flex-wrap: wrap;
}

.paps-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.paps-btn .btn-icon {
    font-size: 1.3em;
}

.paps-btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.paps-btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #6c757d);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(108, 117, 125, 0.3);
}

.paps-btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.paps-btn-success:hover {
    background: linear-gradient(135deg, #20c997, #28a745);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(40, 167, 69, 0.4);
}

.paps-btn:active {
    transform: translateY(-1px);
}

/* ============================================================================
   MESSAGE DE SUCCÈS
   ============================================================================ */

.paps-success-message {
    display: none;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 20px 25px;
    border-radius: 12px;
    margin-top: 25px;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
    animation: slideInUp 0.6s ease-out;
}

.paps-success-message.show {
    display: flex;
    align-items: center;
    gap: 15px;
}

.paps-success-message .success-icon {
    font-size: 2.5em;
    animation: bounce 1s infinite;
}

.paps-success-message .success-text {
    font-size: 1.2em;
    font-weight: 600;
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 1200px) {
    .paps-economic-container {
        padding: 15px;
    }
    
    .paps-economic-section {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .paps-section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .paps-btn-add-row,
    .paps-btn {
        width: 100%;
        justify-content: center;
    }
    
    .paps-action-buttons {
        flex-direction: column;
    }
    
    .paps-context-card {
        grid-template-columns: 1fr;
    }
    
    .paps-info-banner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .paps-section-title-box h3 {
        font-size: 1.2em;
    }
    
    .paps-section-icon {
        width: 45px;
        height: 45px;
        font-size: 1.5em;
    }
}