:root {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    color: #172e35;
    background: #f3f5f2;
    line-height: 1.5;
    font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; }
.site-header { background: #122a32; color: #fff; }
.header-inner { max-width: 1200px; margin: auto; padding: 18px 24px; display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.brand { color: #fff; font-weight: 850; font-size: 1.35rem; letter-spacing: .08em; line-height: 1; text-decoration: none; margin-right: auto; }
.brand span { color: #c3e276; }
.brand small { display: block; font-size: .6rem; font-weight: 500; letter-spacing: .04em; margin-top: 6px; color: #c7d4d4; }
nav { display: flex; gap: 5px; flex-wrap: wrap; }
nav a { padding: 10px 12px; text-decoration: none; border-radius: 6px; color: #e5eeee; font-weight: 650; }
nav a[aria-current="page"], nav a:hover { background: #31505a; color: white; }
.logout { background: transparent; color: #fff; border: 1px solid #8da6a9; min-height: 42px; }
.container { width: min(1200px, 100%); margin: 0 auto; padding: 52px 24px 70px; flex: 1; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.page-heading p { margin-bottom: 0; }
.eyebrow { color: #527823; font-weight: 800; font-size: .76rem; letter-spacing: .12em; }
h1 { margin: 8px 0 10px; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.12; letter-spacing: -.035em; }
h2 { font-size: 1.3rem; line-height: 1.25; margin: 0 0 14px; }
p { color: #52666a; }
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { background: #fff; border: 1px solid #d5dfda; border-radius: 12px; padding: 26px; box-shadow: 0 3px 12px #16312a0a; }
.card-icon { display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: #ecf5db; color: #42651e; min-width: 46px; height: 46px; font-weight: 800; margin-bottom: 22px; }
.text-link { color: #375d16; font-weight: 750; text-decoration: none; display: inline-block; margin-top: 10px; }
.text-link:hover { text-decoration: underline; }
.info-panel { border-left: 4px solid #8cae45; background: #eaf0e3; padding: 20px 24px; margin-top: 24px; border-radius: 0 8px 8px 0; }
.info-panel p { margin: 5px 0 0; }
.login-card { max-width: 480px; margin: 20px auto; padding: 36px; }
.login-card h1 { font-size: 2.2rem; }
.stack { display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-weight: 700; font-size: .92rem; }
input, select, textarea, button { font: inherit; }
input:not([type="checkbox"]), select, textarea { width: 100%; min-height: 48px; border: 1px solid #9aaca7; border-radius: 6px; padding: 10px 12px; color: #172e35; background: white; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #bcdb65; outline-offset: 3px; }
.checkbox { display: flex; gap: 10px; align-items: center; }
.checkbox input { width: 22px; height: 22px; accent-color: #456a1d; }
button, .button { border: 0; border-radius: 7px; background: #254c36; color: #fff; padding: 12px 18px; min-height: 48px; font-weight: 750; cursor: pointer; text-align: center; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 12px; }
button:hover, .button:hover { background: #356c4b; }
button:disabled { opacity: .5; cursor: not-allowed; }
.secondary { background: #e4eee6; color: #1d4930; }
.secondary:hover { background: #d4e5d6; }
.danger { background: #fff; color: #a42c2c; border: 1px solid #b85e5e; margin-top: 16px; }
.danger:hover { background: #fae9e9; }
.muted { color: #607575; font-weight: 400; }
.small { font-size: .88rem; }
.notice { padding: 14px 18px; margin-bottom: 24px; background: #e1efda; border-radius: 6px; }
.notice.error { background: #fbe4e1; color: #79251e; }
.empty-state { text-align: center; padding: 64px 24px; }
.empty-state p { max-width: 510px; margin: 0 auto 20px; }
.disciplines { margin-top: 24px; }
.discipline-list { padding: 0; margin: 20px 0 0; list-style: none; }
.discipline-list li { display: grid; grid-template-columns: 4rem 1fr auto; gap: 12px; align-items: baseline; padding: 13px 0; border-top: 1px solid #e1e9e3; }
.discipline-list li strong { color: #42651e; }
.form-grid, .filter-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; align-items: end; }
.serie { border: 1px solid #d5dfda; border-radius: 8px; padding: 16px; margin: 0; }
.serie legend { font-weight: 750; padding: 0 6px; }
.serie-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.add-serie { margin-top: 16px; }
[hidden] { display: none !important; }
.session-list { padding: 0; margin: 20px 0 0; list-style: none; }
.session-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #e1e9e3; padding: 16px 0; }
.session-score { display: grid; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.badge { background: #edf2e8; color: #496336; padding: 6px 12px; border-radius: 30px; font-size: .8rem; font-weight: 750; }
.chrono-layout, .admin-layout { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 22px; align-items: start; }
.timer { text-align: center; background: #142e35; color: #fff; padding: 48px 24px; }
.timer .eyebrow { color: #c9e78a; font-size: 1rem; }
.timer p { color: #d2e0dc; }
.timer[data-phase="preparation"] { background: #244761; }
.timer[data-phase="delai"] { background: #7a4c13; }
.timer[data-phase="tir"] { background: #345b26; }
.clock { font-size: clamp(4rem, 13vw, 8rem); line-height: 1.2; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.05em; }
.timer-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.timer-actions #start { background: #c3e276; color: #1d3322; }
.timer-actions #start:hover { background: #d9efa1; }
.account summary { cursor: pointer; }
.account summary span { display: block; margin-top: 4px; }
.account-form { margin-top: 20px; }
footer { text-align: center; color: #657b78; font-size: .8rem; padding: 24px; }
@media (max-width: 700px) {
    .header-inner { gap: 14px; padding: 16px; }
    .header-inner nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
    nav a { white-space: nowrap; }
    .container { padding: 34px 16px 50px; }
    .card-grid, .chrono-layout, .admin-layout { grid-template-columns: 1fr; }
    .login-card { padding: 24px; }
    .page-heading .button, .page-heading > button { width: 100%; }
    .discipline-list li { grid-template-columns: 3rem 1fr; }
    .discipline-list li .muted { grid-column: 2; }
    .serie-fields { grid-template-columns: 1fr; }
    .session-list li > .button { width: 100%; }
}
