/* =========================================================
   STUDIOS HB - DESIGN SYSTEM & UNIFIED CSS
   ========================================================= */

/* --- 1. BASE & RESET --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: #07070d;
  color: #e4e4f0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }

/* --- 2. LAYOUT --- */
.wrap { max-width: 720px; margin: 0 auto; padding: 2rem 1.5rem; }
.section { padding: 0 1.5rem 3rem; max-width: 960px; margin: 0 auto; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.frow { margin-bottom: 1rem; text-align: left; }
.crow { display: flex; align-items: flex-start; gap: .6rem; margin: .5rem 0; }

/* --- 3. TYPOGRAPHY & UTILS --- */
.section-label, .section-lbl {
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #454560;
  margin-bottom: 1.2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #1a1a2a;
}
.err { color: #f87171; font-size: .8rem; margin-top: .5rem; }
.msg-ok { color: #4ade80; font-size: .85rem; margin-top: .5rem; }

/* --- 4. NAVIGATION HEADER --- */
nav.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #1a1a2a;
}
.nav-logo img { height: 32px; width: auto; max-width: 180px; }
.nav-link {
  font-size: .8rem;
  color: #8080a8;
  padding: .4rem .8rem;
  border: 1px solid #252535;
  border-radius: 20px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}
.nav-link:hover { color: #e4e4f0; border-color: #454560; }
.back-link {
  font-size: .82rem;
  color: #454560;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-bottom: 1.5rem;
}
.back-link:hover { color: #8080a8; }

/* --- 5. FORMS & BUTTONS --- */
label { display: block; font-size: .78rem; color: #6060a0; margin-bottom: .35rem; }
input, textarea, select {
  width: 100%;
  background: #0d0d18;
  border: 1px solid #252535;
  border-radius: 8px;
  color: #e4e4f0;
  padding: .65rem .9rem;
  font-size: .88rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}
input:focus, textarea:focus, select:focus { border-color: #6090d0; }
textarea { resize: vertical; min-height: 80px; }
input:disabled { opacity: .5; cursor: default; }
.crow input { width: auto; flex-shrink: 0; margin-top: 2px; }
.crow label { font-size: .78rem; color: #6060a0; margin: 0; }

.btn {
  width: 100%;
  padding: .85rem;
  border: none;
  border-radius: 10px;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1rem;
  background: #1e3a5f;
  color: #fff;
  transition: filter 0.2s;
}
.btn:hover:not(:disabled) { filter: brightness(1.2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* --- 6. TABS --- */
.tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #1a1a2a;
  padding-bottom: .8rem;
  flex-wrap: wrap;
}
.tab {
  font-size: .82rem;
  color: #454560;
  padding: .4rem .9rem;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.tab.active { color: #e4e4f0; background: #1a1a2a; border-color: #252535; }
.tab:hover:not(.active) { color: #8080a8; }

/* --- 7. UNIFIED CALENDAR (Premium Look) --- */
.cal-wrap { width: 100%; }
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .8rem;
}
.cal-nav button {
  background: #0d0d18;
  border: 1px solid #252535;
  color: #e4e4f0;
  padding: .4rem .9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.cal-nav button:hover { background: #1a1a2a; border-color: #354555; }
.cal-month { font-weight: 600; font-size: .95rem; color: #fff; text-transform: capitalize; }

.btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn.is-loading::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 1rem; height: 1rem;
  margin: -0.5rem 0 0 -0.5rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.8s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-head {
  text-align: center;
  font-size: .65rem;
  color: #454560;
  padding: .3rem 0;
  text-transform: uppercase;
}
.cal-day {
  height: 42px; /* Fixed height across all calendars for consistency */
  border-radius: 8px;
  border: 1px solid transparent;
  background: #0d0d18;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  color: #e4e4f0;
  cursor: default;
  transition: all 0.2s;
  position: relative;
}
/* Modal tight calendars */
.cal-day.compact { height: 34px; font-size: .78rem; }

.cal-day.dispo {
  color: #e4e4f0;
  border-color: #252535;
  background: #151520;
  cursor: pointer;
}
.cal-day.dispo:hover {
  border-color: #6090d0;
  background: #1e3a5f44;
}
.cal-day.sel, .cal-day.selected {
  background: #1e3a5f;
  border-color: #6090d0;
  color: #fff;
}
.cal-day.off {
  color: #2a2a3a;
  background: #0a0a12;
  border-color: #151520;
}
/* Dots for resas in calendar */
.cal-dot { width: 4px; height: 4px; border-radius: 50%; position: absolute; bottom: 4px; }

/* --- 8. FOOTER --- */
footer {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid #1a1a2a;
  font-size: .75rem;
  color: #353550;
  margin-top: 2rem;
}
footer a { color: #454560; margin: 0 .4rem; text-decoration: none; transition: color 0.2s; }
footer a:hover { color: #8080a8; }



/* --- 9. RESEVER SPECIFICS --- */
.pod-header{padding:2rem 1.5rem;border-bottom:1px solid #1a1a2a}
.pod-chip{display:inline-block;font-size:.7rem;font-weight:700;padding:.25rem .7rem;border-radius:6px;margin-bottom:.6rem}
.pod-title{font-family:Georgia,serif;font-size:1.8rem;color:#fff;margin-bottom:.3rem}
.pod-desc{font-size:.88rem;color:#6060a0}
.mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-bottom:1.5rem}
.mode-card{border:1px solid #252535;border-radius:12px;padding:1.5rem 1.2rem;cursor:pointer;background:#0d0d18;transition:border-color .2s}
.mode-card:hover{border-color:#444}
.mode-icon{font-size:1.6rem;margin-bottom:.6rem}
.mode-title{font-weight:600;font-size:.95rem;color:#fff;margin-bottom:.3rem}
.mode-sub{font-size:.78rem;color:#6060a0;line-height:1.4}
.badge{display:inline-block;font-size:.62rem;font-weight:700;padding:.2rem .5rem;border-radius:4px;margin-top:.5rem;background:#1e3a5f;color:#6090d0}
.slots-wrap, .fwrap, .sug-wrap {display:none;margin-top:1.5rem}
.slots-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:.8rem;margin-top:.8rem}
.slot{padding:1rem;border:1px solid #252535;border-radius:10px;text-align:center;cursor:pointer;background:#0d0d18;transition:border-color .2s}
.slot:hover,.slot.sel{background:#1e3a5f;border-color:#6090d0;color:#fff}
.slot-lbl{font-weight:700;font-size:.95rem}
.slot-date{font-size:.72rem;color:#6060a0;margin-top:.3rem}
.slot.sel .slot-date{color:#a0c0e0}
.sug-item{display:flex;align-items:center;justify-content:space-between;padding:.7rem .9rem;border:1px solid #252535;border-radius:8px;margin-bottom:.5rem;background:#0d0d18}
.sug-item span{font-size:.82rem;color:#e4e4f0}
.sug-item button{background:none;border:none;color:#454560;cursor:pointer;font-size:1.1rem}
.bval{display:none;width:100%;padding:.8rem;background:#1e3a5f;color:#fff;border:none;border-radius:10px;font-size:.9rem;font-weight:600;cursor:pointer;margin-top:.8rem}
.conf-wrap{display:none;text-align:center;padding:2rem 0}
.conf-icon{font-size:3rem;margin-bottom:1rem}
.conf-title{font-family:Georgia,serif;font-size:1.4rem;color:#fff;margin-bottom:.5rem}
.conf-sub{color:#6060a0;font-size:.88rem;margin-bottom:1.5rem}
.conf-code{font-family:monospace;font-size:1.1rem;font-weight:700;background:#0d0d18;border:1px solid #252535;border-radius:8px;padding:.6rem 1.2rem;display:inline-block;margin-bottom:.8rem}

/* --- 10. INDEX/BOTTIN SPECIFICS --- */
.hero{text-align:center;padding:3rem 1.5rem 2rem}
.hero-tag{display:inline-flex;align-items:center;font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;color:#6090d0;border:1px solid #1e3a5f44;border-radius:20px;padding:.3rem .8rem;margin-bottom:1.2rem}
h1{font-family:Georgia,serif;font-size:clamp(1.8rem,5vw,3rem);color:#fff;line-height:1.1;margin-bottom:.8rem}
h1 em{font-style:italic;color:#8080a8}
.hero-sub{color:#6060a0;font-size:.9rem;max-width:460px;margin:0 auto;line-height:1.6}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1rem}
.skel{background:linear-gradient(90deg,#1a1a2a 25%,#252535 50%,#1a1a2a 75%);background-size:200%;border-radius:12px;animation:shimmer 1.4s infinite}
@keyframes shimmer{0%{background-position:200%}100%{background-position:-200%}}
.card{border-radius:12px;overflow:hidden;border:1px solid #1a1a2a;transition:transform .2s,border-color .2s;cursor:pointer;background:#0d0d18}
.card:hover{transform:translateY(-3px);border-color:#333}
.card-body{padding:1.2rem}
.card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:.8rem}
.card-sigle{font-size:.7rem;font-weight:700;letter-spacing:.1em;padding:.25rem .6rem;border-radius:6px;border:1px solid}
.card-name{font-family:Georgia,serif;font-size:1.2rem;color:#fff;margin-bottom:.4rem}
.card-desc{font-size:.8rem;color:#6060a0;line-height:1.5;margin-bottom:1rem}
.card-cta{font-size:.78rem;color:#8080a8;display:flex;align-items:center;justify-content:space-between}
.arrow{width:24px;height:24px;border:1px solid #252535;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.8rem}

/* --- 11. ADMIN/ANIMATEUR SPECIFICS --- */
.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:.6rem;margin-bottom:1.5rem}
.stat-card{background:#0d0d18;border:1px solid #1a1a2a;border-radius:10px;padding:1rem;text-align:center}
.stat-num{font-size:1.8rem;font-weight:700;color:#fff}
.stat-lbl{font-size:.7rem;color:#454560;margin-top:.3rem;text-transform:uppercase;letter-spacing:.08em}
.decon-btn{background:transparent;border:1px solid #252535;color:#8080a8;padding:.4rem .9rem;border-radius:8px;cursor:pointer;font-size:.82rem}
.resa-row{padding:.8rem;border-bottom:1px solid #1a1a2a0a;display:flex;align-items:center;justify-content:space-between;font-size:.82rem;gap:.5rem}
.resa-nom{color:#fff;font-weight:500}
.resa-info{color:#6060a0;font-size:.75rem;margin-top:.2rem}
.login-wrap{min-height:80vh;display:flex;align-items:center;justify-content:center;padding:2rem}
.login-card{background:#13131e;border:1px solid #1a1a2a;border-radius:16px;padding:2rem;width:100%;max-width:460px;text-align:center}
.demande-card{background:#0d0d18;border:1px solid #1a1a2a;border-radius:12px;padding:1.2rem;margin-bottom:1rem}
.demande-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:.8rem;flex-wrap:wrap;gap:.5rem}
.demande-nom{font-weight:600;color:#fff;font-size:.95rem}
.demande-info{font-size:.78rem;color:#6060a0;margin-top:.2rem}
.type-badge{font-size:.7rem;font-weight:700;padding:.2rem .5rem;border-radius:4px;background:#1e3a5f22;color:#6090d0}
.plages{margin:.6rem 0}
.plage-row{font-size:.82rem;color:#8080a8;padding:.3rem 0;border-bottom:1px solid #1a1a2a22}
.actions{display:flex;gap:.5rem;margin-top:.8rem;flex-wrap:wrap}
.btn-app{background:#1e3a5f;color:#fff;border:none;padding:.5rem .9rem;border-radius:8px;cursor:pointer;font-size:.8rem;font-weight:600}
.btn-app:hover{filter:brightness(1.2)}
.btn-ref{background:transparent;border:1px solid #f8717144;color:#f87171;padding:.5rem .9rem;border-radius:8px;cursor:pointer;font-size:.8rem}
.conf-block{background:#4ade8018;border:1px solid #4ade8044;border-radius:10px;padding:.8rem 1rem;margin:.6rem 0}
.conf-block-label{font-size:.65rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#4ade80;margin-bottom:.3rem}
.conf-block-date{font-size:1rem;font-weight:600;color:#fff;margin-bottom:.2rem}
.conf-block-note{font-size:.8rem;color:#a0e0b0}
.empty{text-align:center;padding:2.5rem;color:#454560;font-size:.88rem}

/* --- 12. QUESTIONNAIRE SPECIFICS --- */
.card{background:#0d0d18;border:1px solid #1a1a2a;border-radius:16px;padding:1.5rem;margin-bottom:1rem}
.podcast-header{display:flex;align-items:center;gap:.8rem;margin-bottom:1.2rem}
.pod-badge{width:40px;height:40px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:700;flex-shrink:0}
.subtitle{font-size:.82rem;color:#6060a0}
.question-block{margin-bottom:1.2rem}
.q-label{font-size:.88rem;color:#e4e4f0;font-weight:500;margin-bottom:.5rem;line-height:1.4}
.q-num{font-size:.7rem;color:#454560;text-transform:uppercase;letter-spacing:.1em;margin-bottom:.25rem}
.yesno{display:flex;gap:.5rem}
.yesno label{flex:1;display:flex;align-items:center;justify-content:center;gap:.4rem;background:#07070d;border:1px solid #252535;border-radius:8px;padding:.6rem;cursor:pointer;font-size:.85rem;transition:all .15s}
.yesno input[type=radio]{display:none}
.yesno input[type=radio]:checked + span{color:#4ade80}
.yesno label:has(input:checked){border-color:#4ade8066;background:#4ade8011}
.progress{height:3px;background:#1a1a2a;border-radius:2px;margin-bottom:1.5rem;overflow:hidden}
.progress-fill{height:100%;border-radius:2px;transition:width .4s ease}
.success{text-align:center;padding:2.5rem 1rem}
.success-icon{font-size:3rem;margin-bottom:1rem}
.success h2{font-family:Georgia,serif;font-size:1.4rem;color:#fff;margin-bottom:.5rem}
.success p{font-size:.85rem;color:#6060a0;line-height:1.6}
.loading{text-align:center;padding:3rem;color:#454560}

/* --- 13. BOTTIN SPECIFICS --- */
.pod-section{margin-bottom:2.5rem}
.pod-header{display:flex;align-items:center;gap:.8rem;margin-bottom:1rem;padding:.9rem 1.1rem;border-radius:12px;border:1px solid}
.pod-logo{width:36px;height:36px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:.72rem;font-weight:700;letter-spacing:.06em;flex-shrink:0}
.pod-info .pod-nom{font-family:Georgia,serif;font-size:1.05rem;color:#fff}
.pod-info .pod-desc{font-size:.75rem;color:#6060a0;margin-top:.15rem;line-height:1.4}
.contact-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:.7rem}
.contact-card{background:#0d0d18;border:1px solid #1a1a2a;border-radius:12px;padding:1.1rem 1.2rem;transition:border-color .2s}
.contact-card:hover{border-color:#252535}
.contact-avatar{width:38px;height:38px;border-radius:50%;background:#1a1a2a;display:flex;align-items:center;justify-content:center;font-size:.85rem;font-weight:700;color:#6090d0;margin-bottom:.8rem;font-family:Georgia,serif}
.contact-nom{font-weight:600;font-size:.9rem;color:#fff;margin-bottom:.15rem}
.contact-role{font-size:.68rem;color:#454560;text-transform:uppercase;letter-spacing:.1em;margin-bottom:.7rem}
.contact-info{display:flex;flex-direction:column;gap:.3rem}
.contact-link{display:flex;align-items:center;gap:.4rem;font-size:.8rem;color:#6090d0;text-decoration:none}
.contact-link:hover{color:#8ab4e8}
.contact-link svg{opacity:.6;flex-shrink:0}
.contact-bio{font-size:.76rem;color:#6060a0;margin-top:.6rem;line-height:1.5;border-top:1px solid #1a1a2a;padding-top:.6rem}

/* --- 14. ADMIN SPECIFICS --- */
.test-btn{padding:.7rem 1.4rem;border:none;border-radius:8px;font-size:.85rem;font-weight:600;cursor:pointer;color:#fff}
.test-btn:disabled{opacity:.5;cursor:not-allowed}
#test-log{background:#07070d;border:1px solid #1a1a2a;border-radius:10px;padding:1rem;font-family:monospace;font-size:.75rem;line-height:1.7;height:420px;overflow-y:auto;white-space:pre-wrap;word-break:break-all}
.log-pass{color:#4ade80}
.log-fail{color:#f87171}
.log-warn{color:#fbbf24}
.log-head{color:#6090d0;font-weight:700}
.log-info{color:#8080a8}
.progress-bar{height:4px;background:#1a1a2a;border-radius:2px;overflow:hidden;margin:.8rem 0}
.progress-fill{height:100%;background:#4ade80;border-radius:2px;transition:width .3s ease;width:0%}
.result-summary{display:flex;gap:.8rem;margin-top:.8rem;flex-wrap:wrap}
.result-pill{font-size:.78rem;font-weight:600;padding:.3rem .8rem;border-radius:20px}
@media(max-width:500px){.stat-grid{grid-template-columns:1fr 1fr}}

/* --- 15. GESTION/MODAL CALENDAR --- */
.cal-dep-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}
.cal-dep-cell{height:38px;border-radius:7px;border:1px solid #252535;background:#0d0d18;display:flex;align-items:center;justify-content:center;font-size:.8rem;color:#e4e4f0;cursor:default}
.cal-dep-cell.dispo{border-color:#354555;background:#252535;color:#8080a8;cursor:pointer}
.cal-dep-cell.dispo:hover{border-color:#6090d0;background:#1e3a5f22;color:#6090d0}
.cal-dep-cell.selected{border-color:#4ade80;background:#4ade8022;color:#4ade80}
.plage-sel{background:#1a1a2e;border:1px solid #4a4a8a;border-radius:8px;padding:.6rem 1rem;margin:.3rem 0;display:flex;align-items:center;justify-content:space-between;font-size:.82rem;color:#c0c0f0}
.plage-card{background:#0d0d18;border:1px solid #252535;border-radius:10px;padding:1rem 1.2rem;margin-bottom:.6rem;cursor:pointer;transition:border-color .15s}
.plage-card:hover{border-color:#6090d0}
.plage-card.selected{border-color:#4ade80;background:#4ade8011}
.resa-panel{display:none}
.resa-header{padding:1rem;border-radius:10px;margin-bottom:1rem;display:flex;align-items:center;gap:.8rem}
.resa-badge{font-size:.7rem;font-weight:700;padding:.25rem .7rem;border-radius:6px}
.resa-date{font-weight:600;color:#fff;font-size:.95rem}
.resa-podcast{font-size:.75rem;color:#6060a0;margin-top:.2rem}
.resa-statut{font-size:.78rem;padding:.25rem .7rem;border-radius:20px;display:inline-block;margin-bottom:1rem}
.btn-danger{width:100%;padding:.75rem;background:transparent;border:1px solid #f8717144;color:#f87171;border-radius:8px;cursor:pointer;font-size:.85rem;margin-top:.5rem}
.btn-danger:hover{background:#f8717111}

/* --- 16. TOASTS ET ANIMATIONS (PREMIUM UI) --- */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fade-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-10px) scale(0.98); }
}

.modal-open {
  animation: fade-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
}

#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: rgba(13, 13, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #252535;
  color: #e4e4f0;
  padding: 1rem 1.4rem;
  border-radius: 12px;
  font-size: 0.88rem;
  max-width: 380px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  animation: fade-in 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.toast.toast-error { border-left: 4px solid #f87171; }
.toast.toast-success { border-left: 4px solid #4ade80; }
.toast.toast-info { border-left: 4px solid #6090d0; }
.toast.toast-hide { animation: fade-out 0.3s forwards; }

@keyframes scaleDown {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.95); }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.hb-confirm-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(9, 9, 18, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.hb-confirm-box {
  background: #151525;
  border: 1px solid #252535;
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 16px 64px rgba(0,0,0,0.8);
}
