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

:root {
  --font:   'Montserrat', sans-serif;
  --cyan:   #3FCBD1;
  --cyan-d: #2BA8AD;
  --cyan-l: #E8F9FA;
  --yellow: #FFD82B;
  --ink:    #1A1816;
  --ink2:   #4A4A4A;
  --ink3:   #888;
  --white:  #FFFFFF;
  --bg:     #F8F7F4;
  --surf2:  #F5FEFF;
  --brd:    rgba(63,203,209,.2);
  --brd2:   rgba(63,203,209,.4);
  --red:    #A32D2D;
  --red-bg: #FCEBEB;
  --r:  8px;
  --rl: 14px;
  --rxl: 20px;
}

html { font-size: 16px; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }

/* ── Nav ── */
.nav { position: sticky; top: 0; z-index: 100; background: var(--cyan); border-bottom: none; box-shadow: 0 2px 12px rgba(63,203,209,.3); }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; height: 110px; display: flex; align-items: center; gap: 1.5rem; }
.nav-brand { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; font-family: var(--font); font-size: 30px; font-weight: 700; color: #fff; flex-shrink: 0; }
.nav-brand i { font-size: 24px; color: var(--yellow); }
.nav-brand em { color: var(--yellow); font-style: normal; font-weight: 700; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--r); border: 1.5px solid rgba(255,255,255,.4); background: transparent; font-family: var(--font); font-size: 13px; color: #fff; cursor: pointer; text-decoration: none; transition: .15s; }
.nav-link:hover { background: rgba(255,255,255,.15); }

/* ── Visitor tabs ── */
.vis-tabs { display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; flex: 1; min-width: 0; justify-content: flex-end; }
.vis-tabs::-webkit-scrollbar { display: none; }
.vtab { display: inline-flex; align-items: center; gap: 5px; padding: 8px 14px; border-radius: var(--r); border: 1.5px solid transparent; background: transparent; font-family: var(--font); font-size: 13px; font-weight: 500; color: rgba(255,255,255,.75); cursor: pointer; transition: .15s; white-space: nowrap; flex-shrink: 0; }
.vtab:hover { background: rgba(255,255,255,.15); color: #fff; }
.vtab.active { background: #fff; color: var(--cyan); border-color: #fff; font-weight: 700; }
.vtab-yellow { color: var(--yellow) !important; font-weight: 600; }
.vtab-yellow:hover { color: var(--yellow) !important; }
.vtab-yellow.active { color: var(--cyan) !important; }

/* ── Hero ── */
.hero { background: #FFFFFF; border-bottom: 2px solid var(--cyan-l); padding: 2rem 1.5rem 1.75rem; }
.hero-inner { max-width: 1100px; margin: 0 auto 1.25rem; display: flex; align-items: center; gap: 2.5rem; }
.hero-logo { display: block; max-height: 180px; max-width: 500px; object-fit: contain; flex-shrink: 0; margin-top: -19px; }
.hero-text { display: flex; flex-direction: column; justify-content: center; }
.hero h1 { font-family: var(--font); font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.15; margin-bottom: .6rem; color: var(--cyan); }
.hero h1 em { color: #fff; font-style: normal; background: var(--cyan); padding: 2px 10px; border-radius: 4px; }
.hero p { font-size: 14px; color: var(--ink2); max-width: 480px; font-weight: 400; }
.hero-badges { max-width: 1100px; margin: 0 auto; display: flex; gap: 8px; flex-wrap: wrap; }
.hero-badges span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 14px; border-radius: 100px; font-size: 12px; font-weight: 600; }
.badge-am  { background: var(--cyan-l); color: var(--cyan-d); border: 1px solid var(--brd2); }
.badge-pm  { background: #FFFBE6; color: #B8940A; border: 1px solid rgba(255,216,43,.5); }
.badge-dur { background: var(--surf2); color: var(--ink2); border: 1px solid var(--brd); }

/* ── Container ── */
.container { max-width: 1100px; margin: 0 auto; padding: 1.75rem 1.5rem; }

/* ── Filter bar ── */
.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.search-wrap { flex: 1; min-width: 180px; position: relative; }
.search-wrap i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--cyan); font-size: 15px; pointer-events: none; }
.search-wrap input { width: 100%; padding: 9px 12px 9px 34px; border-radius: var(--r); border: 1.5px solid var(--brd2); background: var(--white); font-family: var(--font); font-size: 13px; color: var(--ink); }
.search-wrap input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(63,203,209,.1); }
#vis-cat { padding: 9px 12px; border-radius: var(--r); border: 1.5px solid var(--brd2); background: var(--white); font-family: var(--font); font-size: 13px; color: var(--ink2); }
.period-filter { display: flex; border: 1.5px solid var(--brd2); border-radius: var(--r); overflow: hidden; background: var(--white); }
.pf { display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px; font-family: var(--font); font-size: 12px; font-weight: 500; border: none; border-right: 1px solid var(--brd); background: transparent; color: var(--ink2); cursor: pointer; transition: .15s; }
.pf:last-child { border-right: none; }
.pf:hover { background: var(--cyan-l); color: var(--cyan-d); }
.pf.active { background: var(--cyan); color: #fff; font-weight: 600; }

/* ── Exposant grid ── */
#grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 14px; }
.exp-card { background: #FFFFFF; border: 1.5px solid var(--brd2); border-radius: var(--rl); padding: 1.1rem; cursor: pointer; transition: .2s; }
.exp-card:hover { border-color: var(--cyan); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(63,203,209,.15); }
.exp-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--cyan-l); border: 2px solid var(--brd2); display: flex; align-items: center; justify-content: center; font-family: var(--font); font-size: 13px; font-weight: 700; color: var(--cyan-d); flex-shrink: 0; }
.exp-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.exp-cat  { font-size: 11px; color: var(--ink3); margin-top: 1px; }
.exp-arrow { margin-left: auto; color: var(--cyan); font-size: 15px; transition: .15s; }
.exp-card:hover .exp-arrow { transform: translateX(3px); }
.pills { display: flex; gap: 5px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; padding: 2px 8px; border-radius: 100px; font-weight: 600; }
.pill-am   { background: var(--cyan-l); color: var(--cyan-d); border: 1px solid var(--brd2); }
.pill-pm   { background: #FFFBE6; color: #B8940A; }
.pill-none { background: #f5f5f5; color: var(--ink3); }
.empty-state { grid-column: 1/-1; text-align: center; padding: 4rem 1rem; color: var(--ink3); }
.empty-state i { font-size: 32px; display: block; margin-bottom: 10px; opacity: .35; }

/* ── Drawer ── */
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 200; }
.overlay.open { display: block; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100vw; background: var(--white); border-left: 2px solid var(--brd2); z-index: 201; transform: translateX(100%); transition: transform .25s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 1.25rem; border-bottom: 1.5px solid var(--brd); background: var(--cyan-l); }
.drawer-label { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--cyan-d); margin-bottom: 3px; font-weight: 600; }
.drawer-title { font-family: var(--font); font-size: 18px; font-weight: 700; color: var(--ink); }
.drawer-cat   { font-size: 12px; color: var(--ink3); margin-top: 2px; }
.drawer-body  { flex: 1; overflow-y: auto; padding: 1.1rem; display: flex; flex-direction: column; gap: 1rem; }
#d-confirm    { padding: .75rem 1.1rem; }
.period-block { display: flex; flex-direction: column; gap: 8px; }
.period-head  { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; padding: 7px 12px; border-radius: var(--r); }
.period-head.am { background: var(--cyan-l); color: var(--cyan-d); border: 1px solid var(--brd2); }
.period-head.pm { background: #FFFBE6; color: #B8940A; border: 1px solid rgba(255,216,43,.4); }
.pcount { margin-left: auto; font-weight: 400; font-size: 11px; opacity: .8; }
.slots-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-btn { padding: 6px 11px; border-radius: var(--r); font-family: var(--font); font-size: 12px; font-weight: 600; border: 1.5px solid; cursor: pointer; transition: .15s; white-space: nowrap; }
.slot-free-am  { background: var(--cyan-l); border-color: var(--brd2); color: var(--cyan-d); }
.slot-free-am:hover  { background: var(--cyan); color: #fff; border-color: var(--cyan); }
.slot-free-pm  { background: #FFFBE6; border-color: rgba(255,216,43,.5); color: #B8940A; }
.slot-free-pm:hover  { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.slot-taken    { background: #f5f5f5; border-color: #ddd; color: var(--ink3); cursor: not-allowed; opacity: .6; }
.confirm-ok    { display: flex; align-items: center; gap: 10px; background: #E6FAF5; border: 1.5px solid #3FCBD1; border-radius: var(--r); padding: 10px 14px; font-size: 13px; color: var(--cyan-d); font-weight: 600; }
.confirm-ok i  { font-size: 22px; flex-shrink: 0; color: var(--cyan); }

/* ── Modal ── */
.modal-wrap { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 400; align-items: center; justify-content: center; padding: 1rem; }
.modal-wrap.open { display: flex; }
.modal-box { background: var(--white); border-radius: var(--rxl); width: 100%; max-width: 400px; animation: pop .2s ease; border: 2px solid var(--brd2); max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column; }
@keyframes pop { from { opacity:0; transform: scale(.96); } to { opacity:1; transform: scale(1); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 1.25rem 1.25rem .75rem; border-bottom: 1.5px solid var(--brd); background: var(--cyan-l); border-radius: var(--rxl) var(--rxl) 0 0; }
.modal-title { font-family: var(--font); font-size: 16px; font-weight: 700; color: var(--cyan-d); }
.modal-info  { font-size: 12px; color: var(--ink2); margin-top: 3px; }
.modal-body  { display: flex; flex-direction: column; gap: 10px; padding: 1rem 1.25rem; flex: 1; overflow-y: auto; }
.modal-foot  { display: flex; gap: 8px; justify-content: flex-end; padding: .75rem 1.25rem 1.25rem; border-top: 1px solid var(--brd); }

/* ── Forms ── */
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12px; font-weight: 600; color: var(--ink2); }
.field input, .field select { padding: 8px 10px; border-radius: var(--r); border: 1.5px solid var(--brd2); background: var(--white); font-family: var(--font); font-size: 13px; color: var(--ink); transition: .15s; }
.field input:focus, .field select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(63,203,209,.1); }

/* ── Buttons ── */
.btn-primary { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: var(--r); border: none; background: var(--cyan); color: #fff; font-family: var(--font); font-size: 13px; font-weight: 600; cursor: pointer; transition: .15s; }
.btn-primary:hover { background: var(--cyan-d); }
.btn-ghost   { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: var(--r); border: 1.5px solid var(--brd2); background: transparent; color: var(--ink2); font-family: var(--font); font-size: 13px; font-weight: 500; cursor: pointer; transition: .15s; }
.btn-ghost:hover { background: var(--cyan-l); border-color: var(--cyan); color: var(--cyan-d); }
.icon-btn { width: 32px; height: 32px; border-radius: var(--r); border: 1.5px solid var(--brd2); background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink2); font-size: 15px; transition: .15s; flex-shrink: 0; }
.icon-btn:hover { background: var(--cyan-l); color: var(--cyan-d); border-color: var(--cyan); }

/* ── Login ── */
.login-screen { position: fixed; inset: 0; background: var(--white); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.login-card { background: var(--white); border: 2px solid var(--brd2); border-radius: var(--rxl); padding: 2.25rem 1.75rem; width: 100%; max-width: 340px; box-shadow: 0 12px 40px rgba(63,203,209,.15); }
.login-logo  { display: flex; align-items: center; gap: 8px; font-family: var(--font); font-size: 16px; font-weight: 700; color: var(--cyan); margin-bottom: 1.5rem; }
.login-logo i { font-size: 22px; color: var(--cyan); }
.login-card h2 { font-family: var(--font); font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: .3rem; }
.login-card p  { font-size: 13px; color: var(--ink3); margin-bottom: 1.25rem; }
.pwd-error { display: none; font-size: 12px; color: var(--red); background: var(--red-bg); border: 1px solid #F09595; border-radius: var(--r); padding: 7px 10px; margin-bottom: .75rem; }
.pwd-error.show { display: block; }

/* ── Admin layout ── */
.admin-tabs { display: flex; border-bottom: 2px solid var(--brd); background: var(--white); padding: 0 1.5rem; }
.atab { display: inline-flex; align-items: center; gap: 6px; padding: 12px 18px; font-family: var(--font); font-size: 13px; font-weight: 500; border: none; border-bottom: 3px solid transparent; background: transparent; color: var(--ink2); cursor: pointer; transition: .15s; margin-bottom: -2px; }
.atab:hover { color: var(--cyan); }
.atab.active { color: var(--cyan); border-bottom-color: var(--cyan); font-weight: 600; }
.rdv-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; background: var(--cyan); color: #fff; border-radius: 100px; font-size: 10px; font-weight: 700; }
.admin-layout { display: flex; height: calc(100vh - 110px); }
.sidebar { width: 270px; flex-shrink: 0; background: var(--white); border-right: 2px solid var(--brd); display: flex; flex-direction: column; overflow: hidden; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.1rem; border-bottom: 1.5px solid var(--brd); font-size: 13px; font-weight: 600; color: var(--cyan-d); }
.add-form { display: none; flex-direction: column; gap: 7px; padding: .9rem 1.1rem; border-bottom: 1.5px solid var(--brd); background: var(--cyan-l); }
.add-form.open { display: flex; }
.add-form input, .add-form select { padding: 7px 9px; border-radius: var(--r); border: 1.5px solid var(--brd2); background: var(--white); font-family: var(--font); font-size: 12px; color: var(--ink); }
.form-actions { display: flex; gap: 6px; justify-content: flex-end; }
#exp-list { flex: 1; overflow-y: auto; padding: .4rem; }
.exp-item { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: var(--r); cursor: pointer; transition: .15s; border: 1px solid transparent; }
.exp-item:hover { background: var(--cyan-l); }
.exp-item.active { background: var(--cyan); }
.exp-item.active .ei-name { color: #fff; font-weight: 600; }
.exp-item.active .ei-cat  { color: rgba(255,255,255,.65); }
.exp-item.active .avatar  { background: rgba(255,255,255,.2); color: #fff; border-color: rgba(255,255,255,.3); }
.ei-name { font-size: 13px; font-weight: 500; color: var(--ink); }
.ei-cat  { font-size: 11px; color: var(--ink3); }
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; padding: .9rem 1.1rem; border-top: 1.5px solid var(--brd); }
.stat { text-align: center; }
.stat-v { font-size: 18px; font-weight: 700; color: var(--cyan); }
.stat-l { font-size: 10px; color: var(--ink3); margin-top: 1px; font-weight: 500; }
.admin-main { flex: 1; overflow-y: auto; padding: 1.75rem; background: var(--surf2); }
.cal-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--ink3); gap: 10px; }
.cal-empty i { font-size: 36px; opacity: .3; color: var(--cyan); }
.cal-empty p  { font-size: 13px; }
.cal-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1.25rem; flex-wrap: wrap; gap: 10px; }
.cal-name { font-family: var(--font); font-size: 20px; font-weight: 700; color: var(--ink); }
.cal-meta { font-size: 12px; color: var(--ink3); margin-top: 2px; }
.period-switcher { display: flex; border: 1.5px solid var(--brd2); border-radius: var(--r); overflow: hidden; background: var(--white); }
.psw { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; font-family: var(--font); font-size: 12px; font-weight: 500; border: none; border-right: 1px solid var(--brd); background: transparent; color: var(--ink2); cursor: pointer; transition: .15s; }
.psw:last-child { border-right: none; }
.psw:hover { background: var(--cyan-l); color: var(--cyan-d); }
.psw.sel-matin { background: var(--cyan-l); color: var(--cyan-d); font-weight: 600; }
.psw.sel-aprem { background: #FFFBE6; color: #B8940A; font-weight: 600; }
.psw.sel-jour  { background: var(--cyan); color: #fff; font-weight: 600; }
.cal-block { background: var(--white); border: 1.5px solid var(--brd2); border-radius: var(--rl); margin-bottom: .9rem; overflow: hidden; }
.cal-block-head { display: flex; align-items: center; gap: 7px; padding: 10px 14px; font-size: 12px; font-weight: 600; border-bottom: 1px solid var(--brd); }
.cal-block-head.am { background: var(--cyan-l); color: var(--cyan-d); }
.cal-block-head.pm { background: #FFFBE6; color: #B8940A; }
.cal-block-head .hcount { margin-left: auto; font-weight: 400; font-size: 11px; }
.cal-slots { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 14px; }
.aslot { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: var(--r); font-family: var(--font); font-size: 12px; font-weight: 500; border: 1.5px solid; cursor: pointer; transition: .15s; white-space: nowrap; }
.aslot-on-am  { background: var(--cyan-l); border-color: var(--brd2); color: var(--cyan-d); }
.aslot-on-am:hover  { background: var(--cyan); color: #fff; border-color: var(--cyan); }
.aslot-on-pm  { background: #FFFBE6; border-color: rgba(255,216,43,.5); color: #B8940A; }
.aslot-on-pm:hover  { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.aslot-off    { background: #f5f5f5; border-color: #ddd; color: var(--ink3); }
.aslot-off:hover    { border-color: #bbb; background: #eee; }
.aslot-booked { background: var(--cyan); border-color: var(--cyan-d); color: #fff; cursor: pointer; font-weight: 600; }
.aslot-booked:hover { opacity: .85; }
.aslot-booked.pm { background: var(--yellow); border-color: #E8C000; color: var(--ink); }
.aslot-booked.pm:hover { opacity: .85; }

/* ── RDV table ── */
.rdv-filter { padding: 7px 10px; border-radius: var(--r); border: 1.5px solid var(--brd2); background: var(--white); font-family: var(--font); font-size: 12px; color: var(--ink2); }
.rdv-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--rl); overflow: hidden; border: 1.5px solid var(--brd2); }
.rdv-table th { padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 600; color: var(--cyan-d); text-transform: uppercase; letter-spacing: .05em; background: var(--cyan-l); border-bottom: 1.5px solid var(--brd2); }
.rdv-table td { padding: 11px 14px; font-size: 13px; color: var(--ink); border-bottom: 1px solid var(--brd); }
.rdv-table tr:last-child td { border-bottom: none; }
.rdv-table tr:hover td { background: var(--surf2); }
.tag-am { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; padding: 2px 8px; border-radius: 4px; background: var(--cyan-l); color: var(--cyan-d); font-weight: 600; }
.tag-pm { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; padding: 2px 8px; border-radius: 4px; background: #FFFBE6; color: #B8940A; font-weight: 600; }
.del-exp-btn { background: transparent; border: none; cursor: pointer; color: var(--ink3); padding: 4px; border-radius: var(--r); opacity: 0; transition: .15s; display: flex; align-items: center; flex-shrink: 0; }
.exp-item:hover .del-exp-btn { opacity: 1; }
.del-exp-btn:hover { color: var(--red); background: var(--red-bg); }
.exp-item.active .del-exp-btn { color: rgba(255,255,255,.5); }
.exp-item.active .del-exp-btn:hover { color: #fff; background: rgba(255,0,0,.25); }
.del-booking-btn { background: transparent; border: none; cursor: pointer; color: var(--ink3); padding: 4px 6px; border-radius: var(--r); transition: .15s; }
.del-booking-btn:hover { color: var(--red); background: var(--red-bg); }

/* ── Mes RDV ── */
.mesrdvs-hero { text-align: center; padding: 2.5rem 0 1.5rem; }
.mesrdvs-hero i { font-size: 40px; color: var(--cyan); display: block; margin-bottom: .75rem; }
.mesrdvs-hero h2 { font-family: var(--font); font-size: 22px; font-weight: 700; color: var(--ink); margin-bottom: .5rem; }
.mesrdvs-hero p { font-size: 14px; color: var(--ink3); }
.mesrdvs-search { display: flex; gap: 8px; margin-bottom: 1.5rem; }
.rdv-card { background: var(--white); border: 1.5px solid var(--brd2); border-radius: var(--rl); padding: 1.1rem 1.25rem; margin-bottom: 10px; display: flex; align-items: center; gap: 1rem; transition: .15s; }
.rdv-card:hover { box-shadow: 0 4px 16px rgba(63,203,209,.1); }
.rdv-card-time { font-family: var(--font); font-size: 18px; font-weight: 700; color: var(--cyan); min-width: 110px; }
.rdv-card-info { flex: 1; }
.rdv-card-exp { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.rdv-card-meta { font-size: 12px; color: var(--ink3); }
.rdv-empty { text-align: center; padding: 3rem 1rem; color: var(--ink3); }
.rdv-empty i { font-size: 32px; display: block; margin-bottom: 10px; opacity: .35; }

/* ── Toast & Loader ── */
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(8px); background: var(--cyan); color: #fff; padding: 9px 20px; border-radius: 100px; font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none; transition: .2s; z-index: 500; white-space: nowrap; box-shadow: 0 4px 16px rgba(63,203,209,.3); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.loader { display: none; position: fixed; inset: 0; background: rgba(255,255,255,.75); z-index: 600; align-items: center; justify-content: center; }
.loader.on { display: flex; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--cyan-l); border-top-color: var(--cyan); border-radius: 50%; animation: spin .65s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  .drawer { width: 100vw; }
  .admin-layout { flex-direction: column; height: auto; }
  .sidebar { width: 100%; height: auto; border-right: none; border-bottom: 2px solid var(--brd); }
  #grid { grid-template-columns: 1fr 1fr; }
  .nav-brand span { display: none; }
}

.nav-brand-sub { font-size: 12px; font-weight: 400; color: rgba(255,255,255,.75); letter-spacing: .01em; }
.nav-brand-main { display: flex; align-items: center; gap: 8px; font-size: 20px; }

/* ── Annulation visiteur ── */
.cancel-rdv-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: var(--r);
  border: 1.5px solid var(--brd2); background: transparent;
  font-family: var(--font); font-size: 12px; font-weight: 500;
  color: var(--ink3); cursor: pointer; transition: .15s;
  flex-shrink: 0; white-space: nowrap;
}
.cancel-rdv-btn:hover {
  background: var(--red-bg); border-color: #F09595;
  color: var(--red);
}
.rdv-card { flex-wrap: wrap; }

/* ── Loader amélioré ── */
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.loader-msg { font-family: var(--font); font-size: 14px; color: var(--cyan); font-weight: 500; }

/* ── Textarea problématique ── */
#m-problematique {
  width: 100%; padding: 8px 10px; border-radius: var(--r);
  border: 1.5px solid var(--brd2); background: var(--white);
  font-family: var(--font); font-size: 13px; color: var(--ink);
  resize: vertical; min-height: 70px; transition: .15s;
}
#m-problematique:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(63,203,209,.1); }

/* ── Edit exposant panel ── */
.edit-panel-inner { background: var(--white); border: 1.5px solid var(--brd2); border-radius: var(--rl); padding: 1.5rem; max-width: 560px; }
.edit-panel-title { font-family: var(--font); font-size: 16px; font-weight: 700; color: var(--cyan-d); margin-bottom: 1.25rem; display: flex; align-items: center; gap: 8px; }
.edit-form { display: flex; flex-direction: column; gap: 12px; }
.edit-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.edit-exp-btn { background: transparent; border: none; cursor: pointer; color: var(--cyan); padding: 4px; border-radius: var(--r); opacity: 1; transition: .15s; display: flex; align-items: center; flex-shrink: 0; }

.edit-exp-btn:hover { color: var(--cyan); background: var(--cyan-l); }
.exp-item.active .edit-exp-btn { color: rgba(255,255,255,.5); }
.exp-item.active .edit-exp-btn:hover { color: #fff; background: rgba(255,255,255,.2); }

/* ── Mes RDV header ── */
.mes-rdv-header { background: var(--white); border: 1.5px solid var(--brd2); border-radius: var(--rl); padding: 1rem 1.25rem; margin-bottom: 1rem; }

/* ── Ateliers ── */
.atelier-hero { text-align:center; padding:2rem 0 1.25rem; }
.atelier-hero i { font-size:36px; color:var(--cyan); display:block; margin-bottom:.6rem; }
.atelier-hero h2 { font-family:var(--font); font-size:22px; font-weight:700; color:var(--ink); margin-bottom:.4rem; }
.atelier-hero p { font-size:14px; color:var(--ink3); }

.atelier-card { background:var(--white); border:1.5px solid var(--brd2); border-radius:var(--rl); padding:1.1rem; margin-bottom:12px; transition:.15s; }
.atelier-card:hover { border-color:var(--cyan); box-shadow:0 4px 16px rgba(63,203,209,.1); }
.at-header { display:flex; align-items:flex-start; gap:12px; margin-bottom:10px; }
.at-time-badge { background:var(--cyan); color:#fff; border-radius:8px; padding:6px 12px; font-size:13px; font-weight:700; white-space:nowrap; flex-shrink:0; font-family:monospace; }
.at-time-badge.pm { background:#B8940A; }
.at-title { font-size:14px; font-weight:700; color:var(--ink); margin-bottom:3px; }
.at-salle { font-size:12px; color:var(--ink3); }
.at-desc { font-size:12px; color:var(--ink2); margin-bottom:8px; line-height:1.5; }
.at-animateurs { font-size:12px; color:var(--cyan-d); margin-bottom:8px; font-weight:500; }
.at-cats { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:10px; }
.at-cat-tag { font-size:10px; padding:2px 7px; border-radius:4px; background:var(--cyan-l); color:var(--cyan-d); font-weight:600; }
.at-footer { display:flex; align-items:center; justify-content:space-between; }
.at-places { font-size:12px; color:var(--ink3); }
.at-places strong { color:var(--ink); }
.at-places.full { color:var(--red); }

.cat-check { display:inline-flex; align-items:center; gap:5px; font-size:12px; color:var(--ink2); padding:4px 10px; border-radius:6px; border:1px solid var(--brd2); cursor:pointer; background:var(--white); transition:.12s; }
.cat-check:hover { background:var(--cyan-l); border-color:var(--cyan); }
.cat-check input { accent-color:var(--cyan); }

.at-pf { display:inline-flex; align-items:center; gap:4px; padding:8px 14px; font-family:var(--font); font-size:12px; font-weight:500; border:none; border-right:1px solid var(--brd); background:transparent; color:var(--ink2); cursor:pointer; transition:.15s; }
.at-pf:last-child { border-right:none; }
.at-pf:hover { background:var(--cyan-l); }
.at-pf.active { background:var(--cyan); color:#fff; font-weight:600; }

/* Planning unifié */
.planning-section-title { font-size:13px; font-weight:700; color:var(--cyan-d); text-transform:uppercase; letter-spacing:.06em; margin:1.25rem 0 .6rem; padding-bottom:.4rem; border-bottom:2px solid var(--cyan-l); }
.planning-item { display:flex; align-items:center; gap:12px; padding:10px 14px; border-radius:10px; margin-bottom:8px; border:1.5px solid; }
.planning-item.rdv-am  { background:var(--cyan-l); border-color:var(--brd2); }
.planning-item.rdv-pm  { background:#FFFBE6; border-color:rgba(255,216,43,.4); }
.planning-item.at-am   { background:#F0FFF4; border-color:#6BAA38; }
.planning-item.at-pm   { background:#FFF5E6; border-color:#E8966A; }
.pi-time { font-family:monospace; font-size:15px; font-weight:700; min-width:105px; }
.pi-info { flex:1; }
.pi-title { font-size:13px; font-weight:600; color:var(--ink); }
.pi-sub   { font-size:11px; color:var(--ink3); margin-top:2px; }
.pi-type  { font-size:10px; font-weight:700; padding:2px 7px; border-radius:4px; white-space:nowrap; }
.type-rdv  { background:var(--cyan); color:#fff; }
.type-at   { background:#3B6D11; color:#fff; }

/* ── Page d'accueil ── */
.accueil-hero { background: var(--white); border-bottom: 2px solid var(--cyan-l); padding: 2rem 1.5rem 1.75rem; }
.accueil-hero-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 2.5rem; }
.accueil-logo { display: block; max-height: 180px; max-width: 500px; object-fit: contain; flex-shrink: 0; margin-top: -19px; }
.accueil-text h1 { font-family: var(--font); font-size: clamp(1.8rem,4vw,2.8rem); font-weight: 700; color: var(--cyan); line-height: 1.15; margin-bottom: .4rem; }
.accueil-text h1 em { color: #fff; font-style: normal; background: var(--cyan); padding: 2px 10px; border-radius: 4px; }
.accueil-sub { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: .4rem; }
.accueil-date { font-size: 13px; color: var(--ink3); display: flex; align-items: center; gap: 5px; }

.accueil-desc { background: var(--white); border: 1.5px solid var(--brd2); border-radius: var(--rl); padding: 1.5rem; margin-bottom: 1.75rem; }
.accueil-desc p { font-size: 14px; color: var(--ink2); line-height: 1.8; margin-bottom: .6rem; }
.accueil-desc p:last-child { margin-bottom: 0; }

.accueil-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 2rem; }
.accueil-card { background: var(--white); border: 1.5px solid var(--brd2); border-radius: var(--rl); padding: 1.75rem; display: flex; flex-direction: column; gap: 12px; transition: .2s; }
.accueil-card:hover { border-color: var(--cyan); box-shadow: 0 6px 24px rgba(63,203,209,.12); transform: translateY(-2px); }
.accueil-card-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.accueil-card-title { font-size: 20px; font-weight: 700; color: var(--ink); }
.accueil-card-desc { font-size: 13px; color: var(--ink2); line-height: 1.6; flex: 1; }
.accueil-card-count { font-size: 14px; color: var(--ink3); font-weight: 500; }
.accueil-card-count span { font-size: 22px; font-weight: 700; color: var(--cyan); }
.accueil-card-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; }

/* ── Footer ── */
.site-footer { background: var(--ink); padding: 1.25rem 1.5rem; margin-top: 3rem; }
.site-footer-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.site-footer span { font-size: 12px; color: rgba(255,255,255,.4); }
.footer-links { display: flex; align-items: center; gap: 10px; }
.footer-links a { font-size: 12px; color: rgba(255,255,255,.65); text-decoration: none; transition: .15s; }
.footer-links a:hover { color: var(--cyan); }
.footer-sep { color: rgba(255,255,255,.25); font-size: 12px; }

@media (max-width: 600px) {
  .accueil-cards { grid-template-columns: 1fr; }
  .accueil-hero-inner { flex-direction: column; gap: 1rem; }
  .accueil-logo { max-height: 100px; margin-top: 0; }
  .site-footer-inner { flex-direction: column; text-align: center; }
}

/* ── Sélecteur de structure juridique ── */
.structure-dropdown {
  display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 100;
  background: var(--white); border: 1.5px solid var(--cyan); border-top: none;
  border-radius: 0 0 var(--r) var(--r); max-height: 200px; overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.structure-dropdown.open { display: block; }
.structure-opt {
  padding: 8px 12px; font-size: 13px; color: var(--ink2); cursor: pointer;
  border-bottom: 1px solid var(--brd); transition: .12s;
}
.structure-opt:last-child { border-bottom: none; }
.structure-opt:hover, .structure-opt.selected { background: var(--cyan-l); color: var(--cyan-d); font-weight: 500; }
.structure-opt .opt-cat { font-size: 10px; color: var(--ink3); display: block; margin-top: 1px; }

/* ── Responsive amélioré ── */
@media (max-width: 900px) {
  .nav-inner { padding: 0 1rem; height: auto; min-height: 58px; flex-wrap: wrap; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .nav-brand { flex-direction: column !important; gap: 2px !important; }
  .nav-brand-main { font-size: 14px !important; }
  .nav-brand-sub { font-size: 12px !important; }
  .vis-tabs { flex-wrap: nowrap; gap: 4px; }
  .vtab { font-size: 12px !important; padding: 6px 10px !important; }
  .accueil-hero-inner { flex-direction: column; gap: 1rem; text-align: center; }
  .accueil-logo { max-height: 120px !important; margin-top: 0 !important; }
  .accueil-text h1 { font-size: 1.6rem; }
  .admin-layout { flex-direction: column; height: auto; }
  .sidebar { width: 100% !important; height: auto; border-right: none; border-bottom: 2px solid var(--brd); }
  .admin-main { min-height: 50vh; }
}

@media (max-width: 600px) {
  .accueil-cards { grid-template-columns: 1fr; }
  #grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .search-wrap { min-width: 0; }
  .period-filter { justify-content: stretch; }
  .pf { flex: 1; justify-content: center; }
  .drawer { width: 100vw; }
  .modal-box { border-radius: var(--rl); margin: .5rem; width: calc(100% - 1rem); }
  .cal-top { flex-direction: column; }
  .period-switcher { flex-wrap: wrap; }
  .rdv-table { font-size: 11px; }
  .rdv-table th, .rdv-table td { padding: 6px 8px; }
  .accueil-desc p { font-size: 13px; }
  .site-footer-inner { flex-direction: column; text-align: center; gap: 6px; }
  .mesrdvs-search { flex-direction: column; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-badges { gap: 6px; }
  .hero-badges span { font-size: 11px; padding: 4px 10px; }
}

@media (min-width: 1200px) {
  .nav-inner { height: 110px; }
  .nav-brand-main { font-size: 30px !important; }
  .nav-brand-sub { font-size: 16px !important; }
  .accueil-logo { max-height: 180px; }
  .container { padding: 2rem 2rem; }
}

@media (max-width: 1199px) and (min-width: 901px) {
  .nav-inner { height: 80px; }
  .nav-brand-main { font-size: 22px !important; }
  .nav-brand-sub { font-size: 13px !important; }
}

/* ── Slots liste d'attente ── */
.slot-booked { background: #F5F5F5 !important; border-color: #CCC !important; color: var(--ink3) !important; cursor: pointer !important; position: relative; }
.slot-booked:hover { background: #FEF3EB !important; border-color: var(--am-brd) !important; color: var(--am) !important; }
.slot-disabled { background: #F5F5F5; border-color: #DDD; color: #BBB; cursor: not-allowed; }
.slot-tag { font-size: 9px; display: block; text-align: center; margin-top: 2px; opacity: .7; }
.slot-wait-badge { position: absolute; top: -6px; right: -6px; background: var(--am); color: #fff; font-size: 9px; font-weight: 700; padding: 1px 4px; border-radius: 6px; white-space: nowrap; }
.slot-btn { position: relative; }

/* Planning attente */
.planning-item.wait-item { background: #FEF3EB; border: 1.5px solid var(--am-brd); border-style: dashed; }

/* ── Modal footer toujours visible ── */
.modal-foot { flex-shrink: 0; position: sticky; bottom: 0; background: var(--white); border-top: 1px solid var(--brd); padding: .75rem 1.25rem 1.25rem; display: flex; gap: 8px; justify-content: flex-end; }

/* ── Liste d'attente rouge dans Mon Planning ── */
.planning-item.wait-item-red {
  background: #FEF3EB;
  border: 2px dashed #B85C1A;
}
.planning-item.wait-item-red .pi-time {
  color: #B85C1A !important;
}

/* ── Paramètres mode inscription ── */
.mode-choice { display: block; cursor: pointer; }
.mode-choice input[type=radio] { display: none; }
.mode-choice-inner { display: flex; align-items: flex-start; gap: 14px; padding: 1rem; border-radius: 10px; border: 2px solid var(--brd2); background: var(--white); transition: .15s; }
.mode-choice:hover .mode-choice-inner { border-color: var(--cyan); background: var(--cyan-l); }
.mode-choice input:checked + .mode-choice-inner { border-color: var(--cyan); background: var(--cyan-l); box-shadow: 0 0 0 3px rgba(63,203,209,.15); }
.mode-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.mode-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.mode-desc { font-size: 12px; color: var(--ink2); line-height: 1.5; }

/* ── Bannière mode visiteur ── */
.mode-banner { padding: 1rem 1.5rem; font-size: 14px; font-weight: 500; text-align: center; display: flex; align-items: center; justify-content: center; gap: 8px; }
.mode-banner.lecture { background: #FFF8E6; color: #5A3A00; border-bottom: 2px solid #FFD82B; }
.mode-banner.preinscription { background: #EAF3DE; color: #2E5A00; border-bottom: 2px solid #6BAA38; }

/* ── Mode plateforme ── */
.mode-card { background: var(--white); border: 2px solid var(--brd2); border-radius: var(--rl); padding: 1.25rem; transition: .2s; }
.mode-card.active-mode { border-color: var(--cyan); background: var(--cyan-l); box-shadow: 0 4px 16px rgba(63,203,209,.15); }
.mode-card.active-mode-pre { border-color: #FFD82B; background: #FFF8E6; }
.mode-card.active-mode-ins { border-color: #6BAA38; background: #F0FFF4; }

/* ── Bandeau mode ── */
#mode-banner { width: 100%; text-align: center; font-family: var(--font); font-size: 14px; font-weight: 600; padding: 12px 1rem; }
#mode-banner.banner-lecture { background: #1A1816; color: #FFD82B; }
#mode-banner.banner-preinscription { background: #FFF3CD; color: #856404; border-bottom: 2px solid #FFD82B; }

/* ── Répertoire exposants ── */
#exposants-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 14px; }
.exposant-list-card { background: var(--white); border: 1.5px solid var(--brd2); border-radius: var(--rl); padding: 1.1rem; transition: .2s; }
.exposant-list-card:hover { border-color: var(--cyan); box-shadow: 0 4px 16px rgba(63,203,209,.1); }
.elc-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.elc-footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── Plan visiteur ── */
.village-card-visitor:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.village-exp-chip:hover { transform: translateX(3px); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
@media(max-width:600px){ 
  #plan-visiteur-content > div:last-child { grid-template-columns: 1fr !important; }
}

/* ── Nav onglets visiteur scrollable ── */
.vtabs { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; flex-wrap: nowrap; }
.vtabs::-webkit-scrollbar { display: none; }
.vtab { white-space: nowrap; flex-shrink: 0; }

/* ── Nav avec plan publié ── */
.vtab { white-space: nowrap; flex-shrink: 0; }

/* ── Flèches navigation onglets ── */
.nav-tabs-wrap { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.nav-tabs-wrap .vis-tabs { flex: 1; min-width: 0; }
.nav-arr { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.4); background: rgba(255,255,255,.12); color: #fff; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; transition: .15s; line-height: 1; user-select: none; }
.nav-arr:hover { background: rgba(255,255,255,.28); }
.nav-arr:active { background: rgba(255,255,255,.4); transform: scale(.93); }
