:root {
  --bg: #0C0E13;
  --glass: rgba(255,255,255,.045);
  --glass-2: rgba(255,255,255,.07);
  --glass-3: rgba(255,255,255,.11);
  --stroke: rgba(255,255,255,.09);
  --txt: #F4F5F8;
  --txt-dim: #878D9B;
  --lun:#FF6B5E; --mar:#FF9F45; --mer:#EFC94C; --jeu:#4ADE80;
  --ven:#5BA8FF; --sam:#A78BFA; --dim:#F472B6;
  --ok:#4ADE80; --danger:#FF6B5E;
  --r-lg: 26px; --r-md: 18px; --r-sm: 13px;
}
* { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }
body {
  background:
    radial-gradient(1100px 650px at 12% -8%, rgba(91,168,255,.16), transparent 60%),
    radial-gradient(900px 600px at 108% 112%, rgba(167,139,250,.14), transparent 60%),
    radial-gradient(700px 500px at 50% 118%, rgba(244,114,182,.07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--txt);
  font-family:'Outfit',system-ui,sans-serif;
  min-height:100vh;
  overflow-x:hidden;
}
button { font-family:inherit; cursor:pointer; border:none; color:inherit; background:none; }
input, textarea { font-family:inherit; }

.wall { max-width:1920px; margin:0 auto; padding:26px 34px 116px;
  display:flex; flex-direction:column; gap:22px; min-height:100vh; }

/* ─── Topbar ─── */
.topbar { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.date-block .weekday { font-size:13px; font-weight:800; text-transform:uppercase;
  letter-spacing:3px; color:var(--accent-today,var(--ven)); }
.date-block .fulldate { font-size:27px; font-weight:800; letter-spacing:-.5px; }
.clock { font-size:60px; font-weight:800; letter-spacing:-3px; line-height:1;
  font-variant-numeric:tabular-nums; color:#fff; }
@supports (-webkit-background-clip: text) {
  .clock { background:linear-gradient(180deg,#fff, #A9B0C0);
    -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
  .clock small { -webkit-text-fill-color:var(--txt-dim); }
}
.clock small { font-size:22px; font-weight:700; color:var(--txt-dim); }

/* ─── Cards ─── */
.card {
  background:linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03) 55%), #161A22;
  border:1px solid rgba(255,255,255,.13);
  border-radius:var(--r-lg);
  box-shadow:0 14px 34px rgba(0,0,0,.42);
  padding:20px 22px; display:flex; flex-direction:column;
}
.card h2 { font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:2px;
  color:var(--txt-dim); margin-bottom:14px; display:flex; align-items:center; gap:9px; }
.card h2 .dot { width:8px; height:8px; border-radius:99px;
  box-shadow:0 0 12px var(--dc, transparent); background:var(--dc); }
.empty { color:var(--txt-dim); font-weight:600; font-size:14px; padding:6px 2px; }
.page-title { font-size:26px; font-weight:800; letter-spacing:-.5px;
  display:flex; align-items:center; justify-content:space-between; gap:12px; }

.btn { border-radius:14px; padding:11px 18px; font-weight:700; font-size:14px;
  transition:transform .15s ease, opacity .15s ease; }
.btn:active { transform:scale(.96); }
.btn-primary { background:linear-gradient(135deg,#fff,#D9DDE6); color:#0C0E13; }
.btn-ghost { background:var(--glass-2); border:1px solid var(--stroke); color:var(--txt-dim); }
.btn-danger { background:rgba(255,107,94,.14); color:var(--danger);
  border:1px solid rgba(255,107,94,.25); }

/* Animation d'entrée de page */
@keyframes rise { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:none; } }
#page > * { animation:rise .35s cubic-bezier(.2,.7,.3,1) both; }

/* ─── Notes ─── */
.notes-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.notes-page-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:15px; }
.note { border-radius:16px; padding:15px; font-weight:600; font-size:14px; line-height:1.4;
  color:#15171C; position:relative; transform:rotate(var(--rot,-1deg));
  box-shadow:0 8px 24px rgba(0,0,0,.35); transition:transform .2s ease; }
.note:hover { transform:rotate(0) scale(1.02); }
.note .who { display:block; font-size:10px; font-weight:800; text-transform:uppercase;
  letter-spacing:1.5px; opacity:.5; margin-top:9px; }
.note .del { position:absolute; top:7px; right:9px; background:rgba(0,0,0,.14);
  border-radius:99px; width:23px; height:23px; font-size:12px; font-weight:800;
  color:#15171C; display:grid; place-items:center; }
.note.c0 { background:linear-gradient(135deg,#FFE083,#F5C94E); }
.note.c1 { background:linear-gradient(135deg,#FFB3D1,#F58EB8); --rot:1.5deg; }
.note.c2 { background:linear-gradient(135deg,#A7F0B0,#7EDA90); --rot:-.5deg; }
.note.c3 { background:linear-gradient(135deg,#B0D6FF,#8FBEF2); --rot:1deg; }

/* ─── Calendrier ─── */
.cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:13px; }
.cal-day { background:linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.02)), #161A22;
  border:1px solid rgba(255,255,255,.13);
  box-shadow:0 12px 30px rgba(0,0,0,.4);
  border-radius:var(--r-md); overflow:hidden;
  display:flex; flex-direction:column; }
.cal-day.today { border-color:var(--c); box-shadow:0 0 30px var(--cglow), 0 12px 30px rgba(0,0,0,.4); }
.cal-head { display:flex; align-items:center; justify-content:space-between;
  padding:10px 13px; font-weight:800; font-size:14px;
  background:linear-gradient(135deg, var(--c), var(--c2)); color:#fff; }
.cal-head .plus { background:rgba(255,255,255,.25); color:#fff; width:25px; height:25px;
  border-radius:9px; font-size:15px; font-weight:800; }
.cal-body { padding:9px; display:flex; flex-direction:column; gap:7px; flex:1; min-height:84px; }
.cal-ev { display:flex; align-items:center; gap:8px; background:var(--glass-2);
  border:1px solid var(--stroke); border-left:3px solid var(--c);
  border-radius:11px; padding:8px 10px; text-align:left; width:100%; }
.cal-ev .t { font-weight:700; font-size:13px; }
.cal-ev .h { font-size:11px; color:var(--txt-dim); font-weight:700; }

/* Sélecteur de vue + navigation agenda */
.seg { display:flex; gap:4px; background:#161A22; border:1px solid rgba(255,255,255,.13);
  border-radius:13px; padding:4px; }
.seg button { padding:8px 14px; border-radius:10px; font-weight:700; font-size:13px;
  color:var(--txt-dim); }
.seg button.active { background:var(--glass-3); color:var(--txt); }
.cal-nav { display:flex; align-items:center; gap:8px; }
.cal-nav .cur { font-weight:800; font-size:16px; min-width:168px; text-align:center;
  text-transform:capitalize; }
.cal-nav .arrow { width:36px; height:36px; border-radius:11px; background:#161A22;
  border:1px solid rgba(255,255,255,.13); font-size:17px; font-weight:800; }

/* Vue mois */
.month-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:8px; }
.m-head { text-align:center; font-size:11px; font-weight:800; text-transform:uppercase;
  letter-spacing:1px; color:var(--txt-dim); padding:4px 0; }
.m-cell { min-height:98px; border-radius:14px; padding:8px; text-align:left;
  display:flex; flex-direction:column; gap:4px; overflow:hidden;
  background:linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.015)), #14181F;
  border:1px solid rgba(255,255,255,.09); color:var(--txt); }
.m-cell.out { opacity:.35; }
.m-cell.today { border-color:var(--accent-today);
  box-shadow:0 0 22px rgba(91,168,255,.22); }
.m-num { font-weight:800; font-size:13px; color:var(--txt-dim); }
.m-cell.today .m-num { color:var(--accent-today); }
.m-ev { display:flex; align-items:center; gap:4px; font-size:11px; font-weight:700;
  border-radius:7px; padding:2px 6px; background:rgba(255,255,255,.07);
  border-left:3px solid var(--c); overflow:hidden; white-space:nowrap;
  text-overflow:ellipsis; max-width:100%; }
.m-more { font-size:10px; font-weight:800; color:var(--txt-dim); }

/* Vue jour */
.day-view { display:flex; flex-direction:column; gap:10px; max-width:680px; width:100%; }
.day-view .event { width:100%; text-align:left; }

@media (max-width:900px) {
  .m-cell { min-height:60px; padding:5px; gap:3px; }
  .m-ev .t { display:none; }
  .m-ev { padding:2px 4px; }
  .cal-nav .cur { min-width:118px; font-size:13px; }
}

/* ─── Courses ─── */
.shop-add { display:flex; gap:10px; margin-bottom:16px; }
.shop-add input { flex:1; background:#161A22; border:1px solid rgba(255,255,255,.14);
  border-radius:14px; padding:13px 16px; color:var(--txt);
  font-weight:600; font-size:16px; outline:none; }
.shop-add input:focus { border-color:var(--ven); box-shadow:0 0 0 3px rgba(91,168,255,.18); }
.shop-list { display:flex; flex-direction:column; gap:9px; }
.shop-item { display:flex; align-items:center; gap:13px;
  background:linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.02)), #161A22;
  border:1px solid rgba(255,255,255,.13);
  border-radius:14px; padding:12px 15px; transition:opacity .2s ease; }
.shop-item .check { width:27px; height:27px; border-radius:10px;
  border:2px solid var(--txt-dim); display:grid; place-items:center;
  font-size:14px; color:#0C0E13; flex-shrink:0; transition:all .15s ease; }
.shop-item.done { opacity:.55; }
.shop-item.done .check { background:var(--ok); border-color:var(--ok); }
.shop-item .name { font-weight:700; font-size:16px; flex:1; }
.shop-item.done .name { text-decoration:line-through; color:var(--txt-dim); }
.shop-item .del { color:var(--txt-dim); font-size:15px; }
.subhead { font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:2px;
  color:var(--txt-dim); margin:14px 0 4px; }

/* ─── Nav ─── */
.nav { position:fixed; bottom:18px; left:50%; transform:translateX(-50%);
  display:flex; gap:6px; padding:8px;
  background:#1A1E27; border:1px solid rgba(255,255,255,.14);
  backdrop-filter:blur(20px); border-radius:22px;
  box-shadow:0 16px 44px rgba(0,0,0,.6); z-index:50; }
.nav-item { display:flex; align-items:center; gap:9px; border-radius:15px;
  padding:11px 18px; font-weight:700; font-size:14px; color:var(--txt-dim);
  transition:all .2s ease; }
.nav-item.active { background:var(--glass-3); color:var(--txt); }
.nav-item .i { font-size:19px; }

/* ─── Modale ─── */
.overlay { position:fixed; inset:0; background:rgba(6,8,12,.7);
  backdrop-filter:blur(8px); display:grid; place-items:center; padding:16px; z-index:100;
  animation:fadeIn .2s ease; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.modal { background:#171A21; border:1px solid var(--stroke);
  border-radius:24px; padding:24px; width:100%; max-width:440px;
  max-height:88vh; overflow-y:auto; animation:rise .25s ease; }
.modal h3 { font-weight:800; font-size:20px; margin-bottom:18px; letter-spacing:-.3px; }
.field { margin-bottom:15px; }
.field > span { display:block; font-size:11px; font-weight:800; text-transform:uppercase;
  letter-spacing:1.5px; color:var(--txt-dim); margin-bottom:7px; }
.field input, .field textarea { width:100%; background:var(--glass-2);
  border:1px solid var(--stroke); border-radius:13px; padding:11px 13px;
  color:var(--txt); font-weight:600; font-size:15px; outline:none; }
.field input:focus, .field textarea:focus { border-color:var(--ven);
  box-shadow:0 0 0 3px rgba(91,168,255,.14); }
.field textarea { resize:vertical; min-height:74px; }
.chips { display:flex; flex-wrap:wrap; gap:6px; }
.chip { font-weight:700; font-size:13px; padding:8px 13px; border-radius:999px;
  background:var(--glass-2); color:var(--txt-dim); border:1px solid var(--stroke); }
.chip.active { background:var(--c,#fff); color:#0C0E13; border-color:transparent; }
.icon-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }
.icon-btn { font-size:19px; padding:8px 0; border-radius:11px; background:var(--glass-2);
  border:1px solid transparent; }
.icon-btn.active { border-color:#fff; background:var(--glass-3); }
.note-colors { display:flex; gap:8px; }
.ncol { width:38px; height:38px; border-radius:12px; border:3px solid transparent; }
.ncol.active { border-color:#fff; }
.modal-actions { display:flex; gap:8px; margin-top:18px; }
.modal-actions .spacer { flex:1; }

/* ─── GSM ─── */
@media (max-width: 900px) {
  .wall { padding:16px 14px 104px; gap:15px; }
  .topbar { flex-wrap:wrap; }
  .clock { font-size:42px; order:-1; width:100%; }
  .clock small { font-size:17px; }
  .date-block .fulldate { font-size:18px; }
  .cal-grid { grid-template-columns:1fr; }
  .notes-page-grid { grid-template-columns:1fr 1fr; }
  .nav { left:10px; right:10px; transform:none; justify-content:space-around;
    gap:0; bottom:10px; }
  .nav-item { flex-direction:column; gap:2px; padding:7px 8px; font-size:10px; }
  .nav-item .i { font-size:21px; }
}

/* ─── Bannière hors-ligne ─── */
#banner .offline { position:fixed; top:0; left:0; right:0; z-index:200;
  background:#7A2B24; color:#FFD9D4; font-weight:700; font-size:13px;
  text-align:center; padding:7px 10px; font-family:'Outfit',system-ui,sans-serif; }

/* ─── Pastille profil (topbar) ─── */
.profile-pill { display:flex; align-items:center; gap:9px; padding:9px 16px;
  background:linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03)), #161A22;
  border:1px solid rgba(255,255,255,.13); border-radius:999px;
  font-weight:800; font-size:15px; box-shadow:0 10px 26px rgba(0,0,0,.4); }
.profile-pill .avatar { width:26px; height:26px; border-radius:99px;
  background:var(--pc,#5BA8FF); display:grid; place-items:center;
  color:#0C0E13; font-size:13px; font-weight:900; }

/* ─── Onglets Planning ─── */
.plan-tabs { display:flex; gap:4px; background:#161A22;
  border:1px solid rgba(255,255,255,.13); border-radius:13px; padding:4px; }
.plan-tabs button { padding:8px 16px; border-radius:10px; font-weight:800;
  font-size:13px; color:var(--txt-dim); }
.plan-tabs button.active { background:var(--glass-3); color:var(--txt); }
.plan-tabs button .dot { display:inline-block; width:8px; height:8px;
  border-radius:99px; margin-right:6px; background:var(--pc); }

/* ─── Cases-jours entièrement colorées (façon Shifter) ─── */
.m-cell { position:relative; }
.m-cell .fill { position:absolute; inset:0; border-radius:13px; opacity:.92; }
.m-cell .halves { position:absolute; inset:0; display:flex; border-radius:13px;
  overflow:hidden; }
.m-cell .halves .half { flex:1; opacity:.92; }
.m-cell .content { position:relative; z-index:1; display:flex;
  flex-direction:column; gap:3px; height:100%; }
.m-cell.painted .m-num { color:#fff; text-shadow:0 1px 3px rgba(0,0,0,.65); }
.m-cell .shift-lbl { font-size:10px; font-weight:800; color:#fff;
  text-shadow:0 1px 3px rgba(0,0,0,.65); line-height:1.15; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; }
.m-cell .m-ev { background:rgba(0,0,0,.38); color:#fff; border-left-width:3px; }

/* ─── Mode Gommette ─── */
.paint-bar { display:flex; gap:8px; align-items:center; flex-wrap:wrap;
  background:linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03)), #161A22;
  border:1px solid rgba(255,255,255,.13); border-radius:16px; padding:10px 14px; }
.paint-bar .pchip { font-weight:800; font-size:13px; padding:9px 14px;
  border-radius:999px; color:#0C0E13; opacity:.55; border:2px solid transparent; }
.paint-bar .pchip.active { opacity:1; border-color:#fff;
  box-shadow:0 0 14px rgba(255,255,255,.25); }
.paint-on .m-cell { cursor:crosshair; outline:1px dashed rgba(255,255,255,.25); }

/* ─── Bandes de shifts (vues semaine/jour/accueil) ─── */
.shift-band { display:flex; align-items:center; gap:8px; border-radius:11px;
  padding:8px 12px; font-weight:800; font-size:13px; color:#fff;
  text-shadow:0 1px 3px rgba(0,0,0,.5); }
.shift-band .h { margin-left:auto; font-size:11px; opacity:.85; }

/* ─── Tâches ─── */
.task-item { display:flex; align-items:center; gap:13px;
  background:linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.02)), #161A22;
  border:1px solid rgba(255,255,255,.13); border-radius:14px; padding:12px 15px; }
.task-item.done { opacity:.5; }
.task-item.done .t { text-decoration:line-through; }
.task-item .check { width:27px; height:27px; border-radius:10px;
  border:2px solid var(--txt-dim); display:grid; place-items:center;
  font-size:14px; color:#0C0E13; flex-shrink:0; }
.task-item.done .check { background:var(--ok); border-color:var(--ok); }
.task-item .meta { font-size:11px; color:var(--txt-dim); font-weight:700; }
.badge { display:inline-grid; place-items:center; min-width:18px; height:18px;
  border-radius:99px; background:var(--danger); color:#fff; font-size:11px;
  font-weight:800; padding:0 5px; margin-left:5px; }

/* ─── Réglages ─── */
.settings-list { display:flex; flex-direction:column; gap:12px; max-width:680px;
  margin:0 auto; width:100%; }
.set-row { display:flex; align-items:center; gap:12px; padding:13px 15px;
  background:linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.02)), #161A22;
  border:1px solid rgba(255,255,255,.13); border-radius:14px; font-weight:700; }
.set-row .grow { flex:1; }
.stype-dot { width:22px; height:22px; border-radius:8px; flex-shrink:0; }
.wk-row { display:grid; grid-template-columns:96px 1fr; gap:10px; align-items:center;
  margin-bottom:8px; font-weight:700; font-size:14px; }
.wk-row select, .field select { width:100%; background:var(--glass-2);
  border:1px solid var(--stroke); border-radius:13px; padding:11px 13px;
  color:var(--txt); font-weight:600; font-size:15px; outline:none;
  font-family:inherit; }
input[type="color"] { width:52px; height:38px; border:none; border-radius:10px;
  background:none; padding:0; cursor:pointer; }

/* ─── Événements (repris du dashboard v2, section accueil) ─── */
.events { display:flex; flex-direction:column; gap:10px; }
.event { display:flex; align-items:center; gap:13px;
  background:var(--glass-2); border:1px solid var(--stroke);
  border-radius:var(--r-md); padding:12px 15px; position:relative; overflow:hidden; }
.event::before { content:''; position:absolute; left:0; top:0; bottom:0; width:4px;
  background:var(--c); border-radius:0 4px 4px 0; box-shadow:0 0 14px var(--c); }
.event .ico { font-size:27px; }
.event .title { font-size:17px; font-weight:700; }
.event .time { margin-left:auto; font-size:17px; font-weight:800; color:var(--c);
  font-variant-numeric:tabular-nums; }

@media (max-width:900px) { .grid-home-2 { grid-template-columns:1fr !important; } }

/* ─── Lisibilité : contrôles natifs sombres + numéros de jours ─── */
html { color-scheme: dark; }
select option { background:#161A22; color:#F4F5F8; }
.m-head { color:#C9CEDB; }
.m-num { font-size:14px; color:#C9CEDB; }
.m-cell.out .m-num { color:var(--txt-dim); }
.m-cell.today .m-num { color:var(--accent-today); }
.m-cell.painted .m-num { color:#fff; }

/* ─── Jours fériés ─── */
.ferie-lbl { font-size:9px; font-weight:800; text-transform:uppercase;
  letter-spacing:.4px; color:#FF8A80; line-height:1.15; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; }
.m-cell.painted .ferie-lbl { color:#FFD9D4; text-shadow:0 1px 3px rgba(0,0,0,.65); }
.m-cell.ferie:not(.painted) { border-color:rgba(255,138,128,.35); }
.shift-band.ferie-band { background:linear-gradient(135deg,#8E3B34,#6E2B26); }

/* ─── Éditeur semaine type (type + horaires par jour) ─── */
.wk-head, .wk-row2 { display:grid; grid-template-columns:44px 1fr 96px 96px;
  gap:8px; align-items:center; margin-bottom:8px; font-weight:700; font-size:14px; }
.wk-head { margin-bottom:4px; font-size:10px; font-weight:800;
  text-transform:uppercase; letter-spacing:1px; color:var(--txt-dim); }
.wk-row2 input[type="time"] { width:100%; background:var(--glass-2);
  border:1px solid var(--stroke); border-radius:13px; padding:11px 8px;
  color:var(--txt); font-weight:600; font-size:14px; outline:none; font-family:inherit; }

/* ─── Mobile : calendrier lisible façon Shifter + gommette confortable ─── */
.m-cell { touch-action:manipulation; -webkit-tap-highlight-color:transparent;
  user-select:none; -webkit-user-select:none; }
.paint-bar .pchip, .nav-item, .btn, .chip { touch-action:manipulation; }

@media (max-width:900px) {
  .wall { padding:10px 6px 96px; gap:12px; }
  .topbar { flex-wrap:nowrap; align-items:center; gap:8px; }
  .clock { font-size:24px; order:0; width:auto; letter-spacing:-1px; }
  .clock small { display:none; }
  .date-block .weekday { font-size:10px; letter-spacing:2px; }
  .date-block .fulldate { font-size:15px; }
  .profile-pill { padding:6px; font-size:0; gap:0; }
  .profile-pill .avatar { width:30px; height:30px; font-size:14px; }

  .month-grid { gap:3px; }
  .m-cell { min-height:94px; padding:4px 3px; border-radius:10px; gap:2px; }
  .m-cell .fill, .m-cell .halves { border-radius:10px; }
  .m-num { font-size:12px; }
  .shift-lbl { font-size:9px; letter-spacing:0; white-space:normal; line-height:1.2;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
    overflow:hidden; }
  .m-ev { padding:1px 3px; font-size:10px; border-radius:5px; }
  .m-more { font-size:9px; }
  .ferie-lbl { font-size:8px; }

  .page-title { font-size:19px; gap:8px; }
  .plan-tabs button { padding:7px 10px; font-size:12px; }
  .seg button { padding:7px 10px; font-size:12px; }
  .cal-nav { gap:5px; }
  .cal-nav .cur { min-width:100px; font-size:12px; }
  .cal-nav .arrow { width:32px; height:32px; font-size:15px; }
  .btn { padding:9px 12px; font-size:13px; }

  /* Palette gommette collante : reste visible pendant qu'on peint en scrollant */
  .paint-bar { position:sticky; top:6px; z-index:40; padding:8px 10px; gap:6px;
    box-shadow:0 12px 32px rgba(0,0,0,.55); }
  .paint-bar .pchip { padding:9px 12px; font-size:12px; }
}

/* ─── Mobile : le mois tient sur un ecran (grille etiree, cellules souples) ─── */
@media (max-width:900px) {
  .m-cell { min-height:0; overflow:hidden; }
  .month-grid { grid-auto-rows:1fr; align-content:stretch; }
  .page-title { gap:6px; }
  .page-title > div { gap:6px !important; }
}

/* ─── Mobile : en-tete Planning ultra-compact (place aux cases) ─── */
@media (max-width:900px) {
  .pt-label, .btn-txt { display:none; }
  .page-title { margin:0; }
  .plan-tabs button { padding:7px 12px; }
  .cal-nav .cur { min-width:96px; }
}

/* ─── Barre Planning épurée : onglets pleine largeur, mois + bouton "+" ─── */
.plan-tabs-full { width:100%; }
.plan-tabs-full button { flex:1; }
.plan-bar { display:flex; align-items:center; gap:8px; }
.plan-bar .cal-nav .cur { font-size:17px; min-width:150px; }
.btn-plus { width:44px; height:44px; border-radius:99px; flex-shrink:0;
  background:linear-gradient(135deg,#fff,#D9DDE6); color:#0C0E13;
  font-size:24px; font-weight:800; line-height:1; display:grid; place-items:center;
  box-shadow:0 8px 22px rgba(0,0,0,.4); transition:transform .15s ease; }
.btn-plus:active { transform:scale(.92); }
@media (max-width:900px) {
  .plan-bar .cal-nav .cur { font-size:14px; min-width:0; }
  .btn-auj { padding:8px 10px; font-size:12px; }
  .btn-plus { width:40px; height:40px; font-size:22px; }
  .paint-bar .btn { padding:8px 11px; font-size:12px; }
}

/* ─── Mini-calendrier de plage (modale vacances) ─── */
.vc-cal-head { display:flex; align-items:center; justify-content:center; gap:10px;
  margin-bottom:8px; }
.vc-cal-head .cur { font-weight:800; font-size:15px; text-transform:capitalize;
  min-width:140px; text-align:center; }
.vc-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
.vc-h { text-align:center; font-size:10px; font-weight:800; color:var(--txt-dim);
  padding:2px 0; }
.vc-day { aspect-ratio:1; border-radius:10px; background:var(--glass-2);
  border:1px solid var(--stroke); font-weight:700; font-size:13px; color:var(--txt);
  touch-action:manipulation; }
.vc-day.out { opacity:.3; }
.vc-day.today { border-color:var(--ven); }
.vc-day.sel { background:#2DD4BF; color:#0C0E13; border-color:transparent; font-weight:800; }
.vc-day.range { background:rgba(45,212,191,.30); border-color:transparent; }

/* ─── iOS PWA plein écran : respect des zones sûres (encoche / barre d'accueil) ─── */
.wall { padding-top: calc(26px + env(safe-area-inset-top, 0px)); }
.nav { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
#banner .offline { padding-top: calc(7px + env(safe-area-inset-top, 0px)); }
@media (max-width:900px) {
  .wall { padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
  .nav { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
}

/* ─── Vue Lisible (variante A) : moitié haute couleurs, moitié basse texte ─── */
.l-legend { display:flex; flex-wrap:wrap; gap:5px 14px; padding:2px 2px 6px; }
.lg-chip { display:inline-flex; align-items:center; gap:5px; font-size:11px;
  font-weight:700; color:var(--txt-dim); white-space:nowrap; }
.lg-dot { width:9px; height:9px; border-radius:3px; flex-shrink:0; }
.l-cell { padding:0 !important; display:flex; flex-direction:column;
  overflow:hidden; position:relative; }
.l-colors { height:44%; min-height:26px; display:flex; flex-shrink:0;
  background:rgba(255,255,255,.03); }
.l-col { flex:1; }
.l-body { flex:1; padding:3px 4px 2px; display:flex; flex-direction:column;
  gap:2px; text-align:left; overflow:hidden;
  background:linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,.01)), #14181F; }
.l-ev { font-size:10.5px; line-height:1.25; font-weight:600; color:var(--txt);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.l-ev .l-t { color:#FF9F45; font-weight:800; }
.l-num { position:absolute; top:2px; left:5px; z-index:1; color:#fff;
  text-shadow:0 1px 3px rgba(0,0,0,.75); font-size:12px; font-weight:800; }
.l-cell.today { border-color:var(--accent-today); }
.l-cell.sel { border-color:#fff; }
.l-cp { display:grid; place-items:center; }
.l-cp-lbl { color:#04342C; font-weight:800; font-size:13px; }

/* Mode compact : jour selectionne -> calendrier retreci, panneau en dessous */
.l-grid.l-compact .l-cell { min-height:42px; }
.l-grid.l-compact .l-colors { height:6px; min-height:6px; }
.l-mini { flex:1; display:flex; align-items:center; justify-content:center;
  gap:3px; font-size:12px; font-weight:800; color:#C9CEDB;
  background:linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,.01)), #14181F; }
.l-dot { width:5px; height:5px; border-radius:99px; background:#FF9F45; }
.l-grid.l-compact .l-cell.sel .l-mini { background:#2A3242; color:#fff; }

/* Panneau du jour (cartes) */
.day-panel { margin-top:10px; display:flex; flex-direction:column; gap:8px; }
.dp-head { display:flex; align-items:center; gap:8px; font-weight:800;
  font-size:15px; text-transform:capitalize; padding:0 2px; }
.dp-ferie { color:#FF8A80; font-size:12px; font-weight:700; text-transform:none; }
.dp-head .btn { margin-left:auto; }
.dp-close { width:34px; height:34px; border-radius:11px; background:var(--glass-2);
  border:1px solid var(--stroke); color:var(--txt); font-size:15px; font-weight:800;
  flex-shrink:0; }
.dp-cards { display:flex; flex-direction:column; gap:8px; }
.dp-card { display:flex; align-items:center; gap:12px; text-align:left; width:100%;
  background:linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.02)), #161A22;
  border:1px solid rgba(255,255,255,.13); border-radius:14px; padding:11px 13px; }
.dp-ico { width:38px; height:38px; border-radius:12px; display:grid;
  place-items:center; font-weight:900; font-size:15px; color:#0C0E13; flex-shrink:0; }
.dp-ico-ev { background:var(--glass-3); font-size:20px; }
.dp-main { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; }
.dp-title { font-weight:700; font-size:14px; }
.dp-desc { font-size:12px; color:var(--txt-dim); font-weight:600; }
.dp-pill { align-self:flex-start; font-size:11px; font-weight:800; color:#0C0E13;
  border-radius:999px; padding:3px 10px; font-variant-numeric:tabular-nums; }
.dp-pill-ev { background:#FF9F45; }
