/* ==========================================================================
   MODAL PLATEAUX OFF - STYLES SPÉCIFIQUES
   ========================================================================== */

/* Animation de fondu */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* Barre de progression */
.modal-progress-bar {
    background: linear-gradient(135deg, #2e7d32 0%, #f5d021 100%);
    transition: width 0.5s ease;
}

/* Contenu du règlement */
.ri-content {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #f8f9fa;
}

.ri-content::-webkit-scrollbar {
    width: 8px;
}

.ri-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.ri-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.ri-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Checkbox d'acceptation */
.modal-accept-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.modal-accept-checkbox:hover {
    border-color: #e74c3c;
    background-color: #f8f9fa;
}

.modal-accept-checkbox.checked {
    border-color: #198754;
    background-color: #f0fff4;
}

input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.modal-checkbox-custom {
    width: 24px;
    height: 24px;
    border: 2px solid #6c757d;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

input[type="checkbox"]:checked + .modal-checkbox-custom {
    background-color: #198754;
    border-color: #198754;
}

input[type="checkbox"]:checked + .modal-checkbox-custom .fa-check {
    display: block !important;
    color: white;
}

.modal-checkbox-label {
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    flex: 1;
    user-select: none;
}

/* En-tête du modal */
.modal-header-gradient {
    background: linear-gradient(135deg, #2E7D32, #20c997) !important;
    color: white;
}

.modal-title-icon {
    margin-right: 10px;
}

/* Indicateur d'étapes */
.modal-step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
    position: relative;
}

.modal-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    min-width: 100px;
}

.modal-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    z-index: 2;
    transition: all 0.3s ease;
}

.modal-step.active .modal-step-number {
    background-color: #e74c3c;
    color: white;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.modal-step.inactive .modal-step-number {
    background-color: #e9ecef;
    color: #6c757d;
}

.modal-step.completed .modal-step-number {
    background-color: #2e7d32;
    color: white;
}

.modal-step-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6c757d;
    text-align: center;
    transition: all 0.3s ease;
}

.modal-step.active .modal-step-label {
    color: #e74c3c;
    font-weight: 600;
}

.modal-step.completed .modal-step-label {
    color: #2e7d32;
}

.modal-step-line {
    position: absolute;
    top: 20px;
    left: calc(50% + 20px);
    right: calc(50% + 20px);
    height: 2px;
    background-color: #e9ecef;
    z-index: 1;
}

.modal-step.completed + .modal-step-line {
    background-color: #2e7d32;
}

/* Boutons */
.btn-continue {
    background: linear-gradient(135deg, #d71c26 0%, #e74c3c 100%);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-continue:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(231, 76, 60, 0.3);
}

.btn-continue:disabled {
    background: #6c757d;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-back {
    background: transparent;
    border: 2px solid #6c757d;
    color: #6c757d;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background-color: #6c757d;
    color: white;
    transform: translateY(-2px);
}

/* Animations */
@keyframes checkAnim {
    0% {
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

input[type="checkbox"]:checked + .modal-checkbox-custom {
    animation: checkAnim 0.3s ease;
}

@keyframes shakeError {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.error-shake {
    animation: shakeError 0.5s ease;
}

/* Style général du modal */
.modal-content {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    overflow: hidden;
}

/* Cartes pour les types de demandeurs */
.demandeur-type-card {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
    background-color: white;
}

.demandeur-type-card:hover {
    border-color: #e74c3c;
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.demandeur-type-card.selected {
    border-color: #198754;
    background-color: #f0fff4;
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.15);
    transform: translateY(-2px);
}

.demandeur-type-card.selected .demandeur-type-icon {
    background: linear-gradient(135deg, #198754, #20c997);
}

.demandeur-type-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2E7D32, #20c997);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.demandeur-type-icon i {
    font-size: 1.5rem;
    color: white;
}

.demandeur-type-content {
    flex: 1;
}

.demandeur-type-content h6 {
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.demandeur-type-content p {
    font-size: 0.85rem;
    line-height: 1.3;
    margin-bottom: 6px;
}

/* Badges pour les catégories */
.demandeur-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 4px;
    margin-top: 4px;
}

.badge-musique {
    background-color: #e3f2fd;
    color: #1565c0;
}

.badge-chant {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.badge-animation {
    background-color: #fff3e0;
    color: #ef6c00;
}

.badge-humour {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.badge-slam {
    background-color: #fce4ec;
    color: #c2185b;
}

/* Aperçu du type sélectionné */
.selectedTypePreview {
    border-left: 4px solid #2E7D32;
    margin-bottom: 20px;
}

.selectedTypePreview i {
    color: #2E7D32;
}

/* Alertes spécifiques */
.alert-artistique {
    border-left: 4px solid #f5d021;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-step-indicator {
        gap: 10px;
    }
    
    .modal-step {
        min-width: 80px;
    }
    
    .modal-step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .modal-step-label {
        font-size: 0.75rem;
    }
    
    .modal-step-line {
        left: calc(50% + 17px);
        right: calc(50% + 17px);
    }
    
    .demandeur-type-card {
        flex-direction: column;
        text-align: center;
        padding: 12px;
    }
    
    .demandeur-type-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .ri-content {
        max-height: 250px;
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .modal-step-indicator {
        flex-direction: column;
        gap: 15px;
    }
    
    .modal-step-line {
        display: none;
    }
    
    .btn-continue,
    .btn-back {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer button {
        width: 100%;
    }
}

/* États de validation */
input[type="radio"]:checked + .demandeur-type-card {
    border-color: #198754;
    background-color: #f0fff4;
}

/* Styles pour les messages d'erreur */
.alert-danger {
    border-left: 4px solid #dc3545;
    animation: fadeIn 0.3s ease-in;
}

/* Loading state pour le bouton continuer */
.btn-continue.loading {
    position: relative;
    color: transparent;
}

.btn-continue.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Amélioration du focus pour l'accessibilité */
.demandeur-type-card:focus-within {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

input[type="checkbox"]:focus + .modal-checkbox-custom {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Styles pour les badges dans le contenu */
.ri-content .badge {
    font-size: 0.8rem;
    padding: 0.25em 0.6em;
    margin-right: 0.5em;
}

/* Spécificité pour les titres du modal */
.modal-body h5 {
    color: #2E7D32;
    font-weight: 700;
    border-bottom: 2px solid #f5d021;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.modal-body h6 {
    color: #2c3e50;
    font-weight: 600;
    margin-top: 1.5rem;
}

/* Styles pour les listes dans le règlement */
.ri-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.ri-content ul li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.ri-content ul li:last-child {
    margin-bottom: 0;
}