:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;color:#25272d;background:#f4f5f7;font-synthesis:none}
*{box-sizing:border-box}html,body{min-height:100%;margin:0}button,input,select{font:inherit}button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.55}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #ffc587;outline-offset:2px}a{color:#ff7500}.initial-loader{margin:28vh auto;text-align:center;color:#666}
#app{min-height:100dvh}.shell{max-width:660px;margin:auto;min-height:100dvh;padding-bottom:24px}
.topbar{height:65px;padding:0 18px;color:#fff;display:flex;align-items:center;gap:12px;background:#ff7500;position:sticky;top:0;z-index:10;box-shadow:0 2px 12px #20171c18}.brand-mark{width:35px;height:35px;border-radius:12px;background:#ffffff25;display:grid;place-items:center;font-size:23px}.brand-name{font-weight:800;font-size:18px;letter-spacing:-.35px}.brand-sub{opacity:.85;font-size:11px}.topbar .spacer{flex:1}.head-btn{padding:8px 10px;background:#ffffff20;border:1px solid #ffffff2c;color:#fff;border-radius:12px;white-space:nowrap;font-size:13px}
.page{padding:16px 14px}.page-title{font-size:22px;font-weight:800;letter-spacing:-.5px;margin:2px 0 4px}.muted{color:#777b84}.small{font-size:12px}
.intro{margin:5px 0 20px;line-height:1.5;color:#777b84}
.card{background:#fff;border:1px solid #eceef1;border-radius:17px;padding:15px;box-shadow:0 2px 9px #28304409; min-height: 150px;}
.stack{display:grid;gap:12px}.row{display:flex;align-items:center;gap:8px}.between{justify-content:space-between}.col{display:flex;flex-direction:column;gap:5px}.grow{flex:1}.btn{border:0;border-radius:12px;background:#ff7500;color:#fff;padding:11px 14px;font-weight:750;min-height:42px}.btn.outline{background:#fff;color:#ff7500;border:1px solid #fbd2a8}.btn.soft{background:#f2f3f5;color:#30333a}.btn.tiny{font-size:12px;min-height:33px;padding:7px 10px;border-radius:9px}.btn.full{width:100%}.btn.icon{width:42px;padding:0;font-size:24px}.btn.good{background:#20855e}.btn.danger{background:#b83646}
.field{display:grid;gap:6px;font-size:13px;font-weight:650;color:#51555e}.field input,.field select{height:44px;width:100%;border:1px solid #dfe1e6;border-radius:11px;padding:8px 12px;background:white;color:#2c3039}.field input:focus,.field select:focus{border-color:#ff7500;outline:2px solid #ffd2a6}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:9px}.form-stack{display:grid;gap:13px}.login-box{max-width:430px;margin:10vh auto 0}.login-icon{width:69px;height:69px;border-radius:19px;background:#fff2e4;color:#ff7500;display:grid;place-items:center;margin:0 auto 15px;font-size:33px}.login-title{text-align:center;font-size:25px;font-weight:800}.login-caption{text-align:center;color:#81848a;font-size:13px;margin:6px 0 24px}.error{background:#fff1f1;border:1px solid #f0b7bf;border-radius:12px;color:#a3182a;padding:11px 14px;font-size:13px}.success{background:#eaf8f0;color:#126740;border:1px solid #b6e3c9;padding:11px 14px;border-radius:12px;font-size:13px}.notice{background:#fff8e9;border:1px solid #f2e0b8;border-radius:12px;padding:11px;color:#8d6025;font-size:12px;line-height:1.4}
.weekbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:15px 0 13px}.weekbar-title{text-align:center;font-size:14px;font-weight:800;line-height:1.3}.weekbar-years{font-size:11px;color:#7e838d}.weekbar button{border:1px solid #e4e5e8;background:#fff;border-radius:11px;font-weight:800;font-size:24px;height:42px;width:43px;color:#ff7500}.swipe-viewport{width:100%;overflow:hidden;touch-action:pan-y}.swipe-track{display:flex;width:300%;transform:translateX(-33.333333%);will-change:transform}.swipe-track.animating{transition:transform .25s ease}.week-panel{width:33.333333%;flex:0 0 33.333333%;min-width:0;padding:0 1px}.day{margin:0 0 16px}.day-header{background:#fff3e8;border-radius:11px;padding:12px 13px;color:#b45b00;font-weight:800;font-size:14px;display:flex;align-items:center;gap:8px;margin-bottom:10px}.slot{margin-bottom:10px}.slot-top{display:flex;align-items:center;gap:9px}
.slot-time{font-weight:850;font-size:16px}.tag{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;background:#eef7f1;color:#1e8053;font-size:12px;font-weight:800;white-space:nowrap}.tag.full{background:#eceef1;color:#67707a}.tag.empty{background:#fff1f2;color:#bd5a00}.slot-label{font-size:12px;color:#858893}.match-list{margin:11px 0;border-top:1px solid #f0f1f2;padding-top:9px;display:grid;gap:9px}.match-line{display:flex;gap:9px;align-items:flex-start;font-size:13px;line-height:1.38;color:#474b53}.match-time{width:42px;flex-shrink:0;color:#ff7500;font-weight:800}.match-name{font-weight:650}.match-serie{color:#8b8f97;font-size:11px;margin-top:2px}
.volunteers{display:flex;align-items:center;gap:7px;background:#f8f9fb;border-radius:10px;padding:9px 11px;font-size:13px;margin:8px 0 11px;color:#444953}.volunteers-label{color:#9b6c77}.action-row{display:flex;gap:7px}.action-row .btn{flex:1}.manage{margin-top:12px;border-top:1px dashed #e7e8ed;padding-top:11px}.person{display:flex;align-items:center;gap:8px;justify-content:space-between;border-bottom:1px solid #f1f2f4;padding:8px 0;font-size:13px}.person:last-child{border:0}.section-title{font-weight:800;font-size:15px;margin:20px 0 10px}.admin-menu{display:flex;gap:8px;margin:13px 0}.admin-menu button{flex:1;background:#fff;border:1px solid #e7e8ec;padding:11px 8px;border-radius:12px;font-weight:750;font-size:13px;color:#666}.admin-menu button.active{background:#ff7500;color:#fff;border-color:#ff7500}.list-empty{padding:32px 18px;color:#858991;text-align:center;background:#fff;border-radius:15px;border:1px dashed #e2e4e8}.loader{text-align:center;padding:35px}.admin-list-item{border-bottom:1px solid #f0f1f3;padding:11px 0}.admin-list-item:last-child{border:0}.footer-note{text-align:center;font-size:11px;color:#979ba3;padding:20px 0 0}.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:25px;border-radius:13px;background:#24272e;color:white;padding:12px 18px;box-shadow:0 5px 20px #0004;z-index:50;max-width:min(90vw,550px);text-align:center;font-size:13px}.toast.error-toast{background:#a21a2e}.dialog{border:0;border-radius:19px;max-width:420px;width:calc(100% - 30px);padding:20px;box-shadow:0 18px 80px #1116}.dialog::backdrop{background:#0007}.dialog-title{font-size:18px;font-weight:800;margin-bottom:12px}.pill{font-size:11px;color:#68717f;background:#f0f2f4;padding:3px 8px;border-radius:999px}.warning-inline{font-size:12px;color:#9a6426;background:#fff6e4;padding:10px;border-radius:10px;margin:9px 0}
@media(min-width:700px){.shell{margin-top:18px;min-height:calc(100dvh - 36px);border-radius:23px;overflow:hidden;background:#f8f9fa;box-shadow:0 6px 30px #2e35401a}.topbar{position:relative}.page{padding:22px 25px}}
@media(prefers-reduced-motion:reduce){.swipe-track.animating{transition:none}}


/* V1.1 : calendrier simplifié, header semaine et footer fixe. */
:root{--orange:#ff7500;color-scheme:light}
html,body{margin:0;min-height:100%;overflow-x:hidden;overflow-y:auto}
body{background:#f4f5f7;overscroll-behavior-x:none}
.shell{background:#f4f5f7;padding-bottom:calc(74px + env(safe-area-inset-bottom))}
.topbar{position:sticky;top:0;z-index:20;height:65px;padding:0 12px;gap:9px;background:var(--orange)}
.brand-mark{width:32px;height:32px;flex-shrink:0;border-radius:10px;font-size:20px}
.brand-text{min-width:0}
.brand-name{font-size:16px;line-height:1.2;white-space:nowrap}
.brand-sub{font-size:10px;white-space:nowrap}
.header-week{flex:0 1 auto;max-width:46%;text-align:right;font-size:12px;font-weight:800;line-height:1.3;
  color:#fff;padding:7px 9px;border-radius:10px;background:#fff2;white-space:normal}
.page{padding:13px 12px 28px}
.calendar-page{padding:12px 12px 20px}
.view-title{font-size:21px;font-weight:800;margin:3px 0 16px}
.bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:660px;z-index:30;
  display:flex;align-items:stretch;background:#fff;box-shadow:0 -3px 16px #22222216;
  border-top:1px solid #eee;padding:6px 8px calc(5px + env(safe-area-inset-bottom))}
.bottom-nav button{flex:1;border:0;background:transparent;color:#81858c;display:flex;flex-direction:column;align-items:center;
  justify-content:center;gap:1px;min-height:52px;font-size:11px;font-weight:700;border-radius:10px}
.bottom-nav button.active{color:var(--orange);background:#fff5ed}
.bottom-nav .nav-icon{font-size:21px;font-weight:700;line-height:23px}
.logout-btn{margin-top:19px;width:100%}
/* Swipe : 3 vrais panneaux de 100% ; seul le panneau courant détermine la hauteur. */
.swipe-viewport{width:100%;overflow:hidden;touch-action:pan-y;transition:height .30s cubic-bezier(.2,.8,.2,1)}
.swipe-track{display:flex;align-items:flex-start;width:100%;transform:translate3d(-100%,0,0);will-change:transform}
.swipe-track.animating{transition:transform .30s cubic-bezier(.22,1,.36,1)}
.week-panel{width:100%;flex:0 0 100%;min-width:0;padding:0 1px 5px}
/* Cartes : date + heure, matchs, bénévoles, sans titre de tranche. */
.slot{margin:0 0 10px;padding:13px 14px 12px;border-radius:15px;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}
.slot:focus-visible{outline:3px solid #ffbd78;outline-offset:2px}
.slot:active{background:#fffaf5}
.slot.is-mine{border-color:#ffddbb}
.slot-top{display:flex;align-items:center;justify-content:space-between;gap:9px}
.slot-time{font-size:16px;font-weight:800;text-transform:capitalize;line-height:1.2}
.slot-hour {
    font-size: 12px;
    color: #929292;
}
.date-sep{color:#c2c5c9;font-weight:500}
.tag{border-radius:999px;padding:5px 9px;font-size:12px}
.tag.full{background:#eef0f2;color:#717780}
.tag.empty{background:#fff2e8;color:#b75a00}
.match-list{display:grid;gap:7px;margin:10px 0 9px;padding-top:10px;border-top:1px solid #f0f1f2}
.match-line{display:flex;align-items:flex-start;gap:8px;font-size:13px;line-height:1.4;color:#343941}
.serie-chip{min-width:46px;max-width:80px;flex:0 0 auto;white-space:nowrap;text-align:center;
  padding:2px 6px;border-radius:6px;background:#fff1e5;color:#bd6107;font-weight:800;font-size:11px}
.match-name{font-weight:600;line-height:1.4}
.match-name .pill{margin-left:7px}
.match-time{margin-top:3px;width:auto;color:#828890;font-size:12px;font-weight:650}
.volunteers{margin:0;padding:8px 9px;font-size:12px;line-height:1.35;align-items:flex-start;background:#f8f9fa}
.volunteers-label{flex-shrink:0;color:#898f99}
/* Bottom sheet : fermeture par X, fond ou balayage vers le bas. */
.sheet-root{position:fixed;inset:0;z-index:100;pointer-events:none}
.sheet-root.is-open{pointer-events:auto}
.sheet-backdrop{position:absolute;inset:0;background:#0008;opacity:0;transition:opacity .25s ease}
.sheet-root.is-open .sheet-backdrop{opacity:1}
.sheet-panel{position:absolute;bottom:0;left:50%;width:min(100%,660px);max-height:88dvh;
  transform:translate(-50%,105%);border-radius:21px 21px 0 0;background:#fff;
  box-shadow:0 -12px 55px #0002;transition:transform .29s cubic-bezier(.22,1,.36,1);display:flex;flex-direction:column;overflow:hidden}
.sheet-root.is-open .sheet-panel{transform:translate(-50%,0)}
.sheet-handle{width:42px;height:5px;background:#d9dce1;border-radius:10px;margin:10px auto 0;flex:0 0 auto}
.sheet-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:12px 17px 14px;border-bottom:1px solid #eceef1;flex-shrink:0}
.sheet-eyebrow{font-size:11px;color:#8a8f98;font-weight:650}
.sheet-title{font-weight:850;font-size:19px;text-transform:capitalize;margin-top:4px}
.sheet-close{width:35px;height:35px;border:0;border-radius:50%;background:#f1f2f4;color:#5f636b;font-size:26px;line-height:28px}
.sheet-body{overflow-y:auto;overscroll-behavior:contain;padding:15px 17px calc(23px + env(safe-area-inset-bottom))}
.sheet-section{border-bottom:1px solid #eceef1;padding-bottom:14px;margin-bottom:15px;display:grid;gap:11px}
.sheet-section-head{display:flex;align-items:center;justify-content:space-between}
.sheet-people{display:flex;gap:7px;flex-wrap:wrap;font-size:13px;color:#494f57}
.sheet-people>span{border-radius:9px;padding:6px 9px;background:#f4f5f7}
.sheet-section .match-line{padding:0 0 9px;border-bottom:1px solid #f2f3f4}
.sheet-section .match-line:last-child{border:0;padding-bottom:0}
.sheet-section .match-name{font-size:14px}
.event-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.admin-section{margin-top:18px}
.admin-section>.manage{margin-top:0;border-top:0;padding-top:0}
.sheet-open{overflow:hidden}
.dialog{z-index:200}
@media (min-width:700px){
  .shell{margin-top:0;min-height:100dvh;overflow:visible;border-radius:0}
  .topbar{position:sticky}
  .page{padding:20px 22px 30px}
  .calendar-page{padding:16px 22px 20px}
  .header-week{font-size:14px}
  .bottom-nav{box-shadow:0 -4px 16px #2222}
  .sheet-panel{border-radius:22px 22px 0 0}
}
@media(prefers-reduced-motion:reduce){
  .swipe-track.animating,.swipe-viewport,.sheet-panel,.sheet-backdrop{transition:none}
}

.volunteers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.volunteer {
    font-size: 13px;
}

.volunteer:not(:last-child)::after {
    content: " ·";
    color: #aaa;
}

.volunteer.is-free {
    color: #aaa;
    font-style: italic;
}
.volunteers {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.calendar-page {
    min-height: calc(100dvh - 65px - 70px - env(safe-area-inset-bottom));
    touch-action: pan-y;
}

/* Glissement vertical fiable depuis l'en-tete du bottom sheet. */
.sheet-handle,
.sheet-head {
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}