/* Styles modernes pour le formulaire de candidature EGCIM */

/* Animation pour les transitions */
.form-section {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.3s ease;
}

.form-section.active {
    opacity: 1;
    transform: translateX(0);
}

/* Animations pour les boutons */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

/* Effet de focus amélioré pour les inputs */
.form-control {
    position: relative;
    transition: all 0.3s ease;
}

.form-control:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44, 90, 160, 0.15);
}

/* Animation pour les step indicators */
.step-item {
    transition: all 0.3s ease;
}

.step-number {
    transition: all 0.3s ease;
    position: relative;
}

.step-item.completed .step-number::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
}

/* Hover effects */
.form-container {
    transition: all 0.3s ease;
}

.form-container:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

/* Loading animation */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* Responsive improvements */
@media (max-width: 576px) {
    .header-section h1 {
        font-size: 1.4rem;
    }
    
    .header-section p {
        font-size: 0.9rem;
    }
    
    .step-text {
        display: none;
    }
    
    .academic-table {
        font-size: 0.8rem;
    }
    
    .academic-table th,
    .academic-table td {
        padding: 8px 4px;
    }
}

/* Validation styles */
.form-control.error {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Success animation */
.alert-success {
    animation: slideInDown 0.5s ease;
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Improved table styling */
.academic-table tbody tr:hover {
    background-color: rgba(44, 90, 160, 0.05);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e3a8a;
}

/* Floating labels effect */
.form-group {
    position: relative;
}

.form-label {
    transition: all 0.3s ease;
}

.form-control:focus + .form-label,
.form-control:not(:placeholder-shown) + .form-label {
    transform: translateY(-25px) scale(0.9);
    color: var(--primary-color);
}

/* Progress bar for form completion */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--primary-color);
    transition: width 0.3s ease;
    z-index: 1000;
}

/* Enhanced radio buttons */
.form-check-input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-check-input[type="radio"]:checked {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
}

.form-check-input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* Enhanced select styling */
.form-control select {
    cursor: pointer;
}

.form-control option {
    padding: 10px;
}

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

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: var(--text-dark);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
}

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

/* Print styles */
@media print {
    .step-indicator,
    .form-actions,
    .btn {
        display: none !important;
    }
    
    .form-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .form-section {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
