/* ============================================================================
   STYLES POUR LA SECTION PAPS - AUTRES PERTES
   Design moderne et premium avec animations fluides
   ============================================================================ */

.autrespertes-form-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Info Box avec design moderne */
.autrespertes-info-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
    padding: 20px 25px;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    animation: slideInDown 0.5s ease-out;
}

.autrespertes-info-box .info-icon {
    font-size: 2em;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

.autrespertes-info-box strong {
    display: block;
    font-size: 1.2em;
    margin-bottom: 5px;
}

.autrespertes-info-box p {
    margin: 0;
    font-size: 0.95em;
    opacity: 0.95;
    line-height: 1.5;
}

/* Section Header */
.autrespertes-section {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    animation: fadeInUp 0.6s ease-out;
}

.autrespertes-section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #f0f0f0;
}

.autrespertes-section-header .section-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    animation: rotateIn 0.6s ease-out;
}

.autrespertes-section-header h3 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
    color: #2d3748;
}

/* Perte Card - Design Premium */
.perte-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.perte-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.perte-card-header {
    margin-bottom: 20px;
}

/* Checkbox Container Moderne */
.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-left: 40px;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 26px;
    width: 26px;
    background: white;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.checkbox-container:hover .checkmark {
    border-color: #667eea;
    background: #f7fafc;
}

.checkbox-container input[type="checkbox"]:checked ~ .checkmark {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 8px;
    top: 4px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input[type="checkbox"]:checked ~ .checkmark:after {
    display: block;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1em;
    color: #2d3748;
}

.perte-icon {
    font-size: 1.3em;
}

/* Detail Section avec animation */
.detail-section {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    animation: slideDown 0.4s ease-out;
}

.detail-section.active {
    display: block;
}

/* Inputs Modernes */
.modern-input,
.modern-select,
.modern-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 1em;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    transition: all 0.3s ease;
    font-family: inherit;
}

.modern-input:focus,
.modern-select:focus,
.modern-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #f7fafc;
}

.modern-input:hover,
.modern-select:hover,
.modern-textarea:hover {
    border-color: #cbd5e0;
}

.modern-textarea {
    resize: vertical;
    min-height: 80px;
}

.amount-input {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 1.1em;
    color: #2d3748;
}

/* Labels avec icônes */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.95em;
}

.label-icon {
    margin-right: 6px;
    font-size: 1.1em;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

/* Boutons Modernes */
.btn-group-modern {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.btn-modern {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 1em;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-modern:active {
    transform: translateY(0);
}

.btn-reset {
    background: linear-gradient(135deg, #718096, #4a5568);
    color: white;
}

.btn-reset:hover {
    background: linear-gradient(135deg, #4a5568, #2d3748);
}

.btn-save {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.btn-save:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
}

.btn-icon {
    font-size: 1.2em;
}

/* Message de succès moderne */
.success-message-modern {
    display: none;
    margin-top: 25px;
    padding: 20px 25px;
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(72, 187, 120, 0.3);
    animation: slideInUp 0.5s ease-out;
}

.success-message-modern.show {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.success-icon {
    font-size: 2em;
    flex-shrink: 0;
}

.success-message-modern strong {
    display: block;
    font-size: 1.2em;
    margin-bottom: 5px;
}

.success-message-modern p {
    margin: 0;
    opacity: 0.95;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .btn-group-modern {
        flex-direction: column;
    }
    
    .btn-modern {
        width: 100%;
        justify-content: center;
    }
    
    .autrespertes-section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Print Styles */
@media print {
    .btn-group-modern,
    .autrespertes-info-box {
        display: none;
    }
    
    .perte-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}