/* BOW Chantiers : composants (cartes, boutons, formulaires, fenêtres) */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.card.flat { background: transparent; }
.card.tap { display: block; text-decoration: none; transition: border-color .15s; }
.card.tap.row { display: flex; }
@media (hover: hover) { .card.tap:hover { border-color: var(--ink); } }
.card.alert { background: var(--alert-bg); border-color: #e2b4ad; }
.card.warn { background: var(--warn-bg); border-color: #e4d09f; }
.card.ok { background: var(--ok-bg); border-color: #b9d6c5; }
.card.dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.card + .card { margin-top: 10px; }
.bar { width: 4px; align-self: stretch; border-radius: 4px; flex: none; background: var(--muted); }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  background: var(--bg-2); color: var(--ink-2); font-size: .76rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent;
}
.chip.alert { background: var(--alert); color: #fff; }
.chip.soft-alert { background: var(--alert-bg); color: var(--alert); border-color: #e2b4ad; }
.chip.warn { background: var(--warn-bg); color: var(--warn); border-color: #e4d09f; }
.chip.ok { background: var(--ok-bg); color: var(--ok); border-color: #b9d6c5; }
.chip.dark { background: var(--ink); color: var(--bg); }
.chip.line { background: transparent; border-color: var(--line-2); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
  padding: 0 20px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg);
  font-weight: 600; text-decoration: none; transition: transform .1s, background .15s; user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(.98); }
@media (hover: hover) { .btn:hover { background: var(--ink-2); } }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: .88rem; }
.btn.xs { min-height: 30px; padding: 0 11px; font-size: .8rem; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
@media (hover: hover) { .btn.ghost:hover { background: var(--bg-2); border-color: var(--ink); } }
.btn.danger { background: var(--alert); border-color: var(--alert); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid transparent; background: transparent;
  display: inline-grid; place-items: center; color: var(--ink-2); flex: none;
}
@media (hover: hover) { .icon-btn:hover { background: var(--bg-2); } }
.fab {
  position: fixed; right: 16px; bottom: calc(var(--tab-h) + var(--safe-b) + 16px); z-index: 35;
  width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg);
  display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}
.fab svg.i { width: 26px; height: 26px; }
@media (min-width: 1000px) { .fab { bottom: 28px; right: 32px; } }

.field { display: block; margin-top: 14px; }
.field > span.lbl { display: block; font-weight: 600; font-size: .86rem; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: .8rem; margin-top: 5px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--r-s);
  background: #fff; font-size: 16px; appearance: none; -webkit-appearance: none;
}
textarea.input { min-height: 90px; resize: vertical; line-height: 1.45; }
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.input:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.input.bad { border-color: var(--alert); outline-color: var(--alert); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--ink); flex: none; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.pick label { position: relative; }
.pick input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pick span {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: #fff; font-weight: 500; font-size: .92rem;
}
.pick input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pick input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.seg { display: inline-flex; background: var(--bg-2); border-radius: 999px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; }
.seg button, .seg a {
  border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: .88rem;
  color: var(--muted); text-decoration: none; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center;
}
.seg .on { background: var(--ink); color: var(--bg); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; overflow: hidden; }
.stepper button { width: 48px; height: 48px; border: 0; background: none; font-size: 1.4rem; }
.stepper input { width: 80px; text-align: center; border: 0; font-size: 1.3rem; font-weight: 600; background: transparent; min-height: 48px; }
.stepper input:focus { outline: none; }
.err-msg { background: var(--alert-bg); border: 1px solid #e2b4ad; color: #7d231a; border-radius: var(--r-s); padding: 10px 14px; margin-top: 12px; font-size: .92rem; }
.note-box { background: var(--info-bg); border-radius: var(--r-s); padding: 10px 14px; font-size: .9rem; margin-top: 12px; }
.note-box.warn { background: var(--warn-bg); color: var(--warn); }
.note-box.alert { background: var(--alert-bg); color: #7d231a; }
.note-box.ok { background: var(--ok-bg); color: var(--ok); }

.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(17, 17, 17, .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease; }
.sheet {
  background: var(--paper); width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto;
  border-radius: 22px 22px 0 0; padding: 18px 18px calc(22px + var(--safe-b)); animation: rise .22s cubic-bezier(.165, .84, .44, 1);
  -webkit-overflow-scrolling: touch;
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.sheet-head h2 { font-size: 1.2rem; }
.sheet .actions { display: flex; gap: 10px; margin-top: 22px; }
.sheet .actions .btn { flex: 1; }
@media (min-width: 700px) {
  .overlay { align-items: center; }
  .sheet { border-radius: 22px; padding-bottom: 22px; }
}
#toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b) + 12px); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
@media (min-width: 1000px) { #toasts { bottom: 24px; } }
.toast { background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-size: .92rem; font-weight: 500; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); max-width: 100%; animation: rise .2s ease; }
.toast.error { background: var(--alert); color: #fff; }
.menu { position: absolute; z-index: 90; background: var(--paper); border: 1px solid var(--line-2); border-radius: 14px; padding: 6px; min-width: 200px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.menu button, .menu a { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 10px 12px; border: 0; background: none; border-radius: 10px; text-decoration: none; font-weight: 500; }
@media (hover: hover) { .menu button:hover, .menu a:hover { background: var(--bg-2); } }
.menu .danger { color: var(--alert); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* petit oeil du mot de passe */
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-right: 50px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border: 0; background: none; border-radius: 50%; color: var(--muted); display: grid; place-items: center; }
.pw-eye:hover, .pw-eye:focus-visible { color: var(--ink); background: var(--bg-2); }
.pw-eye svg.i { width: 22px; height: 22px; }
