/* ============================================
   Ouioweb RDV — style.css
   ============================================ */

:root {
  --bg:       #ddeaf5;
  --navy:     #1e2d4a;
  --navy2:    #253959;
  --gold:     #e8a020;
  --gold-dk:  #c8880a;
  --white:    #ffffff;
  --muted:    #6b7a8d;
  --border:   #c8d8ea;
  --success:  #2d9e6b;
  --danger:   #dc2626;
  --radius:   14px;
  --shadow:   0 4px 20px rgba(30,45,74,.10);
  --shadow-lg:0 8px 40px rgba(30,45,74,.16);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Nunito Sans', sans-serif;
  background: var(--bg);
  color: var(--navy);
  min-height: 100vh;
}

/* ── TOP BAR ── */
.top-bar {
  background: var(--white);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 10px rgba(30,45,74,.07);
  position: sticky;
  top: 0;
  z-index: 10;
}
.logo {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--navy);
}
.logo-dot {
  width: 20px;
  height: 20px;
  border-radius: 50% 50% 50% 0;
  background: var(--gold);
  transform: rotate(-15deg);
  flex-shrink: 0;
}
.logo-gold { color: var(--gold); }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #253959 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: padding .3s ease;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 50%, rgba(232,160,32,.1) 0%, transparent 60%);
  pointer-events: none;
}

/* État step 1 : hero plein */
.hero.hero-state-full { padding: 22px 20px 30px; }

/* État steps 2+ : bandeau compact */
.hero.hero-state-compact { padding: 10px 20px 12px; }

.hero-full {
  position: relative;
  transition: opacity .2s ease;
}
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(232,160,32,.15);
  border: 1px solid rgba(232,160,32,.28);
  color: #f5c860;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  position: relative;
}
.hero-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 6px;
  position: relative;
}
.hero-title span { color: var(--gold); }
.hero-sub {
  color: rgba(255,255,255,.55);
  font-size: .82rem;
  position: relative;
}

/* Bandeau compact */
.hero-compact {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-ctx {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: .8rem;
  color: rgba(255,255,255,.85);
}
.hero-ctx-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.hero-ctx-item .ctx-label {
  color: rgba(255,255,255,.45);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.hero-ctx-item .ctx-value {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  color: #fff;
}
.hero-ctx-item .ctx-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.hero-ctx-sep {
  color: rgba(255,255,255,.2);
  font-size: .9rem;
}

/* ── STEPS BAR ── */
.steps-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.steps-inner {
  display: flex;
  max-width: 560px;
  margin: 0 auto;
}
.step-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 11px 4px;
  border-bottom: 2.5px solid transparent;
  transition: all .2s;
}
.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 800;
  color: var(--muted);
  transition: all .2s;
}
.step-lbl {
  font-size: .65rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
}
.step-tab.active   { border-bottom-color: var(--gold); }
.step-tab.active .step-num  { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.step-tab.active .step-lbl  { color: var(--gold-dk); }
.step-tab.done     { border-bottom-color: var(--success); }
.step-tab.done .step-num    { background: var(--success); border-color: var(--success); color: #fff; font-size: .65rem; }
.step-tab.done .step-lbl    { color: var(--success); }

/* ── MAIN ── */
.main {
  max-width: 560px;
  margin: 0 auto;
  padding: 22px 16px 60px;
  width: 100%;
}

.card {
  background: var(--white);
  border-radius: 18px;
  padding: 22px 20px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(200,216,234,.5);
  animation: fadeUp .22s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ctdot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.hidden { display: none !important; }

/* ── MEETING TYPES ── */
.mt-list { display: flex; flex-direction: column; }
.mt-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
  border-radius: 6px;
}
.mt-item:last-child { border-bottom: none; }
.mt-item:hover .mt-name { color: var(--gold-dk); }
.mt-item:hover { background: #fafcff; }
.mt-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
}
.mt-radio-inner {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  transition: background .15s;
}
.mt-item.selected .mt-radio { border-color: var(--gold); }
.mt-item.selected .mt-radio-inner { background: var(--gold); }
.mt-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.mt-info { flex: 1; }
.mt-name { font-weight: 700; font-size: .9rem; transition: color .15s; }
.mt-dur  { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.mt-arrow { color: var(--border); font-size: 1.1rem; }

/* ── CALENDAR ── */
.cal-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cal-month {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: .95rem;
}
.cal-arr {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-size: .9rem;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  line-height: 1;
}
.cal-arr:hover { background: var(--bg); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-lbl {
  text-align: center;
  font-size: .63rem;
  font-weight: 700;
  color: var(--muted);
  padding: 6px 0;
  text-transform: uppercase;
  letter-spacing: .3px;
}
/* les jours sont injectés par JS dans #cal-days en display:contents */
#cal-days { display: contents; }

.cal-day {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  position: relative;
}
.cal-day:hover:not(.empty):not(.past) { background: var(--bg); }
.cal-day.today { color: var(--gold-dk); font-weight: 800; }
.cal-day.today::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}
.cal-day.selected { background: var(--navy); color: #fff; }
.cal-day.has-slots::before {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
}
.cal-day.past, .cal-day.empty { color: var(--border); cursor: default; pointer-events: none; }

.cal-legend {
  display: flex;
  gap: 14px;
  font-size: .72rem;
  color: var(--muted);
  margin-top: 12px;
  flex-wrap: wrap;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
  vertical-align: middle;
}
.dot.green { background: var(--success); }
.dot.gold  { background: var(--gold); }

/* ── SLOTS ── */
.slots-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.slot-btn {
  padding: 11px 6px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: .85rem;
  font-weight: 700;
  color: var(--navy);
  transition: all .15s;
  text-align: center;
}
.slot-btn:hover   { border-color: var(--gold); color: var(--gold-dk); }
.slot-btn.booked  { color: var(--border); cursor: not-allowed; background: var(--bg); }
.no-slot { text-align: center; color: var(--muted); font-size: .875rem; padding: 20px 0; }
.cal-loading { grid-column: 1/-1; text-align: center; color: var(--muted); font-size: .8rem; padding: 20px 0; }
.slot-retry {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--navy);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: .82rem;
  cursor: pointer;
  transition: all .15s;
}
.slot-retry:hover { background: var(--bg); border-color: var(--gold); color: var(--gold-dk); }

/* ── FORM ── */
.fgrid  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.frow   { margin-bottom: 14px; }
.flabel {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 5px;
  display: block;
}
.flabel small { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: .7rem; }
.finput {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 2px solid var(--border);
  font-family: 'Nunito Sans', sans-serif;
  font-size: .9rem;
  outline: none;
  transition: border .15s;
  color: var(--navy);
  background: #fff;
}
.finput:focus   { border-color: var(--gold); }
.finput.error   { border-color: var(--danger); }
.ftextarea      { resize: vertical; min-height: 72px; }

.form-error {
  background: #fee2e2;
  color: var(--danger);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .83rem;
  margin-bottom: 12px;
}

/* ── RECAP BOX ── */
.recap {
  background: #f0f6ff;
  border-radius: 12px;
  padding: 13px 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}
.recap-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .84rem;
}

/* ── BUTTONS ── */
.btn-row { display: flex; gap: 10px; }
.mt-top  { margin-top: 18px; }

.btn-navy {
  flex: 1;
  padding: 13px;
  border-radius: 12px;
  border: none;
  background: var(--navy);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: .9rem;
  cursor: pointer;
  transition: all .18s;
}
.btn-navy:hover    { background: var(--navy2); }
.btn-navy:disabled { opacity: .5; cursor: not-allowed; }

.btn-ghost {
  flex: 1;
  padding: 13px 18px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: transparent;
  color: var(--navy);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  transition: all .15s;
}
.btn-ghost:hover { background: var(--bg); }

.btn-gold {
  padding: 13px 28px;
  border-radius: 12px;
  border: none;
  background: var(--gold);
  color: var(--navy);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: .9rem;
  cursor: pointer;
  transition: all .18s;
}
.btn-gold:hover { background: var(--gold-dk); color: #fff; }

/* ── SUCCESS ── */
.success-wrap { text-align: center; padding: 14px 0; }
.sico {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #dcfce7;
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.8rem;
  font-weight: 900;
}
.stitle {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.ssub {
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.6;
  margin-bottom: 16px;
}
.ref-box {
  display: inline-block;
  background: var(--bg);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: .85rem;
  margin-bottom: 20px;
}

/* ── RESPONSIVE ── */

@media (max-width: 640px) {
  /* Hero toujours visible sur mobile, adapté */
  .hero.hero-state-full { padding: 16px 16px 22px; }
  .hero-title { font-size: 1.05rem; }
  .hero-label { font-size: .68rem; }
  .hero-sub { font-size: .78rem; }
  .hero.hero-state-compact { padding: 8px 14px 10px; }
  .hero-ctx { gap: 4px 10px; font-size: .74rem; }
  .ctx-value { font-size: .82rem; }
}

@media (max-width: 480px) {
  /* Formulaire 1 colonne */
  .fgrid { grid-template-columns: 1fr; }

  /* Main sans padding excessif */
  .main { padding: 14px 12px 40px; }

  /* Carte légèrement moins large */
  .card { padding: 16px 14px; border-radius: 14px; }

  /* Steps bar : labels raccourcis + taille réduite */
  .step-lbl { font-size: .58rem; letter-spacing: .2px; }
  .step-num { width: 20px; height: 20px; font-size: .65rem; }
  .step-tab { padding: 9px 2px; gap: 2px; }

  /* Calendrier : cellules plus petites */
  .cal-lbl  { font-size: .6rem; padding: 4px 0; }
  .cal-day  { font-size: .75rem; border-radius: 6px; }
  .cal-grid { gap: 2px; }

  /* Créneaux : 4 colonnes sur mobile pour tenir */
  .slots-wrap { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .slot-btn   { padding: 9px 4px; font-size: .78rem; border-radius: 8px; }

  /* Boutons full-width */
  .btn-ghost, .btn-navy { flex: 1; }

  /* Nav calendrier */
  .cal-month { font-size: .88rem; }
  .cal-arr   { width: 28px; height: 28px; font-size: .85rem; }

  /* Contexte étape */

  /* Card title */
  .card-title { font-size: .92rem; margin-bottom: 12px; }

  /* Recap */
  .recap-row { font-size: .78rem; }

  /* Inputs */
  .finput { font-size: .85rem; padding: 10px 11px; }
}
