/* SmartBooker Frontend Styles */
.sb-booking-form-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
}

.sb-form-title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
}

/* CALENDRIER */
#sb_calendar_inline {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    max-width: 100%;
}

.sb-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.sb-cal-header button {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.sb-cal-header button:hover {
    background: #135e96;
}

.sb-cal-title {
    font-weight: bold;
    font-size: 16px;
}

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

.sb-cal-day-name {
    text-align: center;
    font-weight: bold;
    padding: 5px;
    color: #666;
    font-size: 11px;
}

.sb-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all .2s;
    min-height: 50px;
}

.sb-cal-day:not(.empty):not(.closed):hover {
    transform: scale(1.08);
    box-shadow: 0 3px 10px rgba(34,113,177,.25);
    z-index: 10;
    border-color: #2271b1;
}

.sb-cal-day.selected {
    border: 3px solid #2271b1 !important;
    box-shadow: 0 0 0 2px rgba(34,113,177,.3);
}

.sb-cal-day.closed {
    background: #d0d0d0 !important;
    cursor: not-allowed;
    opacity: .7;
}

/* FERMETURES PARTIELLES - Dégradés avec gris */
.sb-cal-day.lunch-closed.dinner-normal {
    background: linear-gradient(135deg, #d0d0d0 50%, #d4a574 50%);
}

.sb-cal-day.lunch-closed.dinner-carte {
    background: linear-gradient(135deg, #d0d0d0 50%, #d4a574 50%);
}

.sb-cal-day.lunch-closed.dinner-event {
    background: linear-gradient(135deg, #d0d0d0 50%, #e6b85c 50%);
}

.sb-cal-day.lunch-brunch.dinner-closed {
    background: linear-gradient(135deg, #1867a3 50%, #d0d0d0 50%);
}

.sb-cal-day.lunch-plat.dinner-closed {
    background: linear-gradient(135deg, #ffc1bd 50%, #d0d0d0 50%);
}

.sb-cal-day.lunch-normal.dinner-closed {
    background: linear-gradient(135deg, #ffc1bd 50%, #d0d0d0 50%);
}

.sb-cal-day.past,
.sb-cal-day.too-far {
    background: #e8e8e8 !important;
    cursor: not-allowed;
    opacity: .4;
    text-decoration: line-through;
}

.sb-cal-day.empty {
    border: none;
    background: transparent !important;
}

/* DÉGRADÉS DIAGONAUX */
.sb-cal-day.lunch-brunch.dinner-normal {
    background: linear-gradient(135deg, #1867a3 50%, #d4a574 50%);
}

.sb-cal-day.lunch-brunch.dinner-carte {
    background: linear-gradient(135deg, #1867a3 50%, #d4a574 50%);
}

.sb-cal-day.lunch-brunch.dinner-event {
    background: linear-gradient(135deg, #1867a3 50%, #e6b85c 50%);
}

.sb-cal-day.lunch-plat.dinner-normal {
    background: linear-gradient(135deg, #ffc1bd 50%, #d4a574 50%);
}

.sb-cal-day.lunch-plat.dinner-carte {
    background: linear-gradient(135deg, #ffc1bd 50%, #d4a574 50%);
}

.sb-cal-day.lunch-plat.dinner-event {
    background: linear-gradient(135deg, #ffc1bd 50%, #e6b85c 50%);
}

.sb-cal-day.lunch-normal.dinner-carte {
    background: linear-gradient(135deg, #ffc1bd 50%, #d4a574 50%);
}

.sb-cal-day.lunch-normal.dinner-event {
    background: linear-gradient(135deg, #ffc1bd 50%, #e6b85c 50%);
}

.sb-cal-day.lunch-normal.dinner-normal {
    background: linear-gradient(135deg, #ffc1bd 50%, #d4a574 50%);
}

.sb-cal-day.lunch-brunch:not([class*="dinner"]) {
    background: #1867a3;
}

.sb-cal-day.lunch-plat:not([class*="dinner"]) {
    background: #ffc1bd;
}

.day-num {
    font-size: 14px;
    font-weight: bold;
    z-index: 1;
    text-shadow: 0 0 3px rgba(255,255,255,.8);
}

/* LÉGENDE */
.sb-legend {
    margin-top: 8px;
    padding: 8px 10px;
    background: #f9f9f9;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px 15px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    white-space: nowrap;
}

.legend-color {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    margin-right: 5px;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.legend-color.sparkle {
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 5px rgba(230, 184, 92, 0.5);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.1);
        box-shadow: 0 0 15px rgba(230, 184, 92, 0.8), 0 0 25px rgba(255, 215, 0, 0.6);
    }
}

.event-link {
    float: right;
    font-size: 14px;
    text-decoration: none;
    color: #2271b1;
}

.event-link:hover {
    text-decoration: underline;
}

/* SÉLECTION SERVICE */
.sb-service-selector, .sb-time-selector {
    background: #f9f9f9;
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
}

.sb-service-selector h3, .sb-time-selector h3 {
    margin-top: 0;
    color: #333;
    font-size: 18px;
}

#sb_service_options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sb-service-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background: #fff;
    border: 3px solid #2271b1;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    text-align: left;
}

.sb-service-btn:hover {
    background: #2271b1;
    color: #fff;
    transform: translateX(3px);
}

.sb-service-btn.active {
    background: #2271b1;
    color: #fff;
    border-color: #135e96;
}

/* FORMULAIRE */
.sb-form-row {
    margin-bottom: 20px;
}

.sb-form-field {
    display: flex;
    flex-direction: column;
}

.sb-form-field label {
    font-weight: 700;
    margin-bottom: 10px;
    color: #222;
    font-size: 16px;
    display: block;
}

.sb-form-field input,
.sb-form-field select,
.sb-form-field textarea {
    padding: 14px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color .3s;
    background: #fff;
    color: #333;
    font-weight: 500;
    width: 100%;
    box-sizing: border-box;
}

.sb-form-field select {
    cursor: pointer;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    appearance: menulist !important;
    height: 52px;
    line-height: normal;
}

.sb-form-field select option {
    padding: 8px;
    background: #fff;
    color: #333;
    font-size: 16px;
}

.sb-form-field input[type="number"] {
    -moz-appearance: textfield;
}

.sb-form-field input[type="number"]::-webkit-outer-spin-button,
.sb-form-field input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.sb-form-field input:focus,
.sb-form-field select:focus,
.sb-form-field textarea:focus {
    outline: none;
    border-color: #2271b1;
}

.sb-panic-alert {
    margin-top: 10px;
    padding: 12px;
    background: #fff3cd;
    border: 2px solid #ff6b35;
    border-radius: 6px;
    color: #856404;
    font-size: 14px;
    text-align: center;
}

.sb-panic-alert strong {
    color: #ff6b35;
    font-size: 16px;
}

.sb-form-submit {
    margin-top: 30px;
}

.sb-submit-button {
    width: 100%;
    padding: 15px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background .3s;
}

.sb-submit-button:hover {
    background: #135e96;
}

.sb-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.sb-form-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    display: none;
    text-align: center;
}

.sb-form-result.success {
    background: #d5eed1;
    color: #1e6f00;
    display: block;
}

.sb-form-result.error {
    background: #fee;
    color: #c00;
    display: block;
}

/* SOIRÉES À THÈME */
.sb-upcoming-events {
    margin-top: 40px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e6b85c10 100%);
    border-radius: 8px;
    border: 2px solid #e6b85c;
}

.sb-upcoming-events h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
    text-align: center;
}

.sb-events-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sb-event-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: transform .2s, box-shadow .2s;
}

.sb-event-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230,184,92,.3);
}

.sb-event-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.sb-event-content {
    flex: 1;
}

.sb-event-content h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
}

.sb-event-date {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.sb-event-link {
    padding: 8px 16px;
    background: #e6b85c;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .3s;
}

.sb-event-link:hover {
    background: #d4a574;
}

/* CONTEXTE INFO */
.sb-context-info {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%);
    border-left: 4px solid #2271b1;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    line-height: 1.6;
}

.sb-context-info p {
    margin: 0 0 10px 0;
}

.sb-context-info strong {
    color: #2271b1;
}

/* MODAL SUCCÈS */
.sb-success-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.sb-success-content {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    margin: 20px;
    text-align: center;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sb-success-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 0.6s ease-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-30px); }
    60% { transform: translateY(-15px); }
}

.sb-success-content h2 {
    color: #00a32a;
    font-size: 28px;
    margin: 0 0 20px 0;
}

.sb-success-details {
    color: #555;
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: 30px;
}

.sb-success-close {
    background: linear-gradient(135deg, #e6b85c 0%, #d4a574 100%);
    color: #fff;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .2s;
}

.sb-success-close:hover {
    transform: scale(1.05);
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .sb-booking-form-container {
        padding: 15px;
        margin: 10px;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    #sb_calendar_inline {
        padding: 10px;
        margin: 0 -5px 15px -5px;
    }
    
    .sb-cal-grid {
        gap: 3px;
    }
    
    .sb-cal-day {
        min-height: 40px;
        border-width: 1px;
    }
    
    .day-num {
        font-size: 11px;
    }
    
    .sb-legend {
        padding: 6px 8px;
        margin-top: 6px;
        gap: 4px 10px;
    }
    
    .legend-item {
        font-size: 11px;
    }
    
    .legend-color {
        width: 14px;
        height: 14px;
    }
    
    .sb-upcoming-events {
        margin-top: 30px;
        padding: 15px;
    }
    
    .sb-upcoming-events h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .sb-event-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .sb-event-link {
        align-self: stretch;
        text-align: center;
    }
}
