/* Alpine.js x-cloak - Masque les éléments avant l'initialisation */
[x-cloak] { 
    display: none !important; 
}

/* ✅ CORRECTION : S'assurer que les boutons sont visibles après initialisation Alpine.js */
.btn {
    min-height: 44px; /* Taille minimale pour accessibilité */
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* ✅ CORRECTION : Forcer l'affichage des boutons de navigation même si Alpine.js n'est pas encore initialisé */
.form-section + .flex,
form > .flex:last-child {
    display: flex !important;
    visibility: visible !important;
}

/* ✅ CORRECTION : S'assurer que les boutons avec x-show sont visibles quand la condition est vraie */
button[x-show] {
    transition: opacity 0.2s ease-in-out;
}

.form-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.form-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #6741E6;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #EDE9FE;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #18181A;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-label.required::after {
    content: " *";
    color: #EF4444;
}

.form-input, .form-select, .form-textarea, .input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus, .input:focus {
    outline: none;
    border-color: #6741E6;
    box-shadow: 0 0 0 3px rgba(103, 65, 230, 0.1);
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-item input[type="checkbox"],
.checkbox-item input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    user-select: none;
}

.progress-bar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 2rem;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.progress-step::after {
    content: '';
    position: absolute;
    top: 1rem;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #E5E7EB;
    z-index: -1;
}

.progress-step:last-child::after {
    display: none;
}

.progress-step.active .step-circle {
    background: #6741E6;
    color: white;
}

.progress-step.completed .step-circle {
    background: #10B981;
    color: white;
}

.step-circle {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #E5E7EB;
    color: #8B8B8B;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.step-label {
    font-size: 0.75rem;
    color: #8B8B8B;
}

.progress-step.active .step-label,
.progress-step.completed .step-label {
    color: #18181A;
    font-weight: 500;
}

/* AJOUT : Styles pour les boutons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    text-align: center;
    text-decoration: none;
    line-height: 1.5;
}

.btn-primary {
    background: #6741E6;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5835C7;
}

.btn-primary:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    background: #F3F4F6;
    color: #374151;
}

.btn-secondary:hover:not(:disabled) {
    background: #E5E7EB;
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Classes utilitaires pour les boutons */
.bg-primary {
    background-color: #6741E6 !important;
}

.text-white {
    color: #ffffff !important;
}

/* S'assurer que les boutons dans les templates sont visibles */
button[type="button"],
button[type="submit"] {
    display: inline-block;
}

/* Garantir l'affichage des boutons avec x-if */
template + button {
    display: inline-block !important;
}

@media (max-width: 768px) {
    .progress-steps {
        display: none;
    }
    .form-section {
        padding: 1.5rem;
    }
}

