:root {
  --blanc:        #ffffff;
  --page:         #ffffff;
  --surface:      #f5f5f5;
  --surface-2:    #efefef;
  --ligne:        #e2e2e2;
  --ligne-2:      #d2d2d2;

  --encre:        #252525;
  --encre-doux:   #575757;
  --encre-faible: #8b8b8b;

  --rouge:        #c01919;
  --rouge-fonce:  #881313;
  --rouge-doux:   #bf4040;
  --rouge-voile:  rgba(192, 25, 25, .07);
  --rouge-filet:  rgba(192, 25, 25, .28);

  --vert:         #2f8f5b;

  --r:            14px;
  --r-s:          10px;
  --ombre:        0 1px 2px rgba(0,0,0,.04), 0 6px 18px rgba(0,0,0,.05);

  --police:       "Libre Franklin", system-ui, -apple-system, sans-serif;
  --mono:         "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--police);
  background: var(--page);
  color: var(--encre);
  font-size: 15px;
  line-height: 1.5;
  padding: 14px 26px 14px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background-image: repeating-linear-gradient(
    -45deg,
    var(--rouge-voile) 0 2px,
    transparent 2px 9px
  );
  background-repeat: no-repeat;
  background-position: top 0 right 0;
  background-size: 220px 150px;
}

.barre {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--encre);
}

.marque {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--encre);
}
.marque .sep { color: var(--rouge); margin: 0 .2em; }

.prepare {
  font-size: .82rem;
  font-weight: 700;
  color: var(--rouge);
}
.prepare[hidden] { display: none; }

.accroche {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 13px 0 10px;
}

.accroche-txt { max-width: 78ch; }

.accroche h1 {
  font-size: 1.62rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.18;
}
.accroche h1 .ac { color: var(--rouge); }

.accroche p {
  margin-top: 6px;
  color: var(--encre-doux);
  font-size: .93rem;
  max-width: 72ch;
}

.btn-parler {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--rouge);
  color: #fff;
  font-family: var(--police);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -.01em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(192,25,25,.28);
  transition: background 140ms ease, transform 140ms ease;
}
.btn-parler:hover { background: var(--rouge-fonce); }
.btn-parler:active { transform: translateY(1px); }
.btn-parler:focus-visible { outline: 3px solid var(--rouge-doux); outline-offset: 3px; }
.btn-parler[disabled] { background: var(--encre-faible); box-shadow: none; cursor: default; }
.btn-glyphe { font-size: .8em; }

.horloge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 18px;
  border: 1px solid var(--ligne);
  border-left: 4px solid var(--rouge);
  border-radius: var(--r-s);
  background: var(--surface);
  font-family: var(--mono);
  font-size: .88rem;
  font-weight: 500;
  margin-bottom: 13px;
}
.horloge-date { color: var(--encre-doux); }
.horloge-sep { color: var(--ligne-2); }
.horloge-etat { font-weight: 700; color: var(--rouge); letter-spacing: .01em; }
.horloge.est-ouvert { border-left-color: var(--vert); }
.horloge.est-ouvert .horloge-etat { color: var(--vert); }

.console {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 22px;
  align-items: start;
}

.gauche { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.titre-bloc {
  font-size: .74rem;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--encre-faible);
  margin-bottom: 8px;
}

.fiche {
  border: 1px solid var(--ligne);
  border-radius: var(--r);
  background: var(--blanc);
  box-shadow: var(--ombre);
  padding: 14px 16px;
}

.fiche-tete {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.fiche-tete h2 {
  font-size: 1.16rem;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--rouge);
  text-transform: uppercase;
}
.fiche-by {
  font-size: .74rem;
  font-weight: 700;
  color: var(--encre);
  letter-spacing: .01em;
}

.btn-fiche {
  border: 1px solid var(--ligne-2);
  border-radius: 999px;
  background: var(--blanc);
  color: var(--encre-doux);
  font-family: var(--police);
  font-size: .78rem;
  font-weight: 600;
  padding: 5px 14px;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}
.btn-fiche:hover { border-color: var(--rouge); color: var(--rouge); }
.btn-fiche:focus-visible { outline: 2px solid var(--rouge); outline-offset: 2px; }

.fiche-faits {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 9px;
  font-size: .85rem;
  color: var(--encre-doux);
}
.fiche-faits span { display: inline-flex; align-items: center; }
.fiche-faits span + span::before {
  content: "·";
  margin-right: 10px;
  color: var(--ligne-2);
}
.fiche-faits .fort {
  font-weight: 700;
  color: var(--rouge);
  text-transform: uppercase;
  font-size: .8rem;
  letter-spacing: .03em;
}

.interdits ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.interdits li {
  position: relative;
  padding-left: 18px;
  font-size: .89rem;
  color: var(--encre-doux);
}
.interdits li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .62em;
  width: 7px;
  height: 2px;
  background: var(--rouge);
}
.interdits b { color: var(--encre); font-weight: 700; }

.familles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.famille h3 {
  font-size: .85rem;
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--ligne);
}

.famille ol { list-style: none; display: flex; flex-direction: column; gap: 6px; }

.famille li {
  padding: 7px 11px;
  border: 1px solid var(--ligne);
  border-radius: var(--r-s);
  background: var(--blanc);
}
.famille li.par-la {
  border-color: var(--rouge-filet);
  background: var(--rouge-voile);
}

.famille li p {
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.32;
  color: var(--encre);
}
.famille li b { font-weight: 800; }

.fleche { color: var(--rouge); font-weight: 700; margin-right: 3px; }

.etiq {
  display: block;
  margin-top: 3px;
  font-size: .8rem;
  color: var(--encre-faible);
}

.preuve {
  border: 1px solid var(--ligne);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--ombre);
  padding: 13px 15px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 14px;
  min-width: 0;
}

.preuve-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.preuve-tete h2 {
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: -.01em;
}
.preuve-outils { display: flex; align-items: center; gap: 8px; }

.badge-maquette {
  font-family: var(--mono);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--rouge);
  padding: 3px 8px;
  border-radius: 4px;
}
.badge-maquette[hidden] { display: none; }

.btn-reset {
  border: 1px solid var(--ligne-2);
  border-radius: 999px;
  background: var(--blanc);
  color: var(--encre-faible);
  font-family: var(--police);
  font-size: .74rem;
  font-weight: 600;
  padding: 4px 12px;
  cursor: pointer;
}
.btn-reset:hover { border-color: var(--encre-faible); color: var(--encre); }
.btn-reset:focus-visible { outline: 2px solid var(--rouge); outline-offset: 2px; }

.bande {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--encre-faible);
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 2px;
}
.bande::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ligne-2);
}

.bloc {
  border: 1px solid var(--ligne);
  border-radius: var(--r-s);
  background: var(--blanc);
  padding: 10px 12px;
  min-width: 0;
}

.bloc-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}
.bloc-tete h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .84rem;
  font-weight: 800;
  letter-spacing: -.005em;
}
.num {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--rouge);
  color: #fff;
  font-family: var(--mono);
  font-size: .64rem;
  font-weight: 700;
}
.bloc-meta {
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--encre-faible);
}

.dossier {
  display: grid;
  grid-template-columns: 46fr 54fr;
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.appel-etat {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 5px 9px;
  margin-bottom: 8px;
  border-radius: 6px;
  background: var(--rouge-voile);
  border: 1px solid var(--rouge-filet);
  font-size: .76rem;
}
.appel-etat[hidden] { display: none; }
.pastille {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--rouge);
  animation: pouls 1.4s ease-in-out infinite;
}
@keyframes pouls { 0%,100% { opacity: 1 } 50% { opacity: .25 } }
.appel-txt { font-weight: 700; color: var(--rouge); }
.minuteur { font-family: var(--mono); font-weight: 700; color: var(--encre); }
.appel-note { flex-basis: 100%; color: var(--encre-faible); font-size: .72rem; }
.appel-note[hidden] { display: none; }

.vide {
  font-size: .82rem;
  color: var(--encre-faible);
  font-style: italic;
  padding: 6px 0;
}

.champs { display: flex; flex-direction: column; gap: 0; }

.champ {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px dashed var(--ligne);
}
.champ:last-child { border-bottom: 0; }

.champ-nom {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--encre-faible);
}
.champ-val {
  font-size: .92rem;
  font-weight: 600;
  color: var(--encre);
  word-break: break-word;
}
.champ-val.attente { font-weight: 400; color: var(--ligne-2); }
.champ.neuf .champ-val { color: var(--rouge); }
.champ.neuf { animation: arrive 420ms ease-out; }
@keyframes arrive {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: none; }
}

.champ-val.donnee { font-family: var(--mono); font-size: .88rem; letter-spacing: .02em; }

.bulles { display: flex; flex-direction: column; gap: 7px; }

.bulle {
  border-radius: 12px;
  padding: 9px 11px;
  font-size: .85rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.bulle-garage {
  background: var(--surface-2);
  border: 1px solid var(--ligne);
  border-bottom-left-radius: 3px;
}
.bulle-client {
  background: var(--rouge-voile);
  border: 1px solid var(--rouge-filet);
  border-bottom-right-radius: 3px;
}
.bulle b { font-weight: 800; }

.filtre {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px dashed var(--ligne-2);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: .82rem;
  color: var(--encre-doux);
}
.filtre-pastille {
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--encre-faible);
}
.filtre b { color: var(--encre); font-weight: 700; }

.erreur {
  font-size: .82rem;
  color: var(--rouge-fonce);
  padding: 6px 0;
}

.savoir {
  border: 0;
  border-radius: var(--r);
  padding: 0;
  max-width: 1080px;
  width: calc(100% - 48px);
  background: var(--blanc);
  color: var(--encre);
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
}
.savoir::backdrop { background: rgba(0,0,0,.5); }

.savoir-tete {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 2px solid var(--rouge);
}
.savoir-tete h2 { font-size: 1.2rem; font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; color: var(--rouge); }
.savoir-tete p { margin-top: 3px; font-size: .85rem; color: var(--encre-doux); max-width: 68ch; }

.btn-fermer {
  flex: none;
  border: 1px solid var(--ligne-2);
  border-radius: 50%;
  width: 30px; height: 30px;
  background: var(--blanc);
  color: var(--encre-doux);
  font-size: .85rem;
  cursor: pointer;
}
.btn-fermer:hover { border-color: var(--rouge); color: var(--rouge); }
.btn-fermer:focus-visible { outline: 2px solid var(--rouge); outline-offset: 2px; }

.savoir-corps {
  display: grid;
  grid-template-columns: 42fr 58fr;
  gap: 22px;
  padding: 16px 20px 20px;
  max-height: 70vh;
  overflow-y: auto;
}
.savoir-col h3 {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--encre-faible);
  margin-bottom: 8px;
}
.savoir-h3-rouge { color: var(--rouge) !important; margin-top: 14px !important; }

.savoir-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.savoir-table td { padding: 5px 0; border-bottom: 1px dashed var(--ligne); }
.savoir-table td.prix {
  text-align: right;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--rouge);
  white-space: nowrap;
}

.savoir-p { font-size: .85rem; color: var(--encre-doux); margin-bottom: 7px; }
.savoir-p b { color: var(--encre); font-weight: 700; }
.savoir-note { font-style: italic; color: var(--encre-faible); }

@media (max-width: 1100px) {
  .console { grid-template-columns: 1fr; }
  .familles { grid-template-columns: 1fr; }
  .preuve { order: -1; position: static; }
  .accroche { flex-direction: column; align-items: flex-start; }
  .savoir-corps { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  body { padding: 12px 14px 18px; }
  .dossier { grid-template-columns: 1fr; }
  .champ { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
