/* Sillage — outil de travail sobre et chaleureux : fond crème, graphite, cartes blanches à bordure fine,
   un seul accent orange réservé à ce qui demande une action (relances, leads chauds, logo). */
:root {
  --bg: #F4F3EF; --panel: #FFFFFF; --ink: #14171A; --ink-2: #3D3B37; --muted: #6B6862; --line: #E2DFD8; --line-2: #EFEDE7; --soft: #ECEAE4;
  --dark: #14171A; --dark-2: #262A2F; --dark-line: #2A2E33; --dark-ink: #B9B6AE; --dark-ink-2: #E8E6E1;
  --accent: #FF8A3D; --accent-soft: #FFF1E6; --accent-ink: #8A3A00;
  --brand: #14171A; --brand-ink: #fff; --brand-soft: #F1EFE9;
  --ok: #145C56; --ok-soft: #E3F4F2; --warn: #7A5206; --warn-soft: #FBF1DC;
  --bad: #A32020; --bad-soft: #FCEBEA; --info: #1F3F99; --info-soft: #E9EFFF;
  --src-meta: #5B8CFF; --src-tiktok: #14171A; --src-linkedin: #3FB8AF; --src-site: var(--accent);
  --radius: 14px; --radius-sm: 10px;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
p a, .small a, .callout a, .help a, .muted a { text-decoration: underline; text-decoration-color: #c9c6bd; text-underline-offset: 2px; }
h1 { font-family: var(--display); font-size: 30px; font-weight: 600; margin: 0 0 2px; letter-spacing: -.03em; line-height: 1.15; }
h2 { font-family: var(--display); font-size: 19px; font-weight: 600; margin: 0 0 14px; letter-spacing: -.03em; }
h3 { font-size: 11px; font-weight: 600; margin: 0 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
strong, b { font-weight: 600; }
code, .mono { font-family: var(--mono); font-size: 12px; font-weight: 500; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* Barre latérale */
.layout { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--dark); color: var(--dark-ink); padding: 22px 16px 16px; position: sticky; top: 0; height: 100vh;
  overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 22px; color: #F4F3EF; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; flex: none; display: block; }
.wordmark { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -.045em; line-height: 1; }
.brand.dark { color: var(--ink); padding: 0 0 18px; justify-content: center; }
/* Logo de la société qui utilise le CRM */
.org { margin: 0 0 24px; display: flex; flex-direction: column; gap: 8px; }
.org-logo { height: 64px; background: #fff; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; padding: 8px; overflow: hidden; }
.org-logo img { height: 48px; width: auto; max-width: 100%; object-fit: contain; display: block; }
.org-name { font-size: 12px; color: var(--dark-ink); padding: 0 4px; }
.org-name b { color: var(--dark-ink-2); font-weight: 500; }
.sidebar .nav { flex: 1; }
.sidebar .nav hr { border: 0; border-top: 1px solid var(--dark-line); margin: 12px 6px; }
.sidebar .nav a { display: flex; justify-content: space-between; align-items: center; min-height: 40px; color: var(--dark-ink); padding: 0 10px; border-radius: var(--radius-sm); margin-bottom: 2px; font-weight: 500; }
.sidebar .nav a:hover { background: var(--dark-2); color: #F4F3EF; text-decoration: none; }
.sidebar .nav a.active { background: var(--dark-2); color: #F4F3EF; }
.sidebar .count { background: var(--accent); color: var(--ink); border-radius: 6px; padding: 1px 7px; font-family: var(--mono); font-weight: 500; font-size: 12px; }
.sidebar .count.soft { background: none; color: var(--dark-ink); padding: 0; }
.sidebar .sync { font-size: 12px; color: var(--dark-ink); padding: 12px 6px; border-top: 1px solid var(--dark-line); display: flex; gap: 8px; align-items: center; }
.sidebar .sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--src-linkedin); flex: none; }
.sidebar .me { border-top: 1px solid var(--dark-line); padding-top: 12px; font-size: 12px; }
.sidebar .me summary { list-style: none; display: flex; gap: 10px; align-items: center; cursor: pointer; padding: 5px 6px; border-radius: var(--radius-sm); color: var(--dark-ink-2); }
.sidebar .me summary strong { font-size: 14px; font-weight: 500; }
.sidebar .me summary::-webkit-details-marker { display: none; }
.sidebar .me summary:hover { background: var(--dark-2); }
.sidebar .me .role { color: var(--dark-ink); }
.sidebar .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--dark-line); color: var(--dark-ink-2); display: grid; place-items: center; font-weight: 600; flex: none; }
.sidebar .me-menu { padding: 6px 0 0; }
.sidebar .me-menu a, .sidebar .me-menu button { display: block; width: 100%; text-align: left; color: var(--dark-ink); padding: 8px 10px; border-radius: 8px;
  background: none; border: 0; font: inherit; cursor: pointer; }
.sidebar .me-menu a:hover, .sidebar .me-menu button:hover { background: var(--dark-2); color: #F4F3EF; text-decoration: none; }

/* Zone principale */
.main { padding: 34px 40px 70px; min-width: 0; max-width: 1440px; }
.subnav { display: flex; gap: 6px; margin: -8px 0 26px; flex-wrap: wrap; }
.subnav a { padding: 8px 15px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.subnav a:hover { border-color: #cfccc4; text-decoration: none; }
.subnav a.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head .muted { font-size: 13px; }
.eyebrow { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 30px 0 14px; }
.section-head h2 { margin: 0; }
.section-head a { color: var(--muted); font-size: 13px; }

/* Cartes & grilles */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 20px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > h2 { padding: 20px 22px 4px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px 10px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.side { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
@media (max-width: 1100px) { .grid.two, .grid.three, .grid.side { grid-template-columns: 1fr; } }
@media (max-width: 800px) { .layout { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; } .main { padding: 22px 16px 50px; } }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 26px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.kpi .label { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.kpi .value { font-family: var(--display); font-size: 38px; font-weight: 600; margin-top: 8px; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.kpi .sub { font-size: 13px; color: var(--muted); margin-top: 8px; }
.kpi .sub.up { color: var(--ok); }
/* Tuile « à traiter » : pastille d'accent devant le libellé (l'accent signale une action à faire) */
.kpi.dark .label { display: flex; align-items: center; gap: 8px; }
.kpi.dark .label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.kpi.dark a { text-decoration: underline; text-underline-offset: 3px; font-size: 13px; font-weight: 500; }
.bar { height: 5px; background: var(--soft); border-radius: 99px; overflow: hidden; margin-top: 12px; }
.bar > i { display: block; height: 100%; background: var(--ink); border-radius: 99px; }

/* Tableaux */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 20px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; text-transform: uppercase; letter-spacing: .06em; padding-top: 12px; padding-bottom: 12px; }
td { border-bottom-color: var(--line-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #faf9f6; }
tfoot td { font-weight: 600; border-top: 1px solid #dcd9d1; }
.table-wrap { overflow-x: auto; }
td .sub, .cell-sub { display: block; font-size: 12px; color: var(--muted); }

/* Formulaires */
.input, select, textarea, input[type=text], input[type=email], input[type=search], input[type=date], input[type=number], input[type=password], input[type=file], input[type=url], input[type=tel], input[type=datetime-local] {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; background: #fff; color: var(--ink);
}
textarea { resize: vertical; }
.input:focus, select:focus, textarea:focus, input:focus { outline: 3px solid #ECEAE4; border-color: #B9B6AE; }
input[type=checkbox], input[type=radio] { accent-color: var(--ink); }
label { font-weight: 500; font-size: 13px; display: block; margin-bottom: 5px; color: var(--ink-2); }
.field { margin-bottom: 14px; }
.field .help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field .error, .errorlist { color: var(--bad); font-size: 12px; margin: 3px 0 0; padding: 0; list-style: none; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.checkbox { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.checkbox input { width: auto; }
ul.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
ul.checks label { font-weight: 400; display: flex; gap: 6px; align-items: center; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.filters > *, .filters > input { width: auto; min-width: 150px; }
.filters input[type=search] { min-width: 240px; }
.search { position: relative; min-width: 270px; }
.search input { padding-left: 36px; height: 42px; border-radius: var(--radius-sm); }
.search::before { content: ""; position: absolute; left: 14px; top: 50%; width: 11px; height: 11px; margin-top: -7px; border: 1.6px solid var(--muted); border-radius: 50%; }
.search::after { content: ""; position: absolute; left: 24px; top: 50%; width: 5px; height: 1.6px; margin-top: 4px; background: var(--muted); transform: rotate(45deg); }

/* Boutons & pastilles */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; color: var(--ink);
  font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #B9B6AE; text-decoration: none; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #F4F3EF; font-weight: 600; }
.btn.primary:hover { background: #000; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--ink); font-weight: 600; }
.btn.big { width: 100%; justify-content: center; height: 52px; font-size: 15px; }
.page-head .btn, .page-head .btn.primary { height: 42px; padding: 0 16px; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.small { padding: 4px 11px; font-size: 12px; border-radius: 8px; }
.btn.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pills a { padding: 6px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 13px; font-weight: 500; }
.pills a:hover { text-decoration: none; border-color: #cfccc4; }
.pills a.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--soft); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.brand { background: var(--accent-soft); color: var(--accent-ink); }
/* Statuts : Nouveau · Contacté · Devis envoyé · Gagné (charte Sillage), étapes intermédiaires dans la même famille */
.stage-new { background: #FFF1E6; color: #8A3A00; }
.stage-contacted { background: #E9EFFF; color: #1F3F99; }
.stage-interested { background: #EFEAFB; color: #4B2F96; }
.stage-quote { background: #F1EFE9; color: #3D3B37; }
.stage-negotiation { background: #FBF1DC; color: #6B4A07; }
.stage-won { background: #E3F4F2; color: #145C56; }
.stage-lost { background: #FCEBEA; color: #8F1D1D; }
.late { color: var(--bad); font-weight: 500; }
/* Relance en retard : pastille d'accent + texte graphite (l'orange sur blanc n'est pas assez lisible en texte) */
.due { color: var(--ink); font-weight: 600; white-space: nowrap; }
.due::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 0; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #B9B6AE; margin-right: 8px; vertical-align: 0; }
.dot.meta { background: var(--src-meta); } .dot.tiktok { background: var(--src-tiktok); } .dot.linkedin { background: var(--src-linkedin); }
.dot.website, .dot.web { background: var(--src-site); }
.dot.previous { background: #3D3B37; } .dot.referral { background: #8B6FD6; } .dot.import { background: #B9B6AE; } .dot.manual { background: #D6D3CB; }

/* Messages */
.messages { list-style: none; padding: 0; margin: 0 0 18px; }
.messages li { padding: 11px 16px; border-radius: 12px; margin-bottom: 8px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; }
.messages .success { background: var(--ok-soft); border-color: #cbe9da; color: #14532d; }
.messages .error { background: var(--bad-soft); border-color: #f4d0ce; color: #7f1d1d; }
.messages .warning { background: var(--warn-soft); border-color: #f1ddb2; color: #6b4a07; }

/* Historique */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { border-left: 1px solid var(--line); padding: 0 0 16px 16px; position: relative; }
.timeline li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); position: absolute; left: -5px; top: 5px; }
.timeline li.k-email::before { background: #4f7cf7; }
.timeline li.k-call::before { background: #2bb39a; }
.timeline li.k-stage::before { background: #c9c6bd; }
.timeline .meta { font-size: 12px; color: var(--muted); }
.timeline .body { white-space: pre-wrap; margin-top: 6px; background: var(--bg); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; max-height: 180px; overflow: auto; }

/* Onglets dans une page */
.tabs { display: flex; gap: 6px; margin: -4px 0 16px; flex-wrap: wrap; }
.tabs button { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.tabs button.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Pipeline */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kanban.mini { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
@media (max-width: 1100px) { .kanban.mini { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kcol { background: var(--soft); border-radius: var(--radius); padding: 12px; min-height: 140px; }
.kanban:not(.mini) .kcol { min-height: 320px; }
.kcol.drop { outline: 2px dashed var(--accent); }
.kcol header { display: flex; justify-content: space-between; font-weight: 600; margin: 4px 6px 12px; font-size: 14px; }
.kcol header .muted, .kcol header .n { font-family: var(--mono); font-weight: 500; color: var(--muted); font-size: 12px; }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; cursor: grab; display: block; color: var(--ink);
  position: relative; }
.kcard:hover { text-decoration: none; border-color: #B9B6AE; }
.kcard .t { font-weight: 600; padding-right: 14px; }
.kcard .m { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; margin-top: 4px; gap: 8px; }
.kcard .code { font-family: var(--mono); font-size: 12px; color: var(--ink-2); margin-top: 5px; }
.kcard .dot { position: absolute; top: 17px; right: 13px; margin: 0; }

.pagination { display: flex; gap: 8px; justify-content: center; align-items: center; padding: 14px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.callout { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px; }
.callout.warn { background: var(--accent-soft); border-color: #f6d9c2; }
#map { height: 620px; border-radius: var(--radius); }
/* Carte des leads */
.map-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.map-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; min-width: 62px; }
.pill-count { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.pills a.active .pill-count { background: rgba(255,255,255,.18); color: #fff; }
.map-pin { display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700;
  font-variant-numeric: tabular-nums; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(20,23,26,.35); opacity: .92; }
.map-pin:hover { opacity: 1; background: var(--accent-ink); }
.top-cities { display: flex; flex-direction: column; gap: 8px; }
.top-city { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; cursor: pointer; font: inherit; text-align: left; }
.top-city:hover { border-color: #cfccc4; }
.top-city .name { font-weight: 600; color: var(--ink); position: relative; }
.top-city .num { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; position: relative; }
.top-city .num strong { color: var(--accent-ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.top-city .num span { color: var(--muted); font-size: 11px; }
.top-city .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--bg); padding: 20px; }
.login-wrap .card { width: 380px; padding: 30px 30px 24px; }

/* Connexion : panneau graphite à gauche, formulaire sur fond crème à droite */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-side { background: var(--dark); color: var(--dark-ink-2); padding: 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.auth-side .brand { padding: 0; }
.auth-side .brand-mark { width: 40px; height: 40px; }
.auth-side .wordmark { font-size: 24px; }
.auth-pitch h1 { font-size: clamp(36px, 4.2vw, 58px); line-height: 1.02; color: #F4F3EF; margin: 0 0 22px; }
.auth-pitch p { font-size: 17px; line-height: 1.55; color: var(--dark-ink); max-width: 520px; margin: 0; }
.auth-sources { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 13px; color: var(--dark-ink); }
.auth-sources .dot.tiktok { background: #F2F0EA; }
.auth-main { background: var(--bg); display: grid; place-items: center; padding: 40px 24px; }
.auth-box { width: 100%; }
.auth-logo { height: 90px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; padding: 12px; margin-bottom: 26px; overflow: hidden; }
.auth-logo img { height: 64px; width: auto; max-width: 100%; object-fit: contain; display: block; }
.auth-title { margin-bottom: 22px; }
.auth-title h2 { font-size: 30px; margin: 0 0 4px; line-height: 1.1; }
.auth-title p { margin: 0; }
.auth-box .field { margin-bottom: 18px; }
.auth-box label { color: var(--ink); font-weight: 600; }
.auth-box .input, .auth-box input[type=text], .auth-box input[type=password] { height: 48px; padding: 0 14px; }
.auth-foot { text-align: center; font-size: 12px; color: var(--muted); margin: 22px 0 0; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-side { padding: 28px 24px; } .auth-pitch, .auth-sources { display: none; } }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 11px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.list-plain li:last-child { border-bottom: 0; }
.checks > div { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.checks label { font-weight: 400; display: flex; gap: 6px; align-items: center; }
.checks input { width: auto; }

/* Plan de salle */
.plan-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.plan-svg { width: 100%; height: auto; max-height: 72vh; display: block; touch-action: none; user-select: none; font-family: system-ui, sans-serif; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; margin: 10px 2px 0; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; border: 1px solid rgba(0,0,0,.15); }

/* Pages publiques (exposants, visiteurs) */
.public { max-width: 980px; margin: 0 auto; padding: 26px 18px 60px; }
.public-head { background: #fff; border-bottom: 1px solid var(--line); padding: 22px 0; }
.public-head .public { padding-top: 0; padding-bottom: 0; }
.public-head h1 { color: var(--ink); }
.public-head .muted { color: var(--muted); }

/* Badge */
.badge-card { max-width: 380px; margin: 24px auto; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 10px 30px rgba(17,24,39,.18); text-align: center; }
.badge-card header { background: linear-gradient(135deg, #0a5cff, #13c6f5); color: #fff; padding: 18px; }
.badge-card .qr svg { width: 240px; height: 240px; }
.badge-card .who { font-size: 22px; font-weight: 800; margin: 4px 0 0; }

/* Scan */
.scan-result { border-radius: var(--radius); padding: 22px; text-align: center; font-size: 18px; margin-bottom: 14px; }
.scan-result.ok { background: #1b7a4c; color: #fff; }
.scan-result.already { background: #f2b44b; color: #111; }
.scan-result.unknown, .scan-result.other_salon, .scan-result.error { background: #c43a2f; color: #fff; }
.scan-result .big { font-size: 30px; font-weight: 800; }
#reader { width: 100%; max-width: 480px; margin: 0 auto; border-radius: 12px; overflow: hidden; }

/* Impression bon de commande */
.doc { background: #fff; max-width: 820px; margin: 20px auto; padding: 40px 48px; border: 1px solid var(--line); border-radius: 4px; }
.doc table td, .doc table th { padding: 7px 8px; text-transform: none; letter-spacing: 0; }
@media print { .no-print, .subnav { display: none !important; } body { background: #fff; } .doc { border: 0; margin: 0; padding: 0; max-width: none; } .layout { display: block; } .sidebar { display: none; } .main { padding: 0; } }

/* Import d'un bon de commande rempli */
.import-card { max-width: 720px; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; margin-top: 6px; padding: 34px 20px;
  border: 2px dashed var(--line); border-radius: var(--radius); background: var(--bg); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.filled { border-style: solid; border-color: var(--ok); background: var(--ok-soft); }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dz-title { font-weight: 600; color: var(--ink); }
.import-wait { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--ink-2); font-weight: 500; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--soft); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.import-banner { border-left: 4px solid var(--accent); background: var(--accent-soft); }

/* Animation de validation : pouce vert */
.import-done { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(20,23,26,.55); animation: fadeIn .2s ease-out; }
.import-done-box { width: min(460px, 100%); background: var(--panel); border-radius: var(--radius); padding: 30px 28px 24px; text-align: center;
  box-shadow: 0 20px 60px rgba(20,23,26,.35); animation: boxIn .35s cubic-bezier(.2,.9,.3,1.2); }
.import-done .thumb { width: 104px; height: 104px; margin: 0 auto 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; background: #1E9E5A; box-shadow: 0 0 0 0 rgba(30,158,90,.45); animation: thumbPop .6s cubic-bezier(.2,1.4,.4,1) both, ring 1.4s .5s ease-out; }
.import-done .thumb svg { animation: thumbTilt .7s .25s ease-in-out both; transform-origin: 30% 80%; }
.import-done h2 { margin: 0 0 14px; font-size: 24px; }
.done-steps { list-style: none; padding: 0; margin: 0 0 18px; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.done-steps li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); background: var(--ok-soft); color: var(--ink);
  opacity: 0; animation: stepIn .35s var(--d) ease-out forwards; }
.done-steps .tick { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #1E9E5A; color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 13px; font-weight: 700; }
.done-actions { justify-content: center; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes boxIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes thumbPop { 0% { transform: scale(0) rotate(-25deg); } 70% { transform: scale(1.12) rotate(6deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes thumbTilt { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(-14deg); } 70% { transform: rotate(6deg); } }
@keyframes ring { to { box-shadow: 0 0 0 26px rgba(30,158,90,0); } }
@keyframes stepIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .import-done *, .import-done { animation: none !important; opacity: 1 !important; } }
