
:root{
  --bg:#f4f3ef;--surface:#ffffff;--surface-2:#f8f7f3;--ink:#15211d;--muted:#6f7b76;
  --brand:#173f35;--brand-2:#285f4f;--brand-soft:#e5eee9;--sand:#d6c3a1;--line:#e6e5df;
  --danger:#b5453a;--danger-soft:#f8e9e7;--warn:#966a13;--warn-soft:#fbf1d9;--ok:#2e6d50;--ok-soft:#e6f1eb;
  --shadow:0 14px 40px rgba(20,37,31,.08);--radius:22px;--radius-sm:14px;
}
*{box-sizing:border-box} html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink)}
button,input,select,textarea{font:inherit} button{cursor:pointer}.hidden{display:none!important}.muted{color:var(--muted)}.small{font-size:12px}.nowrap{white-space:nowrap}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.grow{flex:1}
.app-shell{min-height:100vh}.topbar{height:70px;background:rgba(255,255,255,.92);backdrop-filter:blur(12px);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:16px;padding:0 22px;position:sticky;top:0;z-index:30}.brand{display:flex;align-items:center;gap:11px;font-weight:800;letter-spacing:-.02em}.brand-mark{width:38px;height:38px;border-radius:13px;background:var(--brand);display:grid;place-items:center;color:#fff;font-size:20px}.brand-sub{font-size:12px;color:var(--muted);font-weight:600}.top-actions{margin-left:auto;display:flex;gap:8px;align-items:center}.icon-btn{border:1px solid var(--line);background:#fff;border-radius:12px;padding:9px 11px;color:var(--ink)}
.layout{display:grid;grid-template-columns:250px 1fr;min-height:calc(100vh - 70px)}.sidebar{padding:18px 14px;border-right:1px solid var(--line);background:#fbfaf7;position:sticky;top:70px;height:calc(100vh - 70px)}.nav-section{font-size:11px;text-transform:uppercase;letter-spacing:.1em;color:#9a9f9b;padding:16px 12px 8px;font-weight:800}.nav-item{display:flex;align-items:center;gap:11px;width:100%;border:0;background:transparent;color:#38443f;padding:12px 13px;border-radius:13px;text-align:left;margin:2px 0;font-weight:650}.nav-item:hover{background:#f0f0eb}.nav-item.active{background:var(--brand);color:#fff}.badge{margin-left:auto;min-width:22px;height:22px;padding:0 7px;border-radius:999px;display:grid;place-items:center;background:#fff;color:var(--brand);font-size:11px;font-weight:800}.badge.red{background:var(--danger);color:#fff}.content{padding:28px 30px 90px;max-width:1500px;width:100%;margin:0 auto}.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:22px}.page-head h1{font-size:30px;margin:0;letter-spacing:-.04em}.page-head p{margin:6px 0 0;color:var(--muted)}
.btn{border:0;border-radius:13px;padding:11px 16px;font-weight:750;display:inline-flex;align-items:center;justify-content:center;gap:8px}.btn.primary{background:var(--brand);color:#fff}.btn.primary:hover{background:var(--brand-2)}.btn.secondary{background:#fff;border:1px solid var(--line);color:var(--ink)}.btn.ghost{background:transparent;color:var(--brand)}.btn.danger{background:var(--danger);color:#fff}.btn.warn{background:var(--warn-soft);color:var(--warn)}.btn.large{padding:15px 20px;font-size:16px;border-radius:15px}.btn.block{width:100%}.btn:disabled{opacity:.45;cursor:not-allowed}
.grid{display:grid;gap:16px}.grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px}.stat{padding:18px}.stat .label{font-size:13px;color:var(--muted);font-weight:650}.stat .value{font-size:31px;font-weight:850;letter-spacing:-.05em;margin-top:8px}.stat .detail{font-size:12px;color:var(--muted);margin-top:5px}.stat.highlight{background:var(--brand);color:white;border-color:transparent}.stat.highlight .label,.stat.highlight .detail{color:#d8e6e0}.section-title{font-size:18px;font-weight:800;margin:0 0 14px;letter-spacing:-.02em}.row{display:flex;gap:12px;align-items:center}.row.wrap{flex-wrap:wrap}.between{justify-content:space-between}.stack{display:flex;flex-direction:column;gap:12px}
.alert{padding:14px 15px;border-radius:15px;background:var(--warn-soft);color:#71510f;border:1px solid #eedcae;display:flex;gap:10px;align-items:flex-start}.alert.danger{background:var(--danger-soft);color:#8f332c;border-color:#efcbc7}.alert.ok{background:var(--ok-soft);color:#245c43;border-color:#cee2d6}
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:18px;background:#fff}.table{width:100%;border-collapse:collapse;min-width:760px}.table th{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:#89918d;text-align:left;padding:13px 15px;background:#faf9f6;border-bottom:1px solid var(--line)}.table td{padding:14px 15px;border-bottom:1px solid #efeee9;vertical-align:middle}.table tr:last-child td{border-bottom:0}.table tr:hover td{background:#fcfbf8}.pill{display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border-radius:999px;font-size:12px;font-weight:750;background:#eef0ed;color:#506059}.pill.collective{background:#e7f0eb;color:#2b6650}.pill.individual{background:#efe9f5;color:#69468a}.pill.work{background:#f6eee2;color:#785b2a}.pill.wait{background:var(--warn-soft);color:var(--warn)}.pill.cancel{background:var(--danger-soft);color:var(--danger)}.pill.ok{background:var(--ok-soft);color:var(--ok)}
.calendar-toolbar{display:flex;gap:10px;align-items:center;margin-bottom:14px}.calendar-week{display:grid;grid-template-columns:repeat(7,minmax(130px,1fr));gap:10px;overflow:auto;padding-bottom:8px}.day-col{min-width:130px}.day-head{padding:10px 4px;text-align:center}.day-head .dow{font-size:12px;text-transform:uppercase;color:var(--muted);font-weight:800}.day-head .date{font-size:18px;font-weight:850;margin-top:4px}.day-head.today .date{display:inline-grid;place-items:center;width:34px;height:34px;background:var(--brand);color:#fff;border-radius:50%}.slot{background:#fff;border:1px solid var(--line);border-radius:14px;padding:11px;margin-bottom:8px;box-shadow:0 5px 16px rgba(20,37,31,.05);cursor:pointer}.slot:hover{border-color:#c9cec9}.slot .time{font-weight:850;font-size:14px}.slot .title{font-size:13px;font-weight:750;margin-top:4px}.slot .meta{font-size:11px;color:var(--muted);margin-top:5px}.slot.collective{border-left:4px solid #4d8a6e}.slot.individual{border-left:4px solid #8d68ab}.slot.work{border-left:4px solid #b48b4b}.slot.cancelled{opacity:.55;text-decoration:line-through}.empty-day{border:1px dashed #d9d8d1;border-radius:14px;height:80px;display:grid;place-items:center;color:#aaa;font-size:12px}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field{display:flex;flex-direction:column;gap:7px}.field.full{grid-column:1/-1}.field label{font-size:12px;font-weight:800;color:#53615b}.field input,.field select,.field textarea{width:100%;border:1px solid #dcded9;background:#fff;border-radius:12px;padding:12px 13px;outline:none;color:var(--ink)}.field input:focus,.field select:focus,.field textarea:focus{border-color:#8ca99d;box-shadow:0 0 0 3px rgba(40,95,79,.08)}.field textarea{min-height:88px;resize:vertical}.help{font-size:11px;color:var(--muted)}
.modal-backdrop{position:fixed;inset:0;background:rgba(14,24,20,.44);backdrop-filter:blur(4px);display:grid;place-items:center;padding:18px;z-index:80}.modal{width:min(680px,100%);max-height:92vh;overflow:auto;background:#fff;border-radius:24px;box-shadow:0 30px 100px rgba(0,0,0,.25);padding:22px}.modal.small{width:min(480px,100%)}.modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.modal-head h2{margin:0;font-size:22px;letter-spacing:-.03em}.close{border:0;background:#f2f2ee;width:36px;height:36px;border-radius:12px;font-size:18px}
.login-page{min-height:100vh;display:grid;grid-template-columns:1.05fr .95fr;background:#eef0eb}.login-hero{background:linear-gradient(145deg,#12372f,#285b4d);color:#fff;padding:7vw;display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden}.login-hero:after{content:"";position:absolute;width:420px;height:420px;border:1px solid rgba(255,255,255,.11);border-radius:50%;right:-170px;top:18%}.login-hero h1{font-size:clamp(44px,5vw,76px);letter-spacing:-.065em;line-height:.97;margin:0;max-width:650px}.login-hero p{font-size:17px;color:#d5e2dd;max-width:540px;line-height:1.55}.login-panel{display:grid;place-items:center;padding:28px}.login-card{width:min(470px,100%);background:#fff;border-radius:28px;padding:30px;box-shadow:var(--shadow)}.login-card h2{font-size:28px;letter-spacing:-.04em;margin:0 0 6px}.login-tabs{display:grid;grid-template-columns:1fr 1fr;background:#f1f1ed;padding:4px;border-radius:13px;margin:22px 0}.login-tab{border:0;padding:10px;border-radius:10px;background:transparent;font-weight:800}.login-tab.active{background:#fff;box-shadow:0 3px 10px rgba(0,0,0,.06)}.demo-box{background:#f6f5f1;border:1px solid var(--line);border-radius:14px;padding:12px;margin-top:14px;font-size:12px;line-height:1.5}.credential{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;background:#eceeea;padding:2px 5px;border-radius:5px}
.rider-shell{min-height:100vh;background:#f4f3ef}.rider-top{height:70px;display:flex;align-items:center;padding:0 22px;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}.rider-nav{margin-left:auto;display:flex;gap:4px}.rider-nav button{border:0;background:transparent;padding:10px 12px;border-radius:11px;font-weight:700;color:#5c6863}.rider-nav button.active{background:var(--brand-soft);color:var(--brand)}.rider-content{max-width:980px;margin:0 auto;padding:32px 20px 90px}.welcome{background:linear-gradient(135deg,#173f35,#2b6253);color:#fff;border-radius:28px;padding:28px;box-shadow:var(--shadow)}.welcome h1{margin:0;font-size:31px;letter-spacing:-.045em}.welcome p{margin:7px 0 0;color:#d6e4de}.course-balance{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:18px 0}.balance-card{background:#fff;border-radius:22px;padding:22px;border:1px solid var(--line)}.balance-card .num{font-size:42px;font-weight:900;letter-spacing:-.06em}.balance-card .name{font-size:14px;font-weight:750}.balance-card .expiry{font-size:11px;color:var(--muted);margin-top:7px}.next-course{display:flex;align-items:center;gap:15px;background:#fff;border:1px solid var(--line);border-radius:20px;padding:18px;margin:16px 0}.date-tile{width:56px;min-width:56px;height:56px;border-radius:15px;background:var(--brand-soft);color:var(--brand);display:grid;place-items:center;font-weight:900;text-align:center;line-height:1.05}.session-list{display:flex;flex-direction:column;gap:10px}.session-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;display:flex;align-items:center;gap:15px}.session-card .session-main{flex:1;min-width:0}.session-card .session-title{font-weight:850}.session-card .session-meta{font-size:12px;color:var(--muted);margin-top:4px}.session-card .session-action{min-width:112px}
.horse-load{display:flex;gap:8px;align-items:center}.bar{height:8px;background:#ecece8;border-radius:999px;overflow:hidden;flex:1}.bar span{display:block;height:100%;background:var(--brand);border-radius:999px}.bar.warn span{background:#c38b2f}.bar.danger span{background:var(--danger)}
.mobile-bottom{display:none}.toast-wrap{position:fixed;right:18px;bottom:18px;z-index:120;display:flex;flex-direction:column;gap:8px}.toast{background:#15211d;color:white;border-radius:13px;padding:12px 15px;box-shadow:var(--shadow);font-size:13px;max-width:340px;animation:slide .2s ease}.toast.error{background:var(--danger)}@keyframes slide{from{transform:translateY(8px);opacity:0}to{transform:none;opacity:1}}
@media(max-width:980px){.layout{grid-template-columns:1fr}.sidebar{display:none}.content{padding:20px 16px 90px}.grid.cols-4{grid-template-columns:repeat(2,1fr)}.grid.cols-3{grid-template-columns:1fr 1fr}.calendar-week{grid-template-columns:repeat(7,minmax(150px,1fr))}.mobile-bottom{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;bottom:0;left:0;right:0;background:rgba(255,255,255,.96);backdrop-filter:blur(12px);border-top:1px solid var(--line);z-index:50;padding:7px 6px calc(7px + env(safe-area-inset-bottom))}.mobile-bottom button{border:0;background:transparent;padding:7px 3px;font-size:10px;color:#69736f;font-weight:750;border-radius:10px}.mobile-bottom button.active{color:var(--brand);background:var(--brand-soft)}.mobile-bottom .ico{font-size:17px;display:block;margin-bottom:2px}}
@media(max-width:720px){.login-page{grid-template-columns:1fr}.login-hero{display:none}.login-panel{padding:16px;min-height:100vh}.login-card{padding:24px 20px}.topbar{padding:0 14px}.topbar .brand-sub{display:none}.page-head{align-items:flex-start;flex-direction:column}.page-head h1{font-size:26px}.grid.cols-4,.grid.cols-3,.grid.cols-2{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.rider-nav{display:none}.rider-content{padding:20px 14px 95px}.welcome{padding:22px}.welcome h1{font-size:27px}.course-balance{gap:10px}.balance-card{padding:17px}.balance-card .num{font-size:35px}.session-card{align-items:flex-start;flex-wrap:wrap}.session-card .session-action{width:100%}.session-card .session-action .btn{width:100%}.card{padding:16px}.table-wrap{border-radius:14px}}

/* === Mobile V1.2: vraie interface dédiée admin + cavalier === */
.admin-brand-button{border:0;background:transparent;display:flex;align-items:center;gap:11px;padding:0;color:var(--ink);font:inherit;font-weight:800;text-align:left}
.admin-mobile-action{display:none;position:relative}.top-badge{position:absolute;right:-5px;top:-6px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--danger);color:#fff;font-size:10px;display:grid;place-items:center;font-weight:900}.mobile-nav-badge{position:absolute;top:3px;right:calc(50% - 20px);min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:var(--danger);color:#fff;font-size:9px;display:grid;place-items:center}
.period-nav{display:flex;gap:8px}.planning-legend{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.planning-title{text-transform:capitalize;margin-left:6px}

@media(max-width:720px){
  body{background:#f2f3ef;-webkit-tap-highlight-color:transparent}
  .admin-topbar,.rider-top{height:60px;padding:0 12px;background:rgba(255,255,255,.97)}
  .admin-topbar .brand-mark,.rider-top .brand-mark{width:34px;height:34px;border-radius:11px;font-size:18px}
  .admin-brand-copy{line-height:1.05}.admin-brand-copy>div:first-child{font-size:14px}.admin-brand-copy .brand-sub{display:block!important;font-size:10px;margin-top:3px}
  .admin-mobile-action{display:inline-grid;place-items:center;width:38px;height:38px;padding:0}.admin-desktop-logout{display:none}
  .content{padding:14px 12px 92px;max-width:none}.page-head{gap:10px;margin-bottom:14px}.page-head h1{font-size:24px}.page-head p{font-size:12px;line-height:1.35;margin-top:4px}.page-head>.btn{width:100%;min-height:46px}
  .admin-shell .grid.cols-4{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.admin-shell .grid.cols-3,.admin-shell .grid.cols-2{grid-template-columns:1fr;gap:10px}.admin-shell .stat{padding:14px;border-radius:17px;box-shadow:none}.admin-shell .stat .value{font-size:27px;margin-top:5px}.admin-shell .stat .label{font-size:11px}.admin-shell .stat .detail{font-size:10px}.admin-shell .card{border-radius:17px;box-shadow:none}
  .admin-mobile-nav,.rider-mobile-nav{height:auto;grid-template-columns:repeat(5,1fr)!important;padding:6px 4px calc(7px + env(safe-area-inset-bottom));box-shadow:0 -8px 24px rgba(20,37,31,.06)}
  .admin-mobile-nav button,.rider-mobile-nav button{position:relative;min-height:48px;font-size:9px;padding:5px 1px}.admin-mobile-nav .ico,.rider-mobile-nav .ico{font-size:19px;line-height:1;margin-bottom:3px}
  .admin-search-card{padding:10px!important;position:sticky;top:67px;z-index:12;background:rgba(255,255,255,.97);backdrop-filter:blur(8px)}
  .mobile-admin-list{display:flex;flex-direction:column;gap:8px}.mobile-admin-person{width:100%;border:1px solid var(--line);background:#fff;border-radius:16px;padding:11px;display:flex;align-items:center;gap:10px;text-align:left;color:var(--ink)}.mobile-person-avatar{width:40px;height:40px;min-width:40px;border-radius:13px;background:var(--brand-soft);color:var(--brand);display:grid;place-items:center;font-weight:900;font-size:13px}.mobile-admin-person strong{display:block;font-size:14px}.mobile-admin-person span:not(.pill):not(.mobile-chevron){display:block;font-size:11px;color:var(--muted);margin-top:2px}.mobile-admin-person small{display:block;font-size:10px;color:#8b9490;margin-top:3px}.mobile-admin-person .pill{font-size:9px;padding:4px 6px}.mobile-chevron{font-size:22px!important;color:#a3aaa6!important}

  /* Planning admin mobile */
  .planning-head{margin-bottom:10px}.planning-head>.btn{position:fixed;right:16px;bottom:calc(70px + env(safe-area-inset-bottom));z-index:45;width:54px;height:54px;min-height:54px;border-radius:50%;padding:0;font-size:0;box-shadow:0 9px 24px rgba(23,63,53,.28)}.planning-head>.btn::first-letter{font-size:25px}.planning-head>.btn{color:transparent}.planning-head>.btn::after{content:'+';color:#fff;font-size:27px;font-weight:500;position:absolute;inset:0;display:grid;place-items:center}
  .planning-toolbar{display:grid;grid-template-columns:1fr;gap:8px;margin-bottom:10px}.period-nav{display:grid;grid-template-columns:44px 1fr 44px;gap:7px}.period-nav .btn{padding:9px 8px;min-height:40px}.view-switch{width:100%;order:2}.view-switch button{min-height:38px;padding:7px 8px;font-size:12px}.planning-title{order:3;width:100%;margin:1px 0 0;text-align:center;font-size:13px}
  .mobile-day-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--brand);color:#fff;border-radius:16px;padding:13px 14px;margin-bottom:8px}.mobile-day-summary.closed{background:#59635f}.mobile-day-dow{text-transform:capitalize;font-size:12px;color:#d9e7e1;margin-bottom:2px}.mobile-day-summary strong{font-size:17px;text-transform:capitalize}.mobile-day-summary>span{font-size:10px;padding:6px 8px;background:rgba(255,255,255,.13);border-radius:999px;white-space:nowrap}
  .mobile-timeline{background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden}.mobile-time-row{display:grid;grid-template-columns:49px 1fr;min-height:47px}.mobile-time-row+.mobile-time-row{border-top:1px solid #edf0ec}.mobile-time-label{display:flex;justify-content:center;align-items:flex-start;padding-top:8px;border-right:1px solid #edf0ec;color:#74807b;font-size:10px;font-weight:850;font-variant-numeric:tabular-nums}.mobile-time-cell{min-height:47px;padding:4px 5px;position:relative;background:#fff}.mobile-time-cell.break{background:#fcf8f0}.mobile-time-cell.closed{background:repeating-linear-gradient(135deg,#fbfbfa,#fbfbfa 8px,#f4f4f1 8px,#f4f4f1 16px)}.mobile-empty-slot{position:absolute;right:8px;top:8px;color:#c4cac6;font-size:17px;font-weight:400}.mobile-slot-card{width:100%;border:0;border-left:4px solid;border-radius:10px;padding:7px 8px;display:flex;align-items:center;gap:8px;text-align:left;color:var(--ink)}.mobile-slot-card.collective{background:#e9f3ee;border-color:#4d8a6e}.mobile-slot-card.individual{background:#f1eaf7;border-color:#8d68ab}.mobile-slot-card.work{background:#f7f0e4;border-color:#b48b4b}.mobile-slot-card.cancelled{opacity:.5;text-decoration:line-through}.mobile-slot-time{font-size:11px;font-weight:900;min-width:38px}.mobile-slot-main{display:flex;flex-direction:column;min-width:0;flex:1}.mobile-slot-main strong{font-size:11px}.mobile-slot-main small{font-size:9px;color:#68736e;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-slot-chevron{font-size:20px;color:#82908a}
  .mobile-week-help{font-size:11px;color:var(--muted);background:#fff;border:1px solid var(--line);padding:9px 11px;border-radius:12px;margin-bottom:8px}.mobile-week-scroller{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:10px;padding-bottom:8px;margin:0 -12px;padding-left:12px;padding-right:12px}.mobile-week-day{flex:0 0 calc(100vw - 38px);scroll-snap-align:center}.mobile-week-day-head{width:100%;border:0;background:#fff;border:1px solid var(--line);border-radius:14px 14px 0 0;padding:9px 12px;display:flex;justify-content:space-between;align-items:center;text-transform:capitalize;color:var(--ink)}.mobile-week-day-head span{font-size:12px;font-weight:750}.mobile-week-day-head strong{font-size:13px}.mobile-week-day-head.today{background:var(--brand);color:#fff}.mobile-week-day .mobile-timeline{border-radius:0 0 14px 14px;border-top:0}
  .mobile-month-grid{background:#fff;border:1px solid var(--line);border-radius:16px;padding:9px}.mobile-month-dows,.mobile-month-days{display:grid;grid-template-columns:repeat(7,1fr)}.mobile-month-dows span{text-align:center;font-size:9px;color:var(--muted);font-weight:900;padding:5px 0 7px}.mobile-month-day{height:48px;border:0;background:transparent;border-radius:10px;position:relative;color:var(--ink);display:grid;place-items:center}.mobile-month-day.out{color:#b7bdb9}.mobile-month-day.today{background:var(--brand-soft);color:var(--brand);font-weight:900}.mobile-month-num{font-size:12px}.mobile-month-count{position:absolute;right:4px;top:3px;min-width:15px;height:15px;border-radius:999px;background:var(--brand);color:#fff;font-size:8px;display:grid;place-items:center}.mobile-month-dot{position:absolute;bottom:5px;width:4px;height:4px;background:var(--brand);border-radius:50%}.planning-legend{gap:5px;margin-top:9px}.planning-legend .pill{font-size:9px;padding:4px 6px}.planning-hint{font-size:10px;margin-bottom:6px}

  /* Modales mobiles en feuille basse */
  .modal-backdrop{align-items:end;padding:0;place-items:end center}.modal{width:100%;max-width:none;max-height:91vh;border-radius:24px 24px 0 0;padding:18px 15px calc(18px + env(safe-area-inset-bottom));box-shadow:0 -18px 60px rgba(0,0,0,.22)}.modal.small{width:100%}.modal-head{margin-bottom:12px}.modal-head h2{font-size:20px}.form-grid{gap:10px}.field input,.field select,.field textarea{min-height:46px;font-size:16px}.weekday-picker{gap:5px}.weekday-picker span{min-width:37px;height:37px}.repeat-box{padding:11px}.modal .row[style*="justify-content:flex-end"]{display:grid;grid-template-columns:1fr 1fr;width:100%}.modal .row[style*="justify-content:flex-end"] .btn{width:100%}

  /* Cavalier mobile */
  .rider-mobile .rider-top{justify-content:center}.rider-mobile .rider-top .brand{width:100%}.rider-mobile .rider-content{padding:14px 12px 92px;max-width:none}.rider-mobile-hero{background:linear-gradient(145deg,#173f35,#285f4f);color:#fff;border-radius:20px;padding:18px;display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.rider-eyebrow{font-size:11px;color:#d5e3de;text-transform:uppercase;letter-spacing:.08em;font-weight:800}.rider-mobile-hero h1{font-size:27px;margin:3px 0 0;letter-spacing:-.04em}.rider-horse-chip{background:rgba(255,255,255,.12);padding:7px 9px;border-radius:999px;font-size:10px;font-weight:800;white-space:nowrap}
  .mobile-course-counts{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:10px 0}.mobile-course-count{border:1px solid var(--line);background:#fff;border-radius:18px;padding:16px 12px;text-align:left;color:var(--ink)}.mobile-course-count strong{display:block;font-size:34px;line-height:1;font-weight:900;color:var(--brand)}.mobile-course-count span{display:block;font-size:11px;font-weight:850;margin-top:7px}.mobile-course-count small{display:block;font-size:9px;color:var(--muted);margin-top:2px}
  .mobile-next-course{background:#fff;border:1px solid var(--line);border-radius:18px;padding:13px;display:flex;align-items:center;gap:12px}.mobile-next-date{width:50px;height:50px;min-width:50px;border-radius:14px;background:var(--brand-soft);color:var(--brand);display:flex;flex-direction:column;align-items:center;justify-content:center}.mobile-next-date strong{font-size:20px;line-height:1}.mobile-next-date span{font-size:9px;text-transform:uppercase;font-weight:800;margin-top:3px}.mobile-next-course .grow{display:flex;flex-direction:column}.mobile-next-course small{font-size:8px;letter-spacing:.08em;color:var(--muted);font-weight:900}.mobile-next-course strong{font-size:13px;margin:2px 0}.mobile-next-course span{font-size:10px;color:var(--muted);text-transform:capitalize}.mobile-no-course{background:#fff;border:1px dashed #d7dcd8;border-radius:16px;padding:18px;text-align:center;color:var(--muted);font-size:12px}.rider-main-action,.rider-secondary-action{width:100%;min-height:52px;margin-top:10px;border-radius:16px;font-size:15px}.rider-secondary-action{margin-top:8px}
  .mobile-page-title{margin:2px 2px 13px}.mobile-page-title small{font-size:9px;color:var(--muted);letter-spacing:.1em;font-weight:900}.mobile-page-title h1{font-size:25px;letter-spacing:-.04em;margin:2px 0 0}.mobile-balance-inline{display:flex;gap:7px;margin-top:9px}.mobile-balance-inline span{font-size:9px;background:#fff;border:1px solid var(--line);padding:6px 8px;border-radius:999px}.mobile-balance-inline strong{font-size:11px;color:var(--brand)}
  .mobile-book-list{display:flex;flex-direction:column;gap:15px}.mobile-book-day h2,.mobile-course-section h2{font-size:12px;text-transform:capitalize;margin:0 0 7px 3px;color:#53615b}.rider-slot-mobile{display:grid;grid-template-columns:51px 1fr;gap:9px;padding:12px;border-radius:17px;box-shadow:none}.rider-slot-time{display:flex;flex-direction:column;align-items:center;justify-content:center;background:#f2f5f2;border-radius:12px;height:49px}.rider-slot-time strong{font-size:14px}.rider-slot-time span{font-size:8px;color:var(--muted);margin-top:2px}.rider-slot-mobile .session-main{min-width:0}.rider-slot-mobile .session-title{font-size:13px}.rider-slot-mobile .session-meta{font-size:9px;line-height:1.35}.rider-slot-mobile .session-action{grid-column:1/-1;width:100%}.rider-slot-mobile .session-action .btn{width:100%;min-height:43px}.mobile-blocked{color:var(--danger)}.mobile-course-section{margin-bottom:18px}.rider-mobile .session-card{box-shadow:none}.rider-mobile .next-course{box-shadow:none}

  .toast-wrap{right:10px;left:10px;bottom:calc(74px + env(safe-area-inset-bottom))}.toast{max-width:none;width:100%}
}
@media(max-width:720px){.mobile-month-dot{pointer-events:none}}

/* === Correctif V1.2.1 : largeur planning mobile === */
@media (max-width:720px){
  html,body,#app,.app-shell,.admin-shell,.layout,.content,#adminContent{
    width:100%;max-width:100%;min-width:0;
  }
  html,body,#app,.app-shell,.admin-shell,.content{overflow-x:hidden}

  .planning-head,.planning-toolbar,.period-nav,.view-switch,.planning-title,
  .mobile-week-help,.mobile-week-scroller,.mobile-week-day,.mobile-timeline{
    min-width:0;max-width:100%;
  }

  .planning-toolbar{width:100%;overflow:hidden}
  .period-nav{width:100%;grid-template-columns:44px minmax(0,1fr) 44px!important}
  .period-nav .btn{min-width:0;max-width:100%;overflow:hidden}
  .period-nav .today-btn{white-space:nowrap;text-overflow:ellipsis}

  .view-switch{
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  .view-switch button{
    width:100%;min-width:0!important;display:block!important;
    color:#66716c!important;white-space:nowrap;
  }
  .view-switch button.active{color:var(--brand)!important}
  .planning-title{display:block;width:100%!important;white-space:normal}

  .mobile-week-help{
    width:100%;white-space:normal!important;overflow:visible!important;
    overflow-wrap:anywhere;line-height:1.4;
  }
  .mobile-week-scroller{
    width:100%;max-width:100%;margin:0!important;padding:0 0 8px!important;
    gap:8px;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;
    scrollbar-width:none;
  }
  .mobile-week-scroller::-webkit-scrollbar{display:none}
  .mobile-week-day{
    flex:0 0 100%!important;width:100%!important;
    min-width:100%!important;max-width:100%!important;
    scroll-snap-align:start;
  }
  .mobile-week-day-head,.mobile-timeline{width:100%;min-width:0;max-width:100%}
  .mobile-time-row{width:100%;min-width:0;max-width:100%;grid-template-columns:55px minmax(0,1fr)}
  .mobile-time-cell{width:100%;min-width:0;max-width:100%;overflow:hidden}
  .mobile-slot-card{min-width:0;max-width:100%}
}


/* === V1.2.3 : semaine mobile complète + périodes fermées === */
.pill.closed{background:#ecefee;color:#4f5955;border-color:#d5dad7}
.timeline-event.closed,.month-slot.closed{background:#e7eae8;border-color:#7f8984;color:#39433f}
.timeline-event.closed{border-left-color:#727d78}
.mobile-slot-card.closed{background:#ecefee;border-color:#737e79}
.closed-detail{background:#f1f3f2!important;border-color:#d8dcda!important}
.rider-closed-card{background:#f1f3f2!important;border-color:#d8dcda!important}
.rider-closed-card .rider-slot-time{background:#e3e7e5}

@media(max-width:720px){
  .mobile-week-full{width:100%;max-width:100%;overflow:hidden;border:1px solid var(--line);border-radius:15px;background:#fff}
  .mobile-week-grid{display:grid;grid-template-columns:42px repeat(7,minmax(0,1fr));width:100%;position:relative}
  .mobile-week-corner,.mobile-week-col-head{height:43px;border:0;border-bottom:1px solid var(--line);background:#fff;position:sticky;top:0;z-index:12}
  .mobile-week-corner{border-right:1px solid var(--line)}
  .mobile-week-col-head{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:3px 0;color:var(--ink);min-width:0}
  .mobile-week-col-head span{font-size:10px;text-transform:uppercase;font-weight:800;color:var(--muted)}
  .mobile-week-col-head strong{font-size:13px;line-height:1.1;margin-top:2px}
  .mobile-week-col-head.today{background:var(--brand);color:#fff}
  .mobile-week-col-head.today span{color:#d7e8e1}
  .mobile-week-time{height:30px;border-right:1px solid #edf0ec;border-bottom:1px solid #edf0ec;background:#fff;display:flex;align-items:flex-start;justify-content:center;padding-top:4px;font-size:8px;font-weight:850;color:#6d7974;font-variant-numeric:tabular-nums}
  .mobile-week-cell{height:30px;border-right:1px solid #edf0ec;border-bottom:1px solid #edf0ec;position:relative;background:#fff;min-width:0;overflow:visible;cursor:pointer}
  .mobile-week-cell.break{background:#fcf8f0}
  .mobile-week-cell.default-closed{background:repeating-linear-gradient(135deg,#fbfbfa,#fbfbfa 6px,#f4f4f1 6px,#f4f4f1 12px)}
  .mobile-week-event{position:absolute;z-index:6;left:2px;right:2px;top:1px;border:0;border-left:3px solid;border-radius:5px;padding:2px 1px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;line-height:1;overflow:hidden;min-width:0;box-shadow:0 1px 3px rgba(20,37,31,.08)}
  .mobile-week-event strong{font-size:9px;line-height:1;font-weight:950}
  .mobile-week-event small{font-size:6px;line-height:1.1;margin-top:2px;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
  .mobile-week-event.collective{background:#dcece4;border-color:#4d8a6e;color:#275b45}
  .mobile-week-event.individual{background:#ebe0f3;border-color:#8d68ab;color:#66447f}
  .mobile-week-event.work{background:#f4e8d4;border-color:#b48b4b;color:#755b2e}
  .mobile-week-event.closed{background:#e2e6e4;border-color:#737e79;color:#46504c}
  .mobile-week-event.cancelled{opacity:.45;text-decoration:line-through}
  .mobile-week-key{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;margin:7px 0 0;font-size:8px;color:var(--muted)}
  .mobile-week-key span{display:flex;align-items:center;gap:3px;white-space:nowrap;min-width:0}
  .mobile-week-key b{width:7px;height:7px;border-radius:2px;display:block;flex:0 0 auto}
  .mobile-week-key b.collective{background:#4d8a6e}.mobile-week-key b.individual{background:#8d68ab}.mobile-week-key b.work{background:#b48b4b}.mobile-week-key b.closed{background:#737e79}
}

/* Bacylo online V1.4 */
.price-setting{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.price-input{display:flex;align-items:center;gap:6px;min-width:110px;justify-content:flex-end}.price-input input{width:78px;text-align:right;font-weight:800}
@media(max-width:720px){
  .mobile-time-row{height:47px;min-height:47px;position:relative}
  .mobile-time-cell{height:47px;min-height:47px;overflow:visible!important;padding:0 5px}
  .mobile-slot-card{position:absolute;left:5px;right:5px;top:3px;z-index:8;overflow:hidden;align-items:flex-start;padding-top:7px}
  .mobile-slot-card.collective{min-height:88px}
  .mobile-slot-card.individual{min-height:41px}
  .mobile-time-row:has(.mobile-slot-card){z-index:4}
  .price-setting{align-items:flex-start}.price-input{min-width:96px}.price-input input{width:68px}
}
