/* =========================================
   WRAPPER ET WIDGET PRINCIPAL
   ========================================= */
.booking-wrapper { 
    flex: 1; width: 100%; max-width: 1400px; margin: 0 auto; 
    padding: 20px; display: flex; min-height: 0;
}

.custom-widget {
    flex: 1; width: 100%; display: flex;
    background: var(--card-bg); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-radius: 24px; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.05);
    border: 1px solid var(--nav-border); overflow: hidden;
}

.summary-section, .calendar-section, .time-section { overflow-y: auto; height: 100%; }

/* 1. Partie Gauche : Récapitulatif */
.summary-section { flex: 0.8; padding: 40px; border-right: 1px solid rgba(255,255,255,0.05); background: rgba(10, 10, 15, 0.6); }
.summary-subtitle { color: var(--text-muted); font-weight: 800; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.summary-section h2 { font-size: 2.2rem; font-weight: 900; color: var(--text-main); margin-bottom: 15px; line-height: 1.1; letter-spacing: -1px; }
.summary-desc { color: var(--text-muted); font-size: 1rem; line-height: 1.6; margin-bottom: 35px; font-weight: 500; }

.summary-details { list-style: none; display: flex; flex-direction: column; gap: 20px; }
.summary-details li { display: flex; align-items: flex-start; gap: 15px; font-weight: 700; color: var(--text-main); font-size: 1rem; line-height: 1.4; }
.summary-details li i { color: var(--twitch-purple); font-size: 1.3rem; width: 25px; text-align: center; margin-top: 2px; }
.raw-link { color: var(--primary-blue); text-decoration: none; word-break: break-all; font-weight: 800; transition: 0.2s; }
.raw-link:hover { color: #60a5fa; text-decoration: underline; }

/* 2. Partie Centrale : Le Calendrier */
.calendar-section { flex: 1.2; padding: 40px; border-right: 1px solid rgba(255,255,255,0.05); background: linear-gradient(180deg, rgba(30, 32, 45, 0.4) 0%, rgba(19, 20, 28, 0.6) 100%); }
.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.cal-header button { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); font-size: 1.1rem; cursor: pointer; color: var(--text-main); transition: 0.2s; padding: 10px 15px; border-radius: 12px; }
.cal-header button:hover { background: var(--twitch-purple); border-color: var(--twitch-purple); box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4); }
.cal-header h2 { font-size: 1.3rem; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; }

.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-weight: 800; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 15px; }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-day {
    aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    border-radius: 14px; font-weight: 700; font-size: 0.95rem; cursor: pointer;
    transition: 0.3s; border: 1px solid transparent; color: var(--text-main); background: rgba(255,255,255,0.02);
}
.cal-day:hover:not(.empty):not(.disabled) { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.1); transform: translateY(-2px); }
.cal-day.selected { background: var(--twitch-purple); color: white; box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4); border-color: var(--twitch-purple); transform: scale(1.05); }
.cal-day.empty { cursor: default; background: transparent; }
.cal-day.disabled { color: rgba(255,255,255,0.1); background: transparent; cursor: not-allowed; text-decoration: line-through; border: none; }
.cal-day.full { color: var(--recruit-red); background: rgba(244, 63, 94, 0.05); cursor: not-allowed; border: 1px solid rgba(244, 63, 94, 0.2); }

/* 3. Partie Droite : Créneaux & Formulaire */
.time-section { flex: 1.3; padding: 40px; background: rgba(10, 10, 15, 0.4); display: flex; flex-direction: column; position: relative; }
.time-header { font-size: 1.3rem; font-weight: 900; margin-bottom: 20px; color: var(--text-main); letter-spacing: -0.5px; flex-shrink: 0; }
.time-header span { color: var(--twitch-purple); font-size: 0.85rem; font-weight: 800; display: block; margin-top: 5px; text-transform: uppercase; letter-spacing: 1px; }

.time-slots { display: flex; flex-direction: column; gap: 15px; margin-bottom: 25px; flex-shrink: 0; }
.time-btn {
    background: rgba(30, 32, 45, 0.6); border: 1px solid rgba(255,255,255,0.05); color: var(--text-main);
    padding: 18px 20px; border-radius: 12px; font-weight: 800; font-size: 1.1rem;
    cursor: pointer; transition: 0.3s; font-family: inherit; display: flex; justify-content: space-between; align-items: center;
}
.time-btn i { color: var(--twitch-purple); opacity: 0; transition: 0.3s; }
.time-btn:hover { background: rgba(255,255,255,0.1); transform: translateX(5px); }
.time-btn.active { background: linear-gradient(90deg, #8b5cf6, #a855f7); border-color: transparent; color: white; box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3); }
.time-btn.active i { opacity: 1; color: white; }
.time-btn.booked { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; background: transparent; border-color: transparent; }
.time-btn.booked:hover { transform: none; }

/* Formulaire */
.form-group { display: flex; flex-direction: column; gap: 12px; margin-bottom: 15px; animation: fadeIn 0.4s; flex-shrink: 0; }
input[type="text"], textarea {
    padding: 15px 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.5);
    font-family: inherit; font-size: 0.95rem; outline: none; transition: 0.3s; color: white; font-weight: 600; width: 100%; box-sizing: border-box;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, textarea:focus { border-color: var(--primary-blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }
input::placeholder, textarea::placeholder { color: var(--text-muted); font-weight: 500; }

.discord-profile-zone {
    display: flex; align-items: center; gap: 15px; background: rgba(88, 101, 242, 0.1);
    border: 1px solid var(--discord-blue); padding: 10px 15px; border-radius: 12px; animation: fadeIn 0.4s;
}
.discord-profile-zone img { width: 45px; height: 45px; border-radius: 50%; border: 2px solid var(--discord-blue); box-shadow: 0 0 10px rgba(88, 101, 242, 0.3); }
.discord-profile-zone .discord-name { font-weight: 800; color: white; font-size: 1.05rem; }
.discord-profile-zone i { color: var(--success-green); margin-left: auto; font-size: 1.3rem; }

.btn-submit { 
    background: var(--text-main); color: var(--bg-dark); padding: 16px 25px; border-radius: 12px; 
    font-weight: 900; cursor: pointer; border: none; font-family: inherit; transition: 0.3s; 
    text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; flex: 1; text-align: center;
}
.btn-submit:hover:not(:disabled) { background: var(--twitch-purple); color: white; box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4); transform: translateY(-3px); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-back { background: transparent; color: var(--text-muted); padding: 16px 20px; border-radius: 12px; font-weight: 800; cursor: pointer; border: 1px solid rgba(255,255,255,0.1); font-family: inherit; transition: 0.3s; display: flex; align-items: center; justify-content: center; }
.btn-back:hover { background: rgba(255,255,255,0.05); color: white; }

.mandatory-notice { background: rgba(244, 63, 94, 0.1); border: 1px solid rgba(244, 63, 94, 0.3); padding: 15px; border-radius: 12px; color: #fda4af; font-size: 0.85rem; line-height: 1.5; margin-bottom: 15px; flex-shrink: 0; }
.mandatory-notice strong { color: var(--recruit-red); display: block; margin-bottom: 5px; font-size: 0.95rem; }

.placeholder-text { text-align: center; color: var(--text-muted); font-weight: 600; margin: auto; font-size: 1.1rem; line-height: 1.6; }
.placeholder-text i { font-size: 3.5rem; margin-bottom: 20px; color: rgba(255,255,255,0.05); display: block; }
.placeholder-text a { color: var(--primary-blue); text-decoration: none; font-weight: 800; }

.success-msg { display: none; text-align: center; margin: auto; animation: fadeIn 0.5s; }
.success-msg i { font-size: 5rem; color: var(--success-green); margin-bottom: 20px; filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.4)); }
.success-msg h3 { font-size: 2rem; font-weight: 900; margin-bottom: 10px; }
.success-msg p { color: var(--text-muted); font-weight: 600; font-size: 1.1rem; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideLeft { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

@media (max-width: 1100px) {
    .booking-wrapper { flex: none; height: auto; }
    .custom-widget { flex-direction: column; height: auto; }
    .summary-section, .calendar-section, .time-section { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.05); padding: 30px; overflow-y: visible; }
}