:root {
  --ate-navy: #0b2a4a;
  --ate-navy-2: #001f3f;
  --ate-teal: #4fb0ab;
  --ate-teal-d: #3a8f8a;
  --bs-primary: #1f5f8b;
  --bs-primary-rgb: 31, 95, 139;
  --bs-link-color: #1f5f8b;
  --bs-body-bg: #f4f6f9;
}
body { font-size: .925rem; }
.btn-primary { --bs-btn-bg: #1f5f8b; --bs-btn-border-color: #1f5f8b; --bs-btn-hover-bg: #174a6d; --bs-btn-hover-border-color: #174a6d; }
.btn-teal { background: var(--ate-teal); border-color: var(--ate-teal); color: #fff; }
.btn-teal:hover { background: var(--ate-teal-d); border-color: var(--ate-teal-d); color: #fff; }
.topbar { background: var(--ate-navy-2); }

/* Barre latérale */
.sidebar { width: 250px; min-height: 100vh; background: var(--ate-navy-2) !important; color: #fff; display: flex; flex-direction: column; flex-shrink: 0; }
@media (min-width: 992px) { .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; } }
.offcanvas-lg.sidebar { --bs-offcanvas-bg: var(--ate-navy-2); --bs-offcanvas-width: 260px; }
.sidebar-head { padding: 1rem 1rem .5rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-head .logo { height: 46px; border-radius: 4px; }
.sidebar-body { padding: .5rem; flex: 1; }
.sidebar-foot { padding: .9rem 1rem; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar .nav-link { color: rgba(255,255,255,.78); display: flex; align-items: center; gap: .6rem; padding: .42rem .7rem; border-radius: 6px; font-size: .9rem; }
.sidebar .nav-link i { width: 1.1rem; text-align: center; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.07); }
.sidebar .nav-link.active { color: #fff; background: var(--ate-teal-d); }
.sidebar .nav-link .badge { background: var(--ate-teal); font-weight: 600; }
.sidebar .nav-link.active .badge { background: rgba(0,0,0,.25); }
.nav-titre { text-transform: uppercase; font-size: .68rem; letter-spacing: .08em; color: rgba(255,255,255,.45); padding: .9rem .7rem .3rem; }

.contenu { padding: 1.4rem 1.6rem 3rem; min-width: 0; }
@media (max-width: 576px) { .contenu { padding: 1rem .7rem 3rem; } }
.page-titre h1 { color: var(--ate-navy); font-weight: 700; }

.card { border: 1px solid #e3e7ee; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: #fff; font-weight: 600; color: var(--ate-navy); }
.table > :not(caption) > * > * { padding: .45rem .55rem; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #5b6b7f; background: #f8fafc; white-space: nowrap; }
.table-hover tbody tr { cursor: default; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* Tuiles du tableau de bord */
.tuile { background: #fff; border: 1px solid #e3e7ee; border-radius: .6rem; padding: .9rem 1rem; height: 100%; }
.tuile .lib { font-size: .75rem; color: #5b6b7f; text-transform: uppercase; letter-spacing: .04em; }
.tuile .val { font-size: 1.8rem; font-weight: 700; color: var(--ate-navy); line-height: 1.2; }
.tuile.alerte .val { color: #b42318; }
.tuile.ok .val { color: #1f7a4d; }

/* Écran de saisie */
.saisie .form-label { font-size: .78rem; color: #5b6b7f; margin-bottom: .15rem; font-weight: 600; }
.saisie .form-control[readonly] { background: #f1f4f8; }
.mesures input { text-align: center; font-variant-numeric: tabular-nums; }
.mesures td, .mesures th { vertical-align: middle; }
.mesures .ecart { min-width: 4.5rem; text-align: center; border-radius: .35rem; padding: .3rem .4rem; font-variant-numeric: tabular-nums; font-weight: 600; background: #f1f4f8; }
.ecart.ok, .verdict.ok { background: #e3f1e8; color: #1f6b3a; }
.ecart.ko, .verdict.ko { background: #fde8e4; color: #9c1c0e; }
.verdict { border-radius: .4rem; padding: .45rem .7rem; font-weight: 700; text-align: center; background: #f1f4f8; color: #5b6b7f; }
.alerte-dec { color: #9c5700; font-size: .8rem; }
.info-instrument { font-size: .85rem; }
.point-opt { display: none; }
.point-opt.visible { display: table-row; }
.sticky-actions { position: sticky; bottom: 0; background: rgba(244,246,249,.96); backdrop-filter: blur(3px); padding: .75rem 0; border-top: 1px solid #e3e7ee; z-index: 5; }

/* Connexion / installation */
.page-nue { background: linear-gradient(135deg, #001f3f 0%, #0b3a5c 60%, #2f8f89 100%); min-height: 100vh; }
main.nu { max-width: 460px; margin: 0 auto; padding: 8vh 1rem 2rem; }
main.nu.large { max-width: 760px; }
.carte-nue { background: #fff; border-radius: .8rem; padding: 2rem; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.carte-nue .logo { height: 56px; border-radius: 4px; }

.timeline { border-left: 2px solid #dbe2ea; padding-left: 1rem; }
.timeline .ev { position: relative; padding-bottom: .7rem; }
.timeline .ev::before { content: ''; position: absolute; left: -1.38rem; top: .35rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--ate-teal); }
