/* Wrapper pour l'affichage de la liste des participants */
.participants-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 20px 0;
}

/* Bloc participant */
.participant-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Informations du participant */
.participant-item span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 1rem;
    font-size: 0.9rem;
}

.participant-item span i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* Même style que .btn-edit-participant */
.btn-untrash-participant {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    background: #AF6F47; 
}

.btn-untrash-participant:hover {
    background: #9b6240;
}
/* Boutons d’action : modifier, supprimer, déplacer */
.btn-edit-participant,
.btn-delete-participant,
.btn-move-participant {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-edit-participant {
    background: #AF6F47;
}

.btn-edit-participant:hover {
    background: #9b6240;
}

.btn-delete-participant {
    background: #d64541;
}

.btn-delete-participant:hover {
    background: #c13c38;
}

.btn-move-participant {
    background: #28a745;
}

.btn-move-participant:hover {
    background: #218838;
}

/* Fenêtre modale pour le déplacement de participant */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
    padding: 1rem;
    box-sizing: border-box;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-sizing: border-box;
}

/* Sélecteur de date et liste d’activités */
.date-picker {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.activities-grid {
    display: grid;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 12px;
}

.activity-button {
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    font-size: 0.95rem;
    color: #212529;
    transition: all 0.2s ease;
}

.activity-button:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

/* Formulaire de création ou réservation participant */
.form-participant {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #AF6F47;
    box-shadow: 0 0 0 2px rgba(175, 111, 71, 0.2);
}

/* Sélecteur radio pour le mode de paiement */
.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.radio-group input[type="radio"] {
    display: none;
}

.radio-group label {
    display: block;
    padding: 0.75rem;
    text-align: center;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-group input[type="radio"]:checked + label {
    background: #AF6F47;
    color: #fff;
    border-color: #AF6F47;
}

/* Bouton principal, incl. "Créer le participant" */
.form-participant .submit-btn,
.form-participant button[type="submit"] {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: #85AB76 !important;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 !important;
}

.form-participant .submit-btn:hover,
.form-participant button[type="submit"]:hover {
    background-color: #729463 !important;
    transform: translateY(-1px);
}

.form-participant .submit-btn:active,
.form-participant button[type="submit"]:active {
    transform: translateY(0);
}

/* Bloc d’infos tarifaires */
.tarif-info {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
}


.tarif-info p {
    margin-bottom: 1rem;
    font-weight: 600;
    color: #333;
}

.tarif-line {
    padding: 0.5rem 0;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
}

.tarif-line:last-child {
    border-bottom: none;
}

/* Message quand l'activité est complète */
.no-places {
    text-align: center;
    padding: 2rem;
    background: #f8d7da;
    color: #721c24;
    border-radius: 6px;
    margin: 2rem 0;
}

/* Bouton pour afficher la fenêtre de mise à jour de l’activité */
#showMajActiviteBtn {
    padding: 0.75rem 1.5rem;
    background-color: #AF6F47;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

#showMajActiviteBtn:hover {
    background-color: #9b6240;
}

/* Modale de mise à jour de l’activité */
#majActiviteModal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    overflow-y: auto;
    padding: 1rem;
    box-sizing: border-box;
}

#majActiviteModal > div {
    position: relative;
    margin: 5% auto;
    padding: 20px;
    background: #fff;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
}

#closeMajActiviteModal {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Formulaire interne à la modale */
.maj-activite-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
    margin-top: 1rem;
}

.maj-activite-form label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.maj-activite-form input,
.maj-activite-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
}

#majActiviteModal #update_activite_btn {
    background: #AF6F47;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 1rem;
    width: 100%;
    transition: background 0.2s ease;
}

#majActiviteModal #update_activite_btn:hover {
    background: #9b6240;
}

/* Switch affichage oui/non */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #AF6F47;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Sélecteur pour le guide */
.select-guide-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}

.select-guide-wrapper select {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background: #fff;
    cursor: pointer;
}

#updateGuideBtn {
    padding: 0.75rem 1.5rem;
    background: #AF6F47;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

/* Panneau coulissant pour la modification des participants */
#editParticipantPanel {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 800px;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 5px rgba(0,0,0,0.3);
    transition: right 0.3s;
    overflow: auto;
    padding: 2rem;
    box-sizing: border-box;
}

#editParticipantPanel h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

#editParticipantPanel h3 {
    margin-top: 1rem;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

#editParticipantPanel button {
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    border-radius: 6px;
}

/* Hover des boutons dans le panneau */
#editParticipantPanel button:hover {
    transform: translateY(-1px);
}

/* Boutons d’actions supplémentaires (Paiement / SMS) */
#btnPaymentRequest,
#btnSendSMS {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #AF6F47;
    color: #fff;
    font-weight: 600;
    margin-top: 0.5rem;
    text-align: center;
}

#btnPaymentRequest:hover,
#btnSendSMS:hover {
    background: #9b6240;
}

/* Popups pour paiement et SMS */
#paymentPopup,
#smsPopup {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Champ de saisie du montant de paiement */
#askPaymentAmount {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.75rem;
    width: 100%;
    max-width: 250px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

#askPaymentAmount:focus {
    outline: none;
    border-color: #AF6F47;
    box-shadow: 0 0 0 2px rgba(175, 111, 71, 0.2);
}

/* Bouton de demande de paiement */
#askPaymentBtn {
    background: #AF6F47;
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1.5rem;
    margin-top: 0.75rem;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 250px;
}

#askPaymentBtn:hover {
    background: #9b6240;
    transform: translateY(-1px);
}

/* Boutons SMS */
#sendInfoSMS,
#showCustomSMS {
    padding: 0.75rem 1.5rem;
    background: #28a745;
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

#sendInfoSMS:hover,
#showCustomSMS:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* Bloc SMS personnalisé */
#customSMSBlock {
    margin-top: 1rem;
    display: none;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

/* Zone de texte SMS personnalisé */
#customSMSText {
    width: 100%;
    max-width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.75rem;
    resize: vertical;
    min-height: 100px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

#customSMSText:focus {
    outline: none;
    border-color: #AF6F47;
    box-shadow: 0 0 0 2px rgba(175, 111, 71, 0.2);
}

/* Bouton d'envoi SMS personnalisé */
#sendCustomSMSBtn {
    background: #85AB76;
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1.5rem;
    margin-top: 0.75rem;
    width: 100%;
    transition: all 0.2s ease;
}

#sendCustomSMSBtn:hover {
    background: #729463;
    transform: translateY(-1px);
}


/* Adaptations responsives */
@media (max-width: 992px) {
    .radio-group {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}

@media (max-width: 768px) {
    .participant-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .participant-item > div:last-child {
        width: 100%;
        justify-content: space-between;
    }
    #editParticipantPanel {
        width: 100%;
        max-width: 100%;
    }
    #majActiviteModal > div {
        margin: 5% auto;
        width: 95%;
        max-height: 85vh;
    }
    .radio-group {
        grid-template-columns: 1fr;
    }
    .form-participant {
        margin: 1rem;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .participants-list {
        gap: 0.5rem;
    }
    #majActiviteModal > div {
        margin: 3% auto;
        width: 95%;
        max-height: 80vh;
        padding: 1rem;
    }
    .modal-content {
        padding: 1rem;
    }
    #showMajActiviteBtn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    #editParticipantPanel {
        padding: 1rem;
    }
}
