/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

body::before {
    display: none;
}

/* ===== CONTAINER & LAYOUT ===== */
.container {
    max-width: 900px;
    margin: 0 auto;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 0;
    font-size: 0;
    height: 0;
    padding: 0;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* ===== CARD & IMAGE ===== */
.card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.header-image {
    width: 100%;
    height: 300px;
    background-image: url('image1.jpeg');
    background-position: center top;
    background-repeat: no-repeat;
    background-size: 100% auto;
    margin-bottom: 0;
    border-radius: 15px 15px 0 0;
}

.card-with-image {
    padding: 0;
    overflow: visible;
    padding-bottom: 30px;
}

.card-with-image .header-image {
    border-radius: 15px 15px 0 0;
}

.card-with-image .calendar-section {
    padding: 40px;
}

/* ===== ANIMATIONS ===== */
.step-content {
    display: none;
    animation: slideIn 0.4s ease-out;
}

.step-content.active {
    display: block;
}

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

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* ===== SECTION CALENDRIER ===== */
.calendar-section {
    margin-top: 0;
}

.calendar-section h2 {
    color: #1e3c72;
    margin-bottom: 15px;
    font-size: 1.6em;
    border-bottom: 3px solid #2a5298;
    padding-bottom: 10px;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.calendar-nav button {
    background: #2a5298;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
    font-size: 0.8em;
    white-space: nowrap;
    flex: 0 0 auto;
}

.calendar-nav button:hover {
    background: #1e3c72;
}

.calendar-nav h3 {
    color: #333;
    margin: 0;
    font-size: 1.3em;
}

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

.day-header {
    text-align: center;
    font-weight: bold;
    color: #2a5298;
    padding: 6px;
    border-bottom: 1px solid #2a5298;
    font-size: 0.9em;
}

.day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: not-allowed;
    background: #f5f5f5;
    color: #999;
    font-weight: bold;
    transition: all 0.3s;
    position: relative;
    font-size: 0.8em;
    padding: 8px 2px;
    min-height: 35px;
}

.day-number {
    font-size: 1.1em;
}

.day-capacity {
    font-size: 0.7em;
    margin-top: 3px;
    opacity: 0.8;
    display: none;
}

.day.available {
    cursor: pointer;
    background: linear-gradient(135deg, #fff8e1 0%, #ffe082 100%);
    color: #333;
    border-color: #fbc02d;
    box-shadow: inset 0 0 5px rgba(251, 192, 45, 0.2);
}

.day.available:hover {
    background: linear-gradient(135deg, #ffe082 0%, #ffb300 100%);
    transform: scale(1.08);
    box-shadow: 0 5px 15px rgba(251, 192, 45, 0.4);
}

.day.available-dinner {
    cursor: pointer;
    background: linear-gradient(135deg, #e3f2fd 0%, #90caf9 100%);
    color: #01579b;
    border-color: #1976d2;
    box-shadow: inset 0 0 5px rgba(25, 118, 210, 0.2);
}

.day.available-dinner:hover {
    background: linear-gradient(135deg, #90caf9 0%, #42a5f5 100%);
    transform: scale(1.08);
    box-shadow: 0 5px 15px rgba(25, 118, 210, 0.4);
}

.day.selected {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border-color: #388e3c;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
    transform: scale(1.08);
}

.day.other-month {
    opacity: 0.3;
    cursor: pointer;
    transition: all 0.2s;
}

.day.other-month:hover {
    opacity: 0.6;
    transform: scale(1.05);
    background: #e3f2fd;
}

.day.closed {
    background: #ffcdd2;
    color: #b71c1c;
    border-color: #d32f2f;
    cursor: not-allowed;
}

.day.full {
    background: #ffcdd2;
    color: #b71c1c;
    border-color: #d32f2f;
    cursor: not-allowed;
}

/* ===== LÉGENDE ===== */
.legend {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 25px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
}

.legend-box {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    border: 2px solid;
}

.legend-lunch .legend-box {
    background: linear-gradient(135deg, #fff8e1 0%, #ffe082 100%);
    border-color: #fbc02d;
}

.legend-dinner .legend-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #90caf9 100%);
    border-color: #1976d2;
}

.legend-full .legend-box {
    background: #ffcdd2;
    border-color: #d32f2f;
}

.legend-closed .legend-box {
    background: #efefef;
    border-color: #999;
}

/* ===== SECTION SÉLECTION SERVICE ===== */
.selection-section h2 {
    color: #1e3c72;
    margin-bottom: 30px;
    font-size: 1.8em;
    border-bottom: 3px solid #2a5298;
    padding-bottom: 15px;
}

.selection-section {
    margin: 0 20px;
    padding-bottom: 30px;
}

.selection-info {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #2a5298;
}

.selection-info strong {
    color: #1565c0;
}

/* ===== FORMULAIRES ===== */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    color: #333;
    font-weight: bold;
    font-size: 1.05em;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 8px rgba(42, 82, 152, 0.2);
}

textarea {
    min-height: 80px;
    resize: vertical;
    padding: 12px;
}

/* ===== OPTIONS DE SERVICE ===== */
.service-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 12px;
}

.service-option {
    padding: 18px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    background: white;
}

.service-option:hover {
    border-color: #2a5298;
    background: #f0f5ff;
    transform: translateY(-2px);
}

.service-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.service-option.disabled:hover {
    transform: none;
    background: #f5f5f5;
}

.service-option.checked {
    background: #2a5298;
    color: white;
    border-color: #1e3c72;
    box-shadow: 0 5px 15px rgba(42, 82, 152, 0.3);
}

.option-label {
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    display: block;
}

.option-capacity {
    font-size: 0.85em;
    margin-top: 8px;
    opacity: 0.9;
}

.capacity-bar {
    width: 100%;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
    display: none;
}

.capacity-fill {
    height: 100%;
    background: #27ae60;
    border-radius: 3px;
    transition: width 0.3s;
}

.capacity-critical .capacity-fill {
    background: #e74c3c;
}

.capacity-warning .capacity-fill {
    background: #f39c12;
}

/* ===== CRÉNEAUX HORAIRES ===== */
.time-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.time-slot {
    padding: 14px;
    border: 2px solid #ddd;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    font-weight: bold;
}

.time-slot:hover {
    border-color: #2a5298;
    background: #f0f5ff;
    transform: translateY(-2px);
}

.time-slot.selected {
    background: #2a5298;
    color: white;
    border-color: #1e3c72;
    box-shadow: 0 5px 15px rgba(42, 82, 152, 0.3);
}

.time-slot.disabled {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
}

/* ===== SECTION INFORMATIONS ===== */
.info-section h2 {
    color: #1e3c72;
    margin-bottom: 30px;
    font-size: 1.8em;
    border-bottom: 3px solid #2a5298;
    padding-bottom: 15px;
}

.info-section {
    margin: 0 20px;
    padding-bottom: 30px;
}

/* ===== BOUTONS ===== */
.button-group {
    display: flex;
    gap: 15px;
    margin-top: 35px;
    margin-bottom: 20px;
}

button {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 5px;
    font-size: 1.05em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(42, 82, 152, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* ===== CONFIRMATION ===== */
.confirmation {
    text-align: center;
}

.confirmation-icon {
    font-size: 5em;
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease-out;
}

.confirmation h2 {
    color: #27ae60;
    margin-bottom: 25px;
    font-size: 2.2em;
}

.confirmation-details {
    background: #e8f5e9;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 5px solid #27ae60;
    text-align: left;
}

.confirmation-details p {
    margin: 12px 0;
    font-size: 1.08em;
}

.confirmation-details strong {
    color: #1b5e20;
}

.confirmation-email {
    background: #fff3e0;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
    font-size: 0.95em;
    border-left: 4px solid #ff9800;
}

/* ===== MESSAGES ===== */
.message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
}

.message.error {
    background: #ffebee;
    color: #c0392b;
    border-left: 4px solid #c0392b;
    display: block;
}

.message.success {
    background: #e8f5e9;
    color: #27ae60;
    border-left: 4px solid #27ae60;
    display: block;
}

.message.info {
    background: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid #1565c0;
    display: block;
}

.message.warning {
    background: #fff3e0;
    color: #e67e22;
    border-left: 4px solid #e67e22;
    display: block;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .card {
        padding: 20px;
    }

    .card-with-image {
        padding: 0;
    }

    .card-with-image .calendar-section {
        padding: 20px;
    }

    .header-image {
        height: 150px;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .time-slots {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-options {
        grid-template-columns: 1fr;
    }

    .legend {
        grid-template-columns: repeat(2, 1fr);
    }

    .button-group {
        flex-direction: column;
    }

    .calendar {
        gap: 2px;
    }

    .day {
        font-size: 0.7em;
        padding: 6px 2px;
        min-height: 30px;
    }

    .day-number {
        font-size: 0.9em;
    }

    .day-header {
        font-size: 0.7em;
        padding: 4px 2px;
    }

    .calendar-header button {
        padding: 6px 10px;
        font-size: 0.75em;
    }

    .calendar-header h3 {
        font-size: 1em;
    }

    .calendar-section h2 {
        font-size: 1.4em;
    }
}
