/* ops.fnfl.app : thème marine FNFL */
:root {
  --bg: #0b121d; --panel: #121c2c; --panel2: #18253a; --line: #263752; --text: #e6ecf5; --muted: #8fa1bd;
  --gold: #f2c14e; --blue: #4d8dff; --red: #e5484d; --green: #3fa66b;
  --radius: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--blue); }
[hidden] { display: none !important; }

/* connexion */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login form { width: 100%; max-width: 360px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.login img { width: 96px; height: 96px; }
.login h1 { margin: 10px 0 2px; font-size: 22px; }
.login p.sub { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
label { display: block; text-align: left; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
input, select, textarea { width: 100%; padding: 9px 11px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: transparent; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; border: 1px solid transparent; border-radius: 6px; background: var(--blue); color: #fff; font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none; }
.ghost, button.ghost, .btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.ghost:hover { background: var(--panel2); }
button:disabled { opacity: .5; cursor: default; }
.login button { width: 100%; margin-top: 20px; }
.msg { min-height: 20px; margin-top: 12px; font-size: 13px; color: var(--red); }

/* application */
header.top { display: flex; align-items: center; gap: 14px; padding: 10px 20px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
header.top img { width: 38px; height: 38px; }
header.top .brand { font-weight: 700; font-size: 17px; white-space: nowrap; }
header.top .brand small { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 6px; }
header.top nav { display: flex; gap: 4px; margin-left: 18px; flex-wrap: wrap; }
header.top nav a { padding: 6px 12px; border-radius: 6px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
header.top nav a.on, header.top nav a:hover { background: var(--panel2); color: var(--text); }
header.top .who { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
main { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }
h2 { margin: 0 0 16px; font-size: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.empty { color: var(--muted); text-align: center; padding: 40px 10px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
td.mono { font-family: ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; }
@media (max-width: 700px) {
  header.top { flex-wrap: wrap; }
  header.top nav { margin-left: 0; order: 3; width: 100%; }
}

/* ---------- étape 2 : opérations ---------- */
.bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.bar h2 { margin: 0; }
.bar > .btn, .bar > .calnav { margin-left: auto; }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 6px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; border: 1px solid var(--line); }
.tabs a.on { background: var(--panel2); color: var(--text); border-color: var(--blue); }
.tabs small { opacity: .7; }
.oplist { display: flex; flex-direction: column; gap: 10px; }
.op { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.glogo { width: 44px; height: 44px; border-radius: 8px; object-fit: contain; flex: none; background: var(--panel2); }
.gtext { display: inline-grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--gold); background: var(--panel2); border-radius: 8px; }
.glogo.gtext { width: 44px; height: 44px; }
.op-main { flex: 1; min-width: 0; }
.op-title { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.op-title a { color: var(--text); text-decoration: none; }
.op-title a:hover { text-decoration: underline; }
.op-sub { color: var(--muted); font-size: 13px; }
.op-act { display: flex; gap: 6px; flex: none; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.muted { color: var(--muted); font-size: 13px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.st-draft { background: #2c3a52; color: #c3d0e6; }
.st-sched { background: #4a3b12; color: var(--gold); }
.st-pub { background: #173d2a; color: #6ee7a0; }
.st-cancel { background: #4a1a1d; color: #ff9aa1; }
.form .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.form .full { grid-column: 1 / -1; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form label small { opacity: .7; }
.games { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.game { display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; color: var(--text); font-size: 14px; }
.game input { display: none; }
.game img, .game .gtext { width: 30px; height: 30px; border-radius: 6px; object-fit: contain; font-size: 11px; }
.game:has(input:checked) { border-color: var(--blue); background: var(--panel2); box-shadow: 0 0 0 1px var(--blue); }
.radios { display: flex; gap: 16px; margin: 4px 0 8px; }
.radios label { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--text); font-size: 14px; cursor: pointer; }
.radios input { width: auto; }
textarea { resize: vertical; }
.imgbox { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.imgbox img { max-width: 280px; max-height: 160px; border-radius: 6px; border: 1px solid var(--line); }
.imgbox input[type=file] { width: auto; margin-bottom: 8px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.actions .spacer { flex: 1; }
button.danger, .btn.danger { color: #ff9aa1; border-color: #6b2a2f; }
.foot { color: var(--muted); font-size: 12px; margin: 14px 0 0; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 50; padding: 10px 16px; border-radius: 8px; background: #173d2a; color: #d6ffe6; box-shadow: 0 6px 20px rgba(0,0,0,.4); font-weight: 600; }
.toast.bad { background: #4a1a1d; color: #ffd6d9; }
.calnav { display: flex; align-items: center; gap: 8px; }
.calnav strong { min-width: 150px; text-align: center; text-transform: capitalize; }
.legend { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-h { text-align: center; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; padding: 4px 0; }
.cal-day { min-height: 96px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 4px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.cal-day.out { opacity: .4; }
.cal-day.today { border-color: var(--gold); }
.cal-n { font-size: 12px; color: var(--muted); font-weight: 700; }
.cal-op { display: block; padding: 2px 5px; border-radius: 4px; font-size: 12px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-op.past { opacity: .5; }
@media (max-width: 760px) {
  .form .grid { grid-template-columns: 1fr; }
  .op { flex-wrap: wrap; }
  .op-act { width: 100%; }
  .cal-day { min-height: 64px; }
  .cal-op { font-size: 10px; }
}
