* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: #1d2430; background: #f5f6f8; }
.bandeau { display: flex; gap: 1rem; align-items: center; padding: .5rem 1rem; background: #1f3b57; color: #fff; }
.bandeau a { color: #fff; text-decoration: none; font-weight: 600; }
.bandeau .qui { margin-left: auto; }
.pied { padding: .5rem 1rem; color: #7a8494; font-size: 12px; }
button { font: inherit; padding: .3rem .7rem; border: 1px solid #b8c0cc; border-radius: 4px; background: #fff; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
button.principal { background: #1f6f43; color: #fff; border-color: #1f6f43; }
button.danger { color: #a3261b; }
button.petit { padding: .1rem .45rem; font-size: 12px; }
button.discret { background: transparent; color: #fff; border-color: #5d7a96; }
input, select, textarea { font: inherit; padding: .3rem .4rem; border: 1px solid #b8c0cc; border-radius: 4px; min-width: 0; }
.erreur { color: #a3261b; }
.connexion { max-width: 380px; margin: 3rem auto; background: #fff; padding: 1.5rem; border-radius: 8px; }
.connexion label { display: block; margin: .8rem 0; }
.connexion input { display: block; width: 100%; margin-top: .2rem; }
.liste { max-width: 1100px; margin: 1rem auto; padding: 0 1rem; }
.avancement { border-collapse: collapse; background: #fff; }
.avancement td, .avancement th { padding: .3rem .8rem; border: 1px solid #dde1e7; text-align: left; }
.grille { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 4px; }
.case { display: inline-block; padding: .25rem .4rem; border-radius: 4px; text-align: center; text-decoration: none; color: #1d2430; border: 1px solid #c9d0da; background: #fff; }
.case.en_cours { background: #ffe9b3; border-color: #e0b84a; }
.case.termine { background: #c8ecd4; border-color: #5aa874; }
.navigation { display: flex; gap: 1rem; align-items: center; padding: .4rem 1rem; background: #fff; border-bottom: 1px solid #dde1e7; }
.statut { margin-left: auto; padding: .1rem .5rem; border-radius: 4px; background: #eef; }
.statut.termine { background: #c8ecd4; }
.espace { display: grid; grid-template-columns: minmax(0, 3fr) minmax(380px, 2fr); height: calc(100vh - 110px); }
.visionneuse { overflow: auto; background: #3a3f47; padding: .5rem; }
.commandes-page { position: sticky; top: 0; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; color: #fff; padding-bottom: .4rem; background: #3a3f47; z-index: 1; }
.onglet.actif { background: #ffe9b3; }
.cadre-page img { width: 100%; background: #fff; display: block; }
.tableau { border-collapse: collapse; background: #fff; font-size: 12px; }
.tableau td, .tableau th { border: 1px solid #dde1e7; padding: 2px 4px; white-space: nowrap; }
.tableau th { background: #eef1f5; color: #7a8494; }
.formulaire { overflow: auto; padding: .8rem 1rem 3rem; background: #fff; }
.nature select { width: 100%; margin: .3rem 0 1rem; font-size: 15px; }
fieldset { border: 1px solid #dde1e7; border-radius: 6px; margin: 0 0 1rem; padding: .5rem .8rem; }
legend { font-weight: 600; }
.champ { display: grid; grid-template-columns: 1fr auto auto auto auto; gap: .25rem .4rem; align-items: center; padding: .35rem 0; border-bottom: 1px dashed #edf0f3; }
.champ label { grid-column: 1 / -1; font-weight: 500; }
.champ input, .champ select { grid-column: 1; }
.champ .message { grid-column: 1 / -1; color: #a3261b; font-size: 12px; }
.champ .aide, p.aide { grid-column: 1 / -1; color: #6b7482; font-size: 12px; }
.champ.envoi { opacity: .6; }
.badge { font-size: 11px; padding: .05rem .4rem; border-radius: 3px; }
.badge.vide { background: #f1f3f6; color: #7a8494; }
.badge.ok { background: #c8ecd4; }
.badge.absent { background: #e3e7ee; }
.badge.illisible { background: #ffd8cf; }
.ligne-prix { margin: .5rem 0; padding: .3rem .6rem; background: #f8f9fb; border-radius: 4px; }
.ligne-prix h4 { margin: .2rem 0; }
.site > button.danger { float: right; }
.remarque textarea { width: 100%; }
.fin { margin-top: 1rem; padding: .6rem; background: #f8f9fb; border-radius: 6px; }
.legende .case { margin-right: .4rem; }
@media (max-width: 900px) { .espace { grid-template-columns: 1fr; height: auto; } .visionneuse { max-height: 70vh; } }
.porte-page { position: relative; width: 100%; margin: 0 auto; user-select: none; }
.porte-page.trace { cursor: crosshair; outline: 3px solid #e0b84a; }
.porte-page img { width: 100%; }
.rectangle { position: absolute; border: 2px solid #d9480f; background: rgba(255, 196, 0, .18); pointer-events: none; }
.rectangle.repere { border-color: #1f6f43; background: rgba(31, 111, 67, .15); }
.consigne-zone { margin: 0 0 .4rem; padding: .3rem .6rem; background: #ffe9b3; border-radius: 4px; }
.champ.actif { background: #f3f8ff; }
