/* Dates FormÉcoute — charte : bleu foncé #082748, bleu clair #33506f, or #c08b49 */
:root {
  --navy: #082748;
  --slate: #33506f;
  --gold: #c08b49;
  --gold-soft: #f3e6d4;
  --paper: #f7f4ef;
  --line: #e2dcd2;
  --muted: #7a8799;
  --yes: #1f6b4a;  --yes-bg: #ddefe4;
  --maybe: #8a5a1f; --maybe-bg: #f6e8d3;
  --no: #9b3a3a;   --no-bg: #f5e1df;
  --radius: 6px;
  --sans: "DejaVu Sans", Verdana, "Segoe UI", Arial, sans-serif;
  --serif: "FreeSerif", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; background: var(--paper); color: var(--navy); font-family: var(--sans); line-height: 1.55; display: flex; flex-direction: column; min-height: 100vh; }
a { color: var(--slate); }
a:hover { color: var(--gold); }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
main.wrap { flex: 1; padding-top: 28px; padding-bottom: 48px; }

/* En-tête */
.top { background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(8,39,72,.03); }
.top::before { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--navy) 0 70%, var(--gold) 70%); }
.top-in { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand img { height: 52px; width: auto; display: block; }
.app-name { border-left: 1px solid var(--line); padding-left: 18px; line-height: 1.1; }
.app-name span { display: block; font-size: 1.25rem; font-weight: bold; letter-spacing: .04em; text-transform: uppercase; color: var(--navy); }
.app-name em { font-family: var(--serif); color: var(--gold); font-size: 1.05rem; }
.nav { margin-left: auto; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.nav a, .nav .linklike { color: var(--slate); text-decoration: none; font-size: .93rem; }
.nav a:hover, .nav .linklike:hover { color: var(--gold); }

/* Pied */
.foot { background: var(--navy); color: #c9d3df; font-size: .82rem; padding: 16px 0; }
.foot a { color: #fff; }
.foot em { font-family: var(--serif); color: #e3c49c; }

/* Titres */
h1 { font-size: 1.6rem; margin: 0 0 .4em; color: var(--navy); line-height: 1.25; }
h2 { font-size: 1.1rem; margin: 0 0 .8em; color: var(--navy); }
.lead { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--slate); }
.small { font-size: .85rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.crumbs { margin: 0 0 8px; font-size: .9rem; }
.crumbs a { text-decoration: none; }

/* Cartes */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 22px; }
.card.narrow { max-width: 460px; margin: 20px auto; }
.narrow-left { max-width: 560px; }
.card.empty { text-align: center; color: var(--muted); }
.table-card { padding: 0; overflow: hidden; }
.danger-zone { border-color: #e9c9c6; }
.danger-zone h2 { color: var(--no); }
.num { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; align-items: center; justify-content: center; font-size: .85rem; margin-right: 6px; }
.head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.head-row h1, .head-row h2 { margin-bottom: 0; }
.stack > .card { margin-bottom: 18px; }

/* Formulaires */
label { display: block; margin-bottom: 14px; font-size: .9rem; color: var(--slate); font-weight: bold; }
input, textarea, select { display: block; width: 100%; margin-top: 5px; padding: 9px 11px; font: inherit; font-weight: normal; color: var(--navy); background: #fff; border: 1px solid #cfc7ba; border-radius: 4px; }
input:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
input[type=checkbox], input[type=radio] { display: inline-block; width: auto; margin: 0 6px 0 0; accent-color: var(--navy); }
label.check { font-weight: normal; display: flex; align-items: center; color: var(--navy); }
.inline-label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: normal; }
.inline-label input { display: inline-block; width: auto; margin: 0; }
input.code { font-size: 1.6rem; letter-spacing: .35em; text-align: center; font-family: monospace; }
code { background: var(--gold-soft); padding: 1px 5px; border-radius: 3px; font-size: .88em; }
code.secret { display: inline-block; margin-top: 6px; font-size: 1rem; letter-spacing: .08em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
form.inline { display: inline; }
.inline-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.actions { display: flex; gap: 12px; align-items: center; }

/* Boutons */
.btn { display: inline-block; background: var(--navy); color: #fff; border: 1px solid var(--navy); padding: 9px 18px; border-radius: 4px; font: inherit; font-weight: bold; text-decoration: none; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--slate); color: #fff; }
.btn-lg { padding: 12px 26px; font-size: 1.05rem; }
.btn-gold { background: var(--gold); border-color: var(--gold); }
.btn-gold:hover { background: #a9773a; }
.btn-ghost { background: #fff; color: var(--navy); border-color: #cfc7ba; }
.btn-ghost:hover { background: var(--gold-soft); color: var(--navy); }
.btn-danger { background: var(--no); border-color: var(--no); }
.btn-danger:hover { background: #7d2c2c; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.linklike { background: none; border: 0; padding: 0; color: var(--slate); font: inherit; font-size: .85rem; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linklike:hover { color: var(--gold); }
.linklike.danger { color: var(--no); }
.icon { background: #fff; border: 1px solid #cfc7ba; border-radius: 4px; width: 38px; height: 38px; cursor: pointer; color: var(--slate); font-size: 1rem; }
.icon:hover { background: var(--gold-soft); }
.row-actions { white-space: nowrap; }
.row-actions > * + * { margin-left: 10px; }
.row-actions .linklike + .linklike { margin-left: 10px; }

/* Alertes */
.alert { padding: 11px 15px; border-radius: 4px; margin-bottom: 16px; border-left: 4px solid; background: #fff; }
.alert-ok { border-color: var(--yes); background: var(--yes-bg); }
.alert-err { border-color: var(--no); background: var(--no-bg); }
.alert-warn { border-color: var(--gold); background: var(--gold-soft); }
.alert-info { border-color: var(--slate); background: #e6ecf3; word-break: break-word; }

/* Étiquettes */
.tag { display: inline-block; font-size: .72rem; font-weight: bold; padding: 2px 8px; border-radius: 20px; vertical-align: middle; letter-spacing: .02em; }
.tag-open { background: var(--yes-bg); color: var(--yes); }
.tag-closed { background: #e6ecf3; color: var(--slate); }
.tag-warn { background: var(--gold-soft); color: var(--maybe); }
.tag-muted { background: #eee; color: var(--muted); }
.tag-gold { background: var(--gold); color: #fff; }

/* Onglets */
.tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--slate); border-bottom: 3px solid transparent; margin-bottom: -1px; font-size: .92rem; }
.tabs a.on { border-color: var(--gold); color: var(--navy); font-weight: bold; }

/* Listes */
table { border-collapse: collapse; width: 100%; }
table.list th, table.list td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list thead th { background: var(--navy); color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; font-weight: bold; }
table.list tbody tr:hover { background: #fbf8f3; }
table.list tr.past td { color: var(--muted); }
table.list tr.past .ptitle { color: var(--muted); }
.chk { width: 36px; }
.ptitle { font-weight: bold; color: var(--navy); text-decoration: none; }
.ptitle:hover { color: var(--gold); }
.meter { display: inline-block; width: 60px; height: 6px; background: var(--line); border-radius: 3px; vertical-align: middle; overflow: hidden; margin-right: 4px; }
.meter span { display: block; height: 100%; width: 0; background: var(--gold); }
.bulk-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px; background: #fbf8f3; border-top: 1px solid var(--line); }
.bulk-bar .sep { flex: 1; }
.table-card > .small { padding: 0 14px 12px; margin: 0; background: #fbf8f3; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stats div { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: var(--radius); padding: 12px 16px; }
.stats strong { display: block; font-size: 1.6rem; color: var(--navy); }
.stats span { font-size: .82rem; color: var(--muted); }

/* Créneaux (saisie) */
.slots { margin-bottom: 12px; }
.slot-row, .slot-head { display: grid; grid-template-columns: 170px 110px 110px 1fr 38px 38px; gap: 8px; margin-bottom: 8px; }
.slot-head { margin-bottom: 4px; font-size: .78rem; color: var(--muted); font-weight: bold; text-transform: uppercase; letter-spacing: .04em; }
.slot-row input { margin: 0; }
.slot-list { padding-left: 18px; }
.slot-list li { margin-bottom: 4px; }
.slot-list form { margin-left: 8px; }
details.more { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 14px; }
details.more summary { cursor: pointer; color: var(--slate); font-weight: bold; margin-bottom: 10px; }
.steps { padding-left: 20px; }
.qr { display: flex; justify-content: center; margin: 10px 0; }
.qr svg { border: 1px solid var(--line); border-radius: 4px; }

/* Page invité */
.hero { border-left: 4px solid var(--gold); padding: 4px 0 4px 18px; margin-bottom: 20px; }
.hero .hello { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 1.2rem; margin: 0; }
.hero h1 { font-size: 1.9rem; margin: 2px 0 6px; }
.hero .where { margin: 0 0 6px; color: var(--slate); }
.hero .desc { color: var(--slate); max-width: 720px; }
.intro { color: var(--slate); }
.c-yes { color: var(--yes); } .c-maybe { color: var(--maybe); } .c-no { color: var(--no); }
.vote { padding: 0; overflow: hidden; }
.vote-actions { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--line); background: #fbf8f3; flex-wrap: wrap; }

/* Tableau des réponses */
.grid-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.grid { width: auto; min-width: 100%; font-size: .9rem; }
table.grid th, table.grid td { border: 1px solid var(--line); padding: 8px 10px; text-align: center; position: relative; }
table.grid .who { text-align: left; position: sticky !important; left: 0; background: #fff; z-index: 1; min-width: 150px; max-width: 220px; font-weight: bold; }
table.grid .who .em { display: block; font-weight: normal; font-size: .75rem; color: var(--muted); }
table.grid thead th { background: var(--navy); color: #fff; font-weight: normal; vertical-align: bottom; }
table.grid thead th.who { background: var(--navy); color: #fff; }
table.grid thead th.slot { min-width: 96px; }
table.grid thead th.best { background: var(--gold); }
table.grid thead .d { display: block; font-weight: bold; white-space: nowrap; }
table.grid thead .t { display: block; font-size: .78rem; opacity: .9; }
table.grid thead .h { display: block; font-size: .9rem; font-weight: bold; color: #f1d9b8; margin-top: 2px; }
table.grid thead th.best .h { color: #fff; }
table.grid thead th.final { background: var(--yes); }
table.grid thead th.final .h { color: #fff; }
table.grid tr.mine th.who, table.grid tr.mine td { background: #fdf9f2; }
td.v-yes { background: var(--yes-bg); color: var(--yes); font-weight: bold; }
td.v-maybe { background: var(--maybe-bg); color: var(--maybe); }
td.v-no { background: var(--no-bg); color: var(--no); }
td.none { color: #c3bbb0; }
table.grid tfoot th, table.grid tfoot td { background: #f2eee7; font-weight: bold; }
table.grid tfoot td.best { background: var(--gold-soft); }
.ty { color: var(--yes); } .tm { color: var(--maybe); font-size: .8rem; margin-left: 3px; }
.star { color: var(--gold); margin-left: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
td.edit { padding: 6px; vertical-align: top; }
.pick { display: block; margin: 0 0 4px; font-weight: normal; cursor: pointer; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick span { display: block; padding: 5px 6px; border: 1px solid #d8d0c3; border-radius: 4px; font-size: .78rem; color: var(--muted); background: #fff; white-space: nowrap; transition: all .12s; }
.pick:hover span { border-color: var(--slate); }
.pick input:focus-visible + span { outline: 2px solid var(--gold); }
.pick-yes input:checked + span { background: var(--yes); border-color: var(--yes); color: #fff; font-weight: bold; }
.pick-maybe input:checked + span { background: var(--gold); border-color: var(--gold); color: #fff; font-weight: bold; }
.pick-no input:checked + span { background: var(--no); border-color: var(--no); color: #fff; font-weight: bold; }
.legend { font-size: .82rem; color: var(--muted); }
.legend span { display: inline-block; min-width: 26px; text-align: center; padding: 1px 6px; border-radius: 3px; margin: 0 2px 0 10px; }
.legend span:first-child { margin-left: 0; }
.legend .v-yes { background: var(--yes-bg); color: var(--yes); }
.legend .v-maybe { background: var(--maybe-bg); color: var(--maybe); }
.legend .v-no { background: var(--no-bg); color: var(--no); }
.legend .star { background: none; }

@media (max-width: 720px) {
  .app-name { display: none; }
  .nav { margin-left: 0; width: 100%; gap: 14px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .slot-row { grid-template-columns: 1fr 1fr; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .slot-row input[type=date], .slot-row input[name="slot_label[]"] { grid-column: span 2; }
  .slot-row .icon { width: 100%; }
  .slot-head { display: none; }
  .cols { grid-template-columns: 1fr; }
  .hero.with-logo { flex-direction: column-reverse; }
  .final-banner { flex-direction: column; align-items: flex-start; }
  table.list { font-size: .85rem; }
  table.list th, table.list td { padding: 8px; }
  .hero h1 { font-size: 1.5rem; }
}

/* 1.1.0 */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.btn-sm { padding: 6px 12px; font-size: .88rem; }
.nowrap { white-space: nowrap; }
.wide-install { max-width: 560px; }
.wizard { display: flex; gap: 6px; list-style: none; padding: 0; margin: 10px 0 20px; }
.wizard li { flex: 1; font-size: .82rem; color: var(--muted); border-bottom: 3px solid var(--line); padding-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.wizard li span { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--slate); align-items: center; justify-content: center; font-weight: bold; font-size: .75rem; }
.wizard li.on { color: var(--navy); font-weight: bold; border-color: var(--gold); }
.wizard li.on span { background: var(--gold); color: #fff; }
.wizard li.done span { background: var(--yes); color: #fff; }
.checks { list-style: none; padding: 0; columns: 2; font-size: .85rem; margin: 0 0 16px; }
.checks .ok { color: var(--yes); } .checks .ko { color: var(--no); font-weight: bold; }
.image-field { border: 1px dashed #cfc7ba; border-radius: var(--radius); padding: 14px; background: #fcfaf6; }
.image-field label { margin-bottom: 8px; }
.img-preview img { max-height: 90px; max-width: 260px; display: block; margin: 4px 0 8px; border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 4px; }
.group-picks { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.pill { border: 1px solid #d8d0c3; border-radius: 20px; padding: 4px 12px; margin: 0; background: #fff; font-size: .88rem; cursor: pointer; }
.pill:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.title-with-logo { display: flex; align-items: center; gap: 16px; }
.poll-logo { max-height: 64px; max-width: 160px; border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 4px; }
.mini-logo { height: 22px; max-width: 60px; vertical-align: middle; margin-right: 8px; object-fit: contain; }
.final-banner { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--gold-soft); border-left: 5px solid var(--gold); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 22px; }
.final-banner strong { display: block; font-size: 1.25rem; color: var(--navy); }
.final-banner .small { color: var(--maybe); text-transform: uppercase; letter-spacing: .05em; font-weight: bold; }
.retain { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.retain h3 { font-size: 1rem; margin: 0 0 10px; }
.retain select { width: auto; max-width: 100%; margin: 0; }
.retain .check { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters label { margin: 0; flex: 1; min-width: 140px; }
.table-head { padding: 12px 14px; font-size: .85rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.table-card .empty { padding: 20px; text-align: center; }
.pager { display: flex; justify-content: center; gap: 20px; padding: 12px; font-size: .9rem; }
table.journal { table-layout: fixed; }
table.journal th:nth-child(1) { width: 170px; } table.journal th:nth-child(2) { width: 230px; } table.journal th:nth-child(3) { width: 210px; }
table.journal td { vertical-align: top; overflow-wrap: anywhere; }
@media (max-width: 720px) { table.journal { table-layout: auto; min-width: 640px; } }
table.journal .tag { margin-right: 4px; }
.codes { columns: 2; font-size: 1.15rem; padding-left: 26px; }
.codes li { margin-bottom: 8px; }
.codes code { font-size: 1.05rem; letter-spacing: .08em; }
input.code-rec { letter-spacing: .15em; font-size: 1.3rem; }
code.cmd { display: block; padding: 10px; word-break: break-all; margin-bottom: 12px; }
.hero.with-logo { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.hero-logo { max-height: 110px; max-width: 240px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.deadline { color: var(--maybe); }
@media print {
  .top, .foot, .no-print, .nav { display: none !important; }
  body { background: #fff; }
  .card { border: 0; }
}
