/* Hallmark · v2.0.0 · theme: custom (brand: SOCAR AG, spec 2026-11-06) · scope: app
   critique: un outil de bureau pour les agents : dense, lisible, chaque ligne mène à une action (relancer, encaisser, traiter).
   answered: Impeccable « overused-font » : Montserrat est la police déclarée par la marque, gardée pour titres et actions ; le texte est en Instrument Sans.
   SOCAR AG · gestion interne (maquette). Tokens : ../commun/tokens.css */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; background: var(--brume); }
body { overflow-x: clip; margin: 0; color: var(--nuit); background: var(--brume); font: 500 var(--t-s)/1.5 var(--police-texte); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-family: var(--police); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
h1 { font-size: var(--t-xl); }
h2 { font-size: var(--t-l); margin-bottom: 0.9rem; }
h3 { font-size: var(--t-m); margin-bottom: 0.6rem; }
p { margin: 0; text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 10px; }
small { display: block; color: var(--texte-doux); font-size: 0.8125rem; font-weight: 500; }

/* ---------- Cadre : barre latérale + contenu ---------- */
.g { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; }
.cote { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 1.25rem; padding: 1.5rem 1rem; background: var(--papier); border-right: 1px solid var(--filet); }
.cote > img { width: 128px; margin-left: 0.6rem; }
.cote-role { margin: -0.4rem 0 0 0.6rem; font: 700 var(--t-xs)/1 var(--police); color: var(--texte-doux); }
.cote nav { display: grid; gap: 0.25rem; }
.cote nav a { display: flex; align-items: center; gap: 0.7rem; min-height: 44px; padding: 0.6rem 0.75rem; border-radius: 10px; color: var(--nuit); text-decoration: none; font: 700 var(--t-s)/1.2 var(--police); }
.cote nav a:hover { background: var(--brume); }
.cote nav a[aria-current] { background: var(--bleu); color: var(--papier); }
.compteur { margin-left: auto; min-width: 1.6rem; padding: 0.15rem 0.45rem; border-radius: 999px; background: var(--rouge-fonce); color: var(--papier); font-size: 0.8125rem; text-align: center; font-variant-numeric: tabular-nums; }
.cote-pied { margin-top: auto; display: grid; gap: 0.6rem; padding: 0 0.6rem; font-size: var(--t-xs); color: var(--texte-doux); }
.btn-texte { justify-self: start; padding: 0; border: 0; background: none; color: var(--bleu); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }

main { width: 100%; max-width: 1280px; padding: 1.25rem clamp(1rem, 0.5rem + 2vw, 2.5rem) 4rem; }
.vue-tete { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.4rem 1.5rem; margin-bottom: 1.4rem; }
.sous { color: var(--texte-doux); font-variant-numeric: tabular-nums; }
.sous::first-letter { text-transform: uppercase; }

/* ---------- Blocs ---------- */
.chiffres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.chiffre, .bloc, .carte { background: var(--papier); border-radius: var(--r-bloc); box-shadow: var(--ombre-douce); }
.chiffre { padding: 1.1rem 1.25rem; }
.chiffre p { color: var(--texte-doux); font-size: var(--t-xs); }
.chiffre b { display: block; margin-top: 0.3rem; font: 800 1.6rem/1.15 var(--police); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.chiffre:first-child b { color: var(--bleu); }
.deux { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.bloc { padding: 1.25rem 1.25rem 1.4rem; }
.lien { display: inline-block; margin-top: 0.9rem; font-weight: 700; color: var(--bleu); text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--filet-fort); text-underline-offset: 0.2em; }
.lien:hover { text-decoration-color: var(--bleu); }

/* Listes courtes cliquables (tableau de bord, fiche) */
.courte { list-style: none; margin: 0; padding: 0; display: grid; }
.courte li + li { border-top: 1px solid var(--brume-forte); }
.courte button { display: block; width: 100%; padding: 0.7rem 0.5rem; border: 0; border-radius: 10px; background: none; color: var(--nuit); font: inherit; text-align: left; cursor: pointer; }
.courte button:hover { background: var(--fond-ajout); }
.courte b { font-family: var(--police); font-weight: 800; margin-right: 0.35rem; font-variant-numeric: tabular-nums; }
.vide { padding: 1rem 0.5rem; color: var(--texte-doux); }

/* ---------- Tableaux ---------- */
.defile { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--t-xs); }
th { padding: 0.75rem; text-align: left; font: 700 0.8125rem/1.2 var(--police); color: var(--texte-doux); border-bottom: 1px solid var(--filet); white-space: nowrap; }
tbody th { color: var(--nuit); font-size: var(--t-xs); border-bottom-color: var(--brume-forte); }
td { padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--brume-forte); vertical-align: middle; }
tbody tr:last-child > * { border-bottom: 0; }
tr[data-contrat], tr[data-sinistre] { cursor: pointer; }
tbody tr:hover { background: var(--fond-ajout); }
td b { font-family: var(--police); font-weight: 800; font-variant-numeric: tabular-nums; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lien-ligne { padding: 0; border: 0; background: none; color: var(--bleu); font: 700 var(--t-xs)/1.3 var(--police); font-variant-numeric: tabular-nums; text-decoration: underline; text-decoration-color: var(--filet-fort); text-underline-offset: 0.2em; cursor: pointer; white-space: nowrap; }

/* ---------- Filtres et champs ---------- */
.filtres { display: flex; flex-wrap: wrap; align-items: end; gap: 0.75rem 1rem; margin-bottom: 1rem; }
.champ { display: grid; gap: 0.35rem; font-weight: 700; font-size: var(--t-xs); }
.champ-large { flex: 1 1 280px; }
input, select, textarea { min-height: 44px; padding: 0.55rem 0.75rem; border: 1px solid var(--filet-fort); border-radius: 10px; background: var(--papier); color: var(--nuit); font: 500 var(--t-s)/1.4 var(--police-texte); }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--indice); }
input:focus-visible, select:focus-visible, textarea:focus-visible { box-shadow: var(--focus); }
.champs { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.9rem; }
.champs .champ { flex: 1 1 160px; }
.erreur { color: var(--rouge-fonce); font-weight: 700; font-size: var(--t-xs); }
.erreur:empty { display: none; }

/* ---------- Boutons et pastilles ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0.6rem 1.2rem; border: 2px solid transparent; border-radius: var(--r-bouton); font: 700 var(--t-s)/1.2 var(--police); text-decoration: none; cursor: pointer; font-variant-numeric: tabular-nums; }
.btn:active, .courte button:active, .lien-ligne:active { transform: scale(0.98); }
.btn-bleu { background: var(--bleu); color: var(--papier); }
.btn-bleu:hover { background: var(--bleu-fonce); }
.btn:disabled { background: var(--filet); color: var(--texte-doux); border-color: transparent; cursor: progress; transform: none; }
.connexion { display: grid; gap: 0.9rem; margin-top: 1.2rem; }
.connexion .btn { justify-self: start; }
.btn-contour { border-color: var(--filet-fort); color: var(--bleu); background: var(--papier); }
.btn-contour:hover { border-color: var(--bleu); }
.pastille { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font: 700 0.8125rem/1.4 var(--police-texte); white-space: nowrap; }
.pastille-ok { background: var(--vert-pale); color: var(--vert); }
.pastille-attente { background: var(--ambre-pale); color: var(--ambre); }
.pastille-alerte { background: var(--rouge-pale); color: var(--rouge-fonce); }
.pastille-nouveau { background: var(--bleu-halo); color: var(--bleu-fonce); }
.pastille-neutre { background: var(--brume-forte); color: var(--texte-doux); }

/* ---------- Fiche (boîte de dialogue native) ---------- */
dialog { width: min(680px, 100% - 2rem); max-height: calc(100dvh - 2rem); padding: 1.5rem 1.5rem 1.6rem; border: 0; border-radius: var(--r-bloc); background: var(--papier); color: var(--nuit); box-shadow: var(--ombre-papier); }
dialog::backdrop { background: var(--voile-moyen); }
.fiche-fermer { float: right; display: grid; place-items: center; width: 44px; height: 44px; margin: -0.6rem -0.6rem 0 0; border: 0; border-radius: 999px; background: none; color: var(--nuit); cursor: pointer; }
.fiche-fermer:hover { background: var(--brume); }
.fiche-sur { font: 700 var(--t-xs)/1 var(--police); color: var(--texte-doux); margin-bottom: 0.4rem; }
#fiche-contenu > h2 { display: inline; margin-right: 0.6rem; font-variant-numeric: tabular-nums; }
.details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.45rem 1.25rem; margin: 1.2rem 0; font-size: var(--t-xs); }
.details dt { color: var(--texte-doux); }
.details dd { margin: 0; font-weight: 600; }
.fiche-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.encart { display: grid; align-content: start; justify-items: start; gap: 0.2rem; padding: 1rem; border-radius: 12px; background: var(--brume); }
.encart .champs { width: 100%; }
.encart small { margin-top: 0.4rem; }
.champs-ligne { align-items: end; margin-top: 1.2rem; }
.champs-ligne .btn { flex: none; }
.nouveau { margin-top: 1.2rem; }
.demande { display: flex; align-items: start; justify-content: space-between; gap: 1rem; padding: 0.75rem 0.5rem; }
.demande b { font-family: var(--police); font-weight: 800; margin-right: 0.35rem; }
.demande p { margin-top: 0.3rem; font-size: var(--t-xs); }
.demande > div { flex: 1; min-width: 0; }
.courte .demande .btn { flex: none; display: inline-flex; width: auto; min-height: 40px; padding: 0.4rem 0.9rem; border: 2px solid var(--filet-fort); border-radius: var(--r-bouton); font: 700 var(--t-xs)/1.2 var(--police); color: var(--bleu); background: var(--papier); }
#tableau > .bloc + .bloc { margin-top: 1rem; }
.vue-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.documents { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.documents h3 { width: 100%; margin: 0; }
.erreurs-import { margin: 0.5rem 0 1rem; padding-left: 1.2rem; max-height: 220px; overflow-y: auto; font-size: var(--t-xs); color: var(--rouge-fonce); }
.import-apercu { margin: 0.6rem 0 1rem; font-weight: 700; }
.btn-mini { min-height: 36px; padding: 0.3rem 0.8rem; font-size: var(--t-xs); }
.sms { margin-bottom: 0.9rem; padding: 0.7rem 0.85rem; border-radius: 12px 12px 12px 4px; background: var(--papier); font-size: var(--t-xs); }
.fiche-titre { margin-top: 1.4rem; }
.historique { list-style: none; margin: 0 0 1.2rem; padding: 0 0 0 1rem; display: grid; gap: 0.6rem; border-left: 2px solid var(--filet); font-size: var(--t-xs); }
.historique time { display: block; color: var(--texte-doux); font-size: 0.8125rem; }

.toast { position: fixed; z-index: 50; left: 50%; bottom: 1.5rem; transform: translateX(-50%); width: max-content; max-width: min(560px, 100vw - 2rem); padding: 0.85rem 1.2rem; border-radius: 12px; background: var(--nuit); color: var(--papier); box-shadow: var(--ombre-papier); font-size: var(--t-xs); }

/* ---------- Choix du bureau ---------- */
.choix { width: min(100% - 2rem, 1040px); margin: 0 auto; padding: 2.5rem 0 4rem; }
.choix > img { width: 140px; margin-bottom: 1.75rem; }
.choix h2 { margin: 2.25rem 0 0.2rem; }
.choix-aide { margin-bottom: 1rem; color: var(--texte-doux); font-size: var(--t-xs); }
.choix ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.choix-direction { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choix-agences { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.choix button { display: flex; align-items: center; gap: 0.9rem; width: 100%; height: 100%; padding: 0.9rem 1rem; border: 0; border-radius: var(--r-bloc); background: var(--papier); box-shadow: var(--ombre-douce); color: var(--nuit); font: 500 var(--t-xs)/1.4 var(--police-texte); text-align: left; cursor: pointer; }
.choix-agences button { display: grid; align-content: start; gap: 0.2rem; }
.choix button:hover { box-shadow: 0 0 0 2px var(--bleu); }
.choix button:active { transform: scale(0.98); }
.choix-direction img { width: 60px; height: 80px; object-fit: cover; object-position: 50% 20%; border-radius: 10px; flex: none; }
.choix b { display: block; font: 800 var(--t-m)/1.25 var(--police); letter-spacing: -0.01em; }
.choix-direction span { color: var(--texte-doux); }
.choix-direction b { color: var(--nuit); margin-bottom: 0.15rem; }

.portee { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1rem; margin-bottom: 1.25rem; font-size: var(--t-xs); }
.portee b { font-family: var(--police); font-weight: 800; }

/* ---------- Écrans plus étroits (tablette, téléphone) ---------- */
@media (max-width: 1100px) { .chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .g { grid-template-columns: minmax(0, 1fr); }
  .cote { position: sticky; z-index: 10; height: auto; flex-direction: row; align-items: center; gap: 0.75rem; padding: 0.6rem 1rem; border-right: 0; border-bottom: 1px solid var(--filet); overflow-x: auto; }
  .cote > img { width: 96px; margin: 0; }
  .cote-role, .cote-pied { display: none; }
  .cote nav { display: flex; gap: 0.25rem; }
  .cote nav a { white-space: nowrap; font-size: var(--t-xs); }
  .deux, .fiche-actions, .choix-direction { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .cote nav svg { display: none; }
  .chiffre b { font-size: 1.3rem; }
  .details { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
  .details dd { margin-bottom: 0.5rem; }
}
