
/* ScoutConnect V4.2 — corrections calendrier, semaine, chat plein écran et recherche */

/* Accueil : emploi du temps de la semaine */
.v42-week-card{overflow:hidden}
.v42-week-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:14px}
.v42-week-head h3{margin:3px 0 0;font-size:23px}
.v42-week-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.v42-week-day{min-width:0;border:1px solid var(--line);border-radius:16px;background:#fbfcfa;padding:10px}
.v42-week-day.today{border-color:#85b79d;background:#edf6ef}
.v42-week-label{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.v42-week-label b{font-size:12px;text-transform:uppercase;letter-spacing:.04em}
.v42-week-label span{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:12px}
.v42-week-day.today .v42-week-label span{background:var(--forest);color:#fff}
.v42-week-events{display:grid;gap:6px}
.v42-week-event{display:block;width:100%;border:0;text-align:left;border-radius:10px;padding:7px 8px;background:#f0f5f1;font-size:11px;line-height:1.25;color:var(--text)}
.v42-week-event i{display:inline-block;width:6px;height:6px;border-radius:50%;margin-right:5px}
.v42-week-empty{font-size:11px;color:var(--muted);padding:8px 0}

/* Calendrier */
.calendar-shell .cal-day.v42-cal-day{
  -webkit-appearance:none!important;appearance:none!important;
  border:0!important;background:transparent;color:var(--text);
  display:flex!important;align-items:center!important;justify-content:center!important;
  flex-direction:column!important;padding:0!important;line-height:1!important;
  aspect-ratio:1/1;border-radius:50%;position:relative;overflow:visible;
}
.calendar-shell .cal-day.v42-cal-day>span{
  display:grid;place-items:center;position:relative;z-index:2;
  width:100%;height:100%;line-height:1!important;
}
.calendar-shell .cal-day.v42-cal-day.past-day{color:#a9b0ac}
.calendar-shell .cal-day.v42-cal-day.muted-day{color:#cbd1ce;opacity:1}
.calendar-shell .cal-day.v42-cal-day.today{
  background:var(--forest)!important;color:#fff!important;font-weight:900;
}
.calendar-shell .cal-day.v42-cal-day.today>span{transform:none!important;padding:0!important;margin:0!important}
.v42-markers{position:absolute;left:2px;right:2px;bottom:2px;z-index:3;display:flex;flex-direction:column;gap:2px;pointer-events:none}
.v42-cal-dot{width:6px;height:6px;border-radius:50%;display:block;margin:0 auto}
.v42-cal-band{height:4px;display:block;border-radius:0;margin-left:-7px;margin-right:-7px}
.v42-cal-band.band-start{border-radius:999px 0 0 999px;margin-left:2px}
.v42-cal-band.band-end{border-radius:0 999px 999px 0;margin-right:2px}
.v42-cal-band.band-single{border-radius:999px;margin:0 8px}
.v42-calendar-legend{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.v42-calendar-legend span{font-size:11px;padding:6px 9px;background:#f1f5f1;border-radius:999px;color:#596b61}
.v42-calendar-legend i{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:5px}

/* Nouvelle discussion */
.v42-chat-search{display:grid;grid-template-columns:1fr 170px;gap:8px;margin:12px 0}
.v42-participants{display:grid;gap:7px;max-height:42vh;overflow:auto;padding-right:3px}
.v42-participant{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--line);border-radius:13px;background:#fff}
.v42-participant.hidden-by-filter{display:none}
.v42-participant-main{flex:1;min-width:0}
.v42-participant-main b{display:block}
.v42-participant-main small{color:var(--muted)}
.v42-participant input{width:18px;height:18px}

/* Chat plein écran */
.v42-chat-screen{
  position:fixed;inset:0;z-index:250;background:#f6f8f5;
  display:none;grid-template-rows:auto 1fr auto;
}
.v42-chat-screen.open{display:grid}
body.v42-chat-open{overflow:hidden}
.v42-chat-top{
  display:flex;align-items:center;gap:12px;padding:14px 18px;
  padding-top:max(14px,env(safe-area-inset-top));
  background:rgba(255,255,255,.96);backdrop-filter:blur(16px);
  border-bottom:1px solid var(--line);
}
.v42-chat-back{border:0;background:#edf4ef;color:var(--forest);width:42px;height:42px;border-radius:50%;font-size:24px}
.v42-chat-title{flex:1;min-width:0}
.v42-chat-title h2{margin:0;font-size:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.v42-chat-title small{display:block;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.v42-chat-top-actions{display:flex;gap:6px}
.v42-chat-top-actions button{border:0;background:#edf4ef;border-radius:12px;padding:9px 10px;color:var(--forest);font-weight:800}
.v42-chat-body{overflow:auto;padding:22px max(18px,calc((100vw - 920px)/2));scroll-behavior:smooth}
.v42-chat-line{display:flex;align-items:flex-end;gap:8px;margin:10px 0}
.v42-chat-line.mine{justify-content:flex-end}
.v42-chat-bubble{max-width:min(680px,78%);padding:11px 13px;border-radius:18px;background:#fff;border:1px solid var(--line);box-shadow:0 3px 14px rgba(0,0,0,.03)}
.v42-chat-bubble.mine{background:#dff0e2;border-color:#cce5d2}
.v42-chat-bubble img{display:block;max-width:min(420px,100%);border-radius:13px;margin-bottom:7px}
.v42-chat-meta{font-size:10px;color:var(--muted);margin-top:5px}
.v42-chat-composer{
  display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:end;
  padding:10px max(14px,calc((100vw - 920px)/2));
  padding-bottom:max(10px,env(safe-area-inset-bottom));
  background:#fff;border-top:1px solid var(--line);
}
.v42-photo-btn{display:grid;place-items:center;width:45px;height:45px;border-radius:50%;background:#edf4ef;color:var(--forest);font-size:20px;cursor:pointer}
.v42-chat-composer textarea{resize:none;max-height:120px;border:1px solid var(--line);border-radius:18px;padding:12px 14px;background:#fafcfb}
.v42-chat-send{width:45px;height:45px;border:0;border-radius:50%;background:var(--forest);color:#fff;font-size:18px}

/* Admin renommage */
.v42-group-admin-card{margin-bottom:16px}
.v42-group-rename{display:grid;grid-template-columns:1fr auto;gap:8px}
.v42-group-rename input{min-width:0}

@media(max-width:760px){
  .v42-week-grid{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:5px}
  .v42-week-day{min-width:132px;scroll-snap-align:start}
  .v42-chat-search{grid-template-columns:1fr}
  .v42-chat-body{padding:15px 12px}
  .v42-chat-bubble{max-width:86%}
  .v42-chat-composer{padding-left:10px;padding-right:10px}
  .v42-chat-top{padding-left:10px;padding-right:10px}
  .v42-chat-top-actions button{padding:8px}
}
