.tywork-booking-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
}

.tywork-booking-header {
    text-align: center;
    margin-bottom: 40px;
}

.tywork-booking-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: #333;
}

.tywork-booking-header p {
    color: #666;
    margin: 0;
}

/* Layout deux colonnes */
.tywork-booking-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.tywork-booking-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tywork-booking-right {
    display: flex;
    flex-direction: column;
}

.tywork-booking-summary {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #ddd;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.tywork-booking-summary h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 16px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    color: #666;
    font-size: 14px;
    border-bottom: 1px solid #e0e0e0;
}

.summary-item span:first-child {
    font-weight: 500;
}

.summary-divider {
    height: 1px;
    background: #ddd;
    margin: 10px 0;
}

.summary-price {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2196F3;
}

.tywork-booking-btn {
    background: #2196F3;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    width: 100%;
}

.tywork-booking-btn:hover:not(:disabled) {
    background: #1976D2;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.tywork-booking-btn:disabled {
    background: #cccccc;
    color: #999999;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.tywork-booking-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* Calendrier mini */
.tywork-mini-calendar {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #ddd;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 600;
    color: #333;
}

.calendar-header button {
    background: #2196F3;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.calendar-header button:hover {
    background: #1976D2;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: #666;
    padding: 8px 0;
}

.calendar-day {
    text-align: center;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    background: white;
    transition: all 0.2s ease;
}

.calendar-day:hover {
    background: #e3f2fd;
    border-color: #2196F3;
}

.calendar-day.other-month {
    color: #ccc;
    background: #fafafa;
}

.calendar-day.selected {
    background: #2196F3;
    color: white;
    border-color: #2196F3;
    font-weight: bold;
}

/* Timeline */
.tywork-timeline {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #ddd;
}

.tywork-timeline h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.timeline-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 600px;
    overflow-y: auto;
}

.timeline-hour {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 10px;
    padding: 8px;
    border-radius: 4px;
    background: white;
    border: 1px solid #ddd;
}

.timeline-time {
    font-weight: 600;
    font-size: 12px;
    color: #666;
    text-align: right;
    padding-right: 10px;
}

.timeline-rooms {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.timeline-room {
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    color: white;
}

.timeline-room.available {
    background: #4CAF50;
}

.timeline-room.occupied {
    background: #FF6B6B;
}

.tywork-error {
    padding: 15px;
    background: #ffebee;
    border: 1px solid #f44336;
    border-radius: 4px;
    color: #c62828;
    margin-bottom: 20px;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Disponibilités - Créneaux horaires */
#tywork-availability {
    background: white;
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 20px;
}

#tywork-availability h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 16px;
}

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

.room-availability:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.room-header {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 14px;
}

.room-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
}

.time-slot {
    padding: 8px 12px;
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.time-slot.available {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4caf50;
    cursor: pointer;
}

.time-slot.available:hover {
    background: #c8e6c9;
    border-color: #2e7d32;
}

.time-slot.available.selected {
    background: #4caf50;
    color: white;
    border-color: #2e7d32;
    font-weight: 600;
}

.time-slot.unavailable {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
    cursor: not-allowed;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .tywork-booking-wrapper {
        grid-template-columns: 1fr;
    }

    .tywork-booking-summary {
        position: static;
    }

    .calendar-grid {
        gap: 2px;
    }

    .timeline-hour {
        grid-template-columns: 40px 1fr;
    }
}

.tywork-booking-form {
    border: none;
    border-radius: 10px;
    margin: 20px 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.form-group input[type="date"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    color: #333;
    background-color: #fff;
    transition: border-color 0.3s;
}

.form-group input[type="date"]:focus {
    outline: none;
    border-color: #ea6852;
    box-shadow: 0 0 0 3px rgba(234, 104, 82, 0.1);
}

.tywork-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.tywork-pill {
    display: inline-block;
}

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

.tywork-pill span {
    display: inline-block;
    padding: 5px 15px;
    border: 2px solid #ddd;
    border-radius: 25px;
    background: #f5f5f5;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tywork-pill input[type="radio"]:checked+span {
    background: #ea6852;
    color: white;
    border-color: #ea6852;
}

.tywork-pill input[type="radio"]:disabled+span {
    background: #e8e6e1;
    color: #999;
    cursor: not-allowed;
    border-color: #ddd;
}

.tywork-pill span:hover {
    border-color: #ea6852;
}

#tywork-time-slot-display {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.button.button-primary {
    background-color: #7dd3c0 !important;
    border: none !important;
    border-radius: 25px !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 14px 24px !important;
    font-size: 15px !important;
    cursor: pointer;
    transition: background-color 0.3s;
}

.button.button-primary:hover {
    background-color: #6bc0ad !important;
}

.button.button-primary:disabled {
    background-color: #ccc !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

/* Cancellation Feature */
.woocommerce button.tywork-cancel-btn,
.woocommerce button#tywork-cancel-close {
    background-color: #dc3545;
    color: white;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    transition: background-color 0.3s;
}

.woocommerce button.tywork-cancel-btn:hover,
.woocommerce button#tywork-cancel-close:hover {
    padding: 5px 10px;
    background-color: #c82333;
    border: none;
}

.woocommerce button.tywork-cancel-btn:hover::after,
.woocommerce button#tywork-cancel-confirm:hover::after,
.woocommerce button#tywork-cancel-close:hover::after {
    display: none;
}

.tywork-reservations-container {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
}

.tywork-reservations-container h3 {
    margin-top: 0;
}

.tywork-reservations-table {
    width: 100%;
    border-collapse: collapse;
    border: none !important;
}

.tywork-reservations-table thead {
    border: none;
    border-bottom: 2px solid #ddd;
}

.tywork-reservations-table tr {
    border: none;
}

.tywork-reservations-table th {
    text-align: left;
    padding: 10px;
    font-weight: bold;
    border: none;
}

.tywork-reservations-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.tywork-reservations-table td:last-child {
    text-align: center;
}

.tywork-cancel-not-available {
    color: #999;
    font-size: 0.9em;
}

/* Credit Section */
.tywork-credit-section {
    margin: 20px 0 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border-left: 4px solid #4CAF50;
    border-radius: 4px;
}

.tywork-credit-section h3 {
    margin: 0 0 15px 0;
    color: #2e7d32;
    font-size: 18px;
}

.tywork-credit-amount {
    font-size: 24px;
    font-weight: bold;
    color: #1b5e20;
    margin: 10px 0;
}

.tywork-credit-description {
    color: #558b2f;
    font-size: 14px;
    margin: 10px 0 0 0;
}

/* Cancellation Modal */
#tywork-cancellation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#tywork-cancellation-modal.active {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.tywork-modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
}

.tywork-modal-content h2 {
    margin-top: 0;
}

.tywork-modal-footer {
    margin-top: 20px;
    text-align: right;
}

.tywork-modal-footer button {
    margin-right: 10px;
}

#tywork-cancel-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

#tywork-cancel-close:hover {
    color: #333;
}

#tywork-cancel-close::before {
    content: "✕";
}

#tywork-modal-content p {
    line-height: 1.6;
}

.tywork-refund-success {
    color: #28A745;
    background: #D4EDDA;
    padding: 10px;
    border-radius: 4px;
    margin: 15px 0;
}

.tywork-refund-denied {
    color: #DC3545;
    background: #F8D7DA;
    padding: 10px;
    border-radius: 4px;
    margin: 15px 0;
}

.tywork-refund-note {
    color: #666;
    font-size: 0.9em;
}

/* Status Badge */
.tywork-status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9em;
    white-space: nowrap;
    display: inline-block;
}

.tywork-status-pending {
    background-color: #FFF3CD;
    color: #FFC107;
}

.tywork-status-validated {
    background-color: #D4EDDA;
    color: #28A745;
}

.tywork-status-cancelled {
    background-color: #F8D7DA;
    color: #DC3545;
}

.tywork-status-confirmed {
    background-color: #D4EDDA;
    color: #28A745;
}

/* Loader */
#tywork-time-loader {
    display: none;
    text-align: center;
    padding: 15px;
}

#tywork-time-hint {
    display: block;
    margin-top: 5px;
    color: #666;
}

.tywork-required {
    color: red;
}

.tywork-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: tywork-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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

/* Prix */
.tywork-price-ht {
    color: #888;
}

.tywork-price-old {
    text-decoration: line-through;
    color: #999;
}

.tywork-price-resident {
    color: #40683c;
    font-weight: bold;
}

.tywork-price-adherent {
    color: #0073aa;
    font-weight: bold;
}

.tywork-price-badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 13px;
}

.tywork-price-badge--resident {
    color: #40683c;
}

.tywork-price-badge--adherent {
    color: #0073aa;
}

/* Visuel de la salle */
#tywork-room-visual {
    text-align: center;
    margin-bottom: 15px;
}

#tywork-room-visual img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
}

.tywork-room-link-text {
    display: inline-block;
    font-size: 13px;
    color: #ea6852;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.tywork-room-link-text:hover {
    color: #d85540;
    text-decoration: underline;
}

/* Options price + total */
.tywork-options-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    color: #555;
    border-top: 1px dashed #ddd;
    margin-top: 8px;
}

.tywork-options-price-label {
    font-weight: 500;
}

.tywork-total-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 0 0;
    font-size: 16px;
    color: #333;
    border-top: 2px solid #ddd;
    margin-top: 8px;
}

#tywork-total-price-value {
    color: #40683c;
    font-weight: bold;
    font-size: 18px;
}

/* Hint de connexion */
.tywork-login-hint {
    background: #f0f7ff;
    border: 1px solid #c5ddf5;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 15px;
}

.tywork-login-hint p {
    margin: 0;
    font-size: 13px;
    color: #2c5282;
    line-height: 1.4;
}

.tywork-login-hint a {
    color: #2b6cb0;
    font-weight: 600;
    text-decoration: underline;
}

.tywork-login-hint a:hover {
    color: #1a365d;
}

/* Phrase de contact */
.tywork-contact-hint {
    font-size: 12px;
    color: #888;
    text-align: center;
    margin-top: 12px;
    line-height: 1.4;
}

.tywork-contact-hint a {
    color: #ea6852;
    text-decoration: none;
    font-weight: 500;
}

.tywork-contact-hint a:hover {
    text-decoration: underline;
}
/* ── Info crédit coworking ─────────────────────────────────────── */
#tywork-coworking-credit-info {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
}

.tywork-credit-ok {
    color: #276749;
    background: #f0fff4;
    display: block;
    padding: 8px 12px;
    border-radius: 5px;
    border-left: 3px solid #38a169;
}

.tywork-credit-partial {
    color: #7b4f12;
    background: #fffaf0;
    display: block;
    padding: 8px 12px;
    border-radius: 5px;
    border-left: 3px solid #dd6b20;
}

.tywork-credit-none {
    color: #742a2a;
    background: #fff5f5;
    display: block;
    padding: 8px 12px;
    border-radius: 5px;
    border-left: 3px solid #e53e3e;
}

.tywork-credit-info {
    color: #2b6cb0;
    background: #ebf8ff;
    display: block;
    padding: 8px 12px;
    border-radius: 5px;
    border-left: 3px solid #3182ce;
}

/* Stepper quantité par option */
.tywork-option-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
    flex: 0 0 100%;
}
.tywork-option-qty-row:last-child {
    border-bottom: none;
}
.tywork-option-label {
    flex: 1;
    font-size: 14px;
    color: #333;
}
.tywork-option-price-hint {
    color: #666;
    font-size: 12px;
}
.tywork-adh-hint {
    color: #888;
}
.tywork-qty-stepper {
    display: flex;
    align-items: center;
    gap: 4px;
}
.tywork-qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
}
.tywork-qty-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}
.tywork-option-qty {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    flex-shrink: 0;
    flex-grow: 0;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 14px;
    -moz-appearance: textfield;
}
.tywork-option-qty::-webkit-inner-spin-button,
.tywork-option-qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.tywork-option-qty-row input.tywork-free-option {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    cursor: pointer;
}
