/* intranet-at — feuille de styles (déliée de index.html) */
* {
    box-sizing: border-box
}

:root {
    --bg: #eceffa;
    --surface: #fff;
    --ink: #16213a;
    --ink2: #2c3957;
    --muted: #6a7390;
    --line: #e3e8f4;
    --pri: #1b4fd1;
    --pri-d: #1640a8;
    --pri-soft: #e7eefd;
    --ok: #1f9d6b;
    --okbg: #e2f4eb;
    --warn: #cf8a08;
    --warnbg: #faf0d8;
    --rad: 16px;
    --soft: #eef1f8;
    --soft2: #f5f7fc;
    --hover: #f3f5fb;
    --grad1: #dfe7fb
}

.root.dark {
    --bg: #0f1626;
    --surface: #172333;
    --ink: #e9edf6;
    --ink2: #c4cde0;
    --muted: #8896b0;
    --line: #28344a;
    --pri-soft: #1f2d4e;
    --okbg: #15321f;
    --warnbg: #33270d;
    --soft: #1d2940;
    --soft2: #1a2536;
    --hover: #202d47;
    --grad1: #16203a
}

html,
body {
    margin: 0;
    padding: 0
}

body {
    font-family: 'Public Sans', system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased
}

h1,
h2,
h3,
h4 {
    font-family: 'Archivo', sans-serif;
    margin: 0;
    letter-spacing: -.01em
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit
}

select {
    font-family: inherit
}

.root {
    min-height: 100vh;
    color: var(--ink);
    background: var(--bg)
}

.muted {
    color: var(--muted)
}

.tiny {
    font-size: 12px
}

/* login */
.login {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: radial-gradient(circle at 30% 0%, var(--grad1), var(--bg) 60%)
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px
}

.mark {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--pri);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Archivo';
    font-weight: 800;
    font-size: 20px;
    box-shadow: 0 6px 16px rgba(27, 79, 209, .35);
    overflow: hidden
}

.mark img {
    width: 74%;
    height: 74%;
    object-fit: contain;
    display: block
}

.wordmark {
    font-family: 'Archivo';
    font-weight: 800;
    font-size: 20px;
    letter-spacing: .04em
}

.login h2 {
    font-size: 24px;
    margin: 22px 0 4px
}

.usergrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    max-width: 660px;
    margin-top: 26px
}

.authcard {
    width: 100%;
    max-width: 380px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 28px;
    margin-top: 22px;
    box-shadow: 0 12px 40px rgba(22, 33, 58, .1)
}

.inp {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    background: var(--surface);
    outline: none;
    transition: border-color .12s, box-shadow .12s
}

.inp:focus {
    border-color: var(--pri);
    box-shadow: 0 0 0 3px var(--pri-soft)
}

.inp::placeholder {
    color: var(--muted)
}

.pwwrap {
    position: relative
}

.pwtoggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--pri);
    background: transparent
}

.pwtoggle:hover {
    background: var(--pri-soft)
}

.autherr {
    background: #fbe9e9;
    color: #b42525;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 13px;
    border-radius: 10px;
    margin-bottom: 14px
}

.root.dark .autherr {
    background: #3a1c1c;
    color: #f0a3a3
}

.demobox {
    width: 100%;
    max-width: 380px;
    margin-top: 18px
}

.demohead {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    margin-bottom: 10px;
    text-align: center
}

.demogrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px
}

.demochip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 11px;
    transition: border-color .12s, transform .1s
}

.demochip:hover {
    border-color: var(--pri);
    transform: translateY(-1px)
}

.ucard {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    text-align: left;
    transition: transform .12s, box-shadow .12s, border-color .12s
}

.ucard:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(22, 33, 58, .1);
    border-color: #c7d4f4
}

.av {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Archivo';
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    background: var(--pri)
}

.av.lg {
    width: 72px;
    height: 72px;
    font-size: 26px
}

.av.xl {
    width: 88px;
    height: 88px;
    font-size: 30px
}

.rb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap
}

.rb::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .9
}

.rb-stagiaire {
    background: var(--warnbg);
    color: #9a6804
}

.rb-confirme {
    background: var(--okbg);
    color: #117a4d
}

.rb-formateur {
    background: #efe6fb;
    color: #6a3fbf
}

.rb-controleur {
    background: #dff2f5;
    color: #0c7280
}

.rb-direction {
    background: #e6ebf6;
    color: #33446b
}

/* shell */
.shell {
    display: flex;
    min-height: 100vh
}

.side {
    width: 236px;
    flex: none;
    background: var(--surface);
    border-right: 1px solid var(--line);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh
}

.side .brand {
    margin-bottom: 26px;
    padding: 0 6px
}

.navit {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 13px;
    border-radius: 11px;
    color: var(--ink2);
    font-weight: 600;
    font-size: 14.5px;
    margin-bottom: 4px;
    transition: background .12s, color .12s
}

.navit:hover {
    background: var(--hover)
}

.navit.on {
    background: var(--pri-soft);
    color: var(--pri-d)
}

.navit svg {
    flex: none
}

.navit .ico {
    width: 20px;
    height: 20px;
    color: var(--muted)
}

.navit.on .ico {
    color: var(--pri)
}

.sidefoot {
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding-top: 14px
}

.userchip {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px;
    border-radius: 11px
}

.userchip:hover {
    background: var(--hover)
}

.userchip .av {
    width: 36px;
    height: 36px;
    font-size: 13px
}

.logout {
    margin-top: 8px;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    border-radius: 9px;
    color: var(--muted);
    font-weight: 600;
    font-size: 13px
}

.logout:hover {
    background: var(--hover);
    color: var(--ink)
}

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column
}

.topbar {
    display: none
}

.content {
    flex: 1;
    padding: 30px 38px 60px;
    max-width: 1080px;
    width: 100%;
    margin: 0 auto
}

.bottomnav {
    display: none
}

/* cards & generic */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--rad);
    padding: 22px
}

.h-greet {
    font-size: 14px;
    color: var(--muted);
    font-weight: 600
}

.h-title {
    font-size: 27px;
    margin-top: 2px
}

.pagehead {
    margin-bottom: 24px
}

.grid2 {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 11px;
    font-weight: 700;
    font-size: 14.5px;
    transition: background .12s, transform .08s
}

.btn:active {
    transform: scale(.985)
}

.btn-pri {
    background: var(--pri);
    color: #fff
}

.btn-pri:hover {
    background: var(--pri-d)
}

.btn-lg {
    padding: 16px 22px;
    font-size: 16px;
    width: 100%;
    border-radius: 13px
}

.btn-ghost {
    background: var(--soft);
    color: var(--ink2)
}

.btn-ghost:hover {
    background: var(--hover)
}

.btn-ok {
    background: var(--ok);
    color: #fff
}

.btn-danger {
    background: #e54848;
    color: #fff
}

.btn-danger:hover {
    background: #cf3838
}

.sectlabel {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px
}

/* stat ring + bignum */
.bignum {
    font-family: 'Archivo';
    font-weight: 800;
    font-size: 40px;
    line-height: 1;
    letter-spacing: -.02em
}

.statrow {
    display: flex;
    align-items: baseline;
    gap: 8px
}

.prog {
    height: 9px;
    border-radius: 99px;
    background: var(--soft);
    overflow: hidden;
    margin-top: 14px
}

.prog>i {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: var(--pri)
}

/* chart */
.seg {
    display: inline-flex;
    background: var(--soft);
    border-radius: 10px;
    padding: 3px
}

.seg button {
    padding: 7px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13.5px;
    color: var(--muted)
}

.seg button.on {
    background: var(--surface);
    color: var(--pri);
    box-shadow: 0 1px 3px rgba(22, 33, 58, .12)
}

.chart {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    height: 200px;
    margin-top: 22px;
    padding-top: 10px
}

.col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%
}

.colval {
    font-size: 12px;
    font-weight: 700;
    color: var(--ink2)
}

.bartrack {
    flex: 1;
    width: 100%;
    max-width: 40px;
    display: flex;
    align-items: flex-end;
    background: var(--soft2);
    border-radius: 8px;
    overflow: hidden
}

.barfill {
    width: 100%;
    background: linear-gradient(var(--pri), #3a68df);
    border-radius: 8px 8px 0 0;
    min-height: 4px;
    transition: height .4s cubic-bezier(.3, .8, .3, 1)
}

.barfill.today {
    background: linear-gradient(var(--ok), #36b380)
}

.collab {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted)
}

.collab.today {
    color: var(--ok)
}

/* feuille mini */
.fl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 0;
    border-bottom: 1px solid var(--line)
}

.fl-row:last-child {
    border-bottom: none
}

.kv {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600
}

.kvv {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ink)
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700
}

.pill-ok {
    background: var(--okbg);
    color: #117a4d
}

.pill-draft {
    background: var(--warnbg);
    color: #9a6804
}

/* service */
.svc-hero {
    text-align: center;
    padding: 30px 22px
}

.statuschip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px
}

.statuschip.off {
    background: var(--soft);
    color: var(--muted)
}

.statuschip.on {
    background: var(--okbg);
    color: #117a4d
}

.statuschip.pause {
    background: var(--warnbg);
    color: #9a6804
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor
}

.dot.live {
    animation: pulse 1.4s infinite
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: .3
    }
}

.timer {
    font-family: 'Archivo';
    font-weight: 800;
    font-size: 62px;
    letter-spacing: .01em;
    line-height: 1;
    margin: 18px 0 6px;
    font-variant-numeric: tabular-nums
}

.field {
    margin-bottom: 14px
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px
}

.field select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    background: var(--surface);
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat
}

.svc-meta {
    display: flex;
    justify-content: center;
    gap: 26px;
    margin-top: 6px;
    flex-wrap: wrap
}

.svc-meta div {
    text-align: center
}

.svc-actions {
    display: flex;
    gap: 12px;
    margin-top: 26px
}

.svc-actions .btn {
    flex: 1
}

/* feuille full */
.feuille {
    max-width: 620px;
    margin: 0 auto
}

.fbig {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 18px 0
}

.fbig .box {
    background: var(--soft2);
    border-radius: 13px;
    padding: 16px
}

.fbig .box .l {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted)
}

.fbig .box .v {
    font-family: 'Archivo';
    font-weight: 700;
    font-size: 26px;
    margin-top: 4px
}

.sign {
    margin-top: 18px;
    border: 1.5px dashed var(--line);
    border-radius: 13px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600
}

/* profil */
.profhead {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap
}

.statgrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 8px
}

.stat {
    background: var(--soft2);
    border-radius: 13px;
    padding: 16px
}

.stat .v {
    font-family: 'Archivo';
    font-weight: 800;
    font-size: 24px
}

.stat .l {
    font-size: 12.5px;
    color: var(--muted);
    font-weight: 600;
    margin-top: 3px
}

.steps {
    position: relative;
    margin-top: 6px
}

.step {
    display: flex;
    gap: 16px;
    padding-bottom: 22px;
    position: relative
}

.step:last-child {
    padding-bottom: 0
}

.step .line {
    position: absolute;
    left: 15px;
    top: 32px;
    bottom: 0;
    width: 2px;
    background: var(--line)
}

.step.done .line,
.step.current .line {
    background: var(--pri)
}

.snode {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    font-family: 'Archivo';
    background: var(--soft);
    color: var(--muted);
    border: 2px solid var(--soft);
    z-index: 1
}

.step.done .snode {
    background: var(--ok);
    color: #fff;
    border-color: var(--ok)
}

.step.current .snode {
    background: var(--pri);
    color: #fff;
    border-color: var(--pri-soft);
    box-shadow: 0 0 0 4px var(--pri-soft)
}

.step .stitle {
    font-weight: 700;
    font-size: 15px
}

.step.todo .stitle {
    color: var(--muted)
}

.step .sdesc {
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px
}

.badgegrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 4px
}

.badge {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 13px
}

.badge.locked {
    opacity: .45
}

.bicon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Archivo';
    font-weight: 800;
    color: #fff;
    font-size: 14px
}

/* direction */
.kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px
}

.kpi {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px
}

.kpi .v {
    font-family: 'Archivo';
    font-weight: 800;
    font-size: 30px;
    letter-spacing: -.02em
}

.kpi .l {
    font-size: 12.5px;
    color: var(--muted);
    font-weight: 600;
    margin-top: 4px
}

.cotm {
    background: linear-gradient(120deg, var(--pri), #3a68df);
    color: #fff;
    border-radius: var(--rad);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px
}

.cotm .av {
    background: rgba(255, 255, 255, .2);
    border: 2px solid rgba(255, 255, 255, .5)
}

.rank {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line)
}

.rank:last-child {
    border-bottom: none
}

.rnum {
    width: 24px;
    font-family: 'Archivo';
    font-weight: 800;
    color: var(--muted);
    text-align: center
}

.rbar {
    flex: 1;
    height: 8px;
    background: var(--soft);
    border-radius: 99px;
    overflow: hidden
}

.rbar>i {
    display: block;
    height: 100%;
    background: var(--pri);
    border-radius: 99px
}

.rhrs {
    font-weight: 700;
    font-size: 14px;
    width: 54px;
    text-align: right
}

.ftable {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px
}

.ftable th {
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    padding: 10px 12px;
    border-bottom: 1px solid var(--line)
}

.ftable td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    font-weight: 600
}

.ftable tr:last-child td {
    border-bottom: none
}

.spacer {
    height: 20px
}

.themebtn {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 12px;
    border-radius: 9px;
    color: var(--muted);
    font-weight: 600;
    font-size: 13px
}

.themebtn:hover {
    background: var(--hover);
    color: var(--ink)
}

.themeico {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1.6px solid currentColor;
    background: linear-gradient(90deg, currentColor 50%, transparent 50%);
    flex: none
}

.themetoggle {
    position: absolute;
    top: 22px;
    right: 22px;
    width: auto
}

.iconbtn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink2);
    background: var(--soft)
}

.adminrow {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line)
}

.adminrow .field {
    margin-bottom: 0;
    flex: 1;
    min-width: 120px
}

.adminrow .field.sm {
    flex: 0 0 120px
}

.adminrow .btn {
    flex: 0 0 auto;
    height: 46px
}

.iconbtn-del {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cf3b3b;
    background: transparent;
    font-size: 15px;
    font-weight: 700
}

.iconbtn-del:hover {
    background: #fbe9e9
}

.root.dark .iconbtn-del:hover {
    background: #3a1c1c
}

.typetag {
    display: inline-flex;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700
}

.tt-bus {
    background: var(--pri-soft);
    color: var(--pri-d)
}

.tt-taxi {
    background: #faf0d8;
    color: #9a6804
}

.root.dark .tt-taxi {
    background: #33270d;
    color: #e7b84e
}

.adminnote {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 10px;
    background: var(--soft2);
    padding: 9px 12px;
    border-radius: 9px
}

.disabledform {
    opacity: .45;
    pointer-events: none;
    filter: grayscale(.5)
}

.mono {
    font-family: 'Archivo';
    letter-spacing: .02em
}

.selfbadge {
    font-size: 11px;
    font-weight: 700;
    color: var(--pri);
    background: var(--pri-soft);
    padding: 1px 7px;
    border-radius: 5px;
    margin-left: 6px
}

.adlabel {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
    display: block
}

.adminsub {
    font-size: 13.5px;
    color: var(--muted);
    margin: -6px 0 14px
}

@media (max-width:860px) {
    .side {
        display: none
    }

    .content {
        padding: 18px 16px 96px
    }

    .grid2 {
        grid-template-columns: 1fr
    }

    .kpis {
        grid-template-columns: repeat(2, 1fr)
    }

    .h-title {
        font-size: 23px
    }

    .topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 13px 16px;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        position: sticky;
        top: 0;
        z-index: 20
    }

    .usergrid {
        grid-template-columns: 1fr
    }

    .bottomnav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--surface);
        border-top: 1px solid var(--line);
        padding: 7px 6px 9px;
        z-index: 30
    }

    .bnav {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 6px;
        color: var(--muted);
        font-size: 11px;
        font-weight: 600;
        border-radius: 10px
    }

    .bnav .ico {
        width: 22px;
        height: 22px
    }

    .bnav.on {
        color: var(--pri)
    }

    .timer {
        font-size: 52px
    }
}