:root {
  --blue: #C62828; --blue-dark: #8E1B1B; --navy: #4A1515; --ink: #15213B; --text: #3F4B61; --muted: #5A6578;
  --line: #E4E9F2; --field: #CCD4E0; --bg: #FAF5F4; --p-soft: #FBE9E9;
  --c-blue: #1D63D8; --s-blue: #E8F0FD; --c-green: #1B8A4C; --s-green: #E6F6EC; --c-purple: #7A45D1; --s-purple: #F1EAFC;
  --c-pink: #CC2F6A; --s-pink: #FCE9F0; --c-orange: #C8620A; --s-orange: #FEF0E1; --c-teal: #11807F; --s-teal: #E1F5F4;
  --c-red: #D13C35; --s-red: #FDECEB; --c-yellow: #A87600; --s-yellow: #FFF5D6; --c-indigo: #3F51B5; --s-indigo: #EAECFA;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: #EADCDC; color: var(--ink); font-family: Nunito, "Segoe UI", system-ui, sans-serif; font-size: 16px; line-height: 1.4; -webkit-tap-highlight-color: transparent; }
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--bg); position: relative; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #F5B321; outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--muted); font-size: 13px; } .small { font-size: 13px; } .center { text-align: center; }
.hint { color: var(--muted); font-size: 13px; margin: 0; }

/* barre du haut */
.screen { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.bar { position: sticky; top: 0; z-index: 20; background: var(--blue); color: #fff; display: flex; align-items: center; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top)) 10px 8px 14px; min-height: 60px; box-shadow: 0 2px 8px rgba(142,27,27,.25); }
.bar-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bar h1 { margin: 0; font-size: 19px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar small { color: #FAD4D4; font-size: 13px; font-weight: 600; }
.bar-btn { position: relative; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; text-decoration: none; background: none; border: 0; cursor: pointer; flex-shrink: 0; }
.bar-btn:hover { background: rgba(255,255,255,.14); }
.bar-btn.dark { color: var(--ink); } .bar-btn.dark:hover { background: var(--p-soft); }
.badge { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #E53935; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.badge.static { position: static; margin-top: 4px; }

.content { flex: 1; padding: 16px 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.has-tabs .content { padding-bottom: 104px; }

/* barre d'onglets */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 20; background: #fff; border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -2px 10px rgba(90,20,20,.06); }
.tab { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; min-height: 52px; font-size: 12px; font-weight: 700; color: #6B7488; text-decoration: none; }
.tab.on { color: var(--blue); }
.tab .badge { right: calc(50% - 24px); top: 0; }

/* cartes */
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(90,20,20,.05); }
.card.list { padding: 2px 14px; }
.empty { color: var(--muted); font-size: 15px; margin: 10px 0; }
.card.empty { margin: 0; }
.greet { margin: 0; font-size: 22px; font-weight: 900; color: var(--navy); }
.hello { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.hello-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.hello-txt strong { font-size: 18px; font-weight: 900; } .hello-txt span { color: var(--muted); font-size: 14px; font-weight: 600; }
.hello > .ic { color: #8A94A6; }
.avatar { border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: var(--ink); flex-shrink: 0; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.kid-switch { display: flex; gap: 8px; }
.kid-switch button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--field); background: #fff; font-weight: 800; cursor: pointer; }
.kid-switch button[aria-pressed="true"] { background: var(--blue); color: #fff; border-color: var(--blue); }

.sec { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.sec h2 { margin: 0; font-size: 17px; font-weight: 900; color: var(--ink); }
.sec a { font-size: 14px; font-weight: 700; text-decoration: none; }
.card .sec { margin: 0 0 4px; }
h2.day { margin: 6px 0 0; font-size: 15px; font-weight: 800; color: var(--text); }

/* tuiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 96px; padding: 10px 4px;
  border-radius: 18px; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 700; text-align: center; border: 1px solid rgba(0,0,0,.03); }
.tile:active { transform: scale(.97); }
.tile .badge { top: 8px; right: 10px; }
.tile-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.t-blue { background: var(--s-blue); } .t-blue .tile-ic { color: var(--c-blue); }
.t-green { background: var(--s-green); } .t-green .tile-ic { color: var(--c-green); }
.t-purple { background: var(--s-purple); } .t-purple .tile-ic { color: var(--c-purple); }
.t-pink { background: var(--s-pink); } .t-pink .tile-ic { color: var(--c-pink); }
.t-orange { background: var(--s-orange); } .t-orange .tile-ic { color: var(--c-orange); }
.t-teal { background: var(--s-teal); } .t-teal .tile-ic { color: var(--c-teal); }
.t-red { background: var(--s-red); } .t-red .tile-ic { color: var(--c-red); }
.t-yellow { background: var(--s-yellow); } .t-yellow .tile-ic { color: var(--c-yellow); }
.t-indigo { background: var(--s-indigo); } .t-indigo .tile-ic { color: var(--c-indigo); }

/* chiffres */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; text-decoration: none; }
.stat > .ic { color: var(--muted); }
.stat b { font-size: 24px; font-weight: 900; line-height: 1.1; }
.c-blue { color: var(--c-blue); } .c-green { color: var(--c-green); } .c-pink { color: var(--c-pink); } .c-orange { color: var(--c-orange); }

/* lignes */
.row { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.row:last-child { border-bottom: 0; }
.card.row { border-bottom: 1px solid var(--line); padding: 12px 14px; }
.row.top { align-items: flex-start; }
.btnrow { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: start; cursor: pointer; }
.row-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-txt strong { font-size: 15px; font-weight: 800; }
.row-txt span { font-size: 14px; color: var(--text); }
.row-txt .muted { font-size: 12px; }
.clamp { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.row > .ic { color: #8A94A6; }
.row-ic, .motif-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.motif-ic { width: 46px; height: 46px; border-radius: 50%; }
.meta { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; color: var(--muted); font-weight: 700; flex-shrink: 0; }
.g-blue { background: var(--s-blue); color: var(--c-blue); } .g-green { background: var(--s-green); color: #146B3A; } .g-purple { background: var(--s-purple); color: var(--c-purple); }
.g-pink { background: var(--s-pink); color: #A8234F; } .g-orange { background: var(--s-orange); color: #9A4508; } .g-teal { background: var(--s-teal); color: #0C6463; }
.g-red { background: var(--s-red); color: #B42318; } .g-yellow { background: var(--s-yellow); color: #7A5600; } .g-indigo { background: var(--s-indigo); color: var(--c-indigo); }
.tag { display: inline-flex; align-items: center; align-self: flex-start; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.action { border-color: #F6D3A8; background: #FFFBF5; }

/* boutons */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; padding: 0 18px; border-radius: 16px; border: 0; cursor: pointer;
  background: var(--blue); color: #fff; font-weight: 800; font-size: 16px; text-decoration: none; box-shadow: 0 3px 10px rgba(198,40,40,.25); }
.btn:hover { background: var(--blue-dark); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-outline { background: #fff; color: var(--blue); border: 2px solid var(--blue); box-shadow: none; }
.btn-outline:hover { background: var(--p-soft); color: var(--blue-dark); }
.btn-outline.danger { color: var(--c-red); border-color: #F2B8B5; } .btn-outline.danger:hover { background: var(--s-red); }
.btn-light { background: var(--p-soft); color: var(--blue-dark); box-shadow: none; }
.btn-green { background: #1B8A4C; box-shadow: none; } .btn-green:hover { background: #146B3A; }
.solid-blue { background: var(--c-blue); } .solid-teal { background: var(--c-teal); } .solid-orange { background: var(--c-orange); }
.solid-purple { background: var(--c-purple); } .solid-pink { background: var(--c-pink); }
.btn.solid-blue, .btn.solid-teal, .btn.solid-orange, .btn.solid-purple { box-shadow: none; }
.btn.solid-blue:hover, .btn.solid-teal:hover, .btn.solid-orange:hover, .btn.solid-purple:hover { filter: brightness(.92); }
.btn-sm { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; min-width: 40px; padding: 0 12px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--p-soft); color: var(--blue-dark); font-weight: 800; font-size: 14px; text-decoration: none; flex-shrink: 0; }
.btn-sm.solid-orange, .btn-sm.solid-pink { color: #fff; }
.link { background: none; border: 0; color: var(--blue); font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; text-decoration: underline; }
.actions { display: flex; flex-direction: column; gap: 10px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fab { position: fixed; z-index: 15; bottom: calc(86px + env(safe-area-inset-bottom)); right: max(18px, calc(50% - 222px)); width: 58px; height: 58px; border-radius: 50%;
  background: var(--blue); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(198,40,40,.4); }
.fab .ic { width: 26px; height: 26px; }

/* segments */
.seg { display: flex; gap: 4px; background: #F4E6E6; border-radius: 14px; padding: 4px; }
.seg button { flex: 1; min-height: 42px; border: 0; border-radius: 11px; background: transparent; font-weight: 700; font-size: 14px; color: var(--text); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--blue); color: #fff; box-shadow: 0 2px 6px rgba(198,40,40,.25); }

/* accueil */
.welcome, .plain { min-height: 100vh; min-height: 100dvh; background: #fff; padding: calc(24px + env(safe-area-inset-top)) 22px 28px; display: flex; flex-direction: column; gap: 16px; }
.hero { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; margin-top: 24px; }
.hero svg { width: 150px; height: auto; }
.hero h1 { margin: 0; font-size: 42px; font-weight: 900; color: var(--navy); }
.hero p { margin: 0; font-size: 18px; color: var(--text); font-weight: 600; }
.welcome-art { display: flex; justify-content: center; gap: 18px; color: #fff; margin: 6px 0 auto; }
.welcome-art .ic { width: 64px; height: 64px; padding: 14px; border-radius: 20px; }
.welcome-art .ic:nth-of-type(1) { background: var(--c-blue); } .welcome-art .ic:nth-of-type(2) { background: #F0A92B; } .welcome-art .ic:nth-of-type(3) { background: var(--c-green); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.foot { margin: 0; text-align: center; color: var(--muted); font-size: 13px; font-weight: 600; }
.demo-note { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; font-size: 13px; color: var(--text); background: var(--s-yellow); border-radius: 14px; padding: 10px 12px; }
.demo-note strong { color: #7A5600; }
.plain-back { width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink); margin-left: -10px; }
.big-title { margin: 0; font-size: 28px; font-weight: 900; color: var(--navy); line-height: 1.2; }
.lead { margin: 0; color: var(--text); font-size: 16px; }
.profile { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 22px; text-decoration: none; color: var(--ink); }
.profile-art { width: 104px; height: 104px; flex-shrink: 0; } .profile-art svg { width: 100%; height: 100%; }
.profile-txt { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.profile-txt strong { font-size: 19px; font-weight: 900; } .profile-txt small { font-size: 14px; color: var(--text); line-height: 1.4; }
.p-purple { background: var(--s-purple); } .p-purple > .ic { color: var(--c-purple); }
.p-blue { background: #E3F4FB; } .p-blue > .ic { color: var(--c-blue); }
.motto { margin: auto 0 0; text-align: center; font-style: italic; font-weight: 700; color: var(--navy); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* formulaires */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-size: 15px; font-weight: 800; padding: 0; }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; border: 1px solid var(--field); border-radius: 14px; background: #fff; padding: 12px 14px; font-size: 16px; }
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: 3px solid rgba(198,40,40,.18); outline-offset: 0; }
.input-ic { position: relative; } .input-ic > .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-ic input { padding-left: 46px; }
.code { font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.error { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--s-red); color: #B42318; font-weight: 700; font-size: 14px; }
.checkline, .radio { display: flex; align-items: center; gap: 10px; font-weight: 600; min-height: 44px; }
.checkline input, .radio input { width: 22px; height: 22px; accent-color: var(--blue); }
.attach { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border-radius: 14px; border: 1.5px dashed var(--field); background: #fff; color: var(--text); font-weight: 700; cursor: pointer; font-size: 14px; }
.search { display: flex; align-items: center; gap: 8px; min-height: 50px; background: #fff; border: 1px solid var(--field); border-radius: 14px; padding: 0 14px; color: var(--muted); }
.search input { flex: 1; border: 0; outline: 0; font-size: 16px; background: transparent; min-width: 0; color: var(--ink); }

/* devoirs & annonces */
.hw, .annonce { display: flex; flex-direction: column; gap: 6px; }
.hw p, .annonce p { margin: 0; color: var(--text); font-size: 14px; }
.hw strong, .annonce strong { font-size: 16px; }
.hw-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.check { width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--field); background: #fff; color: transparent; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.check.on { background: var(--c-green); border-color: var(--c-green); color: #fff; }
.annonce.unread { border-color: #C9B3F2; box-shadow: 0 0 0 3px var(--s-purple); }
.annonce-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.annonce-foot .muted { display: inline-flex; align-items: center; gap: 4px; }

/* messagerie */
.chat .content { padding-bottom: 150px; gap: 10px; }
.daysep { align-self: center; font-size: 12px; font-weight: 700; color: var(--muted); background: #F2E7E7; padding: 4px 12px; border-radius: 999px; margin: 4px 0; }
.bubble { align-self: flex-start; max-width: 82%; display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 18px 18px 18px 6px; padding: 10px 14px; font-size: 15px; }
.bubble.mine { align-self: flex-end; background: var(--blue); color: #fff; border-color: var(--blue); border-radius: 18px 18px 6px 18px; }
.bubble small { font-size: 11px; opacity: .75; align-self: flex-end; }
.bubble .tag { background: rgba(255,255,255,.9); }
.chatbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: #fff; border-top: 1px solid var(--line); padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); z-index: 20; display: flex; flex-direction: column; gap: 6px; }
.chat-motif { display: flex; align-items: center; gap: 6px; }
.chat-row { display: flex; align-items: center; gap: 8px; }
.chat-row input { flex: 1; min-width: 0; min-height: 48px; border: 1px solid var(--field); border-radius: 24px; padding: 0 16px; font-size: 16px; }
.chat-btn, .chat-send { width: 48px; height: 48px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.chat-btn { background: var(--p-soft); color: var(--blue); } .chat-send { background: var(--blue); color: #fff; }

/* rendez-vous */
.datebox { width: 52px; height: 54px; border-radius: 14px; background: var(--p-soft); color: var(--blue-dark); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.datebox small { font-size: 11px; font-weight: 800; text-transform: capitalize; } .datebox b { font-size: 20px; font-weight: 900; line-height: 1; }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.days button { flex: 0 0 64px; min-height: 68px; border-radius: 16px; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.days button small { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: capitalize; } .days button b { font-size: 21px; font-weight: 900; }
.days button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; } .days button[aria-pressed="true"] small { color: #FAD4D4; }
.slots { display: flex; flex-direction: column; gap: 10px; }
.slot { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; border-radius: 14px; border: 1px solid #BFE3CD; background: var(--s-green); color: #146B3A; font-weight: 800; font-size: 16px; cursor: pointer; }
.slot.sel { background: var(--c-green); color: #fff; border-color: var(--c-green); }
.slot.taken { background: #EEF1F6; border-color: var(--line); color: var(--muted); justify-content: space-between; cursor: not-allowed; }
.slot.taken small { font-size: 12px; font-style: italic; }
.rdv-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.success { width: 92px; height: 92px; margin: 20px auto 0; border-radius: 50%; background: var(--c-green); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 12px var(--s-green); }

/* calendrier */
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-nav strong { font-size: 16px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-h { text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); padding: 4px 0; } .cal-h.we { color: #A6AEBD; }
.cal-d { position: relative; height: 42px; border-radius: 12px; border: 0; background: none; display: grid; place-items: center; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--ink); }
.cal-d.we { color: #A6AEBD; }
.cal-d.today { box-shadow: inset 0 0 0 2px var(--blue); }
.cal-d.sel { background: var(--blue); color: #fff; }
.dots { position: absolute; bottom: 4px; display: flex; gap: 2px; } .dots i { width: 5px; height: 5px; border-radius: 50%; }
.cal-d.sel .dots i { background: #fff !important; }
.cal-d.st-p { background: var(--s-blue); color: var(--blue-dark); } .cal-d.st-a { background: var(--c-pink); color: #fff; } .cal-d.st-r { background: #F5B321; color: var(--ink); }
.bg-blue { background: var(--c-blue); } .bg-green { background: var(--c-green); } .bg-purple { background: var(--c-purple); } .bg-pink { background: var(--c-pink); }
.bg-orange { background: var(--c-orange); } .bg-teal { background: var(--c-teal); } .bg-yellow { background: #F5B321; } .bg-red { background: var(--c-red); }
.bg-p { background: #A9C4F1; } .bg-we { background: #DDE2EA; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--text); }
.legend span { display: inline-flex; align-items: center; gap: 5px; } .legend i { width: 10px; height: 10px; border-radius: 3px; }

/* photos */
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ph { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; }
.ph svg { width: 100%; height: 100%; display: block; }
.photos.big { gap: 4px; }

/* appel */
.att { display: flex; gap: 6px; }
.att button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--field); background: #fff; font-weight: 900; cursor: pointer; color: var(--muted); }
.att .att-p[aria-pressed="true"] { background: var(--c-blue); border-color: var(--c-blue); color: #fff; }
.att .att-a[aria-pressed="true"] { background: var(--c-pink); border-color: var(--c-pink); color: #fff; }
.att .att-r[aria-pressed="true"] { background: #F5B321; border-color: #F5B321; color: var(--ink); }

/* codes */
.codebox { text-align: center; display: flex; flex-direction: column; gap: 10px; background: var(--p-soft); border: 0; }
.code-big { font-size: 38px; font-weight: 900; letter-spacing: .1em; color: var(--blue-dark); }
.codechip { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; letter-spacing: .06em; }

#toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); background: var(--ink); color: #fff; padding: 12px 18px;
  border-radius: 14px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } .tile:active { transform: none; } }

.btn-sm.solid-orange { background: var(--c-orange); } .btn-sm.solid-pink { background: var(--c-pink); }
.btn-sm.solid-orange:hover, .btn-sm.solid-pink:hover { filter: brightness(.92); }

/* ---------- application réelle ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; font-size: 30px; font-weight: 900; color: var(--blue); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; background: #F2E7E7; }
.row.grow { flex: 1; border: 0; padding: 0; min-height: 0; }
.danger-link { color: var(--c-red); align-self: center; }
input[type="file"] { padding: 10px; font-size: 14px; }

/* ---------- identité Nesma Farah ---------- */
.brand-logo { width: 150px; height: 150px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 10px 28px rgba(198,40,40,.3); }
.brand-logo span { font-family: "Reem Kufi", Tajawal, "DejaVu Sans", sans-serif; font-weight: 700; font-size: 34px; line-height: 1.15; }
.brand-logo span + span { color: #FFE3A3; }
.hero .ar { font-family: "Reem Kufi", Tajawal, sans-serif; font-size: 22px; font-weight: 700; color: var(--blue); margin: 0; }
.hero .sub { font-size: 15px; font-weight: 800; letter-spacing: .03em; color: var(--muted); }
.bar-logo { width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--blue); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; font-family: "Reem Kufi", Tajawal, sans-serif; font-weight: 700; font-size: 10px; line-height: 1.05; }
.bar h1 { display: flex; align-items: center; gap: 10px; }

/* ---------- classes ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips button { flex: 0 0 auto; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--field); background: #fff; font-weight: 800; font-size: 14px; cursor: pointer; color: var(--ink); }
.chips button[aria-pressed="true"] { background: var(--blue); color: #fff; border-color: var(--blue); }
.sec h2 .muted { font-weight: 700; }
.sec-actions { display: flex; gap: 8px; }
.move { display: flex; gap: 8px; align-items: center; }
.move select { flex: 1; min-height: 44px; border: 1px solid var(--field); border-radius: 12px; padding: 0 10px; background: #fff; font-size: 15px; min-width: 0; }
.two .btn { font-size: 15px; padding: 0 10px; }

/* ---------- pièces jointes & notifications ---------- */
.att-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.att-imgs a { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #F2E7E7; }
.att-imgs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-file { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--p-soft); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 700; min-height: 44px; }
.att-file span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-file small { color: var(--muted); font-weight: 600; }
.bubble .att-imgs { min-width: 180px; }
.bubble.mine .att-file { background: rgba(255,255,255,.18); color: #fff; } .bubble.mine .att-file small { color: #FAD4D4; }
label.chat-btn { cursor: pointer; }
.notif-card { border-color: #F6D3A8; background: #FFFBF5; }
