.derniere-sortie {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background-color: #f9f9f9;
    margin: 20px 0;
}

.derniere-sortie__titre {
    margin: 0 0 20px 0;
    font-size: 32px;
    font-weight: bold;
    text-align: center;
}

.derniere-sortie__soustitre {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #333;
    font-weight: bold;
}

.derniere-sortie__details {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.derniere-sortie__details:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.derniere-sortie__info {
    display: flex;
    margin-bottom: 10px;
    align-items: center;
}

.derniere-sortie__label {
    font-weight: 600;
    margin-right: 8px;
    color: #555;
    min-width: 120px;
    text-decoration: underline;
}

.derniere-sortie__valeur {
    color: #333;
}

.derniere-sortie__commentaire {
    margin-bottom: 15px;
    padding: 12px 15px;
    background-color: #eef2f7;
    border-left: 3px solid #3d5a7d;
    border-radius: 0 4px 4px 0;
    font-size: 15px;
    color: #444;
    line-height: 1.6;
}

.derniere-sortie__commentaire p {
    margin-bottom: 5px;
}

.derniere-sortie__commentaire_title {
    text-decoration: underline;
    font-size: 16px;
    font-weight: bold;
}

.derniere-sortie__gpx {
    margin-top: 15px;
}

.derniere-sortie__lien-gpx {
    display: inline-block;
    padding: 10px 20px;
    background-color: #000;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.derniere-sortie-loading,
.derniere-sortie-vide {
    padding: 40px;
    text-align: center;
    border: 2px dashed #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.derniere-sortie-vide p {
    margin: 0;
    color: #666;
}

/* Styles pour la section présence */
.derniere-sortie__presence {
    margin-top: 20px;
    padding-top: 20px;
}

.derniere-sortie__presence-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.derniere-sortie__btn {
    padding: 12px 24px;
    border: 2px solid;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fff;
}

.derniere-sortie__btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.derniere-sortie__btn.loading {
    position: relative;
    color: transparent;
}

.derniere-sortie__btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Bouton Présent */
.derniere-sortie__btn--present {
    border-color: #28a745;
    color: #28a745;
}

.derniere-sortie__btn--present:hover:not(:disabled) {
    background-color: #28a745;
    color: #fff;
}

.derniere-sortie__btn--present.active {
    background-color: #28a745;
    color: #fff;
}

/* Bouton Absent */
.derniere-sortie__btn--absent {
    border-color: #dc3545;
    color: #dc3545;
}

.derniere-sortie__btn--absent:hover:not(:disabled) {
    background-color: #dc3545;
    color: #fff;
}

.derniere-sortie__btn--absent.active {
    background-color: #dc3545;
    color: #fff;
}

/* Compteur de participants */
.derniere-sortie__presence-count {
    font-size: 14px;
    color: #666;
}

.presence-count-number {
    font-weight: 700;
    color: #28a745;
}

/* Liste des participants */
.derniere-sortie__participants {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.derniere-sortie__participants-group {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.derniere-sortie__participants-group:last-child {
    margin-bottom: 0;
}

.derniere-sortie__participants-label {
    font-weight: 600;
    margin-right: 5px;
}

.derniere-sortie__participants-group--present .derniere-sortie__participants-label {
    color: #28a745;
}

.derniere-sortie__participants-group--absent .derniere-sortie__participants-label {
    color: #dc3545;
}

.derniere-sortie__participants-list {
    color: #555;
}

/* Modal de connexion */
.derniere-sortie__modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.derniere-sortie__modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.derniere-sortie__modal-content {
    position: relative;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.derniere-sortie__modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 5px 10px;
    line-height: 1;
}

.derniere-sortie__modal-close:hover {
    color: #333;
}

.derniere-sortie__modal-content h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: #333;
}

.derniere-sortie__modal-content p {
    margin: 0 0 20px 0;
    color: #666;
}

.derniere-sortie__modal-login-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.derniere-sortie__modal-login-btn:hover {
    background-color: #333;
    color: #fff;
}

/* Formulaire de connexion */
.derniere-sortie__login-form {
    text-align: left;
}

.derniere-sortie__form-field {
    margin-bottom: 15px;
}

.derniere-sortie__form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.derniere-sortie__form-field input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.derniere-sortie__form-field input:focus {
    outline: none;
    border-color: #000;
}

.derniere-sortie__form-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

.derniere-sortie__login-form .derniere-sortie__modal-login-btn {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.derniere-sortie__login-form .derniere-sortie__modal-login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.derniere-sortie__forgot-password {
    display: block;
    margin-top: 15px;
    text-align: center;
    color: #666;
    font-size: 14px;
    text-decoration: none;
}

.derniere-sortie__forgot-password:hover {
    color: #000;
    text-decoration: underline;
}

/* Section commentaires */
.derniere-sortie__comments {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
}

.derniere-sortie__comments-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 0;
    font-size: 15px;
    font-weight: 700;
    color: #3d5a7d;
    cursor: pointer;
    font-family: inherit;
}

.derniere-sortie__comments-toggle:hover {
    color: #2e4560;
}

.derniere-sortie__comments-toggle-icon {
    font-size: 11px;
    transition: transform 0.25s ease;
    display: inline-block;
}

.derniere-sortie__comments-toggle[aria-expanded="true"] .derniere-sortie__comments-toggle-icon {
    transform: rotate(180deg);
}

.derniere-sortie__comments-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.derniere-sortie__comments-body.open {
    max-height: 380px;
    overflow-y: auto;
}

.derniere-sortie__comments-list {
    margin: 15px 0 10px 0;
}

.derniere-sortie__comments-empty {
    color: #888;
    font-style: italic;
    font-size: 14px;
    margin: 0 0 15px 0;
}

.derniere-sortie__comment {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.derniere-sortie__comment:last-child {
    border-bottom: none;
}

.derniere-sortie__comment-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
    gap: 10px;
}

.derniere-sortie__comment-author {
    font-weight: 700;
    font-size: 14px;
    color: #3d5a7d;
}

.derniere-sortie__comment-date {
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
}

.derniere-sortie__comment-text {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}

.derniere-sortie__comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.derniere-sortie__comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.derniere-sortie__comment-form textarea:focus {
    outline: none;
    border-color: #3d5a7d;
}

.derniere-sortie__comment-submit {
    align-self: flex-end;
    padding: 9px 22px;
    background-color: #3d5a7d;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.derniere-sortie__comment-submit:hover:not(:disabled) {
    background-color: #2e4560;
}

.derniere-sortie__comment-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* Responsive */
@media (max-width: 480px) {
    .derniere-sortie__presence-buttons {
        flex-direction: column;
    }

    .derniere-sortie__btn {
        width: 100%;
    }
}