:root {
  --fond: #f4f5f2;
  --carte: #fff;
  --texte: #1a2c32;
  --discret: #52626a;
  --bord: #d7dfdc;
  --accent: #075e58;
  --accent-fond: #e8f3f0;
  --ok: #176a43;
  --erreur: #a7322c;
  --agent: #e8f3f0;
  --appelant: #edf0f5;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--texte);
  background: var(--fond);
  line-height: 1.55;
}

* { box-sizing: border-box; }
body { margin: 0; }
.coquille { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.coquille.page-connexion { display: block; }
main { width: min(100%, 1220px); min-width: 0; margin: 0 auto; padding: clamp(1.25rem, 3.5vw, 3.5rem); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.025em; }
h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 0.45rem; font-weight: 720; }
h2 { font-size: 1.25rem; margin-bottom: 0.6rem; }
h3 { font-size: 1.05rem; margin-bottom: 0.75rem; }
a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: #08443f; }
:focus-visible { outline: 3px solid #dc9637; outline-offset: 3px; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em; }
code { overflow-wrap: anywhere; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--fond); padding: 0.85rem; border-radius: 8px; margin: 0.4rem 0 1rem; }
[hidden] { display: none !important; }

.aller-contenu { position: fixed; z-index: 10; top: -5rem; left: 1rem; padding: 0.5rem 1rem; background: #fff; }
.aller-contenu:focus { top: 1rem; }
.barre { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: 1.8rem 0.85rem 1rem; background: #172e33; color: #e8f2f0; }
.barre a, .barre .lien { color: #d6e5e3; text-decoration: none; }
.barre .marque { display: flex; align-items: center; gap: 0.75rem; padding: 0 0.55rem 2.5rem; color: #fff; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.marque small { display: block; margin-top: 0.2rem; font-size: 0.75rem; font-weight: 450; color: #b6cfcb; letter-spacing: 0.02em; }
.marque-signe { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; flex: none; border-radius: 10px; background: #c8e5d9; color: #173f39; font-size: 0.88rem; letter-spacing: -0.04em; }
.barre nav { display: grid; gap: 0.2rem; }
.nav-titre { padding: 0 0.8rem 0.6rem; color: #aac8c3; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.13em; font-weight: 700; }
.barre nav a { display: block; padding: 0.65rem 0.8rem; border-radius: 8px; font-size: 0.94rem; }
.barre nav a:hover, .barre nav a[aria-current="page"] { background: #2b4b4d; color: #fff; }
.barre nav a[aria-current="page"] { box-shadow: inset 3px 0 #8fd3b8; font-weight: 650; }
.barre-bas { display: grid; gap: 0.6rem; margin-top: auto; padding: 1rem 0.65rem 0; border-top: 1px solid #385154; }
.barre-bas form { margin: 0; }
.barre .etat-worker { font-size: 0.85rem; }
.barre .etat-worker a { display: inline-flex; align-items: center; gap: 0.4rem; }
.barre .lien { font-size: 0.85rem; }

.page-entete { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.8rem; }
.page-entete p { margin-bottom: 0; }
.sur-titre { display: block; margin-bottom: 0.35rem; color: var(--accent); font-size: 0.72rem; font-weight: 750; text-transform: uppercase; letter-spacing: 0.12em; }
.section-entete { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 0.9rem; }
.section-entete h2 { margin: 0; }
.section-entete p { margin: 0.6rem 0 0; }
.section-appels { margin: 2.2rem 0; }
.compteur { display: inline-grid; place-items: center; min-width: 1.65rem; height: 1.65rem; padding: 0 0.35rem; border-radius: 6px; background: var(--accent-fond); color: var(--accent); font-size: 0.85rem; vertical-align: middle; letter-spacing: 0; }

.carte, .defilant, .etat-vide { background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; }
.carte { padding: 1.35rem 1.5rem; margin: 0 0 1rem; box-shadow: 0 2px 8px rgb(26 44 50 / 3%); }
.discret { color: var(--discret); font-size: 0.9rem; }
.note, .alerte { border-radius: 8px; padding: 0.8rem 1rem; margin: 0 0 1.2rem; }
.note { background: #e6f4ea; border: 1px solid #b7dfc4; }
.alerte { background: #fff0ec; border: 1px solid #e6bbb4; color: #8c2924; }
.alerte ul { margin: 0.3rem 0; padding-left: 1.2rem; }
.etat-vide { padding: 1.7rem; color: var(--discret); }
.panneau-etat { border-left: 4px solid var(--accent); }
#etat-serveur h2 { font-size: 1rem; margin-bottom: 0.6rem; }
#etat-serveur p { margin: 0.4rem 0; }
#etat-serveur p:last-child { margin-bottom: 0; }
.pastille { display: inline-block; width: 0.65rem; height: 0.65rem; border-radius: 50%; vertical-align: baseline; background: #8a93a3; }
.pastille-vert { background: #43b37b; }
.pastille-orange { background: #e6a344; }
.pastille-rouge { background: #da6056; }

label { display: block; margin: 0; font-size: 0.9rem; font-weight: 620; }
input, select, textarea { display: block; width: 100%; min-width: 0; margin-top: 0.4rem; padding: 0.65rem 0.75rem; font: inherit; color: var(--texte); border: 1px solid #aebbb8; border-radius: 8px; background: #fff; }
input:hover, select:hover, textarea:hover { border-color: #658780; }
input::placeholder { color: #66777b; opacity: 1; }
textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88rem; line-height: 1.55; resize: vertical; }
button { font: inherit; font-weight: 650; padding: 0.62rem 1rem; margin-top: 0.9rem; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent); color: #fff; cursor: pointer; }
button:hover { background: #08443f; }
button.secondaire { background: #fff; color: var(--accent); border-color: #9abbb2; }
button.secondaire:hover { background: var(--accent-fond); }
button.danger { background: #fff; color: var(--erreur); border-color: #cd9089; }
button.danger:hover { background: #fff0ec; }
button.lien { background: none; border: none; padding: 0; margin: 0; font-weight: 500; text-align: left; }
button.lien:hover { text-decoration: underline; }
.grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.3rem; }
.en-ligne { display: flex; gap: 0.75rem; align-items: end; }
.en-ligne input, .en-ligne .champ-recherche { flex: 1; }
.en-ligne button { flex: none; }
form.connexion { max-width: 420px; margin: clamp(2rem, 10vh, 6rem) auto; }
form.connexion button { width: 100%; }
.groupe-champs { border: 0; padding: 1.15rem 0; margin: 0; border-top: 1px solid var(--bord); }
.groupe-champs legend { float: left; width: 100%; margin-bottom: 1rem; font-weight: 700; }
.groupe-champs legend + .grille, .groupe-champs legend + label { clear: both; }
.groupe-champs > label { max-width: 32rem; }
.voix-active { display: inline-block; padding: 0.4rem 0.75rem; border-radius: 7px; background: var(--accent-fond); color: #165047; font-size: 0.86rem; }
.aide-formulaire { margin-top: 0.5rem; }
.section-consignes { margin-top: 2.5rem; }
.champ-texte { margin: 0.5rem 0; }
label.ignoree select { opacity: 0.65; background: var(--fond); }
.mention { display: block; color: #8c4c00; font-size: 0.82rem; font-weight: 500; }

.appels { list-style: none; padding: 0; margin: 0; }
.liste-contextes .carte { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.85rem; }
.liste-contextes .carte a { font-weight: 700; text-decoration: none; }
.liste-contextes .carte a:hover { text-decoration: underline; }
.appels .en-cours { border-left: 4px solid var(--accent); }
.appels .en-cours a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; text-decoration: none; color: var(--texte); }
.appels .en-cours a:hover strong { color: var(--accent); text-decoration: underline; }
.appel-identite { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; font-size: 1.1rem; }
.appel-duree { display: flex; align-items: center; gap: 1.1rem; color: var(--accent); font-weight: 700; }
.appel-meta { display: block; margin: 0.55rem 0 0; }
.chrono { font-variant-numeric: tabular-nums; }
.statut { display: inline-block; font-size: 0.78rem; font-weight: 650; padding: 0.16rem 0.55rem; border-radius: 5px; background: #eef1f2; color: #394e55; vertical-align: middle; }
.statut-en_cours { color: #075e58; background: #def2ea; }
.statut-termine { color: #176a43; background: #e4f4e9; }
.statut-erreur { color: #942f28; background: #fff0ec; }
span.connexion { flex: none; font-size: 0.78rem; font-weight: 650; color: #52626a; padding: 0.35rem 0.65rem; border-radius: 99px; background: #e8edef; }
span.connexion.ok { color: #176a43; background: #e4f4e9; }
span.connexion.ko { color: #942f28; background: #fff0ec; }
span.connexion::before { content: ""; display: inline-block; width: 0.45rem; height: 0.45rem; margin-right: 0.4rem; border-radius: 50%; background: currentColor; vertical-align: middle; }

.defilant { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid #e5eae7; }
th { background: #f8faf8; color: #465a60; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f7faf8; }
td:first-child a { font-weight: 650; white-space: nowrap; }
.retour { font-weight: 650; text-decoration: none; }
.retour:hover { text-decoration: underline; }
.fiche-appel { margin-top: 0.5rem; padding: 1.8rem; }
.fiche-appel h1 { margin-bottom: 1.5rem; }
.fiche-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.fiche-meta > div { display: grid; gap: 0.2rem; min-width: 0; }
.fiche-meta > div > span { color: var(--discret); font-size: 0.78rem; }
.fiche-meta strong { font-size: 0.9rem; overflow-wrap: anywhere; }
.identifiant-appel { padding-top: 1rem; margin: 1.3rem 0 0; border-top: 1px solid var(--bord); }
.journal { margin-top: 2rem; }
.etat-agent { color: var(--discret); font-size: 0.87rem; }
.chronologie { list-style: none; padding: 1.4rem; margin: 0; display: flex; flex-direction: column; gap: 0.8rem; border: 1px solid var(--bord); border-radius: 12px; background: #fff; }
.bulle { max-width: min(80%, 670px); padding: 0.8rem 1rem; border-radius: 10px; overflow-wrap: anywhere; }
.bulle .qui { display: block; margin-bottom: 0.3rem; font-size: 0.75rem; color: var(--discret); font-weight: 650; }
.bulle .texte { white-space: pre-wrap; }
.bulle.agent { align-self: flex-start; background: var(--agent); border-bottom-left-radius: 3px; }
.bulle.appelant { align-self: flex-end; background: var(--appelant); border-bottom-right-radius: 3px; }
.outil { border: 1px solid var(--bord); border-radius: 8px; padding: 0.75rem 1rem; overflow-wrap: anywhere; }
.outil summary, details summary { cursor: pointer; }
.outil summary:hover, details summary:hover { color: var(--accent); }
.systeme { align-self: center; max-width: 100%; font-size: 0.82rem; color: var(--discret); text-align: center; overflow-wrap: anywhere; }
.en-erreur { color: var(--erreur); border-color: var(--erreur); }
.systeme.en-erreur { background: #fff0ec; border-radius: 6px; padding: 0.5rem 0.8rem; }
.message { border-left: 4px solid var(--ok); overflow-wrap: anywhere; }
.resultat-test { margin-top: 1rem; padding: 1rem; border: 1px solid var(--bord); border-radius: 8px; }
.resultat-test p:last-child { margin-bottom: 0; }
.faq { padding-top: 1rem; }
#faq { margin-top: 2rem; }
#faq summary { font-weight: 650; overflow-wrap: anywhere; }

@media (max-width: 1050px) {
  .coquille { grid-template-columns: 190px minmax(0, 1fr); }
  .fiche-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .coquille { display: block; }
  .barre { position: static; height: auto; overflow-y: visible; padding: 0.85rem 1rem 0; }
  .barre .marque { padding: 0 0 0.7rem; }
  .barre nav { display: flex; overflow-x: auto; gap: 0.3rem; margin: 0 -1rem; padding: 0 1rem 0.5rem; }
  .nav-titre { display: none; }
  .barre nav a { white-space: nowrap; padding: 0.5rem 0.7rem; }
  .barre nav a[aria-current="page"] { box-shadow: inset 0 -3px #8fd3b8; }
  .barre-bas { display: flex; justify-content: space-between; align-items: center; margin: 0 -1rem; padding: 0.5rem 1rem; }
  main { padding: 1.5rem 1rem 3rem; }
  .grille { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .page-entete, .section-entete { align-items: flex-start; flex-wrap: wrap; }
  .carte { padding: 1rem; }
  .fiche-appel { padding: 1.2rem; }
  .fiche-meta { gap: 1rem 0.7rem; }
  .appels .en-cours a { align-items: flex-start; }
  .appels .en-cours .appel-identite { display: grid; justify-items: start; }
  .defilant { overflow: visible; border: 0; background: transparent; }
  table, tbody, tr, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  tr { margin-bottom: 0.75rem; padding: 0.55rem 1rem; background: var(--carte); border: 1px solid var(--bord); border-radius: 10px; }
  td { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.45rem 0; border: 0; text-align: right; overflow-wrap: anywhere; }
  td::before { content: attr(data-label); flex: none; color: var(--discret); font-size: 0.8rem; text-align: left; }
  td:first-child { border-bottom: 1px solid var(--bord); margin-bottom: 0.35rem; }
  td:first-child a { white-space: normal; }
  .chronologie { padding: 0.8rem; }
  .bulle { max-width: 95%; }
  .en-ligne { flex-direction: column; align-items: stretch; }
}
@media (max-width: 380px) {
  .fiche-meta { grid-template-columns: 1fr; }
  .appels .en-cours a { flex-wrap: wrap; }
}
