/* Composants réutilisables : cartes, boutons, champs, tableaux, badges, onglets, modales */
.card { background: var(--card); border: 1px solid #e6eaf0; border-radius: var(--radius); box-shadow: var(--shadow-card); }
.card-pad { padding: 16px 18px; }
.h1 { margin: 0; font-family: var(--cond); font-size: 27px; font-weight: 700; color: var(--navy); }
.h2 { margin: 0; font-family: var(--cond); font-size: 17px; font-weight: 700; color: var(--navy); }
.h2-lg { margin: 0; font-family: var(--cond); font-size: 26px; font-weight: 700; color: var(--navy); }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

/* boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 18px; border-radius: 5px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; transition: filter .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-red { border: 0; background: var(--grad-red); color: #fff; box-shadow: var(--shadow-red); }
.btn-red:hover { filter: brightness(1.07); color: #fff; }
.btn-out { background: linear-gradient(180deg, #fff, #f5f7fa); border: 1px solid #d5dbe4; color: var(--navy); box-shadow: 0 1px 2px rgba(16, 27, 45, .06); }
.btn-out:hover { border-color: #b9c2cf; color: var(--navy); }
.btn-navy { border: 0; background: var(--grad-navy-btn); color: #fff; box-shadow: 0 4px 12px rgba(15, 26, 44, .35), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn-navy:hover { color: #fff; filter: brightness(1.15); }
.btn-green { border: 0; background: linear-gradient(180deg, #2dbb57, #179a3e); color: #fff; box-shadow: 0 4px 12px rgba(23, 154, 62, .3); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 42px; padding: 0 22px; }
.icon-btn { width: 30px; height: 30px; border-radius: 5px; border: 1px solid #dfe4eb; background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: #4d5667; box-shadow: 0 1px 2px rgba(16, 27, 45, .05); text-decoration: none; }
.icon-btn:hover { border-color: #b9c2cf; color: var(--navy); }
.icon-btn.danger:hover { color: var(--red); border-color: #f2b5b8; }

/* champs */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .field > .label { font-size: 12px; color: var(--muted); font-weight: 500; }
.field-box { display: flex; align-items: center; height: 36px; border: 1px solid var(--field-line); border-radius: 5px; background: #fff; overflow: hidden; box-shadow: inset 0 1px 2px rgba(16, 27, 45, .04); transition: border-color .15s, box-shadow .15s; }
.field-box:focus-within { border-color: #7aa2e3; box-shadow: 0 0 0 3px rgba(31, 99, 201, .12); }
.field-box > svg { margin-left: 10px; color: var(--muted); }
.field-box input, .field-box select { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; padding: 0 10px; font-size: 13.5px; color: var(--text); height: 100%; appearance: none; }
.field-box select { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7688' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; padding-right: 30px; cursor: pointer; }
.input { height: 36px; border: 1px solid var(--field-line); border-radius: 5px; background: #fff; padding: 0 10px; font: inherit; font-size: 13.5px; color: var(--text); min-width: 0; outline: none; box-shadow: inset 0 1px 2px rgba(16, 27, 45, .04); transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: #7aa2e3; box-shadow: 0 0 0 3px rgba(31, 99, 201, .12); }
select.input { appearance: none; padding-right: 30px; cursor: pointer; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7688' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.input:disabled { background: #f3f5f8; color: var(--muted); }
.field-box .suffix { display: flex; align-items: center; padding: 0 12px; height: 100%; border-left: 1px solid #dfe4eb; background: #f6f8fa; font-size: 12.5px; color: var(--muted); }
.field-box .addon { width: 38px; height: 100%; border: 0; border-left: 1px solid #dfe4eb; background: #f6f8fa; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--navy); }
textarea.textarea { width: 100%; resize: vertical; border: 1px solid var(--field-line); border-radius: 5px; padding: 12px; font-size: 13.5px; color: var(--text); outline: none; box-shadow: inset 0 1px 2px rgba(16, 27, 45, .04); min-height: 84px; }
textarea.textarea:focus { border-color: #7aa2e3; box-shadow: 0 0 0 3px rgba(31, 99, 201, .12); }
.field.invalid .field-box, .field.invalid textarea { border-color: #e8888c; }
.field .err { font-size: 11.5px; color: var(--red-text); min-height: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--red); }

/* tableaux */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 0 14px; height: 42px; font-size: 12.5px; font-weight: 600; color: var(--text-3); white-space: nowrap; background: linear-gradient(180deg, #f6f8fb, #eef1f5); border-bottom: 1px solid var(--line); }
.table td { padding: 0 14px; height: 54px; font-size: 13.5px; color: var(--text-2); border-bottom: 1px solid var(--line-2); }
.table tbody tr:nth-child(even) { background: #fbfcfd; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover { background: #f3f6fb; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .strong { font-weight: 600; color: var(--navy); }
.table .plate { font-family: var(--cond); font-size: 17px; font-weight: 700; color: var(--blue); letter-spacing: .3px; }
.table .actions { display: flex; gap: 6px; }
.car-thumb { width: 40px; height: 20px; object-fit: contain; }
.car-thumb.lg { width: 72px; height: 36px; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .12)); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.empty svg { color: #b9c2cf; margin-bottom: 8px; }

/* pagination */
.pager { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-top: 1px solid var(--line); font-size: 13px; color: #4d5667; }
.pager .pages { display: flex; gap: 6px; align-items: center; }
.pager button { min-width: 30px; height: 30px; border-radius: 5px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid #e0e5ec; color: var(--navy); background: #fff; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.pager button.on { border: 0; color: #fff; background: var(--grad-red); box-shadow: 0 3px 8px rgba(225, 29, 36, .35); }
.pager button:disabled { opacity: .45; cursor: default; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-red { background: #fdeaea; color: #d7141b; border-color: #f7c6c8; }
.b-blue { background: #e7f0fd; color: #1f63c9; border-color: #c3d8f7; }
.b-amber { background: #fff4dc; color: #c77c00; border-color: #f7dca3; }
.b-green { background: #e3f6e8; color: #1a8a3a; border-color: #b9e5c5; }
.b-grey { background: #eef0f3; color: #4d5667; border-color: #d9dde4; }
.b-orange { background: #fff0e3; color: #e0620e; border-color: #fbd2b0; }
.b-purple { background: #f2eafd; color: #7a3fc4; border-color: #dccbf6; }
.pill { display: inline-flex; align-items: center; height: 26px; padding: 0 14px; border-radius: 13px; color: #fff; font-size: 13px; font-weight: 600; }
.pill-green { background: linear-gradient(180deg, #27ae4f, #17883a); box-shadow: 0 3px 8px rgba(23, 136, 58, .33), inset 0 1px 0 rgba(255, 255, 255, .25); }
.pill-red { background: linear-gradient(180deg, #ee2830, #c9141b); box-shadow: 0 3px 8px rgba(201, 20, 27, .33), inset 0 1px 0 rgba(255, 255, 255, .25); }
.pill-grey { background: linear-gradient(180deg, #8a94a4, #6b7688); }

/* onglets style "étapes" */
.tabs { display: flex; gap: 4px; padding: 4px 4px 0; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, #eef1f5, #e8ecf1); border-bottom: 1px solid #dde2ea; }
.tab { flex: 1; height: 44px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 0; background: transparent; font-size: 14px; font-weight: 500; color: #4d5667; cursor: pointer; position: relative; border-radius: 6px 6px 0 0; }
.tab .num { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; background: #8a94a4; }
.tab.on { background: #fff; font-weight: 600; color: var(--red-text); box-shadow: 0 -1px 4px rgba(16, 27, 45, .06); }
.tab.on .num { background: var(--grad-red); box-shadow: 0 2px 6px rgba(225, 29, 36, .45); }
.tab.done .num { background: linear-gradient(180deg, #2dbb57, #179a3e); }
.tab.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, #e11d24, #ff3b41); box-shadow: 0 0 8px rgba(225, 29, 36, .5); }
.tab-panel { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; box-shadow: 0 6px 16px rgba(16, 27, 45, .05); background: #fff; }
.utabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); }
.utab { position: relative; display: flex; align-items: center; gap: 6px; height: 42px; padding: 0 16px; border: 0; background: transparent; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; text-decoration: none; }
.utab.on { color: var(--red-text); font-weight: 600; }
.utab.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 2px; background: var(--red); }

/* segmenté */
.seg { display: flex; gap: 2px; padding: 2px; border: 1px solid #dfe4eb; border-radius: 6px; background: #f6f8fa; }
.seg button { height: 32px; padding: 0 20px; border: 0; border-radius: 4px; font-size: 13px; font-weight: 600; cursor: pointer; color: #4d5667; background: transparent; }
.seg button.on { color: #fff; background: var(--grad-red); box-shadow: 0 3px 8px rgba(225, 29, 36, .35); }

/* modale */
.modal-back { position: fixed; inset: 0; background: rgba(8, 14, 26, .55); backdrop-filter: blur(2px); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; overflow-y: auto; animation: fadeIn .15s ease; }
.modal { width: min(640px, 100%); background: #fff; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); animation: popIn .2s cubic-bezier(.2, .8, .2, 1); }
.modal.wide { width: min(920px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fafbfc; border-radius: 0 0 10px 10px; }
@keyframes fadeIn { from { opacity: 0 } }
@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(.98) } }

/* toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { min-width: 280px; max-width: 420px; padding: 12px 16px; border-radius: 8px; background: #14223b; color: #fff; font-size: 13.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); display: flex; gap: 10px; align-items: flex-start; animation: popIn .2s ease; border-left: 4px solid #1f63c9; }
.toast.ok { border-left-color: #2dbb57; }
.toast.err { border-left-color: #ff3b41; }

/* page de connexion */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(ellipse at 70% 110%, rgba(225, 29, 36, .28), transparent 55%), linear-gradient(180deg, #111d31, #0a1321); }
.login-card { width: min(420px, 100%); background: #fff; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); overflow: hidden; }
.login-card .top { background: url('../assets/hero.jpg') center/cover; height: 130px; position: relative; }
.login-card .top::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, #e11d24, #ff3b41); box-shadow: 0 0 12px rgba(255, 40, 48, .8); }
.login-card form { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.form-error { background: #fdeaea; color: #b3121a; border: 1px solid #f7c6c8; padding: 10px 12px; border-radius: 6px; font-size: 13px; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: gSpin .7s linear infinite; }
.spinner.dark { border-color: rgba(20, 34, 59, .2); border-top-color: var(--navy); }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 60px; color: var(--muted); }
.utabs { overflow-x: auto; scrollbar-width: thin; }
.utabs .utab { white-space: nowrap; flex: 0 0 auto; }

/* ---------- blocs « à la Dolibarr » en bas des fiches ---------- */
.dp-wrap { padding: 0 24px 24px; }
.dp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.dp-card { overflow: hidden; }
.dp-dl { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 6px 12px; margin: 0; padding: 0 16px 14px; font-size: 13.5px; }
.dp-dl dt { color: var(--muted); }
.dp-dl dd { margin: 0; font-weight: 600; }
.dp-links { padding: 0 12px 12px; display: grid; gap: 10px; }
.dp-gh { display: flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); padding: 2px 4px; }
.dp-item { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 6px 8px; border-radius: 6px; text-decoration: none; color: inherit; font-size: 13px; }
.dp-item:hover { background: #f4f6f9; }
.dp-ev { list-style: none; margin: 0; padding: 0 16px 10px; display: grid; gap: 10px; }
.dp-ev li { display: flex; gap: 10px; font-size: 13px; }
.dp-ev .muted { font-size: 11.5px; }
.dp-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #1f63c9; margin-top: 5px; }
.dp-draft-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 24px 12px; padding: 10px 14px; border-radius: 8px; background: #fff7e6; border: 1px solid #f5d38a; color: #6b4b00; font-size: 13.5px; }
.dl-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.dl-nav button { display: block; width: 100%; text-align: start; border: 0; background: none; padding: 8px 12px; border-radius: 6px; cursor: pointer; font: inherit; font-size: 13.5px; }
.dl-nav button.on { background: #fdecec; color: #b3121a; font-weight: 600; }
.dl-nav .dl-g { font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 12px 4px; }
@media (max-width: 900px) { .dl-grid { grid-template-columns: 1fr; } }

.pa-phone { display: grid; gap: 3px; padding: 10px 12px; border-radius: 10px; background: #eef8f1; border: 1px solid #bfe3cb; font-size: 13px; } .pa-phone code { font-weight: 700; background: #fff; padding: 1px 6px; border-radius: 5px; border: 1px solid #d5e6da; }

/* ===== alerte « nouveau rendez-vous » (ERP) ===== */
#rdv-alerts { position: fixed; top: 78px; right: 18px; z-index: 1200; display: flex; flex-direction: column; gap: 12px; width: 400px; max-width: calc(100vw - 24px); pointer-events: none; }
.rdv-alert { pointer-events: auto; display: flex; gap: 14px; padding: 16px 18px; border-radius: 16px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #b3121a, #e11d24 55%, #ff4b52); box-shadow: 0 18px 40px rgba(180, 18, 26, .55), 0 0 0 2px rgba(255, 255, 255, .18) inset;
  animation: rdv-in .55s cubic-bezier(.2, 1.4, .4, 1) both, rdv-glow 1.6s ease-in-out .6s infinite; }
.rdv-alert::before { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%); transform: translateX(-100%); animation: rdv-sheen 2.6s ease-in-out .8s infinite; pointer-events: none; }
@keyframes rdv-in { from { transform: translateX(120%) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rdv-glow { 50% { box-shadow: 0 18px 46px rgba(255, 60, 70, .9), 0 0 0 5px rgba(255, 255, 255, .25) inset; } }
@keyframes rdv-sheen { to { transform: translateX(120%); } }
.rdv-alert-ic { width: 50px; height: 50px; flex: 0 0 50px; border-radius: 14px; background: rgba(0, 0, 0, .25); display: grid; place-items: center; animation: rdv-ring 1.4s ease-in-out infinite; }
@keyframes rdv-ring { 0%, 60%, 100% { transform: rotate(0); } 10% { transform: rotate(-16deg); } 20% { transform: rotate(14deg); } 30% { transform: rotate(-10deg); } 40% { transform: rotate(8deg); } }
.rdv-alert-body { position: relative; min-width: 0; }
.rdv-alert-k { font: 800 10.5px Barlow, sans-serif; letter-spacing: .14em; opacity: .95; display: flex; align-items: center; gap: 7px; }
.rdv-alert-k i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: rdv-dot 1s ease-out infinite; } @keyframes rdv-dot { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .8); } 100% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); } }
.rdv-alert-body > b { display: block; font: 800 22px/1.15 'Barlow Semi Condensed', sans-serif; margin: 3px 0; }
.rdv-alert-when { font-size: 14px; } .rdv-alert-sub { font-size: 12.5px; opacity: .9; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rdv-alert-actions { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.rdv-btn { border: 0; border-radius: 10px; padding: 9px 16px; background: #fff; color: #c8161c; font: 800 13.5px Barlow, sans-serif; cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); } .rdv-btn:hover { transform: translateY(-1px); }
.rdv-later { border: 1px solid rgba(255, 255, 255, .55); border-radius: 10px; padding: 8px 12px; background: transparent; color: #fff; font: 600 12.5px Barlow, sans-serif; cursor: pointer; }
tr.rdv-new td { background: #fff1f1; } tr.rdv-new td:first-child { box-shadow: inset 4px 0 0 #e11d24; }
/* fiche du rendez-vous */
.rdvp { display: flex; flex-direction: column; gap: 14px; }
.rdvp-head { display: flex; gap: 18px; align-items: center; padding: 14px 16px; border-radius: 14px; background: linear-gradient(120deg, #0a0e17, #1b0d11); color: #fff; }
.rdvp-head .muted { color: #b9c1ce; } .rdvp-when { text-align: center; padding-right: 18px; border-right: 1px solid rgba(255, 255, 255, .15); } .rdvp-when small { display: block; text-transform: capitalize; color: #b9c1ce; font-size: 12px; }
.rdvp-when b { font: 800 40px/1 'Barlow Semi Condensed', sans-serif; } .rdvp-when span { display: block; font-size: 11.5px; color: #b9c1ce; }
.rdvp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .rdvp-card { border: 1px solid var(--line, #e5e9f0); border-radius: 12px; padding: 12px 14px; }
.rdvp-card h4 { margin: 0 0 8px; font: 700 11px Barlow, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #6b7688; display: flex; gap: 6px; align-items: center; }
.rdvp-big { font: 700 19px 'Barlow Semi Condensed', sans-serif; display: block; margin-bottom: 4px; } .rdvp-line { display: flex; gap: 8px; align-items: center; margin: 3px 0; }
.rdvp-h { margin: 4px 0 0; font: 700 11px Barlow, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #6b7688; }
.rdvp-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rdvp-opt { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line, #e5e9f0); background: #f7f9fc; cursor: pointer; font-family: inherit; color: var(--ink, #14223b); text-decoration: none; transition: transform .15s, border-color .15s; }
.rdvp-opt:hover { transform: translateY(-2px); border-color: #14223b; } .rdvp-opt b { font-size: 14px; margin-top: 4px; } .rdvp-opt small { color: #6b7688; font-size: 11.5px; }
.rdvp-opt.ok { background: #eaf8ef; border-color: #b6e2c4; color: #14743a; } .rdvp-opt.bad { background: #fdeeee; border-color: #f2bcbc; color: #b3121a; } .rdvp-opt.warn { background: #fff5e6; border-color: #f5d29b; color: #8a5200; } .rdvp-opt.go { background: #14223b; color: #fff; border-color: #14223b; } .rdvp-opt.go small { color: #b9c1ce; }
.rdvp-sub { border: 1px dashed #b9c1ce; border-radius: 12px; padding: 12px 14px; }
@media (max-width: 760px) { .rdvp-grid, .rdvp-opts { grid-template-columns: 1fr; } #rdv-alerts { top: 64px; right: 8px; left: 8px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .rdv-alert, .rdv-alert::before, .rdv-alert-ic, .rdv-alert-k i { animation: none !important; } }

/* logos de marques (Paramètres) */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.brand-tile { border: 1px solid var(--line, #e5e9f0); border-radius: 12px; padding: 12px; text-align: center; display: grid; gap: 8px; background: #fff; } .brand-tile.has { border-color: #bfe6cc; }
.brand-tile .bl { height: 70px; display: grid; place-items: center; background: #f5f7fa; border-radius: 10px; } .brand-tile .bl img { max-width: 80%; max-height: 58px; object-fit: contain; } .brand-tile .bl span { font: 800 20px 'Barlow Semi Condensed', sans-serif; color: #b9c1ce; }

/* pavé de signature (réception) */
.sig-box { display: grid; gap: 6px; max-width: 660px; } .sig-box canvas { width: 100%; height: auto; aspect-ratio: 16 / 5; border: 2px dashed #b9c1ce; border-radius: 12px; background: #fff; touch-action: none; cursor: crosshair; }
/* rapports de scanner */
.rp-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; } .rp-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line, #e5e9f0); border-radius: 10px; background: #fff; }
.rp-list a { display: flex; align-items: center; gap: 8px; color: #1f4f9a; text-decoration: none; flex: 1; min-width: 0; } .rp-list a b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rp-list .muted { font-size: 12px; }
/* logigramme du processus atelier */
.pf { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 4px 0; padding: 4px 0 2px; }
.pf-node { position: relative; width: 86px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; padding: 8px 4px; border-radius: 12px; border: 1px solid #e3e7ee; background: #f7f9fc; }
.pf-node b { font: 700 12px 'Barlow Semi Condensed', sans-serif; color: #26324a; } .pf-node small { font-size: 10px; color: #6b7688; line-height: 1.2; min-height: 12px; }
.pf-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #e4e8ef; color: #8a94a4; }
.pf-node.done { background: #eaf8ef; border-color: #bfe6cc; } .pf-node.done .pf-ic { background: linear-gradient(180deg, #2dbb57, #179a3e); color: #fff; }
.pf-node.current { background: #fff1f1; border-color: #f2a3a6; box-shadow: 0 0 0 4px rgba(225, 29, 36, .10); } .pf-node.current .pf-ic { background: linear-gradient(180deg, #ee2830, #c9141b); color: #fff; animation: pf-pulse 1.8s ease-in-out infinite; } .pf-node.current b { color: #c9141b; }
@keyframes pf-pulse { 50% { box-shadow: 0 0 0 7px rgba(225, 29, 36, .16); } }
.pf-node.wait { background: #fff7e6; border-color: #f5c26b; }
.pf-arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 62px; width: 15px; color: #b9c1ce; position: relative; } .pf-arrow.on { color: #2dbb57; } .pf-arrow em { position: absolute; top: 4px; font: 800 8.5px Barlow, sans-serif; color: #1f9a3e; font-style: normal; letter-spacing: .06em; }
.pf-node.dec { border-color: transparent; background: transparent; padding-top: 0; } .pf-dia { width: 44px; height: 44px; display: grid; place-items: center; }
.pf-dia span { width: 32px; height: 32px; transform: rotate(45deg); display: grid; place-items: center; border-radius: 6px; background: #e4e8ef; color: #6b7688; font: 800 15px Barlow, sans-serif; } .pf-dia span::first-line { line-height: 1; }
.pf-node.dec.done .pf-dia span { background: linear-gradient(135deg, #2dbb57, #179a3e); color: #fff; } .pf-node.dec.wait .pf-dia span { background: linear-gradient(135deg, #f5a524, #d98200); color: #fff; animation: pf-pulse 1.6s ease-in-out infinite; }
.pf-branch { margin-top: 2px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 20px; font-size: 10.5px; border: 1px dashed #c7d0de; color: #8a94a6; } .pf-branch em { font: 800 8.5px Barlow, sans-serif; font-style: normal; letter-spacing: .06em; color: #c9141b; } .pf-branch.wait { border: 1px solid #f5c26b; background: #fff3d6; color: #8a5200; font-weight: 700; }
.pf-doc { margin-top: 3px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 20px; border: 1px solid #c7d0de; background: #fff; color: #1f4f9a; font: 700 10px Barlow, sans-serif; cursor: pointer; text-decoration: none; } .pf-doc:hover { border-color: #1f4f9a; background: #f2f7ff; }
.or-chips { display: flex; flex-wrap: wrap; gap: 6px; } .or-chips span { border: 1px solid #f5c26b; background: #fff7e6; color: #8a5200; border-radius: 20px; padding: 3px 10px; font-weight: 700; font-size: 12px; } .or-chips span.none { border-color: #bfe6cc; background: #eaf8ef; color: #14743a; } .or-chips span.acc { border-color: #cfd8e8; background: #f3f6fb; color: #26324a; font-weight: 600; }
.or-sign { max-height: 70px; max-width: 220px; border: 1px solid #e3e7ee; border-radius: 8px; background: #fff; padding: 4px; }
@media (max-width: 900px) { .pf-arrow { display: none; } .pf { gap: 6px; } }
/* v1.83 : bouton « Excel » des tableaux (components/table-export.js) */
.tx-bar { display: flex; justify-content: flex-end; padding: 6px 10px 2px; }
.tx-btn { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 7px; border: 1px solid #b9dcc6; background: #f1faf4; color: #15703a; font: 600 12px var(--font, 'Barlow', sans-serif); cursor: pointer; }
.tx-btn:hover { background: #def3e6; border-color: #7cc49a; }
.tx-btn:disabled { opacity: .55; cursor: progress; }
html[data-theme="dark"] .tx-btn { background: #102419; border-color: #1f5a37; color: #7fe0a6; }
@media print { .tx-bar { display: none; } }
/* v1.83 : bandeau hors ligne et invitation à installer l'application (components/offline.js) */
.off-bar { position: fixed; left: 50%; bottom: 16px; transform: translate(-50%, 140%); z-index: 900; max-width: min(640px, calc(100vw - 24px)); padding: 10px 16px; border-radius: 12px; background: #0f1b2f; color: #e8edf5; font-size: 13px; line-height: 1.4; box-shadow: 0 10px 30px rgba(0,0,0,.35); border-left: 4px solid #f5b22e; transition: transform .35s ease; }
.off-bar.on { transform: translate(-50%, 0); }
.off-bar b { color: #ffd27a; }
.off-install { position: fixed; right: 16px; bottom: 16px; z-index: 899; display: flex; align-items: center; gap: 10px; max-width: min(520px, calc(100vw - 24px)); padding: 10px 12px 10px 16px; border-radius: 12px; background: #fff; color: #14223b; font-size: 13px; box-shadow: 0 10px 30px rgba(16,27,45,.22); border: 1px solid #e4e8ef; }
.off-install button { border: 0; cursor: pointer; border-radius: 8px; font: 600 13px var(--font, 'Barlow', sans-serif); }
.off-install [data-yes] { background: #e11d24; color: #fff; padding: 7px 12px; } .off-install [data-no] { background: transparent; color: #6b7688; padding: 6px; }
html[data-theme="dark"] .off-install { background: #111a2b; color: #eef2f8; border-color: #26324a; }
@media (max-width: 820px) { .off-bar, .off-install { bottom: 76px; } }
