/* Styles personnalisés pour l'application PAK */

.font-inter {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* Animations et transitions */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Progress bar */
.progress-bar {
    transition: width 0.3s ease-in-out;
}

/* Question types styling */
.question-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.radio-option {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.radio-option:hover {
    border-color: #3b82f6;
    background-color: #f8fafc;
}

.radio-option.selected {
    border-color: #1e3a8a;
    background-color: #eff6ff;
}

.checkbox-option {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.checkbox-option:hover {
    border-color: #3b82f6;
    background-color: #f8fafc;
}

.checkbox-option.selected {
    border-color: #1e3a8a;
    background-color: #eff6ff;
}

/* Text areas */
.text-input {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color 0.2s ease-in-out;
}

.text-input:focus {
    border-color: #1e3a8a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 250px;
    background-color: #1f2937;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -125px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    line-height: 1.4;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Navigation steps */
.step-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease-in-out;
}

.step-indicator.completed {
    background-color: #10b981;
    color: white;
}

.step-indicator.current {
    background-color: #1e3a8a;
    color: white;
}

.step-indicator.pending {
    background-color: #e5e7eb;
    color: #6b7280;
}

/* Charts container */
.chart-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
}

/* Tables */
.data-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.data-table th {
    background-color: #f8fafc;
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.data-table tr:hover {
    background-color: #f8fafc;
}

/* Buttons */
.btn-primary {
    background-color: #1e3a8a;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

/* Alert messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.alert-success {
    background-color: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-warning {
    background-color: #fffbeb;
    border: 1px solid #fed7aa;
    color: #d97706;
}

.alert-info {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .radio-option, .checkbox-option {
        padding: 12px;
    }
    
    .question-container {
        margin: 0 16px;
    }
    
    .data-table {
        font-size: 14px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 12px;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #1e3a8a;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Styles pour les options "Autres" avec texte libre */
.other-text-container {
    border-top: 1px solid #e5e7eb;
    margin-top: 12px;
    padding-top: 12px;
}

.other-text-container textarea {
    transition: border-color 0.2s ease-in-out;
}

.other-text-container textarea:focus {
    border-color: #1e3a8a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* Styles pour les détails de soumissions */
.submission-details-modal {
    backdrop-filter: blur(4px);
}

.submission-response-item {
    transition: background-color 0.2s ease-in-out;
}

.submission-response-item:hover {
    background-color: #f8fafc;
}

/* Indicateur de texte libre */
.free-text-indicator {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 3px solid #1e3a8a;
}

/* Animation pour l'apparition des champs texte */
.other-text-appear {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
        padding-top: 12px;
        padding-bottom: 0;
    }
}

/* Styles pour les compteurs de caractères */
.char-counter-warning {
    color: #f59e0b !important;
}

.char-counter-danger {
    color: #dc2626 !important;
}