/* Le Central — Staff. Thème clair « fintech » (référence : Plum) : fond blanc,
   une seule couleur d'accent, tuiles douces, typographie ronde et généreuse. */
:root {
  --accent: #6214E8;          /* violet électrique — validé (contraste 7,7:1 avec blanc) */
  --accent-deep: #4C0BBF;
  --accent-soft: #EFE8FD;
  --ink: #17233B;             /* texte principal, bleu nuit */
  --mut: #68718A;             /* texte secondaire */
  --bg: #FFFFFF;
  --tile: #F5F6F9;            /* cartes gris très pâle */
  --line: #ECEEF3;
  --ok: #0E9F6E;
  --warn: #B54708;
  --bad: #D92D20;
  --ok-soft: #E4F7EF;  --warn-soft: #FFF3E4;  --bad-soft: #FDEAE8;
  --r: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  font-weight: 500;
}
#app { max-width: 640px; margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) 16px calc(92px + env(safe-area-inset-bottom)); }

h1 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.02rem; font-weight: 800; margin: 22px 2px 10px; display: flex; align-items: center; gap: 8px; letter-spacing: -.01em; }
h2 small { color: var(--mut); font-weight: 600; font-size: .78rem; }
.mut { color: var(--mut); font-size: .85rem; }
.sp { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
a { color: var(--accent); }

svg.ic { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

.card { background: var(--tile); border-radius: var(--r); padding: 15px; margin-bottom: 10px; }
.card.flat { background: var(--tile); }

/* Pastille d'icône dans les listes (comme les lignes Brain/Challenge de Plum) */
.icchip {
  width: 40px; height: 40px; min-width: 40px; border-radius: 13px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
}
.icchip.ok { background: var(--ok-soft); color: var(--ok); }
.icchip.warn { background: var(--warn-soft); color: var(--warn); }

/* En-tête */
.top { display: flex; justify-content: space-between; align-items: center; padding: 8px 2px 16px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand .logo {
  width: 40px; height: 40px; border-radius: 13px; background: var(--accent);
  display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 1.25rem;
}
.brand .sub { color: var(--mut); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; }
.top .who { color: var(--mut); font-weight: 700; font-size: .88rem; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; background: var(--tile); color: var(--ink);
  border-radius: 999px; padding: 11px 18px; font-size: .92rem; font-weight: 800; cursor: pointer;
  font-family: inherit; text-decoration: none;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.ok { background: var(--ok-soft); color: var(--ok); }
.btn.bad { background: var(--bad-soft); color: var(--bad); }
.btn.small { padding: 7px 13px; font-size: .8rem; }
.btn.wide { width: 100%; padding: 14px; font-size: 1rem; }
.btn:disabled { opacity: .45; }

/* Carte héros (comme « Your Plum value ») */
.hero {
  background: var(--accent); color: #fff; border-radius: 22px;
  padding: 20px 18px; margin-bottom: 12px;
}
.hero .lab { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 1.02rem; color: #E4D9FB; }
.hero .big { font-size: 2.15rem; font-weight: 800; letter-spacing: -.02em; margin: 10px 0 4px; }
.hero .sub { color: #D7C7FA; font-weight: 700; font-size: .86rem; }
.hero .cta {
  background: #fff; color: var(--accent); border: none; border-radius: 999px;
  padding: 11px 18px; font-weight: 800; font-size: .95rem; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 7px;
}
.hero.enservice { background: var(--ok); }
.hero.enservice .lab { color: #CDEFDF; } .hero.enservice .sub { color: #BDEAD4; } .hero.enservice .cta { color: var(--ok); }

/* Tuiles d'accès rapide (2 colonnes, comme Pockets/Investments) */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px; }
.tile {
  background: var(--tile); border-radius: var(--r); padding: 14px;
  display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink);
}
.tile b { font-size: .95rem; font-weight: 800; display: block; }
.tile span { color: var(--mut); font-size: .8rem; font-weight: 700; }

/* Carte de progression (comme « Get set up — 2 of 5 ») */
.progress-card {
  background: var(--accent-soft); border-radius: var(--r); padding: 14px 15px;
  display: flex; align-items: center; gap: 13px; margin-bottom: 10px;
  text-decoration: none; color: var(--ink);
}
.progress-card b { color: var(--accent); font-weight: 800; display: block; font-size: .98rem; }
.progress-card span { color: var(--ink); font-weight: 700; font-size: .84rem; }
.ring { width: 44px; height: 44px; min-width: 44px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4.5; }
.ring .track { stroke: #fff; }
.ring .val { stroke: var(--accent); stroke-linecap: round; }

/* Stats du patron */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.stat { background: var(--tile); border-radius: var(--r); padding: 12px 10px; text-align: center; }
.stat b { font-size: 1.45rem; display: block; color: var(--accent); font-weight: 800; letter-spacing: -.02em; }
.stat span { font-size: .68rem; color: var(--mut); font-weight: 700; }

/* Formulaires */
input, select, textarea {
  width: 100%; background: var(--tile); color: var(--ink);
  border: 1.5px solid transparent; border-radius: 13px; padding: 12px 13px; font-size: 1rem;
  font-family: inherit; font-weight: 600;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
input::placeholder, textarea::placeholder { color: #9AA1B5; font-weight: 500; }
label { display: block; font-size: .76rem; color: var(--mut); margin: 12px 2px 5px; font-weight: 800; letter-spacing: .02em; }
.row { display: flex; gap: 8px; } .row > * { flex: 1; }

/* Badges */
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.tag.cyan { background: var(--accent-soft); color: var(--accent); }
.tag.violet { background: var(--accent-soft); color: var(--accent); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.dot { width: 8px; height: 8px; border-radius: 99px; background: var(--ok); display: inline-block; }

/* Barres d'heures : une seule série (accent), extrémités arrondies, repères discrets */
.bar { height: 8px; border-radius: 99px; background: #fff; overflow: hidden; }
.card .bar { background: #fff; }
.progress-card .bar { background: #fff; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }
.hbars { display: flex; align-items: flex-end; gap: 8px; height: 96px; padding-top: 8px; }
.hbars .hb { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; height: 100%; }
.hbars .hb i { width: 100%; max-width: 36px; background: var(--accent); border-radius: 5px 5px 0 0; min-height: 2px; }
.hbars .hb b { font-size: .64rem; color: var(--ink); font-weight: 800; }
.hbars .hb span { font-size: .64rem; color: var(--mut); font-weight: 700; }

/* Listes */
.item { display: flex; align-items: center; gap: 11px; padding: 11px 2px; border-bottom: 1.5px solid var(--line); }
.card .item { border-color: #fff; }
.item:last-child { border-bottom: none; }
.item .grow { flex: 1; min-width: 0; }
.item .t { font-weight: 800; font-size: .94rem; }
.item .s { color: var(--mut); font-size: .78rem; margin-top: 1px; font-weight: 600; }
.done .t { text-decoration: line-through; color: var(--mut); }

/* Cases à cocher */
.chk {
  width: 27px; height: 27px; min-width: 27px; border-radius: 9px; border: 2px solid #CBD0DD;
  background: #fff; display: grid; place-items: center; color: transparent; cursor: pointer;
}
.chk svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 3.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chk.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Planning */
.dayhead { display: flex; align-items: baseline; gap: 8px; margin: 16px 2px 8px; }
.dayhead b { font-size: .95rem; font-weight: 800; }
.dayhead.today b { color: var(--accent); }
.shift { border-left: none; }
.shift.vide { box-shadow: inset 3px 0 0 var(--warn); }
.people { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; align-items: center; }
.pill { padding: 5px 12px; border-radius: 999px; font-size: .76rem; font-weight: 800; background: #fff; color: var(--ink); }
.pill.valide { background: var(--ok-soft); color: var(--ok); }
.pill.demande { background: var(--warn-soft); color: var(--warn); }

/* Navigation basse */
nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px);
  border-top: 1.5px solid var(--line);
  display: flex; justify-content: space-around;
  padding: 10px 6px calc(8px + env(safe-area-inset-bottom));
}
nav a {
  flex: 1; text-align: center; text-decoration: none; color: #9AA1B5;
  font-size: .66rem; font-weight: 800; padding: 2px 0;
}
nav a svg.ic { display: block; margin: 0 auto 3px; width: 24px; height: 24px; }
nav a.on { color: var(--accent); }

/* Connexion */
.login { min-height: 82dvh; display: flex; flex-direction: column; justify-content: center; }
.login .logo-big {
  width: 78px; height: 78px; border-radius: 26px; background: var(--accent); margin: 0 auto 16px;
  display: grid; place-items: center; font-size: 2.5rem; font-weight: 800; color: #fff;
}
.login h1 { text-align: center; font-size: 1.6rem; }
.login .sub { text-align: center; color: var(--mut); letter-spacing: .22em; text-transform: uppercase; font-size: .68rem; font-weight: 800; margin: 6px 0 26px; }

/* Divers */
.msg { padding: 11px 13px; border-radius: 13px; font-size: .85rem; margin: 10px 0; font-weight: 700; }
.msg.bad { background: var(--bad-soft); color: var(--bad); }
.msg.ok { background: var(--ok-soft); color: var(--ok); }
.fab {
  position: fixed; right: 16px; bottom: calc(94px + env(safe-area-inset-bottom)); z-index: 40;
  width: 56px; height: 56px; border-radius: 999px; border: none; background: var(--accent);
  color: #fff; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 8px 22px rgba(98, 20, 232, .35);
}
.fab svg { width: 26px; height: 26px; stroke: #fff; stroke-width: 2.5; fill: none; stroke-linecap: round; }
.sheet-bg { position: fixed; inset: 0; background: rgba(23, 35, 59, .45); z-index: 60; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-width: 640px; margin: 0 auto;
  background: #fff; border-radius: 24px 24px 0 0;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); max-height: 86dvh; overflow-y: auto;
  box-shadow: 0 -12px 40px rgba(23, 35, 59, .18);
}
.sheet h3 { margin-bottom: 6px; font-weight: 800; }
.sheet input, .sheet select, .sheet textarea { background: var(--tile); }
table.simple { width: 100%; border-collapse: collapse; font-size: .85rem; }
table.simple th { text-align: left; color: var(--mut); font-weight: 800; font-size: .7rem; padding: 6px 4px; text-transform: uppercase; letter-spacing: .03em; }
table.simple td { padding: 8px 4px; border-top: 1.5px solid #fff; font-weight: 600; }
.right { text-align: right; }

/* Sur grand écran (le Mac d'Oswald) : mise en page plus large et plus dense. */
@media (min-width: 900px) {
  #app { max-width: 980px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  nav { border-radius: 20px 20px 0 0; max-width: 980px; margin: 0 auto; }
  .hero .big { font-size: 2.6rem; }
}

/* Rangée d'onglets de « Gérer » : défilable horizontalement, sans faire glisser la page. */
.tabsrow { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 2px; scrollbar-width: none; }
.tabsrow::-webkit-scrollbar { display: none; }
.tabsrow .btn { flex: 0 0 auto; }

/* Réservations Bokun : jaune fluo, toujours en tête. Texte encre (le jaune
   ne porte jamais de texte clair). */
:root { --fluo: #E6FF1A; --fluo-deep: #C8E000; }
.resa {
  background: var(--fluo); color: var(--ink); border-radius: var(--r);
  padding: 11px 14px; margin-bottom: 8px; display: flex; align-items: center; gap: 12px;
  box-shadow: inset 4px 0 0 var(--fluo-deep);
}
.resa .h { font-weight: 800; font-size: 1.05rem; min-width: 52px; }
.resa .grow { flex: 1; min-width: 0; }
.resa .t { font-weight: 800; font-size: .92rem; }
.resa .s { font-size: .78rem; font-weight: 700; opacity: .75; }
.resa .pax { background: var(--ink); color: var(--fluo); border-radius: 999px; padding: 4px 10px; font-weight: 800; font-size: .78rem; white-space: nowrap; }
.resa-tab {
  display: block; text-decoration: none; color: var(--ink); background: var(--fluo);
  border-radius: 22px; padding: 16px 18px; margin-bottom: 12px;
}
.resa-tab .lab { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .95rem; }
.resa-tab .big { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 2px; }
.resa-tab .sub { font-weight: 700; font-size: .85rem; opacity: .8; }
.resa-tab.vide { background: var(--tile); }

/* Réservation ouverte depuis une notification. */
.resa-cible { outline: 3px solid var(--ink); outline-offset: 3px; animation: resa-pulse 1.2s ease-out 2; }
@keyframes resa-pulse { 50% { transform: scale(1.02); } }
@media (prefers-reduced-motion: reduce) { .resa-cible { animation: none; } }

/* Associé (lecture seule) : on retire tout ce qui modifie. Le serveur refuse de
   toute façon ; c'est pour ne pas proposer de boutons qui ne marcheraient pas. */
body.lecture .fab, body.lecture #punch, body.lecture #us-add, body.lecture #an-form,
body.lecture [data-sg], body.lecture [data-delan], body.lecture [data-deltask],
body.lecture [data-delev], body.lecture [data-reopen], body.lecture #hr-manuel,
body.lecture #ta-add { display: none !important; }
body.lecture .chk { pointer-events: none; opacity: .45; }
body.lecture [data-edit], body.lecture [data-sess-in] { cursor: default !important; }

/* Annonce ouverte depuis une notification. */
.annonce-cible { background: var(--accent-soft); border-radius: 12px; outline: 2px solid var(--accent); outline-offset: 2px; }

body.lecture [data-ent], body.lecture [data-entundo] { display: none !important; }
