:root {
  color-scheme: dark;
  --canvas: #0b0c0e;
  --panel: #0f1011;
  --surface: #141516;
  --hover: #191a1b;
  --line: #23252a;
  --line-active: #34343a;
  --ink: #f7f8f8;
  --muted: #a0a5ae;
  --accent: #ff6a2b;
  --accent-hover: #ff8754;
  --accent-ink: #151515;
  --accent-panel: #2a1b15;
  --accent-panel-hover: #342219;
  --accent-line: #5d3828;
  --accent-light: #ffad85;
  --radius: 8px;
  --header: 55px;
  font: 13px/1.5 Inter, system-ui, sans-serif;
  background: var(--canvas);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select, textarea, summary { font: inherit; }
button, summary, a, select { cursor: pointer; }
button, select, input, textarea {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
button { padding: 6px 10px; }
button:hover:enabled, summary:hover { background: var(--hover); border-color: var(--line-active); }
button:disabled { opacity: .44; cursor: default; }
:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-light); }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 14px; font-weight: 600; }
h3 { font-size: 13px; font-weight: 600; }
.barre {
  height: var(--header);
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.marque, .barre-droite, .compte { display: flex; align-items: center; gap: 10px; }
.marque { font-weight: 600; white-space: nowrap; }
.logo {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 700;
}
.separateur, .campagne, .discret, .compte > :last-child { color: var(--muted); }
.discret, .compte { background: transparent; border-color: transparent; }
.avatar {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  background: var(--accent-panel-hover);
  color: var(--accent-light);
  border-radius: 50%;
  font-size: 10px;
}
.espace {
  display: grid;
  grid-template-columns: minmax(235px, 270px) minmax(0, 1fr) minmax(320px, 358px);
  grid-template-rows: minmax(0, 1fr);
  column-gap: 1px;
  background: var(--line);
  height: calc(100dvh - var(--header));
}
.file { background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.file-entete { padding: 18px 15px 0; }
.file-entete h2 { display: flex; align-items: center; gap: 8px; }
.compteur, kbd { color: var(--muted); border: 1px solid var(--line); background: var(--surface); border-radius: 5px; white-space: nowrap; }
.compteur { font-size: 11px; padding: 1px 6px; font-variant-numeric: tabular-nums; }
kbd { font: 10px Inter, sans-serif; padding: 2px 4px; }
.recherche {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 13px 0 10px;
  padding: 0 7px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
}
.recherche:focus-within { border-color: var(--accent-light); }
.recherche > span { font-size: 19px; line-height: 1; }
.recherche input { min-width: 0; flex: 1; border: 0; outline: none; background: transparent; padding: 0; }
.filtres { display: flex; gap: 2px; margin: 0 -2px; }
.filtres button { background: transparent; border-color: transparent; font-size: 12px; color: var(--muted); padding: 5px 6px; white-space: nowrap; }
.filtres button[aria-pressed="true"] { color: var(--ink); background: var(--hover); border-color: var(--line); }
.filtres span { font-size: 10px; padding-left: 2px; color: var(--muted); }
.file-liste { padding: 10px 8px; overflow: auto; flex: 1; scrollbar-width: thin; }
.prospect {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  column-gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 52px;
  text-align: left;
  background: transparent;
  border-color: transparent;
  padding: 6px 9px;
}
.prospect[aria-current="true"] { background: var(--accent-panel); border-color: var(--accent-line); }
.prospect[aria-current="true"]:hover { background: var(--accent-panel-hover); }
.prospect .personne, .prospect .agence { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prospect .personne { font-weight: 500; }
.prospect .agence, .rang { color: var(--muted); font-size: 11px; }
.point { width: 7px; height: 7px; border: 1px solid #7c818c; border-radius: 50%; }
.point[data-statut="rappel"] { background: #b99b5c; border-color: #b99b5c; }
.point[data-statut="joint"], .point[data-statut="rdv"] { background: #69a782; border-color: #69a782; }
.point[data-statut="ne_pas_appeler"], .point[data-statut="non_qualifie"] { background: #9b7580; border-color: #9b7580; }
.fiche { background: var(--canvas); overflow: auto; min-width: 0; scrollbar-width: thin; }
.fiche-barre {
  padding: 0 20px;
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.navigation { display: flex; gap: 4px; }
.navigation button { min-width: 29px; padding: 2px 5px; }
.retour { display: none; }
.identite { padding: 26px 28px 0; }
.identite h1 { font-size: clamp(23px, 2.6vw, 32px); line-height: 1.18; letter-spacing: -.045em; font-weight: 600; overflow-wrap: anywhere; }
.sous-titre { color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }
.categorie { font-size: 11px; color: var(--accent-light); letter-spacing: .025em; font-weight: 600; margin-bottom: 6px; }
.statuts, .liens { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.etiquette, .lien {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
}
.lien:hover { border-color: var(--line-active); background: var(--hover); }
.informations { padding: 17px 28px 24px; display: grid; gap: 13px; }
.section { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); min-width: 0; }
.section-entete { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; }
.section-entete + .section-corps { border-top: 1px solid var(--line); }
.section-corps { padding: 11px 12px; color: var(--muted); overflow-wrap: anywhere; white-space: pre-wrap; }
.section .vide { padding: 10px 12px; }
.telephone-liste { display: grid; }
.telephone-ligne { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 5px 9px; gap: 6px; border-top: 1px solid var(--line); }
.telephone-ligne button { text-align: left; display: flex; align-items: center; gap: 9px; min-width: 0; background: transparent; border-color: transparent; }
.telephone-ligne button[aria-pressed="true"] { background: var(--accent-panel); color: #ffe6da; border-color: var(--accent-line); }
.telephone-ligne button small { color: var(--muted); }
.telephone-ligne button .numero { font-variant-numeric: tabular-nums; white-space: nowrap; }
.composer { padding: 4px 7px; border-radius: 5px; color: var(--accent-light); white-space: nowrap; }
.composer:hover { background: var(--accent-panel-hover); }
.actions { background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.actions-formulaire { padding: 18px; display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: auto; scrollbar-width: thin; }
.actions-entete, .ligne-label { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.telephone-actif { display: flex; justify-content: space-between; align-items: center; min-height: 40px; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-variant-numeric: tabular-nums; }
.numero-a-appeler { min-width: 0; padding: 3px 4px; margin-left: -4px; background: transparent; border-color: transparent; font-variant-numeric: tabular-nums; }
.numero-a-appeler option { background: var(--surface); }
#bloc-resultat { display: grid; gap: 8px; }
.ligne-label, .champ > span { font-size: 12px; color: var(--muted); }
.resultats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.resultats button { background: var(--surface); min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 4px; text-align: left; }
button[data-resultat][aria-pressed="true"] { border-color: var(--accent); background: var(--accent-panel); color: #ffe6da; }
.champ { display: grid; gap: 4px; min-width: 0; }
.champ input, .champ select, .champ textarea { width: 100%; min-width: 0; padding: 6px 8px; }
.champ textarea { resize: vertical; min-height: 55px; }
.primaire { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.primaire:disabled { background: var(--surface); border-color: var(--line-active); color: var(--muted); opacity: 1; }
.primaire:hover:enabled { background: var(--accent-hover); border-color: var(--accent-hover); }
.enregistrer { width: 100%; display: flex; align-items: center; justify-content: space-between; min-height: 38px; }
.actions-bas { position: sticky; bottom: -18px; padding: 8px 0 12px; background: var(--panel); margin-top: -8px; }
.actions-secondaires { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 3px; margin-top: 6px; }
.actions-secondaires button, .actions-secondaires summary { font-size: 11px; padding: 4px 3px; }
.actions-secondaires details { position: relative; }
.actions-secondaires details > div { position: absolute; bottom: 100%; right: 0; z-index: 2; min-width: 135px; padding: 4px; border: 1px solid var(--line-active); border-radius: var(--radius); background: var(--hover); }
.actions-secondaires details button { border-color: transparent; display: block; width: 100%; text-align: left; }
.actions-secondaires summary { color: var(--muted); border-radius: 5px; }
#erreur { color: #f0a5ac; font-size: 12px; }
.vide, .entree-meta { color: var(--muted); font-size: 12px; }
.identite .vide { font-size: 14px; }
.entree { padding: 9px 12px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.entree .note-texte { margin-top: 3px; white-space: pre-wrap; }
.entree-meta { display: flex; flex-wrap: wrap; column-gap: 8px; }
.connexion { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login { width: min(100%, 380px); padding: 25px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.login h1 { margin-top: 18px; letter-spacing: -.04em; font-weight: 600; }
.login p { margin-top: 6px; color: var(--muted); }
.login button { margin-top: 12px; }
dialog { width: min(92vw, 390px); color: var(--ink); background: var(--panel); border: 1px solid var(--line-active); border-radius: 10px; padding: 16px; }
dialog::backdrop { background: #000a; }
.dialogue-entete { display: flex; justify-content: space-between; align-items: center; }
dialog table { width: 100%; margin-top: 12px; text-align: left; border-collapse: collapse; }
dialog td, dialog th { border-top: 1px solid var(--line); padding: 8px 4px; }
dialog thead { color: var(--muted); }
.confirmation { position: fixed; z-index: 3; bottom: 12px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); padding: 7px 12px; border: 1px solid var(--line-active); border-radius: var(--radius); background: #24262c; }
@media (min-width: 901px) {
  .fiche { grid-column: 2; grid-row: 1; }
  .actions { grid-column: 3; grid-row: 1; }
}
@media (min-width: 901px) and (max-height: 680px) {
  .actions-formulaire { padding: 12px; gap: 7px; }
  .actions-bas { bottom: -12px; padding-bottom: 7px; margin-top: -5px; }
}
@media (max-width: 900px) {
  .espace { grid-template-columns: 225px minmax(0, 1fr); background: var(--canvas); height: auto; min-height: calc(100dvh - var(--header)); }
  .file { grid-row: 1/-1; position: sticky; top: 0; height: calc(100dvh - var(--header)); }
  .fiche { display: contents; }
  .fiche-barre, .identite, .actions, .informations { grid-column: 2; }
  .actions { margin: 16px 18px 0; border: 1px solid var(--line); border-radius: var(--radius); }
  .actions-formulaire { overflow: visible; }
  .actions-bas { position: static; }
  .identite, .informations { padding-inline: 18px; }
  .informations { grid-row: 4; }
  .espace { grid-template-rows: auto auto auto 1fr; }
}
@media (max-width: 600px) {
  .barre { padding-inline: 10px; }
  .barre-droite, .marque { gap: 5px; }
  .compte { padding: 4px 3px; gap: 4px; }
  .compte > :last-child, .barre .separateur, .barre .campagne { display: none; }
  .espace { grid-template-columns: minmax(0, 1fr); }
  .fiche-barre, .identite, .actions, .informations { grid-column: 1; }
  .file { height: calc(100dvh - var(--header)); position: static; border: 0; }
  .espace:not(.mobile-fiche) .fiche > *, .espace:not(.mobile-fiche) .actions { display: none; }
  .mobile-fiche .file { display: none; }
  .fiche-barre { padding-inline: 9px; }
  .retour { display: inline-block; }
  .identite { padding-top: 15px; }
  .actions { margin-top: 12px; }
  .actions-formulaire { padding: 12px; gap: 9px; }
  .telephone-ligne button { flex-wrap: wrap; row-gap: 0; }
}
.appel-fait { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
