/* Cockpit 0.7.0 : onglets (Météo, Santé PSNA), éphémérides, terrain voisin, « Mon profil ».
 * Fichier à part pour ne pas toucher cockpit.css ; mêmes couleurs que le reste (variables de .cku). */

/* ---------- Onglets ---------- */
.cku-ong { min-width: 0; }
.cku-ong-barre { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 14px; border-bottom: 2px solid #1d2328; }
.cku-ong-barre [role="tab"] { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; min-height: 44px; border-radius: 4px 4px 0 0; text-decoration: none !important; color: var(--placard-dim) !important; font-size: 14px; }
.cku-ong-barre [role="tab"]:hover { color: #fff !important; background: rgba(255,255,255,.06); }
.cku-ong-barre [role="tab"]:focus-visible { outline: 2px solid var(--magenta); outline-offset: -2px; color: #fff !important; }
.cku-ong-barre [role="tab"].is-on { color: #fff !important; background: #1d2328; box-shadow: inset 0 3px 0 var(--magenta); }
.cku-ong-b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font: 700 12px 'B612 Mono', monospace; background: #3b444c; color: var(--placard); }
.cku-ong-b.is-hors { background: #d03b3b; color: #fff; }
.cku-ong-b.is-surveiller { background: #fab219; color: #1d2328; }
.cku-ong-choix { display: none; margin: 0 0 14px; }
.cku-ong-choix span { display: block; font-size: 12.5px; color: var(--placard-dim); margin-bottom: 4px; }
.cku-ong-choix select { width: 100%; min-height: 46px; font: 700 15px 'B612', sans-serif; color: var(--placard); background: #1d2328; border: 1px solid #3b444c; border-radius: 6px; padding: 8px 10px; box-shadow: inset 0 -3px 0 var(--magenta); }
.cku-ong-p { min-width: 0; outline: none; }
.cku-ong-p[hidden] { display: none !important; }
@media (max-width: 640px) {
    .cku-ong-barre { display: none; }
    .cku-ong-choix { display: block; }
}

/* ---------- Météo : terrain voisin, radar sans clef ---------- */
.cku-wx-voisin-l { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: #2e2a1c; border-left: 4px solid var(--amber); font-size: 14px; color: var(--placard); }
.cku-wx-voisin-l strong { color: #ffd27a; }
.cku-wx-voisin-l .cku-btn { margin-left: auto; }
.cku-wx-cle { max-width: 760px; }
.cku-wx-cle p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.5; }
.cku-wx-etapes { margin: 0 0 12px; padding-left: 0; list-style: none; counter-reset: e; display: grid; gap: 8px; }
.cku-wx-etapes li { counter-increment: e; position: relative; padding: 10px 12px 10px 48px; background: rgba(0,0,0,.35); border-radius: 8px; font-size: 14.5px; line-height: 1.45; }
.cku-wx-etapes li::before { content: counter(e); position: absolute; left: 12px; top: 9px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--magenta); color: #fff; font: 700 13px 'B612 Mono', monospace; }
.cku-wx-etapes a { color: var(--cyan); }
.cku-wx-radar { min-height: 120px; }

/* ---------- Éphémérides ---------- */
.cku-eph-etat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 0 0 14px !important; padding: 12px 14px; border-radius: 10px; background: linear-gradient(90deg, #3d5a73, #2a3238); font-size: 16px; font-weight: 700; color: #fff; }
.cku-eph-etat.is-nuit { background: linear-gradient(90deg, #141b33, #2a3238); }
.cku-eph-etat span { font-size: 20px; color: #ffd27a; }
.cku-eph-etat small { font-weight: 400; font-size: 13px; color: var(--placard-dim); }
.cku-eph-frise { position: relative; height: 34px; border-radius: 8px; overflow: hidden; background: #0c1124; box-shadow: inset 0 0 0 1px #1d2328; }
.cku-eph-frise > span { position: absolute; top: 0; bottom: 0; }
.cku-eph-frise .is-nuit, .cku-eph-k.is-nuit { background: #0c1124; }
.cku-eph-frise .is-nautique, .cku-eph-k.is-nautique { background: #23305e; }
.cku-eph-frise .is-civil, .cku-eph-k.is-civil { background: #c96f4a; }
.cku-eph-frise .is-jour, .cku-eph-k.is-jour { background: linear-gradient(180deg, #8fd0ff, #5aa8e0); }
.cku-eph-na { position: absolute; top: 0; height: 9px; background: repeating-linear-gradient(135deg, rgba(224,64,251,.9) 0 4px, transparent 4px 8px); }
.cku-eph-k.is-na { background: repeating-linear-gradient(135deg, rgba(224,64,251,.9) 0 3px, #0c1124 3px 6px); }
.cku-eph-now { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.5); }
.cku-eph-now em { position: absolute; bottom: 2px; left: 5px; font: 700 11px 'B612 Mono', monospace; font-style: normal; color: #fff; text-shadow: 0 1px 2px #000; white-space: nowrap; }
.cku-eph-graduation { position: relative; height: 18px; margin: 2px 0 0; font: 11px 'B612 Mono', monospace; color: var(--placard-dim); }
.cku-eph-graduation span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.cku-eph-graduation span:first-child { transform: none; }
.cku-eph-graduation span:last-child { transform: translateX(-100%); }
.cku-eph-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; margin: 6px 0 18px; }
.cku-eph-c { background: rgba(0,0,0,.4); border-radius: 10px; padding: 12px 14px; box-shadow: inset 0 0 0 1px #1d2328; min-width: 0; }
.cku-eph-c h3 { margin: 0 0 8px; font-size: 15px; color: var(--placard); font-family: inherit; }
.cku-eph-c dl { margin: 0; display: grid; gap: 6px; }
.cku-eph-c dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid rgba(255,255,255,.06); padding-bottom: 5px; }
.cku-eph-c dt { font-size: 13px; color: var(--placard-dim); }
.cku-eph-c dt small { font-size: 11.5px; opacity: .85; }
.cku-eph-c dd { margin: 0; font: 700 17px 'B612 Mono', monospace; color: var(--placard); text-align: right; }
.cku-eph-c dd small { display: block; font: 400 11.5px 'B612 Mono', monospace; color: var(--placard-dim); }
.cku-eph-c-nuit { box-shadow: inset 0 0 0 1px #1d2328, inset 3px 0 0 var(--magenta); }
.cku-eph-diff { display: block; font: 400 12px 'B612', sans-serif !important; }
.cku-eph-diff.is-plus { color: #7ee081 !important; }
.cku-eph-diff.is-moins { color: #ffb38a !important; }
.cku-eph-rappel { margin: 10px 0 0 !important; font-size: 12.5px; line-height: 1.45; color: var(--placard-dim); }
.cku-eph-lune-l { display: flex; align-items: center; gap: 14px; margin: 0 0 10px; }
.cku-eph-lune { flex: 0 0 auto; filter: drop-shadow(0 0 10px rgba(242,236,210,.18)); }
.cku-eph-lune-nom { font-size: 16px; font-weight: 700; margin: 0 0 4px !important; }
.cku-eph-lune-l p { font-size: 13.5px; margin: 0; color: var(--placard-dim); }
.cku-eph-lune-l strong { color: var(--placard); }
.cku-eph-tw { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 8px; box-shadow: inset 0 0 0 1px #1d2328; }
.cku-eph-t { width: 100%; border-collapse: collapse; font-size: 13.5px; background: rgba(0,0,0,.35); min-width: 640px; }
.cku-eph-t th, .cku-eph-t td { padding: 8px 10px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.07); white-space: nowrap; }
.cku-eph-t thead th { font-size: 12px; color: var(--placard-dim); font-weight: 700; background: #1d2328; }
.cku-eph-t td { font-family: 'B612 Mono', monospace; color: var(--placard); }
.cku-eph-t td small { color: var(--placard-dim); font-size: 11px; }
.cku-eph-t tr.is-auj th, .cku-eph-t tr.is-auj td { background: rgba(224,64,251,.08); }
.cku-eph-tl { display: flex; align-items: center; gap: 6px; }
.cku-eph-tl .cku-eph-lune { filter: none; }

/* ---------- Santé PSNA : vue d'ensemble, historique, rapport ---------- */
.cku-sante-att { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; }
.cku-sante-att li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; background: rgba(0,0,0,.4); border-radius: 6px; font-size: 14px; }
.cku-sante-att a { color: var(--cyan); }
.cku-sante-doms { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 8px; }
.cku-sante-doms a { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 12px 14px; min-height: 52px; background: var(--well); border-radius: 8px; text-decoration: none; box-shadow: inset 0 0 0 1px #1d2328; }
.cku-sante-doms a:hover, .cku-sante-doms a:focus-visible { box-shadow: inset 0 0 0 2px var(--cyan); outline: none; }
.cku-sante-doms span:first-child { font-weight: 700; color: var(--placard); }
.cku-sante-doms small { width: 100%; font-size: 12px; color: var(--placard-dim); }
.cku-sante-rap { margin: 0 0 12px; font-size: 14.5px; }
.cku-sante-rap p { margin: 0 0 10px; }
.cku-sante-rap-b { display: flex; flex-wrap: wrap; gap: 8px; }
.cku-sante-hist td { white-space: nowrap; }
.cku-sante-hist .cku-mat-c { font-size: 12.5px; padding: 2px 6px; border-radius: 4px; }
.cku-sante-hist .cku-st-hors { background: rgba(208,59,59,.28); }
.cku-sante-hist .cku-st-surveiller { background: rgba(250,178,25,.22); }
.cku-sante-hist .cku-st-bon { background: rgba(12,163,12,.2); }
.cku-sante-hist-dom th { background: #1d2328; color: var(--placard-dim); font-size: 12px; text-align: left; }

/* ---------- Mon profil ---------- */
.cku-tile-profil .cku-pf-trig { font: 700 12px 'B612 Mono', monospace; color: var(--magenta); background: #000; padding: 2px 6px; border-radius: 3px; vertical-align: 2px; }
.cku-tile-profil.is-alerte { box-shadow: inset 0 0 0 2px var(--amber); }
.cku-pf-id { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 0 0 14px; padding: 14px 16px; border-radius: 10px; background: var(--well); box-shadow: inset 0 0 0 1px #1d2328; }
.cku-pf-avatar { flex: 0 0 auto; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: #1d2328; color: var(--magenta); font: 700 18px 'B612 Mono', monospace; box-shadow: inset 0 0 0 2px var(--magenta); }
.cku-pf-qui { flex: 1 1 220px; min-width: 0; display: grid; gap: 4px; }
.cku-pf-nom { font-size: 20px; font-weight: 700; }
.cku-pf-go { font-size: 16px !important; padding: 13px 20px !important; }
.cku-pf-alerte { margin: 0 0 14px !important; padding: 10px 14px; border-radius: 8px; background: #3a1f1f; border-left: 4px solid #d03b3b; }
.cku-pf-b { display: inline-block; font: 700 12px 'B612', sans-serif; padding: 3px 9px; border-radius: 10px; border: 1px solid; white-space: nowrap; }
.cku-pf-b.is-l { font-size: 13.5px; padding: 5px 12px; white-space: normal; }
.cku-pf-b.is-ok { background: #0f3a12; color: #9be59c; border-color: #0ca30c; }
.cku-pf-b.is-info { background: #10303a; color: #8fe3f2; border-color: #4fd1e8; }
.cku-pf-b.is-warn { background: #3b2d08; color: #ffd27a; border-color: #fab219; }
.cku-pf-b.is-ko { background: #3a1414; color: #ffaaa5; border-color: #d03b3b; }
.cku-pf-b.is-na { background: #2a3238; color: var(--placard-dim); border-color: #5b6670; }
.cku-pf-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 8px; margin: 0 0 16px; }
.cku-pf-kpi > div { background: rgba(0,0,0,.45); border-radius: 8px; padding: 10px 12px; }
.cku-pf-kpi dt { font-size: 12.5px; color: var(--placard-dim); }
.cku-pf-kpi dd { margin: 4px 0 0; font: 700 20px 'B612 Mono', monospace; color: var(--placard); }
.cku-pf-kpi dd small { display: block; font: 400 12px 'B612', sans-serif; color: var(--placard-dim); margin-top: 2px; }
.cku-pf-kpi .is-warn { box-shadow: inset 3px 0 0 #fab219; } .cku-pf-kpi .is-warn dd { color: #fab219; }
.cku-pf-kpi .is-info { box-shadow: inset 3px 0 0 var(--cyan); }
.cku-pf-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 12px; }
.cku-pf-c { background: rgba(0,0,0,.4); border-radius: 10px; padding: 12px 14px; box-shadow: inset 0 0 0 1px #1d2328; min-width: 0; }
.cku-pf-c h3 { margin: 0 0 10px; font-size: 15px; font-family: inherit; color: var(--placard); }
.cku-pf-c-faire { box-shadow: inset 0 0 0 1px #1d2328, inset 3px 0 0 var(--amber); }
.cku-pf-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cku-pf-l li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 14px; }
.cku-pf-l li:last-child { border-bottom: 0; }
.cku-pf-l small { color: var(--placard-dim); font-size: 12.5px; }
.cku-pf-l small.is-ko { color: #ff8a80; }
.cku-pf-l .cku-btn { padding: 6px 10px; font-size: 12.5px; margin-left: auto; }
.cku-pf-tag { font: 700 11px 'B612', sans-serif; text-transform: uppercase; letter-spacing: .03em; color: #1d2328; background: var(--placard-dim); padding: 2px 7px; border-radius: 3px; }
.cku-pf-t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cku-pf-t th, .cku-pf-t td { padding: 7px 6px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.06); vertical-align: middle; }
.cku-pf-t thead th { font-size: 12px; color: var(--placard-dim); }
.cku-pf-t tbody th { font-weight: 400; color: var(--placard); }
.cku-pf-t td { font-family: 'B612 Mono', monospace; white-space: nowrap; }
@media (max-width: 560px) {
    .cku-pf-go { width: 100%; text-align: center; }
    .cku-pf-t thead { display: none; }
    .cku-pf-t tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
    .cku-pf-t th, .cku-pf-t td { border: 0; padding: 0; }
    .cku-pf-t tbody th { grid-column: 1 / -1; font-weight: 700; }
    .cku-eph-c dd { font-size: 16px; }
    .cku-wx-voisin-l .cku-btn { margin-left: 0; }
}
