/* AND CONCEPT — back-office */
@font-face { font-family: "Sora"; src: url("../fonts/sora-latin.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --a: #343434; --o: #FF8A00; --c: #FF5A6E; --m: #B5126B; --p: #F8F7F5;
  --line: #e6e3de; --muted: #6b6560; --ok: #157a43; --err: #b0002f;
  --g: linear-gradient(120deg, #FF8A00, #FF5A6E, #B5126B);
  --r: .75rem;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.55 "Inter", system-ui, sans-serif; color: var(--a); background: var(--p); }
h1, h2, h3 { font-family: "Sora", system-ui, sans-serif; letter-spacing: -.02em; line-height: 1.2; }
h2 { font-size: 1.15rem; margin: 0 0 1rem; }
h3 { font-size: 1rem; margin: 0 0 .75rem; }
a { color: var(--m); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--o); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--a); color: #fff; padding: .6rem 1rem; border-radius: .5rem; z-index: 50; }
.skip-link:focus { top: 1rem; }
.icon { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.wordmark { display: inline-flex; align-items: baseline; gap: .35rem; font-family: "Sora", sans-serif; color: #fff; }
.wordmark__and { font-weight: 800; font-size: 1.35rem; }
.wordmark__concept { font-size: .7rem; letter-spacing: .3em; font-weight: 600; }
.wordmark__dot { width: .45rem; height: .45rem; border-radius: 50%; background: var(--g); align-self: center; }

/* Structure */
.adm-side {
  position: fixed; inset: 0 auto 0 0; width: 250px; background: #262626; color: #cfcac4;
  display: flex; flex-direction: column; padding: 1.25rem 1rem; overflow-y: auto; z-index: 30;
  transform: translateX(-100%); transition: transform .3s;
}
.adm-side.is-open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
.adm-brand { text-decoration: none; padding: .25rem .5rem 1rem; }
.adm-side__group { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: #8d8780; margin: 1.1rem .6rem .4rem; }
.adm-side ul { list-style: none; margin: 0; padding: 0; }
.adm-side nav a {
  display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: .6rem;
  color: #e9e5e0; text-decoration: none; font-size: .92rem;
}
.adm-side nav a:hover { background: #333; }
.adm-side nav a[aria-current="page"] { background: #fff; color: var(--a); font-weight: 600; }
.adm-side nav a[aria-current="page"] .icon { color: var(--m); }
.adm-pill { margin-left: auto; background: var(--o); color: #1b1b1b; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .05rem .5rem; }
.adm-side__site { margin-top: auto; padding: .8rem .7rem 0; color: #cfcac4; display: flex; gap: .5rem; align-items: center; font-size: .88rem; }
.adm-wrap { min-height: 100vh; }
.adm-top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem;
  padding: .75rem 1.25rem; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.adm-top__title { font-size: 1.15rem; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-top__user { display: flex; align-items: center; gap: .75rem; font-size: .88rem; }
.adm-top__user a { color: var(--a); text-decoration: none; font-weight: 600; }
.adm-top__user small { display: block; color: var(--muted); font-weight: 400; }
.adm-top__user form { margin: 0; }
.adm-burger { border: 0; background: var(--a); color: #fff; width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.adm-main { padding: 1.5rem 1.25rem 4rem; max-width: 1400px; }
@media (min-width: 64em) {
  .adm-side { transform: none; }
  .adm-wrap { margin-left: 250px; }
  .adm-burger { display: none; }
  .adm-main { padding: 2rem 2.25rem 4rem; }
}
@media (max-width: 40em) { .adm-top__user small, .adm-top__user a { display: none; } }

/* Composants */
.adm-card { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem; }
.adm-card + .adm-card { margin-top: 1.25rem; }
.adm-grid { display: grid; gap: 1.25rem; }
@media (min-width: 48em) { .adm-grid--2 { grid-template-columns: 1fr 1fr; } .adm-grid--3 { grid-template-columns: repeat(3, 1fr); } .adm-grid--side { grid-template-columns: 2fr 1fr; align-items: start; } }
@media (min-width: 64em) { .adm-grid--4 { grid-template-columns: repeat(4, 1fr); } }
.adm-kpi { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: 1.1rem 1.25rem; position: relative; overflow: hidden; text-decoration: none; color: inherit; display: block; }
.adm-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--g); }
.adm-kpi strong { display: block; font: 700 2rem/1.1 "Sora", sans-serif; }
.adm-kpi span { color: var(--muted); font-size: .85rem; }
.adm-kpi small { display: block; margin-top: .3rem; font-size: .78rem; color: var(--muted); }
a.adm-kpi:hover { border-color: var(--a); }

.adm-head { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.adm-head p { margin: 0; color: var(--muted); }

.adm-btn {
  display: inline-flex; align-items: center; gap: .45rem; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--a); color: #fff; padding: .6rem 1.1rem; font: 600 .88rem "Sora", sans-serif; text-decoration: none; white-space: nowrap;
}
.adm-btn:hover { background: #1f1f1f; }
.adm-btn--accent { background: var(--g); color: #fff; }
.adm-btn--ghost { background: transparent; color: var(--a); box-shadow: inset 0 0 0 1.5px var(--line); }
.adm-btn--ghost:hover { background: #fff; box-shadow: inset 0 0 0 1.5px var(--a); }
.adm-btn--danger { background: #fff; color: var(--err); box-shadow: inset 0 0 0 1.5px #f1c4cf; }
.adm-btn--danger:hover { background: #fdeef1; }
.adm-btn--sm { padding: .35rem .8rem; font-size: .78rem; }
.adm-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.adm-actions form { margin: 0; }

.adm-alert { padding: .85rem 1.1rem; border-radius: .75rem; margin-bottom: 1.25rem; font-weight: 500; }
.adm-alert--ok { background: #ecf7f0; color: var(--ok); border: 1px solid #bfe3cc; }
.adm-alert--err { background: #fdeef1; color: #8a0025; border: 1px solid #f5c2cd; }
.adm-alert--warn { background: #fff6eb; color: #7a4100; border: 1px solid #ffdcb0; }

/* Tableaux */
.adm-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 1rem; }
.adm-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.adm-table th, .adm-table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.adm-table th { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: #fbfaf8; font-weight: 600; white-space: nowrap; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-table tbody tr:hover { background: #fcfbfa; }
.adm-table a { color: var(--a); font-weight: 600; text-decoration: none; }
.adm-table a:hover { text-decoration: underline; }
.adm-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.adm-muted { color: var(--muted); font-size: .85rem; }
.adm-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: .4rem; background: var(--p); }

/* Statuts */
.st { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; background: #eee; }
.st::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.st--new { background: #fff1e0; color: #a35400; }
.st--to_qualify { background: #fff6d6; color: #806000; }
.st--contacted { background: #e7f0ff; color: #1d4fa8; }
.st--quote_to_prepare { background: #f3e8ff; color: #6a2fb0; }
.st--quote_sent { background: #fde7f1; color: var(--m); }
.st--negotiation { background: #e8f6f6; color: #0d6b6b; }
.st--won { background: #e3f5ea; color: var(--ok); }
.st--lost { background: #f0eeec; color: #6b6560; }
.tag { display: inline-block; padding: .1rem .5rem; border-radius: .35rem; background: var(--p); border: 1px solid var(--line); font-size: .75rem; }
.tag--demo { background: #fff6eb; border-color: #ffdcb0; color: #7a4100; }
.tag--draft { background: #f0eeec; }
.tag--live { background: #e3f5ea; border-color: #bfe3cc; color: var(--ok); }

/* Filtres */
.adm-filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-bottom: 1rem; }
.adm-filters .adm-field { margin: 0; min-width: 9rem; }
.adm-filters .adm-field--grow { flex: 1; min-width: 14rem; }
.adm-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.adm-tabs a { padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--a); text-decoration: none; font-size: .82rem; font-weight: 500; }
.adm-tabs a[aria-current="true"] { background: var(--a); color: #fff; border-color: var(--a); }
.adm-pager { display: flex; gap: .4rem; justify-content: center; margin-top: 1rem; }
.adm-pager a, .adm-pager span { padding: .35rem .75rem; border-radius: .5rem; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--a); font-size: .85rem; }
.adm-pager span { background: var(--a); color: #fff; }

/* Formulaires */
.adm-form { display: grid; gap: 1rem; }
.adm-field { display: grid; gap: .35rem; margin: 0; }
.adm-field > label { font-weight: 600; font-size: .88rem; }
.adm-field input:not([type=checkbox]):not([type=radio]):not([type=file]), .adm-field select, .adm-field textarea, .adm-filters input, .adm-filters select {
  width: 100%; padding: .6rem .8rem; border: 1.5px solid #d9d5cf; border-radius: .6rem; font: inherit; background: #fff; color: var(--a);
}
.adm-field textarea { resize: vertical; line-height: 1.5; }
.adm-field input:focus, .adm-field select:focus, .adm-field textarea:focus { outline: none; border-color: var(--a); box-shadow: 0 0 0 3px rgba(255,138,0,.25); }
.adm-field [aria-invalid="true"] { border-color: var(--err) !important; }
.adm-code { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.adm-field--check label { display: flex; gap: .55rem; align-items: center; font-weight: 500; cursor: pointer; }
.adm-field--check input { width: 1.1rem; height: 1.1rem; accent-color: var(--m); }
.adm-help { margin: 0; font-size: .8rem; color: var(--muted); }
.adm-error { margin: 0; font-size: .8rem; color: var(--err); font-weight: 600; }
.adm-req { color: var(--m); }
.adm-image { display: grid; gap: .5rem; padding: .75rem; border: 1.5px dashed #d9d5cf; border-radius: .6rem; background: #fff; }
.adm-image img { max-height: 140px; width: auto; border-radius: .4rem; background: var(--p); }
.adm-inline { display: flex; gap: .4rem; align-items: center; font-size: .82rem; }
.adm-checks { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.adm-checks label { display: flex; gap: .4rem; align-items: center; font-size: .9rem; }
.adm-sticky-save { position: sticky; bottom: 0; padding: .9rem 0; background: linear-gradient(transparent, var(--p) 30%); display: flex; gap: .6rem; flex-wrap: wrap; }
fieldset.adm-card { margin: 0; }
fieldset.adm-card legend { font: 700 1rem "Sora", sans-serif; padding: 0 .4rem; }

/* Tableau de bord */
.bars { display: flex; align-items: flex-end; gap: .6rem; height: 160px; padding-top: 1rem; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .35rem; height: 100%; justify-content: flex-end; }
.bars i { display: block; width: 100%; max-width: 46px; border-radius: .4rem .4rem .1rem .1rem; background: var(--g); min-height: 3px; }
.bars b { font-size: .8rem; }
.bars span { font-size: .72rem; color: var(--muted); }
.hbars { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.hbars li { display: grid; grid-template-columns: minmax(8rem, 1fr) 2fr 2.5rem; gap: .6rem; align-items: center; font-size: .86rem; }
.hbars .track { height: .55rem; border-radius: 999px; background: #f0eeec; overflow: hidden; }
.hbars .track i { display: block; height: 100%; background: var(--a); border-radius: 999px; }
.hbars li:first-child .track i { background: var(--g); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; font-size: .9rem; }
.checklist li::before { content: "○ "; color: var(--o); font-weight: 700; }

/* Fiche prospect */
.dl { display: grid; gap: .1rem; margin: 0; }
.dl div { display: grid; grid-template-columns: 11rem 1fr; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.dl div:last-child { border-bottom: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; word-break: break-word; }
@media (max-width: 40em) { .dl div { grid-template-columns: 1fr; gap: .1rem; } }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.timeline li { padding: .75rem .9rem; border-radius: .7rem; background: var(--p); font-size: .9rem; }
.timeline li header { display: flex; justify-content: space-between; gap: .5rem; font-size: .78rem; color: var(--muted); margin-bottom: .3rem; }
.timeline li p { margin: 0; white-space: pre-wrap; }

/* Médias */
.media-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.media-item { background: #fff; border: 1px solid var(--line); border-radius: .8rem; overflow: hidden; display: grid; }
.media-item img { aspect-ratio: 4/3; object-fit: cover; width: 100%; background: var(--p); }
.media-item div { padding: .6rem; display: grid; gap: .4rem; font-size: .78rem; }
.media-item input { width: 100%; padding: .35rem .5rem; border: 1px solid #d9d5cf; border-radius: .4rem; font: inherit; }

/* Connexion */
.login { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: #262626; }
.login__card { width: 100%; max-width: 400px; background: #fff; border-radius: 1.25rem; padding: 2rem; position: relative; overflow: hidden; }
.login__card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--g); }
.login__card .wordmark { color: var(--a); margin-bottom: 1.25rem; }
.login__card h1 { font-size: 1.35rem; margin: 0 0 1.25rem; }
