.cso-resa-wrapper {
    max-width: 1280px;
    margin: 0 auto;
}
.cso-salles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 45px;
}
.cso-salle-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    border-top: 4px solid #007bc4;
    display: flex;
    flex-direction: column;
}
.cso-salle-thumb img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}
.cso-salle-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.cso-salle-body h3 {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
    font-weight: 800;
    color: #1d1d1b;
}
.cso-salle-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}
.cso-salle-badges span {
    background: #eee8e8;
    color: #1d1d1b;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
}
.cso-salle-badges i {
    color: #e63316;
    margin-right: 4px;
}
.cso-salle-desc {
    font-size: 0.95rem;
    line-height: 1.55;
    color: #444;
    flex-grow: 1;
}
.cso-salle-equip {
    font-size: 0.88rem;
    color: #555;
    background: #f9f9f9;
    padding: 10px 12px;
    border-radius: 6px;
    margin: 12px 0 16px 0;
}
.cso-select-salle-btn {
    background: #007bc4;
    color: #ffffff;
    border: none;
    padding: 11px 18px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: background 0.25s ease;
    margin-top: auto;
}
.cso-select-salle-btn:hover {
    background: #e63316;
}

/* Formulaire */
.cso-resa-form-section {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
    border-top: 4px solid #e63316;
}
.cso-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.cso-form-group {
    display: flex;
    flex-direction: column;
}
.cso-form-group label {
    font-weight: 700;
    margin-bottom: 6px;
    color: #1d1d1b;
    font-size: 0.95rem;
}
.cso-form-group .req {
    color: #e63316;
}
.cso-form-group input,
.cso-form-group select,
.cso-form-group textarea {
    padding: 11px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.96rem;
    background: #fafafa;
}
.cso-form-group input:focus,
.cso-form-group select:focus,
.cso-form-group textarea:focus {
    background: #ffffff;
    border-color: #007bc4;
    outline: none;
}

/* Calendrier */
.cso-calendar-box {
    margin-top: 25px;
    padding: 22px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}
.cso-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 18px;
}
.cso-calendar-header h3 {
    margin: 0 0 4px 0;
    color: #1d1d1b;
    font-size: 1.2rem;
}
.cso-calendar-hint {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
}
.cso-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.85rem;
    font-weight: 600;
}
.leg-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.leg-item .dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: inline-block;
}
.dot-free { background: #ffffff; border: 1px solid #ccc; }
.dot-busy { background: #e63316; }
.dot-selected { background: #007bc4; }

.cso-cal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    background: #ffffff;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
}
.cso-cal-nav-btn {
    background: #eee8e8;
    border: none;
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    color: #1d1d1b;
}
.cso-cal-nav-btn:hover {
    background: #007bc4;
    color: #ffffff;
}
.cso-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.cso-cal-day-name {
    text-align: center;
    font-weight: 800;
    font-size: 0.82rem;
    color: #555;
    padding: 6px 0;
    text-transform: uppercase;
}
.cso-cal-cell {
    background: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}
.cso-cal-cell.empty {
    background: transparent;
    border: none;
    cursor: default;
}
.cso-cal-cell.past {
    background: #eeeeee;
    color: #999999;
    cursor: not-allowed;
}
/* Créneau occupé dans Nextcloud : uniquement en rouge, sans aucun libellé confidentiel */
.cso-cal-cell.busy {
    background-color: #e63316 !important;
    border-color: #c9260c !important;
    color: #ffffff !important;
    cursor: not-allowed;
}
.cso-cal-cell.free:hover {
    border-color: #007bc4;
    background: #eef7fc;
}
.cso-cal-cell.selected {
    background-color: #007bc4 !important;
    border-color: #005f99 !important;
    color: #ffffff !important;
}
.cso-selected-summary {
    margin-top: 15px;
    padding: 12px 15px;
    background: #eef7fc;
    border-left: 4px solid #007bc4;
    border-radius: 4px;
    font-size: 0.92rem;
}
.cso-resa-submit-row {
    margin-top: 22px;
}
.cso-resa-submit-btn {
    background: #e63316;
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.25s ease;
}
.cso-resa-submit-btn:hover {
    background: #1d1d1b;
}
.cso-resa-legal-note {
    font-size: 0.85rem;
    color: #666;
    margin-top: 10px;
}
.cso-resa-feedback {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 6px;
    font-weight: 600;
}
.cso-resa-feedback.success {
    background: #e7f6ec;
    border-left: 4px solid #1e8e3e;
    color: #135c28;
}
.cso-resa-feedback.error {
    background: #fdecea;
    border-left: 4px solid #e63316;
    color: #a61c08;
}

@media (max-width: 768px) {
    .cso-form-grid {
        grid-template-columns: 1fr;
    }
    .cso-resa-form-section {
        padding: 20px 15px;
    }
    .cso-cal-cell {
        min-height: 40px;
        font-size: 0.85rem;
    }
}
